query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
TODO Autogenerated constructor stub
public static HashData createNew() { return new HashData(); }
[ "@Override\n }", "@Override\r\n\tpublic void init() {\n\t \r\n\t}", "private O()\r\n {\r\n super();\r\n }", "@Override\n protected void init()\n {\n\n }", "@Override\n \tpublic void init() {\n \n \t}", "public Innlegg() {\n\t\t\n\t}", "public Loto649(){\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A helper method to create and add an element with a text value if and only if that text value is not null. For long lists of optional simple elements, this method is ideal.
private Element addElementNS(Element parent, String nsUrl, String qname, String textValue) { if (textValue != null) { Element el = parent.getOwnerDocument().createElementNS(nsUrl, qname); el.appendChild(parent.getOwnerDocument().createTextNode(textValue)); parent.appendChild(...
[ "private void addElement(Element parent, String value, String elementName) {\n if(!\"\".equals(value) && parent.getChild(elementName) == null) {\n parent.addContent(new Element(elementName).setText(value));\n }\n }", "public static void createNullableText(Node parent, String name, String text) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 DecimalShift = 2 [default = 1000];
public boolean hasDecimalShift() { return ((bitField0_ & 0x00000002) == 0x00000002); }
[ "public void setSourceOffsetDec(double in) { this.sourceOffsetDec = in; }", "public static int offset_power() {\n return (0 / 8);\n }", "void setDecimal(int d);", "protected int snapBits(){return 9;}", "public long shiftDownOverflow(){\n long overflow = field << 56;\n field >>>= 8;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ (Utility Method) Get yymmddHHMMss Value String.
public static String getYymmddhhmm(byte[] time) throws Exception { StringBuffer b = new StringBuffer(); StringBuffer sb = new StringBuffer(); char c = 0x00; if(time.length < 6) { throw new Exception("Length Error"); } try { for(int i = 0;i<time.length; i++){ ...
[ "protected String getTime()\n {\n SimpleDateFormat formatter = new SimpleDateFormat( \"ddMMyyyyHHmmss\" );\n Date date = new Date();\n return formatter.format( date );\n\n }", "private String getTime() {\n\t\tCalendar cal = new GregorianCalendar();\n\t\t\n\t\t// Hour, Minute, Second\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 currency_type = 3;
public boolean hasCurrencyType() { return ((bitField0_ & 0x00000004) == 0x00000004); }
[ "public void setPreferredCurrency(typekey.Currency value);", "public void setReinsuranceCurrency(typekey.Currency value);", "static int getCurrencyIdx() { return currencyIdx; }", "public String getPaymentCurrency();", "public interface CLIENT_PROTOCOL_POLICY_TYPE {\n int value = 43;\n}", "service.Curre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internally managed dictionaries cannot be null.
@Test public void nullWrappedDictionary() { try { cut = new ThreeTieredNodeDictionary( randomString(), null, localNamesDictionary, bnodesAndLiteralsDictionary); fail(); } catch (final IllegalArgumentException expected) { // Nothing, this is the expected behaviour } try { c...
[ "public Dictionary() {\r\n dict = new HashSet<String>();\r\n }", "private static Map<Object,Object> getEmptyMap() {\n\n\t\tswitch (counter++ % 4) {\n\t\tcase 0:\n\t\t\treturn new Hashtable<Object,Object>();\n\t\tcase 1:\n\t\t\treturn new HashMap<Object,Object>();\n\t\tcase 2:\n\t\t\t//return new LinkedHashMap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
source over rules plus blend fs = 1 fd = (1as) cd = csfs + cdfd ad = asfs + adfd alpha is increases as a funtion of pa and pb channel delta mean
public static int compositeSrcOverBlend(int _s, int _d, float _alpha) { float as = ((_s >> 24) & 0xFF) / 255f; float rs = ((_s >> 16) & 0xFF) / 255f; float gs = ((_s >> 8) & 0xFF) / 255f; float bs = ((_s) & 0xFF) / 255f; float ad = ((_d >> 24) & 0xFF) / 255f; float rd =...
[ "private static int blend_multiply(int dst, int src) {\n int a = src >>> 24;\n\n int s_a = a + (a >= 0x7F ? 1 : 0);\n int d_a = 0x100 - s_a;\n\n int d_gn = dst & GN_MASK;\n\n int f_r = (dst & RED_MASK) >> 16;\n int f_b = (dst & BLUE_MASK);\n\n int rb =\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the marker for the specified position
public MapMarkerViewModel getMarkerForPosition(int position) { return markers.get(position); }
[ "Optional<String> marker();", "@NonNull\r\n LatLng getPosition();", "public Spot getSpot(final Position position) {\r\n\t\treturn board.get(position.getRow(), position.getColumn());\r\n\t}", "public LatLng getMarkerLocation()\n {\n double latitude = getDouble(getColumnIndex(MarkerTable.Cols.LAT))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test method for default value setting and getValue().
public void testDefaultAndGetValue() { PropertyChoice prop = this.createChoiceProperty( "<property name=\"test\" enum=\"org.rapidbeans.domain.org.Sex\"" + " default=\"female\"/>"); assertEquals(1, prop.getValue().size()); assertSame(Sex.female, prop.getValue().get(0)); }
[ "protected abstract void setDefaultValue();", "@Test\r\n public void testGetValue() {\r\n assertTrue(instance.getValue() == 94);\r\n }", "@Test void assignValue() {\n\t\tvar config = new ConfigDummyA();\n\n\t\tConfigGenerator.assignValue(config, \"valueChar\", 'b');\n\t\tassertEquals('b', config.va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected / renamed from: a
public final void mo18092a() { try { ThreadPoolExecutor threadPoolExecutor = this.f7330b; C3106a aVar = new C3106a(2, 0, null, null, null); threadPoolExecutor.execute(aVar); } catch (Throwable unused) { } }
[ "protected void a() {}", "protected void a()\n\t{\n\t\tsuper.a();\n\t}", "protected void method_5557() {}", "protected abstract void mo3493a();", "@Override\n\tpublic void aamir() {\n\n\t}", "private void a() {\n }", "@Override\r\n\tpublic void a2() {\n\t\t\r\n\t}", "@Override\r\n public void pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor A constructor that doesn't take any arguments; initializes the elevator with zero passengers, first floor position, and a direction of UP.
public Elevator() { System.out.println("Initializing elevator...\n"); this.passengers=0; this.floor= 1; this.direction= UP; }
[ "public elevator() {\r\n\t\tthis.goingUp = new ArrayList<Integer>();\r\n\t\tthis.goingDown = new ArrayList<Integer>();\r\n\t\twait = new Thread();\r\n\t\tthis.FillAscendingFloor();\r\n\t\tthis.FillDescendingFloor();\r\n\t\t\r\n\t}", "Elevator(Building building, int elevatorCapacity) {\n\n CAPACITY = elevat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface contenant uniquement des declarations de methode a implementer
public interface IService { public List<Etudiant> lectureServiceEtudiant(); public int enregistrerServiceEtudiant(Etudiant ed); }
[ "public interface a {\n void a(int i, String str);\n\n void b(int i, String str);\n\n void c(int i, String str);\n\n void d(int i, String str);\n\n void e(int i, String str);\n }", "public interface ExerciseInterface\n{\n\n\n void MethodA(String sParam, int add1, int add2);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Moves piece to neighbor cell
protected void goUp() { y -= CELL_SIZE; }
[ "void movePiece(Location from, Location to);", "public void move() // player chooses cell by clicking on it\r\n\t{\r\n\t}", "public void jump() {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location nextFirst = loc.getAdjacen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
No args constructor for use in serialization
public FeedbackModel() { }
[ "private Serializer() {\n }", "public BPlusTree() {\n //Pedro -- I need an empty constructor to Jgroups deserialize the object\n }", "public User() {\n //no arg constructor for serializable\n }", "private NonSerializables() {\n\t}", "private SerializationUtils() {\n throw new E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the first clause and adds another clause
public void replaceFirstAddLast(PropositionalSentence clause) { if(!hasClause(clause)) { this.remove(getFirstClause()); add(clause); } }
[ "public void testClearClause()\r\n\t{\r\n\t\tClause clause1 = new Clause();\r\n\t\tLiteral onet = new Literal(1);\r\n\t\tLiteral twot = new Literal(2);\r\n\t\tLiteral threet = new Literal(3);\r\n\t\tclause1.add(onet);\r\n\t\tclause1.add(twot);\r\n\t\tclause1.add(threet);\r\n\t\tclause1.clearClause();\r\n\t\tassertT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This value remainPower is change every single min/hr
public VehicleInstance(T vehicle, double remainPower) { this.vehicle = vehicle; this.remainPower = remainPower; }
[ "@Override\n public void charge() {\n remainingPower++;\n }", "public void updateCurrentPower() {\n double absDesPower = abs(desiredPower);\n if (parent.getTargetPosition() == parent.getCurrentPosition() && parent.getMode() == DcMotorController.RunMode.RUN_TO_POSITION) {\n de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
same as floor excepts rounds up
public static Node ceil(LinkedList[] skiplist, String key) { Node result = null; Node current = skiplist[9].getFirst(); String currentKey = current.getData().getKey(); while (current != null) { currentKey = current.getData().getKey(); if (compareKeys(key, currentK...
[ "private static int fastfloor(double x)\n\t{\n\t\treturn x > 0 ? (int) x : (int) x - 1;\n\t}", "@Override\n public long roundHalfCeiling(long instant) {\n return roundFloor(instant);\n }", "public static double floor(double paramDouble) {\n/* 442 */ return StrictMath.floor(paramDouble);\n/* ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get Name of the user logged in
@Override public void success(Result<User> userResult) { mName = userResult.data.name; mPhotoUrlOriginalSize = userResult.data.profileImageUrl.replace("_normal", ""); //Save these data to be passed to Another Activity. Data.putString("ProfileP...
[ "public String getName() {\r\n return um.getLoggedUser().getName();\r\n }", "default String getUserName() {\n return getUser().getName();\n }", "public String getName()\n {\n User user = userManager.getLoggedUser();\n if(user==null) return \"Error! User not logged in!\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This test looks to see if the links/tabs on the Hello page are correct.
@Test public void testVerifyHelloPageLink() throws Exception { driver.get(baseUrl + "/hello"); assertEquals("CS1632 D3 Home", driver.findElement(By.linkText("CS1632 D3 Home")).getText()); assertEquals("Factorial", driver.findElement(By.linkText("Factorial")).getText()); assertEquals(...
[ "@Test\n public void testHeaderLinksHelloPage() throws Exception{\n WebElement w = driver.findElement(By.linkText(\"Hello\"));\n w.click(); \n try{\n driver.findElement(By.linkText(\"CS1632 D3 Home\"));\n driver.findElement(By.linkText(\"Factorial\"));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up the simulation and starts the GUI
public void createAndShowSimulation() { Simulation s = new TransitSimulation(PCT_RFID,PCT_LUGGAGE,PCT_DELAYS); Factory pf = new PersonFactory(s, ROUTES_FILE_NAME,NUM_RIDERS); s.addFactory(pf); Factory bf = new BusFactory(s, ROUTES_FILE_NAME); s.addFactory(bf); SimulationU...
[ "public simulationGUI() {\n initComponents();\n }", "public void start() {\n controller.showGUI();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 546, 504);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
abstract implementation, only used for static method calls
private PackageRepository() { super(IPackageRepository.TYPE_ID); }
[ "protected void method_5557() {}", "public abstract void mo17847T2();", "@Override\n }", "protected abstract void mo3493a();", "public abstract class_503 method_279();", "public abstract void mo30461b();", "@Override\n public void extornar() {\n \n }", "public abstract void mo3...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__QueryPattern__Group__2__Impl" $ANTLR start "rule__QueryPattern__Group__3" InternalServiceDefinition.g:3594:1: rule__QueryPattern__Group__3 : rule__QueryPattern__Group__3__Impl rule__QueryPattern__Group__4 ;
public final void rule__QueryPattern__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalServiceDefinition.g:3598:1: ( rule__QueryPattern__Group__3__Impl rule__QueryPattern__Group__4 ) // InternalServiceDefinition.g:3599:2: rul...
[ "public final void rule__Rule__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../it.univaq.coevolution.emfmigrate.ui/src-gen/it/univaq/coevolution/emfmigrate/ui/contentassist/antlr/internal/InternalEmig.g:1955:1: ( rule__Rule__Gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Programmatically configures a Google Analytics tracker if implemented by the application's main router layout.
public interface TrackerConfigurator { /** * Configure a tracker by updating the provided configuration. * * @param configuration * the configuration to update, not <code>null</code> */ void configureTracker(TrackerConfiguration configuration); }
[ "private void initializeGa() {\n\t\tmGa = GoogleAnalytics.getInstance(this);\n\t\tmTracker = mGa.getTracker(GA_PROPERTY_ID);\n\n\t\t// Set dispatch period.\n\t\t// GAServiceManager.getInstance().setLocalDispatchPeriod(GA_DISPATCH_PERIOD);\n\n\t\t// Set dryRun flag.\n\t\tmGa.setDryRun(GA_IS_DRY_RUN);\n\n\t\t// Set L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form UPassword
public UPassword() { initComponents(); }
[ "public passwordCreator() {\r\n newPassword = \"\";\r\n }", "AdminPassword createAdminPassword();", "public void enterpasswordcreate() {\n\t\tpasswordcreateaccount.sendKeys(\"12345\");\n\t}", "public static com.google.gwt.user.client.Element createInputPassword() {\n return Document.get().createP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Zugriff auf ein abonniertes Topic.
SubscriberTopicDto getTopic(String topicUuid, String login);
[ "public void setTopic(String topic) {\n this.topic = topic;\n }", "@Override\n\tpublic String topic() {\n\t\treturn null;\n\t}", "public Topic getTopic()\n\t{\n\t\treturn topic;\n\t}", "public java.lang.CharSequence getTopic() {\n return topic;\n }", "Topic(){\n\t\tthis(-1);\n\t}", "public Top...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests checkmatemethod when King is attacked by pawn
@Test public void testCheckMateWhileAttackingPawn(){ //white can beat attacking black pawn CPD-OFF game1.chessBoard.clearBoard(); game1.chessBoard.clearBlackAlliance(); game1.chessBoard.clearWhiteAlliance(); game1.chessBoard.setPieceAt(2, 2, new King(game1.chessBoard.getSquar...
[ "public boolean checkMate(){\r\n\t\tint wKing = 0;\r\n\t\tint bKing = 0;\r\n\t\tfor(int i = 8; i >= 0; i--){\r\n\t\t\tfor(int j = 8 ; j > 0 ; j--){\r\n\t\t\t if(ChessGame.board.getBoard()[j-1][i-1] instanceof King && ChessGame.board.getBoard()[j-1][i-1].player == 1){\r\n\t\t\t\t \twKing = 1;\r\n\t\t\t\t}\r\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 132 / 210 covered goals: Goal 1. org.apache.commons.lang3.StringUtils.indexOfAny(Ljava/lang/CharSequence;Ljava/lang/String;)I: Line 1538 Goal 2. org.apache.commons.lang3.StringUtils.indexOfAny(Ljava/lang/CharSequence;Ljava/lang/String;)I: Line 1539 Goal 3. org.apache.commons.lang3.StringUtils.substrin...
@Test public void test132() throws Throwable { String string0 = StringUtils.overlay("Minimum abbreviation width with offset is 7", "Minimum abbreviation width with offset is 7", 0, 1667); int int0 = StringUtils.indexOfAny((CharSequence) "Minimum abbreviation width with offset is 7", (String) null); ...
[ "@Test\n public void test202() throws Throwable {\n String string0 = StringUtils.defaultString(\"\\\"q0GZ^F~+}|{%x0OJtt\", \"\\\"q0GZ^F~+}|{%x0OJtt\");\n int int0 = StringUtils.getLevenshteinDistance((CharSequence) \"\\\"q0GZ^F~+}|{%x0OJtt\", (CharSequence) \"\\\"q0GZ^F~+}|{%x0OJtt\");\n }", "@Test\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show project information in list and details page view after the specified delay.
private void showProjectInfo(int delay) { if (delay != 0) { Job job = new Job("") { @Override protected IStatus run(IProgressMonitor monitor) { showProjectInfo(); return new Status(Status.OK, Activator.PLUGIN_ID, ""); } }; job.setUser(false); job.schedule(delay); }...
[ "public void viewProjects() {\n\t\tString[] info = new String[10]; // String array set to store project info from lines in text file.\n\t\t\n\t\t// A file object is created and a while loop used to run through each line in the CurrentProjects.txt file.\n\t\t// Each line in the file is split, with the info stored i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void sampleLinks() { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make a working copy
public void copyImage(String source, String destination) { try { if(source.contains("jpg") || source.contains("jpeg")){ Main.mainGui.updateFeedLabel("Reading image: " + source); bufferedImage = ImageIO.read(new File(source)); Main.mainGui....
[ "public void copy() {\n\t\t\r\n\t}", "public void performCopy() {\n \t}", "Path copy();", "public Copy() { }", "public OpticsObject makeCopy();", "public void copy()\n {\n // do nothing\n }", "public void flushWorkingCopy() {\n\n }", "@Test\n public void testCopy() {\n }", "def...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: b
public List<DkCloudPurchasedFiction> m5463b() { List arrayList = new ArrayList(this.f3890c.size()); for (DkCloudPurchasedFiction dkCloudPurchasedFiction : this.f3890c.values()) { if (dkCloudPurchasedFiction.isHidden()) { arrayList.add(dkCloudPurchasedFiction); } ...
[ "public abstract T zzs(B b2);", "public void b(ByteOrder bo) {\n/* 72 */ if (this.i != bo) {\n/* 73 */ this.i = bo;\n/* 74 */ this.h = a(bo);\n/* */ } \n/* */ }", "public void doSth(B b){\n\n }", "public abstract void mo14156a(B b, int i, int i2);", "@Override\n\tpublic v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints out the Student's highest HW grade
public void printHighestQuizGradeForStudent(int ID){ Vector<Integer> quizIndexes = new Vector<Integer>(); for(int i = 0;i<values.size();i++) if(values.get(i) == 1) quizIndexes.addElement(i); int high = (gradebook.get(ID)).get(quizIndexes.get(0)); for(int i=1;i<(gradebook.get(ID)).size();i...
[ "public void bestGrade() {\r\n float max = students.get(0).getGrade();\r\n for (int i = 1; i < students.size(); i++) {\r\n if (max < students.get(i).getGrade()) {\r\n max = students.get(i).getGrade();\r\n }\r\n\r\n }\r\n System.out.println(\"\\nbest g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method for saving an entity object in a new transaction.
private void persist(Object entity) { helper.persist(entity, true); }
[ "public T save(T entity) {\n entityManager.getTransaction().begin();\n entityManager.persist(entity);\n entityManager.getTransaction().commit();\n log.info(\"Saved entity with: {}\", entity);\n return entity;\n }", "@Override\n\tpublic Serializable save(T entity) {\n\t\treturn factory.getCurrentSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Moves the rifshape
public void move(int dx, int dy){ x += dx; y += dy; }
[ "private void rotateRight() {\n int index = 0;\n for (Integer i : shape) {\n if (currShape == ShapeEnum.I_SHAPE) {\n if (i == 7)\n shape.set(index, (i + 2) % 8);\n else\n shape.set(index, (i + 2) % 11);\n } else\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the index of the nth occurrence of str in the current phrase; returns 1 if the nth occurrence does not exist. Precondition: str.length() > 0 and n > 0 Postcondition: the current phrase is not modified.
public int findNthOccurrence(String str, int n) { int count = 0; // number of times str has been found int loc = currentPhrase.indexOf(str); // last place where str was found while(loc != -1 && count < n) { count++; if (count == n) { ...
[ "private static int nthOccurrenceOf(String str, String substr, int n) {\r\n\t int pos = str.indexOf(substr);\r\n\t while (--n > 0 && pos != -1) {\r\n\t pos = str.indexOf(substr, pos + 1);\r\n\t }\r\n\t return pos;\r\n\t}", "private int nthOccurrence(String str, char c, int n) {\n\t\tint pos = s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Resource Adapter'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseResourceAdapter(ResourceAdapter object) { return null; }
[ "public ResourceAdapter getResourceAdapter() {\n return this.resourceAdapter;\n }", "public IResource getResource(Object obj) {\n \t\treturn (IResource)TeamAction.getAdapter(obj, IResource.class);\n \t}", "public T caseLPResource(LPResource object) {\r\n\t\treturn null;\r\n\t}", "public @Nullable Re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class Canton1
public Canton1(String canton) { // initialise instance variables this.canton = canton; persona = new ArrayList<Persona>(); this.promedioTotal=0; this.promedioM=0; this.promedioH=0; this.porcentajePersona=0; }
[ "public Croyant(){\r\n\t\tsuper();\r\n\t}", "public Donjon(){\n super();\n }", "public EjemploClase1(){\n\t\t// llamada al constructor del padre\n\t\tsuper();\n\t}", "public DoctorC() {}", "public Citas() {\n }", "public Coeur(){\r\n\r\n }", "private SingleObjectPt2() {}", "private Sin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fill handle with a null value
void clear();
[ "public void setNull()\n {\n this.type = ValueType.NULL;\n this.number = 0;\n this.object = null;\n }", "public void reset(){\n\t\tput(\"null\");\n\t}", "protected Nullable(final long nativeHandle, final Object dummy) {\n super(nativeHandle, new Disposer() {\n @Overr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Like save(Like like) { return likeRepository.save(like); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String used for printing the RIB
public String distString() { String ret; if(cost == 0) { ret = String.format("%s", "Local, 0"); } else if (cost == Integer.MAX_VALUE) { ret = String.format("%s", "None, INF"); } else {...
[ "@Override\n public String toString() {\n return rbt.toString();\n }", "public void printRBT() {\n rbt.display();\n }", "public Text printToString()\n\t{\n\t\tText result=new Text(this.nodeId +\"_\"+outlinkList.toString() +\"_\"+this.pagerank);\n\t\treturn result;\n\t}", "public String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Two level fog manager.
public TwoLevelFogManager() { executorService = Executors.newCachedThreadPool(); }
[ "void addFog() {\n\tif (fog != null) {\n\t Fog fogNode = fog.getObjectNode();\n\t if (fogNode != null) {\n\t\tsceneGroupNode.addChild(fogNode);\n\t\tscene.addFogNode(fogNode);\n\t }\n\t}\n }", "@Override\n\tprotected void createFogDevices() {\n\t\t// Create the movement for the cloud\n\t\tMovement mov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method creates fills VBoxes for field to hit in a cricket game,
private void fillFieldsToThrowVBox() { for (int i = 0; i < 7; i++) { Label label = (Label) boardController.getCricketsFields().getChildren().get(i); label.setText(String.valueOf(Cricket.getFieldsToThrow().get(i))); } }
[ "void createBoxes() {\n\t\tfor (int i = 0; i < puzzle.length(); i++) {\n\t\t\tJLabel textField = new JLabel(\"_\");\n\t\t\tboxes.add(textField);\n\t\t\tpanel.add(textField);\n\t\t}\n\t}", "public void initializeVBoxes() {\n\t\tdiceVBox = new VBox(15); // Dice tab\n\t\tdetailsVBox = new VBox(30); // Details tab\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the plugin is loaded.
public abstract void onLoad();
[ "@Override\n public void pluginInitialize() {\n }", "@Override\n public void postInitPlugin() throws Exception {\n\n }", "public void onEnable(){\n\t\tPluginManager pm = getServer().getPluginManager();\n\t\tinstance = this;\n\t\t\n\t\tpm.registerEvents(new CartBlockListener(), this);\n\t\tpm.registe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string from a property file, with underlined access key. Access key can be specified in the label by &amp: character following character in the label that is to serve as access key It uses 'name' as a the key to retrieve from the webapp.properties file.
public static String getLabel(String name, HttpServletRequest request) { String property = WebappResources.getString(name, UrlUtil.getLocaleObj( request, null)); if (property == null || property.length() <= 0) { return property; } int amp = property.indexOf('&'); if (amp <0 || amp >= property.le...
[ "private String getStringSubProperty(String name, String def) {\n if (name.contains(\".\")) {\n\n String[] splits = name.split(\"\\\\.\");\n if (splits.length > 1 && hasProperty(splits[0])) {\n\n BasicConfig sub = new BasicConfig(getMapProperty(splits[0]));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
singleton only started once
public synchronized static PendingCertCache getPendingCache( String cadnname, ServiceBroker sb) { if (thisCache == null) { try { thisCache = new PendingCertCache(cadnname, sb); } catch (Exception e) { Logger logger = LoggerFactory.getInstance().createLogger("PendingCertCache"); if...
[ "private SingletonDesignDemo(){}", "@Override\r\n public boolean isSingleton() {\n return false;\r\n }", "private Singleton() {\r\n\r\n }", "private Singleton() {\r\n }", "public void singletonOperation() {\n\t\tSystem.out.println(\"LazySingleton\");\n\t}", "private Singleton(){\n\t\tna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Robot rotates 360 degrees while calibrating the compass sensor
public void calibrateCompass() {compassPilot.calibrate();}
[ "public void RotateByRad(float deltaRadians){rotation.AddRotationRad(deltaRadians);}", "public void animateSpin()\r\n {\r\n // start with current rotation, this will increment each frame\r\n tempRotation = rotation; \r\n \r\n // where we need to end up\r\n rotation = game.getWheelRotation();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the adaptive property.
public void setAdaptive(boolean value) { this.adaptive = value; }
[ "public void setController(IAdaptiveController controller);", "public static WaterfallPlotParameters adaptiveRange(boolean adaptiveRange) {\n return new WaterfallPlotParameters(\"adaptiveRange\", adaptiveRange);\n }", "public void setvibrateSetting(boolean b) {\n\t\teditor.putBoolean(\"VIBRATESETTING\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a symbol to the list. The symbol being added must not have a keyword that clashes with another symbol in the list.
public void addAliasSymbol(AliasSymbol symbol) throws DuplicateSymbolKeywordException { assert symbol != null; if (contains(symbol.getKeyword())) throw new DuplicateSymbolKeywordException(); internalList.add(symbol); }
[ "public void addSymbol(String symbol) {\n\t\tsynchronized (list) {\n\t\t\tif (!list.contains(symbol)) {\n\t\t\t\tlist.add(symbol);\n\t\t\t}\n\t\t}\n\t}", "public boolean add(Symbol symbol)\n\t{\n\t\tif (symbols.containsKey(symbol.getName()))\n\t\t\treturn false;\n\t\tsymbols.put(symbol.getName(), symbol);\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
terminal ML_COMMENT : '/' > '/';
public TerminalRule getML_COMMENTRule() { return gaTerminals.getML_COMMENTRule(); }
[ "String comment();", "public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Users\\\\timothee\\\\Desktop\\\\Cours\\\\Année 2019-2020\\\\Semestre 7\\\\CIN\\\\TP2_DURGEAUD_TIMOTHEE\\\\TP Pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / / / / / /
private boolean passesLucasLehmer() /* */ { /* 893 */ BigInteger localBigInteger1 = add(ONE); /* */ /* */ /* 896 */ int i = 5; /* 897 */ while (jacobiSymbol(i, this) != -1) /* */ { /* 899 */ i = i < 0 ? Math.abs(i) + 2 : -(i + 2); /* */ } /* */ /*...
[ "private void calculatePaths() {\n\n\n }", "public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Router Address.
public BasicElementConfig routerAddress(String router) { return (BasicElementConfig) setOrClear(ROUTER_ADDRESS, router); }
[ "void setAddr(String addr);", "void setAddress(java.lang.String address);", "public void setAddress( String address )\r\n {\r\n _strAddress = address;\r\n }", "void setToAddress(String sToAddress);", "public void setAddress(String value)\r\n {\r\n address.setValue(value);\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public C4498hs mo42017a(long j) { this.f12261a = j; m12948a(true); return this; }
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .dstore.engine.MetaInformation meta_information = 2;
public Builder removeMetaInformation(int index) { if (metaInformationBuilder_ == null) { ensureMetaInformationIsMutable(); metaInformation_.remove(index); onChanged(); } else { metaInformationBuilder_.remove(index); } return this; }
[ "@Override\n\tpublic int getMetadata(int meta)\n {\n return meta;\n }", "public int getMetadata()\r\n/* 72: */ {\r\n/* 73: 70 */ return this.meta % 16;\r\n/* 74: */ }", "public void setMetaData(String s) { metaData=s;}", "MetaInformationOrBuilder getMetaInformationOrBuilder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column i_associ.gmt_create
public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; }
[ "@Basic\n @Column(name = \"gmtCreate\")\n public Timestamp getGmtCreate() {\n return gmtCreate;\n }", "@Override\n\tpublic void setCreateTime(java.util.Date createTime) {\n\t\t_officeSupply.setCreateTime(createTime);\n\t}", "@PrePersist\n private void setCreationDate() {\n this.created...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bloat this object so we fill the heap faster.
static InstanceMemEater allocate() { try { return new InstanceMemEater(); } catch (OutOfMemoryError e) { InstanceMemEater.sawOome = true; return null; } }
[ "private void expandHeap() {\r\n heap = copyArray();\r\n }", "private void grow() {\n\t\tint oldCapacity = elementData.length;\n\t\tint newCapacity = oldCapacity + (oldCapacity >> 1);\n\t\tObject[] expElementData = new Object[newCapacity];\n\t\tSystem.arraycopy(elementData, 0, expElementData, 0, size);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
atraves de la vista se entrega el contenido de toda la tabla, propiedad del modelo de la tabla, que debe ser casteado al tipo exclusivo creado para este dato, al que se le agrego un metodo adicional para devolver su contenido.
public float[][] getValoresTabla() { return ((TableModelMedicionTemporal) componenteTabla.getTbl_medicion().getModel()).getDatos(); }
[ "public void llenadoDeTablas() {\n\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"Codigo\");\n modelo.addColumn(\"Tipo Transaccion\");\n modelo.addColumn(\"Efecto Transaccio\");\n\n\n \n TipoTransaccionDAO TipoTDAO = new TipoTransacci...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the specific Token.
final public Token getToken(int index) { Token t = token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; }
[ "public final String getToken()\n {\n return token;\n }", "public Object getToken(){\n\treturn token;\n }", "CachedToken getToken();", "private String getToken() {\n return token;\n }", "TokenResponse getToken(String token);", "public Integer getToken() {\n return token;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///////////////////////////////////////////////////////////////////////////////////////////////// Component Lifecycle /////////////////////////////////////////////////////////////////////////////////////////////////
@Override public Props getDefaultProps() { Props p = Jso.create(); p.setStyle(new StyleProps().width("100%")); p.disabled(false); return p; }
[ "private void initComponents() {\n\t\t\t\n\t\t}", "@Override\n protected void init()\n {\n\n }", "@Override\n protected void start() {\n\n }", "@Override\n public void postInit()\n {\n\n }", "@Override\n \tpublic void onInitialise()\n \t{\n \t}", "@Override\n public void initialize(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the singleton instance of DMGeofenceDatabase.
public static synchronized DMGeofenceDatabase getInstance(Context context) { if (sInstance == null) { sInstance = Room .databaseBuilder(context.getApplicationContext(), DMGeofenceDatabase.class, "ex") .build(); // sInstance.populateInitialData(); ...
[ "public synchronized static Geofencing getInstance(Context context) {\n return GeofencingImpl.getInstance(context);\n }", "public static synchronized DB getInstance() {\n if (instance == null)\n instance = new DB();\n\n return instance;\n }", "public static Database getInst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Object createTransportKey(TransEnum transEnum) { String lastKey = null; String prefix = ""; try { lastKey = (String) this.lastTransportKeyMap.get(transEnum); int num = Integer.parseInt(lastKey.replaceFirst(prefix, "")); lastKey = prefix + (++num); } catch (Exception e) { lastKey = ...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the given group's option node to the value
public void setGroupInfoString(String world, String group, String node, String value);
[ "protected Element setOption(String elementName, String value) {\n\n Element optionsElement =\n (Element) component.getChild(\"options\");\n if (value != null) {\n String escapedValue = WorkflowFileUtils.htmlEncode(value.replace(\"\\n\", \"\").replace(\"\\r\", \"\"));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.folder, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to display summary output to console
public static void displayConsoleOutput(double subTotalPrice, String discountOutputText, double totalPrice) { // Display sub-total before any discounts are applied System.out.println("Subtotal: £" + formatValueForDecimalDisplay(subTotalPrice)); // Display any discount information System.out.println(di...
[ "public void printSummary();", "public void printSummaryInfo() {\n\t\tSystem.out.println(\"r:\\t\" + r);\n\t\tSystem.out.println(\"cs:\\t\" + cs);\n\t\tSystem.out.println(\"cmin:\\t\" + cmin);\n\t\tSystem.out.println(\"mn:\\t\" + mn);\n\t\tSystem.out.println(\"delta:\\t\" + delta);\n\t}", "public void summary()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Testing follow a user using a wrong key
@Test public void testFollowWrongKey() throws SQLException, WrongEmailFormatException, InputTooLongException, ArgumentMissingException, IOException, UserNotFoundException, PasswordWrongException, EmailAlreadyExistsException { String firstName = "Karolina"; String lastName = "Schliski"; String email = "test@we...
[ "void followUser(long userId);", "@Test\n public void userCheckFollowingTest() throws ApiException {\n String username = null;\n String target = null;\n api.userCheckFollowing(username, target);\n\n // TODO: test validations\n }", "private void followUser(Message<JsonObject> me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the main frame.
public MyPizzaShop() { super("Pizza Shop"); this.setSize(800, 600); this.setDefaultCloseOperation(EXIT_ON_CLOSE); myMenuBar = new MyMenuBar(); this.setJMenuBar(myMenuBar); Container container = this.getContentPane(); container.setLayout(new BorderLayout()); ...
[ "private static void createAndShowGUI() {\n new MainFrame();\n }", "public MainFrame() {\n\t\tcreate();\n\t\taddListeners();\n\t\tsetVisible(true);\n\t}", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void buildFrame() {\n\t\tframe.setDefaultLookAndFeelDecorated(true);\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region Implements SelectLevelInteraction
@Override public void onLevelSelected() { if (mPresenter.isPaid()) { showBoard(); } else { showAdvertising(); } }
[ "public void levelSelect() {\n\n if (canChangeToLevelSelect()) {\n Logger.info(\"Level Completed Presenter: level select\");\n audio.playSound(LDSound.SMALL_CLICK);\n screenChanger.changeToLevelSelect();\n }\n }", "@Override\n\t\t\tpublic void difficultySelected(D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a new CVC2 code for a card.
public static BunqResponse<Integer> create(Integer cardId, Map<String, String> customHeaders) { ApiClient apiClient = new ApiClient(getApiContext()); if (customHeaders == null) { customHeaders = new HashMap<>(); } HashMap<String, Object> requestMap = new HashMap<>(); byte[] requestBytes = g...
[ "CardVal1 createCardVal1();", "public Builder setCardId2(communication.protos.DataProtos.Card value) {\n if (cardId2Builder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n cardId2_ = value;\n onChanged();\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tranferer la liste de model vers la liste dto
public List<AgentDto> agentModelToAgentDto(List<AgentModel> agentModels) { List<AgentDto> agentDtos= new ArrayList<AgentDto>(); for(AgentModel agentModel:agentModels) { agentDtos.add( agentModelToAgentDto(agentModel)); } return agentDtos; }
[ "List<R> mapModelListToDtoList(List<M> models);", "@Override\r\n\tpublic List<User> dtoToModel(List<UserDTO> dtos) {\n\t\treturn dtos.stream().map(d -> dtoToModel(d)).collect(Collectors.toList());\r\n\t}", "List<Entity> fromDTOToEntity(List<DTO> dtoList);", "private List<ResultadoRegraClienteAdquirenteDTO> co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the applet window
public void draw() { background(0); fill(255); if (drone != null) { textAlign(CENTER, CENTER); text("Drone name: " + drone.getName() + " , Id: " + drone.getId() + " , IP: " + drone.getInetAddress(), width / 2, 10); text("Validate any text...
[ "protected abstract void drawWindow();", "public void draw(Graphics window)\r\n {\n }", "public abstract void draw(Window window);", "public void draw()\r\n {\r\n g2d.drawImage(getImage(), at, applet);\r\n }", "public void init() \n {\n setSize(500, 300);\n \n ball = new Ball();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write your code here
public static boolean perfect(int n) { int sum=0; for(int i=1;i<n;i++) { if(n%i==0) sum=sum+i; } if(sum==n) return true; else return false; }
[ "void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}", "@Override\n }", "void writeCode() {\n System.out.println(\"WRITING ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public String toString() { return "名称:"+this.name+"\t年龄:"+this.age+"\t\t品种:"+this.strain; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Equalizer preset, eg. Flat, BassBoost etc. Use getEqualizerPresets to get the available presets.
public void setEqualizerPreset(int presetIndex) { if (mMediaPlayer != null && mEqualizerEnabled && presetIndex <= mEqualizer.getNumberOfPresets()) mPreset = presetIndex; initializeEqualizer(); mEqualizer.usePreset((short) presetIndex); mEqualizer.setEnabled(true); ...
[ "private void applyPresets() {\n applyMode(MODE_PRESET.load(mPresetDict));\n }", "private void setupPresets(MatchersRegistry mr) {\n\t\t// check to see if the presets directory exists.\n\t\tString presetDir = System.getProperty(\"user.dir\") + File.pathSeparator + \"presets\";\n\t\t\n\t\tFile presetsDir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set a selection listener for the chart
public void setOnChartValueSelectedListener(OnChartValueSelectedListener l) { this.mSelectionListener = l; }
[ "@JSProperty(\"selection\")\n void setSelection(ChartSelectionCallbackFunction value);", "public interface OnSelectionChangedListener {\n /**\n * Triggered when pie chart slice is selected.\n *\n * @param label Name of the pie chart slice selected.\n * @param value Value of...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / / / / / /
public Image copy() { /* 282 */ throw new OperationNotSupportedException("Can't copy big images yet"); /* */ }
[ "private void calculatePaths() {\n\n\n }", "public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Save a new client in the database
public void addCliente(Cliente cliente);
[ "public void save(Client client)\r\n\t{\r\n\t\tclientRepository.save(client);\r\n\t}", "public void save(final IClient client) throws Exception;", "public void saveClient(Client client) {\n\t\trepository.save(client);\n\t}", "public void addNewClient(Client c);", "private void addNewClient() throws Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new database
public Database(String path) { file = new File(path); }
[ "public void createNewDatabase() {\r\n try (Connection conn = DriverManager.getConnection(driverURL)) {\r\n if (conn != null) {\r\n DatabaseMetaData meta = conn.getMetaData();\r\n// System.out.println(\"Database database.db created.\");\r\n }\r\n } c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void parseProperty(Element propertyElement, VariableDeclaration variableDeclaration, IActivity activity) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is intentionally undocumented. You should never have to invoke or customize it.
public java.lang.String length(){ return null; //TODO codavaj!! }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "protected void method_5557() {}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n public void publicando() {\n }", "@Override\n\tprotected void location() {\n\t\t\n\t}", "@O...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a JSONObject to http response.
public static void writeJsonObject(HttpServletResponse response, JSONObject obj) throws IOException { response.setContentType("Application/JSON"); response.setHeader("Access-Control-Allow-Origin", "*"); PrintWriter out = response.getWriter(); out.print(obj); out.close(); }
[ "public String write(JsonObject jsonObject);", "public static void writeJsonResponse(final HttpServletResponse response, final Object object) {\n response.setContentType(Type.APPLICATION_JSON_UTF_8.asString());\n\n try {\n OBJECT_MAPPER.writeValue(response.getOutputStream(), object);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs on the EDT. Update the GUI based on the result computed by doInBackground().
@Override protected void succeeded(Object result) { }
[ "@Override\n\t\t\tprotected Object doInBackground() throws Exception {\n\n\t\t\t\tlista.setSomaDifFinal(0.00);\n\t\t\t\tlista.setSomaDifVar(0.00);\n\n\t\t\t\twhile (chBoxDif.isSelected()) {\n\t\t\t\t\tteste2 = new Thread();\n\t\t\t\t\tteste2.sleep(1000);\n\t\t\t\t\tlabelDif.setText(String.valueOf(String.format(\"%....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dismisses the menu's dialog.
public void dismiss() { if (mDialog != null) { mDialog.dismiss(); } }
[ "public void menuQuit()\n\t{\n\t\tsetVisible(false);\n\t}", "public void hideDialog() {\r\n\t\thideDialog(null);\r\n\t}", "public void dismiss() {\n this.mDialog.dismiss();\n }", "public void dismiss() {\n if (dialog.isShowing())\n \tdialog.dismiss();\n }", "public void onCloseMen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.IOSXRExtensibleManagabilityService.CommitMsg msg = 1;
public Builder setMsg(com.cisco.stbarth.netconf.grpc.XRGRPC.CommitMsg value) { if (msgBuilder_ == null) { if (value == null) { throw new NullPointerException(); } msg_ = value; onChanged(); } else { msgBuilder_.setMessage(value); } ...
[ "String getCommitMessage();", "java.lang.String getCommitMessage();", "public void notifyCommittment();", "public int getMsgCode(){\r\n return localMsgCode;\r\n }", "void mo31256a(Message message);", "com.google.protobuf.ByteString getCommitMessageB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds the remainder for a particular user
@PostMapping("/{usrname}/{venname}/{venservice}/{remainder}") public void addRemainder(@PathVariable String usrname, @PathVariable String venname, @PathVariable String venservice, @PathVariable String remainder) { this.userService.addRemainder(usrname, venname, venservice, remainder); }
[ "public void addToInv(User user, Document document){\n\t\tint userID;\t\t\t\t\t\t// User input ID to find\n\t\t\n\t\tSystem.out.println(\"\\nRe-Enter ID For Receipt: \");\n\t\tuserID = Library.getInteger();\t// Exception ensures input is int\n\t\t\n\t\tIterator<User> it = userList.iterator();\t\n\t\twhile (it.hasNe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encodes the coverage in the specified output format onto the output stream
void encode(GridCoverage2D coverage, String outputFormat, Map<String,String> econdingParameters,OutputStream output) throws ServiceException, IOException;
[ "public void encode(OutputStream output, Indenter indenter);", "public void finish() throws IOException {\n writeline(\"/home/ubuntu/results/coverage/SevenZOutputFile/SevenZOutputFile_4_10.coverage\", \"f0efd9bc-3f71-4fe1-923a-6454f59d116c\");\n if (finished) {\n writeline(\"/home/ubuntu/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///////////////////xml reader end ////////////////////////////////
public Long getUserId() { return userId; }
[ "private XmlReaderStAX(){\n\t\tinit();\n\t}", "public void Reader() throws SAXException, IOException {\n\tXMLReader reader = XMLReaderFactory.createXMLReader();\n\treader.setContentHandler(new ContentHandler());\n\treader.parse(\".data.xml\");\n }", "public javax.xml.stream.XMLStreamReader getPullParser(java...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a paginated collection of entities based on a given native SQL string.
public PagedResult<Serializable> find(String sql, Page page) throws PersistenceHibernateException { SQLQuery query = createQueryNativeSQL(sql); PagedResult<Serializable> result = createNativePagedResult(query, page); return result; }
[ "Query<T> paginate(int size);", "@Override\n\tpublic <T> List<T> findByPage(final String hql, Class<T> entityClass,\n\t\t\tfinal Object[] params, final int firstResult, final int maxResult) {\n\n\t\tQuery query = getSession().createQuery(hql);\n\t\tfor (int i = 0; i < params.length; i++) {\n\t\t\tquery.setParamet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check Employee in Leave Request Table
@Override public boolean checkLeave(String empid) { // TODO Auto-generated method stub boolean find=true; try { connection=DBConnection.initializedb(); pt=connection.prepareStatement("select * from LeaveRequest where Emp_Id=?"); pt.setString(1, empid); ResultSet res = pt.executeQuery(); find=re...
[ "@And(\"^Validate that all employees have been created$\")\r\n\tpublic void ValidateEmp() throws InterruptedException {\n\t\tdriver.findElement(By.id(\"menu_pim_viewPimModule\")).click();\r\n\t\t//Click on the Employee List\r\n\t\tdriver.findElement(By.id(\"menu_pim_viewEmployeeList\")).click();\r\n\t\t//Enter emp ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the gender of the user
public String getGender() { return gender; }
[ "public Long getUserGender() {\n return userGender;\n }", "public Integer getUserGender() {\n\t\treturn userGender;\n\t}", "public void getUserGender() {\n if (userData.get(5).toString().equals(\"Male\")) {\n\n mRadioMale.setChecked(true);\n\n } else {\n\n mRadioFem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the boolean GoToLetterPage(Letter) method test. Verify that the method return false if page name is not the letter page
@Test public void testGoToLetterPageIsFalseIfRequestedPageIsNotLetterPage() throws Exception { MainWindow mainWindow = EasyMock.createMock(MainWindow.class); Alphabet alphabet = EasyMock.createMock(Alphabet.class); Letter cLetter = EasyMock.createMock(Letter.class); EasyMock.expect(alphabet.SetCur...
[ "public boolean Start()\r\n\t{\r\n\t\treturn GoToPage(PageName.AlphabetPage);\r\n\t}", "public void checkLetter(String letter){\n\n char letterIntroduced = letter.charAt(0);\n boolean checkletter = false;\n\n for(int i = 0; i<mWord.length(); i++){\n if(mWord.charAt(i) == letterIntr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end synpred2_InternalModelQueryLanguage $ANTLR start synpred3_InternalModelQueryLanguage
public final void synpred3_InternalModelQueryLanguage_fragment() throws RecognitionException { // InternalModelQueryLanguage.g:761:3: ( ( () ( ( ruleOpAnd ) ) ) ) // InternalModelQueryLanguage.g:761:4: ( () ( ( ruleOpAnd ) ) ) { // InternalModelQueryLanguage.g:761:4: ( () ( ( ruleOpAn...
[ "public final AntlrDatatypeRuleToken ruleQueryType() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n enterRule(); \n \n try {\n // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of required or optional connection parameters, the meaning of each parameter and whether it is required or not is described in the instructions.
ArrayList<String> getConnectionParameters();
[ "private void getInfoParameters() {\n Map<String, String> map = new HashMap<String, String>();\n int nrNonEmptyVariables = wParams.nrNonEmpty();\n for ( int i = 0; i < nrNonEmptyVariables; i++ ) {\n TableItem tableItem = wParams.getNonEmpty( i );\n String paramName = tableItem.getText( 1 );\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
private static int FINDA(int I) { int L,SAVE,p; if(START==-1){ L=-1; return L; } if(I<LIST[START]){ L=-1; return L; } SAVE=START; p=LINK[START]; while (p!=-1) { if(I<LIST[p]){ L=SAVE; return L; } SAVE=p; p=LINK[p]; L=SAVE; return SAVE; } return 0; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns getFactorial precisely if cached.
public BigInteger getFactorial(int n) { if(cache.containsKey(n)) return cache.get(n); else return null; //TODO: calculate Stirling's approximation (Bauer) // or init to new larger range }
[ "public long findFactorial(){\n\t\tlong total = 1;\n\t\tfor (int x=original; x>0; x--)\n\t\t\ttotal*=x;\n\t\treturn total;\n\t}", "private static void cacheFact(BigInteger n, BigInteger value) {\n if (n.compareTo(TWO) >= 0 && n.compareTo(MAX_LONG) < 0) {\n Long key = n.longValueExact();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the currently open structure view of all nodes Sets the currently displaying file to nothing.
public void resetStructureView() { this.setRootNode(null); }
[ "public void clear()\n {\n \t// EXERCISE OR HOMEWORK\n root = null;\n size = 0;\n }", "public void clearContent() {\n\t\ttreeViewer.setInput(null);\n\t}", "public void clear() {\n\t\trootNode.removeAllChildren();\n\t\ttreeModel.reload();\n\t}", "public void clear() {\n doc = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the address that will be added in the FROM part of the message
public void setFrom(java.lang.String newFrom) { from = newFrom; }
[ "public void xsetFromAddress(org.apache.xmlbeans.XmlString fromAddress)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mirror method takes in a queue and populates it with the original queue + the mirror image of itself [a b c] should become [a b c c b a]
public static void mirror(Queue<Integer> inputQueue) { }
[ "public static void queueMirrorCopy(Queue<Integer> queue, Queue<Integer> queueMirror) {\n\t\twhile(!queue.isEmpty()) {\n\t\t\tint num = queue.poll();\n\t\t\tqueueMirrorCopy(queue, queueMirror);\n\t\t\tqueueMirror.offer(num);\n\t\t}\n\t}", "static void reversequeue()\r\n {\r\n Stack<Integer> stack = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
view holder berfungsi untuk setting list item yang digunakan
@Override public ListAllUserViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View mItemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_karyawan, null, false); RecyclerView.LayoutParams layoutParams = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATC...
[ "@Override\n public void onBindViewHolder(final MyMenusListAdapter.ViewHolder holder, int position) {\n holder.itemView.setTag(itemList.get(position)); //añade etiqueta con su posicion\n holder.menuTitle.setText(itemList.get(position).name);//añade texto\n //añade intents\n //holder.m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
programar funcion que devuelve todos los usuarios excepto el solicitante
public String getUsers(String id) { String usuarios=""; for(int i=0; i<this.idCli.length; i++) { if(this.idCli[i]!= Integer.parseInt(id)) { if(this.idCli[i]!=0) { usuarios+= this.idCli[i]+""; } } } return usuarios; }
[ "private void usersAll() throws JSONException, IOException {\n UserDAO dUser = new UserDAO();\n\n // Search for user in the bank\n var users = dUser.read();\n\n boolean bUser = users != null;\n\n JSONObject route = new JSONObject();\n route.put(\"rota\", \"cliente.usuarios\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 msg_dst = 1;
boolean hasMsgDst();
[ "private static native int getDstBinding0(Buffer ptr);", "public int getMsgType(){\r\n return localMsgType;\r\n }", "public void receive(Message msg, NetAddress src, MacAddress lastHop, byte macId, NetAddress dst, byte priority,\r\n byte ttl) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case COEFFICIENT: return isSetCoefficient(); case T_STAT: return isSetTStat(); case STD_ERR: return isSetStdErr(); case P_VALUE: return isSetPVal...
[ "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case DATA:\n return isSetData();\n }\n throw new IllegalStateException();\n }", "public boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }