query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
/////////////////////////////////////////////////////// inOrder1 traverse the QuadTree2: is a leaf node is encountered, we queue it for drawing purposes
public QueueADT<QuadNode> inOrder1(QuadNode node,QueueADT<QuadNode> queue) { if(node==null) { return queue; } else { queue=inOrder1(node.getNorthEast(),queue); if(isLeaf(node)) { queue.enqueue(node); return queue;} queue=inOrder1(node.getNorthWest(),queue); queue=inOrder1(node.getSouthEast(),queue); ...
[ "public QueueADT<QuadNode> inOrder2(QuadNode node,QueueADT<QuadNode> queue){\nif(node==null) { return queue; }\nelse\n{\nqueue=inOrder1(node.getNorthEast(),queue);\nqueue=inOrder1(node.getNorthWest(),queue);\nif(isLeaf(node)) { queue.enqueue(node); return queue; }\nqueue=inOrder1(node.getSouthEast(),queue);\nqueue=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string SbDRUGId = 20 [(.validation.regex) = ""];
java.lang.String getSbDRUGId();
[ "public Builder setSbDRUGId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00100000;\n sbDRUGId_ = value;\n onChanged();\n return this;\n }", "public Builder setSbDRUGIdBytes(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property 'currentSectorGroup'.
public String getCurrentSectorGroup() { return currentSectorGroup; }
[ "public void setCurrentSectorGroup(String currentSectorGroup) {\n this.currentSectorGroup = currentSectorGroup;\n }", "public ColladaAnimationGroup getCurrentGroup() {\n return currentGroup;\n }", "public int getSectorId() {\n\t\treturn sectorId;\n\t}", "public Integer getIdSector() {\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Output a trace message with an appended newline.
public void traceln(String message) { if (onOff) { out.println(message); } }
[ "public static void traceOut(String msg) {\r\n setLevel(level - 1); \r\n tracePrint(msg);\r\n }", "public void printTraceMessage(String message);", "protected void writeln() throws IOException {\n \t\twrite(LINE_SEPARATOR);\n \t}", "protected void trace(String msg)\r\n\t{\r\n\t\tm_stream.println(msg);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the multi booking mm.
public void setMultiBookingMM(String multiBookingMM) { this.multiBookingMM = multiBookingMM; }
[ "public void setMultiBookingMMNum(Integer multiBookingMMNum) {\n\t\tthis.multiBookingMMNum = multiBookingMMNum;\n\t}", "public String getMultiBookingMM() {\n\t\treturn multiBookingMM;\n\t}", "public Integer getMultiBookingMMNum() {\n\t\treturn multiBookingMMNum;\n\t}", "public void setMultiBookingDate(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the annotations for gmf.compartment.
protected void createGmf_2Annotations() { String source = "gmf.compartment"; addAnnotation (getSystem_Subsystems(), source, new String[] { "collapsible", "true", "layout", "free" }); addAnnotation (getSubsystem_DeploymentSets(), sourc...
[ "protected void createGmf_2Annotations() {\n\t\tString source = \"gmf.compartment\";\t\n\t\taddAnnotation\n\t\t (getNode_Children(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"mxShape\", \"swimlane\",\n\t\t\t \"mxCollapsible\", \"0\",\n\t\t\t \"mxNoLabel\", \"1\",\n\t\t\t \"xEditable\", \"0\",\n\t\t\t \"mx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for NEW_END_DATE using the alias name NewEndDate.
public String getNewEndDate() { return (String) getAttributeInternal(NEWENDDATE); }
[ "public Date getEndDate() {\n return (Date)getAttributeInternal(ENDDATE);\n }", "public Date getEndDate()\n {\n return (Date)getAttributeInternal(ENDDATE);\n }", "public Date getEndDate() {\r\n return (Date)getAttributeInternal(ENDDATE);\r\n }", "public void setNewEndDate(String value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Derive the pressure value using P03C along with PTSY to calculate the positive or negative sign.
@DeriveMethod public PressChange3Hr derive(PressChange3HrAbsVal p, PressureTendencySymbol ptsy) throws InvalidValueException, NullPointerException { if (p.hasValidValue() && ptsy.hasValidValue()) { Number n = (Number) new Integer(ptsy.getStringValue()); Amount ptsyAmount = new Amoun...
[ "double getP0();", "double getPValue();", "double getPressure();", "public double getUnused03() {\n return unused03_;\n }", "public double getPressure(AnalogInput pressureSensor) {\r\n\t\ttry {\r\n\t\t\treturn 250*(pressureSensor.getVoltage()/5)-25;\r\n\t\t} catch (NullPointerException e){\r\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private helper method that takes a PrintStream output and a QuestionNode root. If the root is an answer (leaf node), prints "A:" and the data of the given root. Otherwise, if the root is a question (branch node), prints "Q:" and the data of the given root. Repeats this process for all of the nodes in the tree. This met...
private void writeHelper(PrintStream output, QuestionNode root) { if (root.left == null || root.right == null) { output.println("A:"); output.println(root.data); } else { output.println("Q:"); output.println(root.data); writeHelper(output, root.left); ...
[ "private void writeInternal(QuestionNode root, PrintStream output) {\r\n if(root != null) {\r\n if(root.isLeafNode()) { // leaf node\r\n output.println(\"A:\");\r\n output.println(root.data);\r\n } else {\r\n output.println(\"Q:\");\r\n output.println...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ImportDecl__Group_2_1__1" $ANTLR start "rule__ImportDecl__Group_2_1__1__Impl" InternalGo.g:15565:1: rule__ImportDecl__Group_2_1__1__Impl : ( ( rule__ImportDecl__Imports2Assignment_2_1_1 ) ) ;
public final void rule__ImportDecl__Group_2_1__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:15569:1: ( ( ( rule__ImportDecl__Imports2Assignment_2_1_1 )* ) ) // InternalGo.g:15570:1: ( ( rule__ImportDecl__Imports...
[ "public final void rule__Import__Group_2__1__Impl() throws RecognitionException {\n int rule__Import__Group_2__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 307) ) { return ; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mapping from onehot encoding of 12 states to true indices in Mario 0= stay, no jump, no speed (none active) 1= left, no jump, no speed (0) 2= right, no jump, no speed (1) 3= stay, jump, no speed (3) 4= left, jump, no speed (0,3) 5= right, jump, no speed (1,3) 6= stay, no jump, speed (4) 7= left, no jump, speed (0,4) 8=...
private void initializeActionMap() { twelveToSixMap = new HashMap<Integer, int[]>(12); twelveToSixMap.put(0, new int[]{}); twelveToSixMap.put(1, new int[]{0}); twelveToSixMap.put(2, new int[]{1}); twelveToSixMap.put(3, new int[]{3}); twelveToSixMap.put(4, new int[]{0,3}); twelveToSixMap.put(5, new int[]{1...
[ "public static Vector<Integer> buildOnesMap(boolean[] ttable) {\n \n Vector<Integer> omap = new Vector<Integer>();\n \n for(int i=0; i<ttable.length; i++) {\n \n if(ttable[i]) {\n \n omap.add(i);\n \n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function make set puts all the books in the cart into a different set, where each book type is represented by the number(BOOK_ONE = 1 etc) and calculates the first possible smallest price, which will be if the books will be distributed into the maximum possible sets
public double makeset(int value){ double price = 0; int ssset = maxset(value); // form the set of the distinct books for (int i=0; i< ssset; i++){ for (Integer a: bookset){ if (!bookset2.contains(a)){ bookset2.add(a); } } // record the sets of the different books into a d...
[ "public void check(){\n\t// if the number of the books in the cart is less than 5\n\tif (distinctbooks.size() > 5){\n\t\tfinalprice = makeset(5);\n\t\t}\n\t// if the number of the books is the cart is 0\n\telse if (bookset.size() == 0){\n\t\tfinalprice = 0;\n\t}\n\t// if the cart has only one find of the book\n\tel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a new item to the othrBkCtctPrsn list.
public InitialBaselineSubmissionV04 addOthrBkCtctPrsn(ContactIdentification3 othrBkCtctPrsn) { getOthrBkCtctPrsn().add(othrBkCtctPrsn); return this; }
[ "public void addCMCCPrd(java.lang.Object vCMCCPrd)\n throws java.lang.IndexOutOfBoundsException\n {\n _CMCCPrdList.addElement(vCMCCPrd);\n }", "void addCpItem(ICpItem item);", "public void addCMCCPrd(int index, java.lang.Object vCMCCPrd)\n throws java.lang.IndexOutOfBoundsException\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the canvas and graphicsContext to null
@Override public void killScreen() { canvas = null; graphicsContext = null; }
[ "public void resetCanvas()\n {\n erase();\n objects.clear();\n shapes.clear();\n drawAxes(graphic);\n canvas.repaint(); \n }", "public void clearCanvas() {\n\t\tthis.init = true;\n\t\tbackground(0);\n\t\tredraw();\n\t}", "public void canvasCleared();", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints the final Population(set of chromosomes)
private static void printResultPopulation(){ System.out.println("Result Population:"); for(Chromosome chromosome:Config.population.getChromosomes()){ System.out.println(chromosome.getBinaryCode().toString()); } }
[ "public void printChromosome() {\n System.out.println(\"Chromosome Length = \" + this.getChromosomeLength());\n System.out.println(\"Number Of Genes = \" + this.getGeneCount());\n\n for (int i = 0; i < this.getGeneCount(); i++) {\n System.out.println(\"Gene[\" + i + \"]:\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the index definition.
public abstract TIndexDefinition createIndexDefinition();
[ "private void createAndBuildIndex() {\n createIndexTable();\n index();\n }", "public static IndexOnDisk createIndex() {\n\t//\tSystem.out.println(\"@Index\\t\"+ ApplicationSetup.TERRIER_INDEX_PATH+\"\\t\"+ApplicationSetup.TERRIER_INDEX_PREFIX);\n\t\tApplicationSetup.TERRIER_INDEX_PATH =\"/home/Le...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the list of placeable positions after a new tile is placed; This is a private method;
private void updatePlaceableList(Tile tile){ //tile: newly placed tile; placeablePositions.remove(placeablePositions.indexOf(tile.getPosition())); int x = tile.getPosition().getX(); int y = tile.getPosition().getY(); if(getTile(new Position(x+1, y))==null && placeablePositions.indexOf(new Position(x+1, y))==-...
[ "public void markPlaceable() {\n\t\tfor (int i = 0; i < grids.length; i++) {\n\t\t\tfor (int j = 0; j < grids[i].length; j++) {\n\t\t\t\tif (grids[i][j] == GRID_EMPTY) {\n\t\t\t\t\tgrids[i][j] = GRID_PLACEABLE;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (grids[i][j] == GRID_PLACEABLE) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inner interface: Recipient A recipient informs a visitor of it's willingness to be visited.
public interface Recipient<B> { /** * Accept the given visitor. * * @param visitor Visitor that is requesting to visit this recipient * @param clz the Class that can be used by the visitor * @param <C> the Class type being visited */ ...
[ "public void accept(AntAgent a);", "public boolean hasOtherRecipients();", "public interface AntAcceptor extends DMASUser{\n\t\n\t/**\n\t * Accept ant and visit by self (visitor pattern)\n\t * @param a\tAnt Agent\n\t */\n\tpublic void accept(AntAgent a);\n}", "interface MessageVisitor {\n\t/**\n\t * Methode d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new single value geo point field data.
public SingleValueGeoPointFieldData(String fieldName, int[] ordinals, double[] lat, double[] lon) { super(fieldName, lat, lon); this.ordinals = ordinals; }
[ "public DataPoint(double value)\r\n {\r\n this.value = value;\r\n this.time = Calendar.getInstance();\r\n }", "private Object createFeature() {\n for (int i=0; i<buffer.length; i++) {\n buffer[i] = (char) ('A' + random.nextInt(26));\n }\n final String city ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method is displaying a table of "Delivery Person id " "Delivery Person name" " Delivery Area"
public void displayDeliveryPeopleWithDeliveryAreas() { String str = "SELECt delivery_person.delivery_person_id, delivery_person.first_name, delivery_person.last_name, delivery_area.name\n" + "FROM delivery_person, delivery_area\n" + "WHERE delivery_person.delivery_person_id = d...
[ "public void displayAllDeliveriesOfPublication(int publicationId) {\n if(publicationDeliveryExists(publicationId)) {\n String query = \"SELECT publication.publication_name, customer.first_name, customer.last_name, delivery.delivery_status ,delivery.delivery_date as 'date of delivery'\\n\" +\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next token or null if the end of input stream has been reached.
Token nextToken() throws TokenizerException;
[ "public Symbol next_token() {\n if (index < tokens.size()) {\n token the_token = tokens.get(index);\n index += 1;\n Integer symbol_id = symbols_map.get(the_token.type().symbol_identifier());\n assert symbol_id != null;\n return new Symbol(symbol_id, the_token);\n } else {\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an entry to the phone book, given the name and phone number.
public void addEntry(String name, String phoneNumber) throws AlreadyPresentException { String key = name.toUpperCase(); if(entries.containsKey(key)) { throw new AlreadyPresentException(name); } PhoneBookEntry entry = new PhoneBookEntry(name, phoneNumber); entries.put(key, entry); }
[ "public void addEntry() {\n\t\tSystem.out.print(\"Name: \");\n\t\tString entryName = getInputForName();\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\t\n\t\tp = new PhoneEntry(entryName, entryNumber);\n\t\t\n\t\ttry {\n\t\t\tphoneList.add(p);\n\t\t\twriteFile();\n\t\t\t\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if (DEBUG) Log.d(TAG, "getDateRange String : " + compareString);
public Pair<Long,Long> getDateRange(String compareString) { int index = 0; int[] validRange = {0,0,0}; boolean isSecondRange = false; int unknownCnt = 0; Calendar range1 = getNewCalObj(true); Calendar range2 = getNewCalObj(false); Pair<Long, Long> p = getPhraseDa...
[ "public void getRangeDateData(TextView tvRangeDate1, TextView tvRangeDate2) {\n Log.d(\"theF\", \"getRangeDateData: mainItemList: \" + mainItemList.size());\n List<Item> itemList = new ArrayList<>();\n String startDateStr = tvRangeDate1.getText().toString();\n String endDateStr = tvRange...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column covidus_r_scheda_file.sch_id
public void setSchId(Integer schId) { this.schId = schId; }
[ "public void setSchFileId(Integer schFileId) {\n\t\tthis.schFileId = schFileId;\n\t}", "public Integer getSchFileId() {\n\t\treturn schFileId;\n\t}", "public void setSchprescId(Integer schprescId) {\n\t\tthis.schprescId = schprescId;\n\t}", "public Integer getSchId() {\n\t\treturn schId;\n\t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Force reindex for indexer of given name.
public void forceReindex(String indexerName) throws ObjectNotFoundException;
[ "public synchronized void reindex() {\n }", "void reindex();", "private Reindex() {}", "public void setName(String name)\r\n {\r\n this.indexName = name;\r\n }", "public void resetIndexSearcher() {\n\t if(!generatingIndex) {\n\t \tthis.searcher.reloadIndex(this.idxSelect);\n\t }\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the stroke width.
public void setStrokeWidth(String strokeWidth) { myStrokeWidth = strokeWidth; }
[ "public void setStrokeWidth(float width) {\n \t\n }", "public void setPaintStrokeWidth(int width) {\n paint.setStrokeWidth(width);\n }", "void setLineWidth(float width) { }", "private void setShapeStrokeWidth(double width) {\n rectangle.setStrokeWidth(width);\n oval.setStrokeWidt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "saltData" attribute
void xsetSaltData(org.apache.xmlbeans.XmlString saltData);
[ "void setSaltData(java.lang.String saltData);", "public void setSalt(byte[] salt) {\n this.salt = salt;\n }", "public void setSalt(String saltString) throws Exception\n {\n salt = base64Decode(saltString);\n }", "public void setSalt(java.lang.String value) {\n this.salt = value;\n }", "ja...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build a safe location
public Location build() { try { return getSafeY(initialLocation); } catch (SafeLocationNotFoundException e) { return null; } }
[ "Location createLocation();", "String getLocationOnDisk();", "private static String createFullPathDir() {\n\t\tStringBuffer fileName = new StringBuffer();\n\t\tif (!fullPath) { // relative path\n\t\t if (!isWindows()) { // not windows, make dir hidden\n\t fileName.append(System.getProperty(\"user.home...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new leaving application by employee
Long addNewApplication(Application application);
[ "Pgemployee create(Pgemployee pgemployee);", "private static void createEmployees() {\n \tEmployee employee1=new Employee();\n \tEmployee employee2=new Employee(\"Angie\",\"Smith\", \"asmith@teams.com\",departments.get(2),\"08/21/2020\",002);\n \tEmployee employee3=new Employee(\"Margaret\",\"Thompson\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DBActionsException constructor gets the cause written message and the root cause and acts accordingly
public DBActionsException(String message, Throwable cause) { super(message, cause); }
[ "public DBActionsException() {\n super();\n }", "public DBActionsException(String message) {\n super(message);\n }", "public MigrationException(String message, Throwable cause) {\n super(String.format(\"$s %n %s\", message, cause.getStackTrace()), cause);\n }", "public DBException(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test GetObservationRequest with query of assetType. Verify response is sent.
@Test public void testGetObservationRequestQueryAssetType() throws IOException, ObjectConverterException { //necessary messages for request Query query = Query.newBuilder().setAssetType("a.new.Asset").build(); GetObservationRequestData message = GetObservationRequestData.newBuilder() ...
[ "@Test\n public void testGetObservationRequestQueryAssetTypeTime() throws IOException, ObjectConverterException\n {\n //necessary messages for request\n TimeConstraintData time = getCreatedTimeConstraint();\n \n Query query = Query.newBuilder().setAssetType(\"a.new.Asset\")\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hides the red warning label message
@FXML private void hideFeedbackLabel() { feedback.setVisible(false); }
[ "public void undisplayWarningMessage() {\r\n\t\t\twarningIcon.setVisible(false);\r\n\t\tlblwarningMessage.setVisible(false);\r\n\t\t\r\n\t}", "@Override\n public void hideErrorText() {\n errorLabel.setVisible(false);\n }", "protected void hideErrors()\n {\n labelErrorLabel.setVisible(false);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public List llenarComboBancos(); public List llenarComboGral(LlenaComboGralDto dto);
public List<LlenaComboGralDto> llenarComboBeneficiario(LlenaComboGralDto dto);
[ "public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}", "List<DetalleOrdenCompra> listarDetalleOrdenCompra(DetalleOrdenCompraDTO detalleOrdenCompra) throws Exception;", "public void datosCombobox() {\n listaColegios = new Co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field oauthClientSecret is set (has been assigned a value) and false otherwise
public boolean isSetOauthClientSecret() { return this.oauthClientSecret != null; }
[ "public boolean isSetOauthClientId() {\n return this.oauthClientId != null;\n }", "@Override\n public boolean isSecretRequired() {\n return client.getClientSecret() != null;\n }", "@Override\n public boolean isSecretRequired() {\n\t return getClientSecret() != null;\n }", "@java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adding a nonvegan food item to a currently vegan recipe
@Test void getIsVeganAddNonVegan() { FoodItem normalBread = new FoodItem("2222", "normal bread", UnitType.COUNT); Set<FoodItem> addableIngredients1 = new HashSet<>(); addableIngredients1.add(normalBread); Set<FoodItem> ingredients = new HashSet<>(); FoodItem veganBread = ne...
[ "public void addDragonItemRecipe(AltarItemRecipe recipe){\n\t\tvalidate();\n\t\tDragonEssenceHandler.recipes.add(recipe);\n\t}", "private void addFood(Food food){\n\t\tif(listenerFragment != null){\n\t\t\tlistenerFragment.recipeUpdate(food);\n\t\t}\n\t\tlistener.getSupportFragmentManager().beginTransaction().remo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the XMLNS Prefix Map feature.
protected void addXMLNSPrefixMapPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_xMLNSPrefixMap_feature"), getString("_UI_PropertyD...
[ "public void setPropertyPrefix(String prefix);", "public String getPropertyPrefix();", "@NotNull\n public String getPropertyPrefix ();", "public void setXnPrefix(String xnPrefix) {\n this.xnPrefix = xnPrefix;\n }", "public void addPrefix(String prefix) {\r\n Enumeration pnames = super.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is panagram.
public static String isPanagram(String inputString) { char[] inputStringChars = inputString.toCharArray(); char[] alphabets = new char[26]; for (int i = 0; i < inputStringChars.length; i++) { if ((inputStringChars[i] - 65) >= 0 && (inputStringChars[i] - 65) <= 97) { alphabets[inputStringChars[i] - 65] = '1...
[ "static boolean checkPanagram(String str) {\n\t\tboolean result = true;\n\t\tfor (char s = 'a'; s <= 'z'; s++) {\n\t\t\tif (str.indexOf(s) <= 0) {\n\t\t\t\tresult = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn result;\n\n\t}", "@Test\n public void testIsAnagram() {\n assertTrue(StringAnagram.isA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hub serial number optional string serial = 2;
String getSerial();
[ "java.lang.String getSerial();", "public void setSerial(java.lang.String value) {\n this.serial = value;\n }", "public void setSerial(int serial) {\n\t\tthis.serial = serial;\n\t}", "java.lang.String getSerialnumber();", "public int getSerialNumber(){\r\n return serial;\r\n }", "public i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the normalize function of the vector Checks length, X, and Y
@Test void normalize() { Vector2f v2 = v.normalize(); assertEquals (1.0, v2.length()); assertEquals (3.0f / 5.0f, v2.getX()); assertEquals (4.0f / 5.0f, v2.getY()); }
[ "public void NormalizeVector() {\r\n\t\tthis.length = GetLength();\r\n\t\t\r\n\t\tthis.x /= this.length;\r\n\t\tthis.y /= this.length;\r\n\t}", "@Test\n void testNormalize() {\n\n Vector vCopy = new Vector(v.getHead());\n Vector vCopyNormalize = vCopy.normalize();\n assertEquals(vCopy, vCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the identifiers declared in rule constructDeeperUnderstanding02_PATH_2_GOAL_6_COMPONENT_txtOp_16
private String[] getDeclaredIdentifiers_constructDeeperUnderstanding02_PATH_2_GOAL_6_COMPONENT_txtOp_16() { return identifiers_constructDeeperUnderstanding02_PATH_2_GOAL_6_COMPONENT_txtOp_16; }
[ "private String[] getDeclaredIdentifiers_constructDeeperUnderstanding02_PATH_1_GOAL_2_COMPONENT_txtOp_3() {\r\n return identifiers_constructDeeperUnderstanding02_PATH_1_GOAL_2_COMPONENT_txtOp_3;\r\n }", "private String[] getDeclaredIdentifiers_constructDeeperUnderstanding03_PATH_1_GOAL_2_COMPONENT_txtO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HACK: because essential stuff in a BindingExpression is set up after addBindingExpression() is called on it, we have to wait until the last minute before adding their destination types to the import list. TODO clean up BindingExpression setup. A BE should be completely configured by the time it's added here.
private final void ensureBindingImports() { if (!bindingImportsAdded) { for (Iterator<BindingExpression> iter = bindingExpressions.iterator(); iter.hasNext(); ) { BindingExpression expr = iter.next(); addImport(expr.getDestinationTypeName(), ex...
[ "private void completeTwoWayBindings()\n {\n // A side-effect of creating a new BindingExpression is that it is inserted\n // into the bindingExressions list. Since we can't add to the list while \n // iterating thru it, use an array instead.\n Object[] bindingExpressionsArray = bind...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the content assistant ready to be used with the given source viewer. This implementation always returns null. Created : Nov 28, 2004 6:09:53 PM Author : Christopher Harper account : HARPECHR
@Override public IContentAssistant getContentAssistant( final ISourceViewer sourceViewer) { final ContentAssistant assistant = new ContentAssistant(); assistant.setContentAssistProcessor(new APICompletionProcessor(), IDocument.DEFAULT_CONTENT_TYPE); assistant.enableAutoActivation(true); assis...
[ "@Override public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {\n return null;\n }", "public SourceViewer getSourceViewer()\n {\n return sourceViewer;\n }", "public Viewer getViewer() {\n return (Viewer) getSource();\n }", "public interface Conten...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Pow__Group__6" $ANTLR start "rule__Pow__Group__6__Impl" InternalSymboleoide.g:9052:1: rule__Pow__Group__6__Impl : ( ',' ) ;
public final void rule__Pow__Group__6__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSymboleoide.g:9056:1: ( ( ',' ) ) // InternalSymboleoide.g:9057:1: ( ',' ) { // InternalSymboleoide.g:9057:1: ( ',' )...
[ "public final void rule__Obl__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:4763:1: ( ( ',' ) )\n // InternalSymboleoide.g:4764:1: ( ',' )\n {\n // InternalSymboleoide.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extracts the size from the supplied measure specification.
public static int getSize(int measureSpec) { throw new RuntimeException("Stub!"); }
[ "int getMeasureLength();", "double getSize();", "java.lang.String getSize();", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "Size measureText(String text, double availWidth, double availHeight);", "private int resolveSizeAndStateRespectingMinSize(int minSize,\n int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new richiesta economale soggetto converter.
public RichiestaEconomaleSoggettoConverter() { super(RichiestaEconomale.class, SiacTRichiestaEcon.class); }
[ "public MovimentoGestioneStiloConverter() {\n\t\tsuper(MovimentoGestioneStilo.class, MovimentoGestione.class);\n\t}", "public EventoConverter() {\n }", "public ConciliazionePerBeneficiarioSoggettoConverter() {\n\t\tsuper(ConciliazionePerBeneficiario.class, SiacRConciliazioneBeneficiario.class);\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new QuickSort sorter with the given integers to sort.
public QuickSort(Integer[] nums) { super(nums); // pass nums[] to the superclass Sort }
[ "QuickSort(final int num) {\n cutOff = num;\n insertObj = new Insertion();\n }", "Sort createSort();", "public QuickSort(int[] newArray) {\n this.sortArray = newArray;\n\t\tthis.length = newArray.length;\n\t}", "public static void main(String[] args) {\n \n QuickSortSerial ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds an image from a relative path.
public static Image findImage( String filePath ) { ImageDescriptor desc = imageDescriptorFromPlugin( PLUGIN_ID, filePath ); Image img = null; try { img = desc.createImage(); } catch( Exception e ) { log( "Image " + filePath + " could not be found.", IStatus.ERROR ); } return img; }
[ "public Photo getPhotoByPath(String path);", "public static Path findImagePath(String imageName, Path logosDir) throws IOException {\n if (imageName.indexOf('.') > -1) {\n final Path imagePath = logosDir.resolve(imageName);\n if (java.nio.file.Files.exists(imagePath)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test connection and create a new one on failure
private void testConnection() { PreparedStatement pst = null; try { pst = (PreparedStatement) con.prepareStatement("select 1;"); pst.executeQuery(); } catch (SQLException ex) { try { if (pst != null) { pst.close(); ...
[ "@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scans through the list of time frames selected (mIntTimeSelected)and removes the deleted time frames from the selection list.Updates the mIntTimeSelected, to have only valid time frames. There is no need for a parameter here
private void updateSelectedListOfTimeFrames() { TimeFrames modes = new TimeFrames().getData(mContext); if (modes == null) { Log.e(TAG, "getData returned zero modes"); return; } // loop through all the time frames and check if the time frame selected // is...
[ "public void deleteSelected()\n\t{\n\t\tfor(Element e : currentSelectedElements)\n\t\t{\n\t\t\tcircuit.removeElement(e);\n\t\t}\n\t\tisSelectingMultipleElements = false;\n\t\thasSelectedMultipleElements = false;\n\t\tcurrentSelectedElements.clear();\n\t\trefreshCanvas();\n\t\t\n\t}", "public void removeAllTime() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first fase postulacion in the ordered set where usuarioId = &63; and tipoFase = &63;.
public static com.hitss.layer.model.FasePostulacion fetchByT_U_First( long usuarioId, long tipoFase, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByT_U_First(usuarioId, tipoFase, orderByCompa...
[ "public static com.hitss.layer.model.FasePostulacion findByT_U_First(\n\t\tlong usuarioId, long tipoFase,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.hitss.layer.NoSuchFasePostulacionException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\treturn getP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method updates the Constraints object and find the first CurrentSolution object based on the initial constraints. This method uses a dowhile loop which looks for new constraints in every iteration. Whenever it finds a new constraint, it updates the Constraints object and sets a flag to continue the looping (every ...
public static Holder updateConstraints(final Constraints constraintsOrig, final boolean printOutput) throws BadCellException { Constraints constraints = constraintsOrig; int dim = constraints.getDim(); CurrentSolution currentSolution = new CurrentSolution(dim); ...
[ "public void solve() {\r\n\t\tOptimizationStatus status;\r\n\t\tdo {\r\n\t\t\tstatus = iterate();\r\n\t\t} while (status == RUNNING);\r\n\t}", "private void setInitialPartialSolution() {\n\t\tfor (int row = 0; row < size; row++) {\n\t\t\tfor (int col = 0; col < size; col++) {\n\t\t\t\tif (intGrid[row][col] != -1)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The interface implemented by the automatically generated JNI bindings class PaymentHandlerHostJni.
@NativeMethods /* package */ interface Natives { /** * Initializes the native object. The Java caller owns the returned native object and must * call destroy(nativePaymentHandlerHost) when done. * @param webContents The web contents in the same browser context as the payment handl...
[ "public PaymentHandlerHost(WebContents webContents, PaymentRequestUpdateEventListener listener) {\n mNativePointer = PaymentHandlerHostJni.get().init(webContents, listener);\n }", "PaymentHandler createPaymentHandler();", "void destroy(long nativePaymentHandlerHost);", "public interface IGatewayAdap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to get an operation off of the todo queue and perform it.
private boolean processToDoQueue() { RegionServerOperation op = null; // block until the root region is online if (regionManager.getRootRegionLocation() != null) { // We can't process server shutdowns unless the root region is online op = delayedToDoQueue.poll(); } // ...
[ "public void runNextAction() throws InterruptedException {\n TaskAction action = queue.poll(POLL_TIMEOUT_MS, TimeUnit.MILLISECONDS);\n\n if (action != null) {\n // This queue::add may be executed in any thread\n // add() unfortunately is blocking\n action.run().thenAcc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the ringingDuration value for this AlcForwardState.
public org.apache.axis.types.PositiveInteger getRingingDuration() { return ringingDuration; }
[ "public String getRingingDuration() {\n return ringingDuration;\n }", "public void setRingingDuration(org.apache.axis.types.PositiveInteger ringingDuration) {\r\n this.ringingDuration = ringingDuration;\r\n }", "public int getDuration() {\n\t\treturn (int) ((arrivalTime - departureTime) / 10...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ String search(int) Searches the tree for a given key; returns the associated String if the key is found, or null if it is not found.
public String search(int key){ String val; if( searchTree(root,key) == null){ val = null; }else{ val = searchTree(root,key).value; } return val; }
[ "String search(int key);", "public String search(int k)\r\n {\r\n\t if(this.empty())\r\n\t {\r\n\t\t return null;\r\n\t }\r\n\t RBNode currentNode = root;\r\n\r\n\t while(-1 != currentNode.key)\r\n {\r\n // if found the wanted node\r\n\t\t if(currentNode.key == k)\r\n {\r\n\t\t\t return curr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make robot use battery (if possible).
@Override public void useBattery(Robot robot, Battery battery) { try { if(robot.canUse(battery)) { robot.use(battery); } else { System.out.println("This battery could not be used by this robot."); } } catch(IllegalStateException exc) { System.out.println("Either ...
[ "public void battery(int value){\n _battery = value;\n }", "public void getTwsSlaveBattery() {\n sendOrEnqueue(AirohaMMICmd.GET_RIGHT_BATTERY);\n }", "public void setBattery(Battery battery);", "@Override\r\n\tpublic void pickUpBattery(Robot robot, Battery battery)\r\n\t{\t\r\n\t\ttry\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
INTERNAL: Build and return a new element based on the change set.
public Object buildAddedElementFromChangeSet(Object changeSet, MergeManager mergeManager) { return this.buildElementFromChangeSet(changeSet, mergeManager); }
[ "protected Object buildElementFromChangeSet(Object changeSet, MergeManager mergeManager) {\n ObjectChangeSet objectChangeSet = (ObjectChangeSet)changeSet;\n ObjectBuilder objectBuilder = this.getObjectBuilderForClass(objectChangeSet.getClassType(mergeManager.getSession()), mergeManager.getSession());\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sends the data reception complete message
private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException { SocketChannel channel = (SocketChannel)key.channel(); byte[] ackData = new byte[4]; ackData[0]=00; ackData[1]=00; ackData[2]=00; ackData[3]=data[9]; //bPacketRec[0]; ByteBuffer bSend = ByteBuffer.allocate(ac...
[ "private void sendData() {\n String msg = TX_message.getText().toString();\n msg += (char) TXRX_delimiter; // Append delimiter character\n try {\n outStream.write(msg.getBytes());\n logInfo(\"sent: \" + msg);\n } catch (Exception e) {\n logError...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of offensiveAttack
public void setOffensiveAttack(int offensiveAttack) { this.attack = offensiveAttack; }
[ "public void setAttack(int value) {\n this.attack = value;\n }", "public void setAttack(int attack) {\n base.setAttack(attack);\n }", "public int getOffensiveAttack() {\n return attack;\n }", "public void setCanAttack(boolean canAttack){ target.setCanAttack(canAttack);}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set whether or not the item has been returned. Has no effect if the item is not rented.
public void setReturned(boolean returned) { if (this.rented) this.returned = returned; }
[ "@Override\n\tpublic void setReturned() throws StatusException\n\t{\n\t\tif (!isRented())\n\t\t{\n\t\t\tthrow new StatusException(\"Item has not been rented\");\n\t\t}\n\t\trented = false;\n\t}", "public boolean returnItem() {\n\t\tif (this.hired == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.hired = 0;\n\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the path of validation normalized data
public String getNormalizedValidationDataPath(SourceType sourceType) { String normalizedDataPath = getPreferPath(modelConfig.getTrain().getCustomPaths(), Constants.KEY_NORMALIZED_VALIDATION_DATA_PATH); if(StringUtils.isBlank(normalizedDataPath)) { return getPathBySourceType(...
[ "public String getNormalizedValidationDataPath() {\n return getNormalizedValidationDataPath(modelConfig.getDataSet().getSource());\n }", "public String getNormalizedDataPath() {\n return getNormalizedDataPath(modelConfig.getDataSet().getSource());\n }", "public String getNormalizedDataPath(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the charging status
public void getChargeBatteryStatus() { sendOrEnqueue(AirohaMMICmd.GET_CHG_BAT_STATUS); }
[ "public void requestBatteryStatus() {\n send(\"[!GET_VCC]\");\n }", "int getChargingMethod();", "com.zhicheng.wukongcharge.models.TransactionEventProto.transactionEventReq.chargingStateEnumType getChargingState();", "int getDeviceBattery();", "@java.lang.Override public google.maps.fleetengine.v1....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show the garage vehicles
public void showVehicles() { for (Vehicle vehicle : vehicles) { System.out.println(vehicle); } }
[ "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void view_vehicles(){\n\t\tSystem.out.println(\"\\n Sedan Rentals\"); \n\t\tfor (Integer sedan_id: sedan_db.keySet()){\n\t\t\tSystem.out.println(\" \" + s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if opt is a valid menu selection option, false otherwise
public static boolean isValidOption(char opt) { return opt == 'p' || opt == 's' || opt == 'c' || opt == 'q'; }
[ "public boolean isOption(String option);", "private boolean isValidMenuOption(String option, char optionLimit)\r\n {\r\n option = option.trim();\r\n if (option.length() == 1 && option.charAt(0) >= '1' && option.charAt(0) <= optionLimit)\r\n return true;\r\n else \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given the email of the user we get all the books that he already has in the current time
public ArrayList<Book> getBorrowedBooks(String email) throws SQLException, ParseException { Statement myStmt = myConn.createStatement(); ResultSet stringQuery = myStmt.executeQuery( "select b.book_id,m.email,b.book_name,b.description,b.category,b.author,b.book_issue_date,b.entry_date,b.version,b.borrow_perio...
[ "List<Book> getBooks() {\n\n\t\tPreparedStatement pst = null;\n\t\tResultSet rst = null;\n\t\tList<Book> bookListAll = new ArrayList<Book>();\n\t\tConnection con = new DBConnection().getConnection();\n\t\t\n\t\t//sql query for retrive books which were purchesd one year ago\n\t\tString sql = \"Select * from books wh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensure number of languages is correct
@Test void loadDataTestNumberOfLanguages() { int actualNumberOfLanguages = DatabaseConnector.languages.size(); int expectedNumberOfLanguages = 984; assertEquals(expectedNumberOfLanguages, actualNumberOfLanguages); }
[ "Integer numberOfLanguages();", "public int maxLanguages();", "@Test(priority=6)\n\tpublic void verifyRemaininglanguagedisplaysOnclickingLanguageDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.ov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return all categories with his sub categories
public Map<String, ArrayList<Category>> getCategories() { int mainParentId = 0; Map<String, ArrayList<Category>> allCategories = new HashMap<String, ArrayList<Category>>(); //get main categories Set<Category> mainCategories = new HashSet<Category>(categoryDAO.getCategoriesByParentId(mainParen...
[ "Collection<Category> getSubCategories(Category category);", "List<Category> getSubCategories(long categoryUid);", "List<SubCategory> getAllByCategoryId(int categoryId);", "Collection<Category> getCategories();", "List<SubCategory> getAllByCategoryTitle(String categoryTitle);", "List<SubCategory> getSubCa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This version of ucnv_MBCSFromUnicodeWithOffsets() is optimized for singlebyte codepages.
private CoderResult cnvMBCSSingleFromUnicodeWithOffsets(CharBuffer source, ByteBuffer target, IntBuffer offsets, boolean flush) { CoderResult[] cr = { CoderResult.UNDERFLOW }; int sourceArrayIndex; char[] table; byte[] results; // agljport:comment resul...
[ "private CoderResult cnvMBCSSingleToUnicodeWithOffsets(ByteBuffer source, CharBuffer target, IntBuffer offsets,\n boolean flush, CharsetDecoderListener cdl) {\n CoderResult[] cr = { CoderResult.UNDERFLOW };\n\n int sourceArrayIndex;\n int[][] stateTable;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears all user session data stored in shared preferences
public void clearSharedPreferences(){ //clear user session data SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.clear(); editor.apply(); }
[ "public static void clearAllSavedUserData() {\n cacheUser = null;\n cacheAccessToken = null;\n getSharedPreferences().edit().clear().commit();\n }", "public void clearUserData() {\n SharedPreferences.Editor editor = userLocalDataStore.edit();\n editor.clear();\n editor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
? GETTER Dapatkan semua bangunan dengan tipe bangunan buildingType tiap row
private List<Integer> getBuildingTypeEachRow(PlayerType playerType, BuildingType buildingType) { List<Integer> res = new ArrayList<>(); for (int i = 0; i < gameState.gameDetails.mapHeight ; i++) { res.add(getAllBuildingsForPlayer(playerType, b -> b.buildingType == buildingType, i).size()); ...
[ "public void setBuildingType(Byte buildingType) {\n this.buildingType = buildingType;\n }", "public List<BuildingType> getAllBuildingType()\r\n\t{\n\t\tList<BuildingType> list = new ArrayList<BuildingType>();\r\n\t\t// This is the SP to be called\r\n\t\tString query = \"{ call readAllBuildingType}\";\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do signon process (Any sent transactions before do Sign On will be rejected.)
private void doSignOn(XLinkSessionWrapper sessionWrapper) throws XLinkISO8583Exception, IOException { ISOMsg request = new ISOMsg(); try { NetworkMgtUtil.createSignOnMessage(request, sessionWrapper.getNextRequestId()); log.info("Sending Sign On"); XLinkISO8583Util.logISOMsg(request); sessionWrapper.s...
[ "void signInComplete();", "private void silentSignIn() {\n Task<AuthHuaweiId> task = mAuthManager.silentSignIn();\n task.addOnSuccessListener(new OnSuccessListener<AuthHuaweiId>() {\n @Override\n public void onSuccess(AuthHuaweiId authHuaweiId) {\n Log.i(TAG, \"s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: load sample project from XMI and generate SMV code
private SoftwareProject generateTestingReprotoolModel() { URI sampleModelUri = URI.createPlatformPluginURI("/reprotool.model/model/SampleSoftwareProject.xmi", true); ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.getResource(sampleModelUri, true); return (SoftwareProject...
[ "@Test\r\n\tpublic void testExampleVBox() {\n\t\tString filename = \"example/example.vbox\";\r\n\t\tClassLoader classLoader = getClass().getClassLoader();\r\n\t\tFile inputFile = new File(classLoader.getResource(filename).getFile());\r\n\t\t\r\n\t\t// 2. process the file\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tVirtualMach...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a AbstractGraphLayoutReader for reading a graph layout and initializes all data structures.
public AbstractGraphLayoutReader(GreqlEvaluatorFacade evaluator) { this.evaluator = evaluator; initilizeStates(); }
[ "public DiGraphReader() {\n // Configure the graph reader here\n g = null;\n e = null;\n }", "GraphLayout createGraphLayout();", "public Graph load(Reader reader) throws IOException\n {\n return load(reader, new SparseGraph(), null);\n }", "public Graph load(Reader reader,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the link which contains the claimed transaction by the input given. All the links including the given one and all parents of it will be checked (the link denotes the branch to search). Note that only the transaction hash should be checked, the output index is not relevant for this search.
BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);
[ "BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);", "boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);", "BlockChainLink getLink(byte[] hash);", "private Node getReference(DNA key) {\n int hash = key.hashCode();\n if(this.debug)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the num property.
public void setNum(int value) { this.num = value; }
[ "public void setNum(int value) {\n this.num = value;\n }", "public void setNum(int num) {\r\n this.num = num;\r\n }", "public void setNum(String num) {\r\n\t\tthis.num = num;\r\n\t}", "public void xsetNum(org.apache.xmlbeans.XmlInteger num)\r\n {\r\n synchronized (monitor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the any ActionListeners are registered.
public boolean hasActionListeners() { return hasEventListenerList() && getEventListenerList().getListenerCount(ActionListener.class) != 0; }
[ "boolean hasActionEvents() {\r\n if (eventListenerList == null || eventListenerList.isEmpty()) {\r\n return false;\r\n }\r\n return true;\r\n }", "boolean hasActionListener() {\n // Guaranteed to return a non-null array\n Object[] listeners = listenerList.getListen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the temperature from the database. Also notifies the appropriate model listeners.
@Override public com.surwing.model.Temperature deleteTemperature( com.surwing.model.Temperature temperature) throws com.liferay.portal.kernel.exception.SystemException { return _temperatureLocalService.deleteTemperature(temperature); }
[ "@Override\n public com.surwing.model.Temperature deleteTemperature(long temperatureId)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return _temperatureLocalService.deleteTemperature(temperatureId);\n }", "@O...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checker for the "FeatureInstalled2" variable.
public void checkFeatureInstalled2(String x) throws SnmpStatusException;
[ "public void checkFeatureInstalled1(String x) throws SnmpStatusException;", "public void checkFeatureInstalled3(String x) throws SnmpStatusException;", "public String getFeatureInstalled2() throws SnmpStatusException;", "public void checkFeatureInstalled6(String x) throws SnmpStatusException;", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "KeyBox" element
void xsetKeyBox(org.apache.xmlbeans.XmlBoolean keyBox);
[ "void setKeyBox(boolean keyBox);", "void xsetKey1(org.apache.xmlbeans.XmlString key1);", "void xsetKey2(org.apache.xmlbeans.XmlString key2);", "void xsetKey3(org.apache.xmlbeans.XmlString key3);", "public void setKey(String key);", "public void xsetKey(org.apache.xmlbeans.XmlString key)\n {\n sy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
should mine fuel or karbonite? counts robots on our team through castle_talk gets reports and scans for enemy robots
public static void processRobotList() { int id, team, command, unit, msg, tempx, tempy; boolean isVisible; nearbyEnemy = false; resetUnitCount(); for(int i = 0; i < bot.robotList.length; i++) { id = bot.robotList[i].id; team = bot.robotList[i].team; unitCounted = false; //check for vi...
[ "public void countKiwi() \n {\n //check if there are any kiwis here\n for (Occupant occupant : island.getOccupants(player.getPosition())) {\n if (occupant instanceof Kiwi) {\n Kiwi kiwi = (Kiwi) occupant;\n if (!kiwi.counted()) {\n kiwi.co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.header_bg), 0, 0, null);
@Override public void draw(Canvas canvas) { canvas.drawBitmap(bitmapHeader, 0, 0, null); }
[ "private void drawBackground(Canvas canvas) {\n // Use the cached background bitmap.\n if (background == null) {\n Log.w(tag, \"Background not created\");\n } else {\n canvas.drawBitmap(background, 0, 0, backgroundPaint);\n }\n }", "protected void drawHeader(Gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private boolean saveConfirmationEnabled = true;
protected boolean isSaveConfirmationEnabled(Map<String,Object> options){ return checkOptions(options, SupplyOrderTokens.CONFIRMATION); }
[ "public void setConfirmEnabled(boolean isEnabled);", "void setSaveButtonEnabled(boolean isEnabled);", "public boolean isAllowSave() {\r\n return allowSave;\r\n }", "public boolean canSave()\n {\n return true;\n }", "public boolean isSaveRequired() {\r\n return saveRequired;\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor of FavProdRepository class which is a Room repository for favorite products database
FavProdRepository(Application application) { PastScanDatabase db = PastScanDatabase.getDatabase(application); mFavProdDao = db.favProdDao(); mAllFavProducts = mFavProdDao.loadAllFav(); }
[ "public interface ProductRepository {\n /*Definimos las reglas que tendrá el repositorio de nuestro dominio al momento que cualquier repository\n * quiera acceder a productos en la BD, esto nos permite no acoplar nuestra solucion a una BD especifica\n * sino que siempre estemos hablando en terminos de dom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update all places add edit tour. response call this method
public void update_all_places_add_edit_tour(ArrayList<entities.PlaceOfInterest> placesofcity) { Runnable runn = new Runnable() { @Override public void run() { for (entities.PlaceOfInterest place : placesofcity) { PlaceBase sp = new PlaceBase(place); sp.setOnMouseEntered(event -> { sp.setS...
[ "public void update(Tour tour);", "@Override\n\tpublic ComposerPlace update(ComposerPlace obj) {\n\t\t\n\t\tConnection.update(\"UPDATE ComposerPlace SET idCaseSalle =\"+obj.getIdCaseSalle()\n\t\t\t\t\t\t +\",idSeance=\"+obj.getIdSeance()\n\t\t\t\t\t\t +\" WHERE idPlace=\"+obj.getIdPlace()+\";\");\t\t\n\t\tConne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to demonstrate the sample. Invoking this method will walk through all API calls that will be required for simple cart checkout followed with immediate authorization and capture of entire order amount
public void runSample(HttpServletRequest request) { try { this.printMessage("<html><head><title>Simple checkout result</title></head><body><div><pre>"); example.addOrderReferenceDetails(request.getParameter("SellerNote"), request.getParameter("OrderReferenceId"), requ...
[ "private void hitOrderDetailsApi() {\n progressBar.setVisibility(View.VISIBLE);\n ApiInterface apiInterface = RestApi.createServiceAccessToken(this, ApiInterface.class);//empty field is for the access token\n final HashMap<String, String> params = new HashMap<>();\n params.put(Constants....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string addMd52 = 47; optional string addMd52 = 47;
boolean hasAddMd52();
[ "java.lang.String getAddMd52();", "java.lang.String getAddMd51();", "com.google.protobuf.ByteString\r\n getAddMd52Bytes();", "boolean hasAddMd51();", "public Builder setAddMd52Bytes(\r\n com.google.protobuf.ByteString value) {\r\n if (value == null) {\r\n throw new NullPointerExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the supplierPartId property
public String getSupplierPartId() { return this.supplierPartId; }
[ "public void setSupplierPartId(String supplierPartId) {\r\n this.supplierPartId = supplierPartId;\r\n }", "public Integer getSupplierId() {\n return supplierId;\n }", "public String getSupplierId() {\n return this.supplierId;\n }", "public Integer getSupplierid() {\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method of loading any fxml file passsing location and title as parameters
void loadWindow(String location, String title) { try { Parent root = FXMLLoader.load(getClass().getResource(location)); Stage stage = new Stage(StageStyle.DECORATED); stage.setTitle(title); stage.setScene(new Scene(root)); stage.getIcons().add(new ...
[ "private void loadFXML() {\n try {\n FXMLLoader loader = new FXMLLoader(getClass()\n .getResource(\"AddLaptop.fxml\"));\n loader.setController(this);\n loader.setRoot(this);\n loader.load();\n } catch (IOException ex) {\n System...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to split nodes of the given doubly linked list into two halves using the fast/slow pointer strategy
public static Node split(Node head) { Node slow = head; Node fast = head.next; // Advance 'fast' by two nodes, and advance 'slow' by single node while (fast != null) { fast = fast.next; if (fast != null) { slow = slow.next;...
[ "Node split(Node head) {\n\t\t\n\t\tif(head == null) {\t\t\t// Linked list is empty\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tNode fast = head;\n\t\tNode slow = head;\n\t\t\n\t\twhile(fast.next != null && fast.next.next != null) {\n\t\t\tfast = fast.next.next;\n\t\t\tslow = slow.next;\n\t\t}\n\t\t\n\t\tNode temp = sl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the acceptor, i.e., control where the output will go.
static void setAcceptor(TraceMessageAcceptor acceptor) { for (Trace tr : theTraces.values()) { tr.myAcceptor = acceptor; } }
[ "public int getAcceptor() {\n return acceptor;\n }", "public PaxosAcceptor getAcceptor()\n {\n return m_acceptor;\n }", "@Override\n public int getFirstTargetAtom() {\n return acceptor;\n }", "public void setReceiver(InetSocketAddress serverAddress);", "public void setOut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first arret in the ordered set where uuid = &63; and companyId = &63;.
@Override public Arret fetchByUuid_C_First( String uuid, long companyId, OrderByComparator<Arret> orderByComparator) { List<Arret> list = findByUuid_C( uuid, companyId, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
[ "public Foo fetchByUuid_C_First(java.lang.String uuid, long companyId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator);", "public org.liferay.jukebox.model.Album fetchByUuid_C_First(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByCompar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface that manages logic of getting business stakeholder information related to KYC in Mirakl
public interface MiraklBusinessStakeholderDocumentsExtractService extends MiraklDocumentsExtractService { /** * Obtains valids and requiresKYC flagged business stakeholders since a delta time * @param delta * @return {@link List<KYCDocumentBusinessStakeHolderInfoModel>} valids to be sent to * other system for...
[ "Kingdom getKingdom(KingdomUser user);", "public interface HumanResourcesPayrollService {\n\n /**\n * @param positionUnionCode\n * @return\n */\n public boolean validatePositionUnionCode(String positionUnionCode);\n\n /**\n * Pulls position data from an external system for the given posit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column tb_temp_vehicle.series
public String getSeries() { return series; }
[ "@Column(name=\"SERIES_TYPE\")\n public RaceSeriesType getSeriesType()\n {\n return seriesType;\n }", "public java.lang.Long getSERIESNO() {\n return SERIES_NO;\n }", "@Column(name=\"RACE_SERIES\")\n public Integer getRaceSeriesID()\n {\n return raceSeriesID;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Goes through every attribute of a person and compares to the extracted data. Counts the right attributes. Calculates the rate of the right extracted attributes. Generates the table with results.
private void evaluatePersons(EmbeddedDatabase db) { String realAttribute; String discoveredAttribute; int counter_eval; for (int i = 0; i < 20; i++) { counter_eval = 0; log.info("Checking results for " + persons[i]); Person person = EntityFinder.get...
[ "private void evaluateMonuments(EmbeddedDatabase db) {\n\n String realAttribute;\n String discoveredAttribute;\n Person tmpPerson;\n City tmpCity;\n int counter_eval;\n\n for (int i = 0; i < 20; i++) {\n counter_eval = 0;\n tmpCity = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column lt_google_adwords_report_ad.primary_company_name
public String getPrimaryCompanyName() { return primaryCompanyName; }
[ "public java.lang.String getCompanyName() {\n\t\treturn _adsItem.getCompanyName();\n\t}", "public void setPrimaryCompanyName(String primaryCompanyName) {\r\n this.primaryCompanyName = primaryCompanyName;\r\n }", "java.lang.String getCompanyName();", "public java.lang.String getCompanyName() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the confidenceCode property.
public void setConfidenceCode(int value) { this.confidenceCode = value; }
[ "public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCDC_NCS_TCS_SHOWS.Builder setCONFCODE(java.lang.CharSequence value) {\n validate(fields()[31], value);\n this.CONF_CODE = value;\n fieldSetFlags()[31] = true;\n return this;\n }", "public void setCode(ResponseTypes code) \n {\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRule_ExperimentKey" $ANTLR start "rule_ExperimentKey" InternalGaml.g:1083:1: rule_ExperimentKey : ( 'experiment' ) ;
public final void rule_ExperimentKey() throws RecognitionException { int rule_ExperimentKey_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 74) ) { return ; } // InternalGaml.g:1087:2...
[ "public final void entryRule_ExperimentKey() throws RecognitionException {\n int entryRule_ExperimentKey_StartIndex = input.index();\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 73) ) { return ; }\n // InternalGaml.g:1075:1: ( rule_ExperimentKey EOF )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks to see if a sound file exists in the public ringtones directory
public boolean hasRingtone(String fileName, String fileType) { // Check if the file exists. If external storage is not currently mounted this will // think the picture doesn't exist. File file = getRingtone(fileName, fileType); return file.exists(); }
[ "private static boolean checkFileSpeechExisted(Word word) {\n return Algorithms.checkFileExist(AudioPlayer.filename + word.getTarget().replaceAll(\"\\\\s+\", \"\") + \".mp3\");\n }", "public boolean isValidSong() { \n\t\tString filepath = aFilePath.toString();\n\t\tFile f = new File(filepath);\n\t\tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is parsing the expr block
private NodeExpr parseExpr() throws SyntaxException { NodeTerm term=parseTerm(); NodeAddop addop=parseAddop(); if (addop==null) return new NodeExpr(term,null,null); NodeExpr expr=parseExpr(); expr.append(new NodeExpr(term,addop,null)); return expr; }
[ "private Object parseExpr() throws IOException, FSException{\n\n ETreeNode curNode=null;\n boolean end=false;\n Object val;\n boolean negate=false; //flag for unary minus\n boolean not=false;//flag for unary not.\n boolean prevOp=true;//flag - true if previous value was an ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of the updateBuffer property.
public void setUpdateBuffer(Integer updateBuffer) { this.updateBuffer = updateBuffer; this.handleConfig("updateBuffer", updateBuffer); }
[ "public void setBuffer(final byte[] buffer) {\n this.buffer = buffer;\n }", "synchronized void setBuffer(byte[] buffer)\n {\n this.buffer = buffer;\n notifyAll();\n }", "public void setDataBuffer(byte[] buffer) {\r\n\t\tthis.mBuffer = buffer;\r\n\t}", "public void setBu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }