query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns the WFMS_Requisition_Audit persistence.
public WFMS_Requisition_AuditPersistence getWFMS_Requisition_AuditPersistence() { return wfms_Requisition_AuditPersistence; }
[ "public WFMS_RequisitionPersistence getWFMS_RequisitionPersistence() {\n\t\treturn wfms_RequisitionPersistence;\n\t}", "public com.ys.hmawfm.wfms.services.service.WFMS_Requisition_AuditLocalService getWFMS_Requisition_AuditLocalService() {\n\t\treturn wfms_Requisition_AuditLocalService;\n\t}", "public WFMS_COS_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load values into the leaderboard from a given String that is valid YAML.
public void load(String txt) throws ClassCastException { Yaml yaml = new Yaml(); Map<Object, Object> map = (Map<Object, Object>) yaml.load(txt); for (Map.Entry<Object, Object> e : map.entrySet()) { if (!(e.getValue() instanceof Map)) { leaderboard.pu...
[ "public void loadYaml(){\n\t\ty = new Yaml();\n\t}", "public static IYAMLArtifact load( String _in )\n {\n Yaml yaml = new Yaml();\n Object content = yaml.load( _in );\n if ( content instanceof Map<?, ?> )\n return new YObject( null, null, (Map<?, ?>)content );\n else\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stopping state listener for authentication
@Override public void onStop() { super.onStop(); if (authListener != null) { auth.removeAuthStateListener(authListener); } }
[ "@Override\n protected void onStop() {\n super.onStop();\n if (mAuthStateListener != null){\n mAuth.removeAuthStateListener(mAuthStateListener);\n }\n }", "@Override\n public void stop(){\n loginController.stopCommunicationHandler();\n }", "@Override\n publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We need to force the TextInputLayout to generate an invisible error view in order to avoid jumps on the MuunTextInput layout after showing an error.
private void preloadErrorView() { if (!isInEditMode()) { layout.setErrorEnabled(true); } }
[ "private void setupHideErrorForEditText() {\n binding.inputTextField.getEditText().addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the boolean isInvertedColorScheme() method test.
@Test public void testIsInvertedColorScheme_1() throws Exception { boolean result = ColorUtils.isInvertedColorScheme(); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at org.eclipse.bpel.common.u...
[ "public abstract boolean isInverted();", "@Test\n\tpublic void testIsInvertedColorScheme_2()\n\t\tthrows Exception {\n\n\t\tboolean result = ColorUtils.isInvertedColorScheme();\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// jav...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / SETTERS / Test de setId(int idO).
@Test public final void testSetId() { o.setId(2); Assert.assertEquals(o.getId(), 2); o.setId(1); Assert.assertEquals(o.getId(), 1); }
[ "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "@Test\r\n public void testSetId() {\r\n System.out.println(\"setId\");\r\n int id = 2;\r\n Telefono instance = new Telefono();\r\n instance.setId(id);\r\n assertEquals(id, instance.getId());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1. Assigns the Taxi to a passenger group 2. Removes the taxi from the Taxi Linked lost 3. Call the notifyObservers method which updates the screen
public void assignTaxi(Taxi taxi) { if (!taxis.isEmpty()) { taxis.remove(taxi); notifyObservers(); } }
[ "public void managementPassengers(){\n List<Passenger> passengersOut = lift.getPassengers().stream()\n .filter(passenger -> lift.getCurrentFloor().getNumber() == passenger.getRequiredFloor())\n .collect(Collectors.toList());\n lift.passengersOut(passengersOut);\n L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create and return a zip file path
public static String getZipFile() { File file = new File(getZipBaseDir(), System.currentTimeMillis() + ".zip"); try { boolean ignore = file.createNewFile(); } catch (IOException ignore) { } return file.getAbsolutePath(); }
[ "String getZipFilePath() {\n return packageRootPrefix.isEmpty() ? zipFilePath\n : zipFilePath + \"!/\" + packageRootPrefix.substring(0, packageRootPrefix.length() - 1);\n }", "Path getArchiveFilePath();", "private String generateZipEntry(String file){\n\t\tString sourceFolder = SDCARD +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes and returns a fitness score for handling the current message. Higher scores give higher probability of this handler being selected for handling the message.
Float getActivationScore(ChatMessage message) { MessageHandler aPrecendece = this.getClass().getDeclaredAnnotation(MessageHandler.class); if (aPrecendece == null) { return 0f; } for (Method m : methods) { StartsWithPhrase startsWithPhraseAnnotation = m.getAnno...
[ "int getFitnessScore(Fitness fitness) {\n\t\tif (score == -1) {\n\t\t\tscore = fitness.computeFitness(this);\n\t\t}\n\n\t\treturn score;\n\t}", "public int fitness() {\n\t\tint fitnessLevel;\n\t\t\n\t\tint targetLength = myTarget.size();\n\t\tint currentLength = myGeneString.size();\n\t\tint agreedChar = 0;\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recoloring and deletion of a node that has 1 or 0 children
private void deleteDegreeOneChild(Node curr, AtomicReference<Node> rootRef) { Node child = curr.right.isNull ? curr.left : curr.right; replaceNode(curr, child, rootRef); if(curr.color == Color.BLACK) { if(child.color == Color.RED) { child.color = Color.BLACK; } ...
[ "private void fixDelete(RedBlackTreeNode py) {\n\t\twhile (py.colour == COLOUR.BLACK && root != py) {\n\t\t\tif (py.parent.left == py) {\n\t\t\t\tRedBlackTreeNode v = py.parent.right;\n\t\t\t\tif (v.colour == COLOUR.RED) {\n\t\t\t\t\t// if v colour is red, left rotate\n\t\t\t\t\tpy.parent.colour = COLOUR.RED;\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
copies content from arrayA to arrayB
private void copyAToB(int[] arrayA, int[] arrayB) { System.arraycopy(arrayA, 0, arrayB, 0, arrayB.length); }
[ "private void copyArray(java.lang.Object[] destArray,\n java.lang.Object[] sourceArray)\n {\n int index;\n for(index = 0; index < arraySize; index++)\n {\n destArray[index] = sourceArray[index]; \n } \n }", "private void copyAToC(int[] array...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return position of parent of child at pos
private int parent(int pos) { return (pos-1)/ 2; }
[ "public int parent(int pos) {\n assert pos > 0 : \"Position has no parent\";\n return (pos-1)/2;\n }", "private int parent(int pos) {\n\t\treturn pos / 2;\n\t}", "private int getPosition() {\n\t\tif (parent_ == null)\n\t\t\treturn -1;\n\t\treturn parent_.children_.indexOf(this);\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XConstructorCall__Group_4_1_1_1__1__Impl" $ANTLR start "rule__XBooleanLiteral__Group__0" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12267:1: rule__XBooleanLiteral__Group__0 : rule__XBooleanLiteral__Group__0__Impl rule__XB...
public final void rule__XBooleanLiteral__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12271:1: ( rule__XBooleanLi...
[ "public final void rule__XBooleanLiteral__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12283:1: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete rule by reference field schema PK id.
@Override public void deleteRuleByReferenceFieldSchemaPKId(String datasetSchemaId, String referenceFieldSchemaPKId) { rulesRepository.deleteRuleByReferenceFieldSchemaPKId(new ObjectId(datasetSchemaId), new ObjectId(referenceFieldSchemaPKId)); }
[ "void deleteRule(Integer ruleId);", "@Override\n public void deleteRuleByReferenceId(String datasetSchemaId, String referenceId) {\n rulesRepository.deleteRuleByReferenceId(new ObjectId(datasetSchemaId),\n new ObjectId(referenceId));\n }", "@Override\n public void deleteAutomaticRuleByReferenceId(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retorna o titulo do CD.
public String getTituloCD () { return tituloCD; }
[ "java.lang.String getTitile();", "public String getCdOrDVDtitle() {\n\t\treturn cdOrDVDtitle;\n\t}", "String getConftitle();", "String getTitre();", "public String getChcTitle() {\n return chcTitle;\n }", "public String getTitulo() {\r\n\t\treturn titulo;\r\n\t}", "@Override\n\tpublic java.lan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the active VPLEX volumes in the CG.
private List<Volume> getActiveVPLEXVolumesForCG(URI cgURI) { List<Volume> cgVPLEXVolumes = new ArrayList<Volume>(); List<Volume> cgVolumes = CustomQueryUtility.queryActiveResourcesByConstraint( dbClient, Volume.class, ContainmentConstraint.Factory. getVolumesByCon...
[ "public org.landxml.schema.landXML11.VolumeDocument.Volume[] getVolumeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(VOL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function returns the abletojump.
public boolean getAbleToJump() { return isAbleToJump; }
[ "public boolean canJump() {\n\t\treturn false;\n\t}", "public int getMaxJump() {return 2;}", "public boolean getJumps(){\n return this.jumped;\n }", "public boolean canJump() {\n\t\t\tif (direction > Math.PI)\n\t\t\t\treturn false;\n\t\t\tif (currentActionPoints == 0)\n\t\t\t\treturn false;\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method takes in the index of a wall and determines what index of A ROW it is in.
public int getRowIndex(int listIndex) { int row = getRow(listIndex); //Determines which row wall is in. return listIndex-(row*21); //Uses the walls row to calculate the walls index in that row. }
[ "public int getRow(int listIndex)\n {\n int row = 0;\n \n //Checks each row to see if index of wall belongs to that row.\n for(int i=0; i<21; i++)\n { \n int leftBound = (20*i)+i; //First index in row i.\n int rightBound = leftBound+21; //Last index in row i.\n \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Liefert alle Folder des MailAccounts, sortiert nach FULLNAME.
List<MailFolder> getMailFolder(long accountID);
[ "List<MailFolder> getFolder();", "public void getAllFolders();", "private IFolder getUnsortedFolder() {\n \t\tString unsortedFolder = (String) arguments.get(UNSORTED_FOLDER);\n \t\tif (unsortedFolder == null)\n \t\t\tunsortedFolder = DEFAULT_UNSORTED_FOLDER;\n \t\treturn getProject().getFolder(unsortedFolder);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for check if 2 client with the same name corresponds to the same client :
@Test public void twoClientObjectsWithSameNameCorrespondsToSameClient() throws IllegalStateException, UnknownVehicleException { this.agency.addVehicle(v); assertEquals(100,this.agency.rentVehicle(client1, v),0.0001); assertTrue(this.agency.hasRentedAVehicle(client1)); assertTrue(this.agency.hasRentedAVehicle(c...
[ "protected Client findDuplicate(Client client) {\n \t\tfor (Client otherClient : this.clients) {\n \t\t\tif (client.equals(otherClient)) {\n \t\t\t\treturn otherClient;\n \t\t\t}\n \n \t\t}\n \t\treturn null;\n \t}", "public boolean exists(String name){\r\n for(int i=0; i<clientList.size() ; i++){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Methods to Reflect the State of the HVAC System
private void reflectNewState() { updateWheelView(); reflectHVACOnState(); reflectActualTemps(); reflectDefrosterState(); }
[ "private void reflectHVACOnState() {\n HVACState.State hvac = appContext.lastKnownHVACState.get();\n boolean hvacOn = (hvac.fanStatus > 0);\n hvacOnButton.setSelected(hvacOn);\n hvacOffButton.setSelected(!hvacOn);\n reflectFanStatus();\n updateCoolHotImages();\n doub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads the database from a file, or the web if none is found locally.
private void loadDatabase() { try { try { // Check to make sure the Bmod Database is there, if not, try // downloading from the website. if(!Files.exists(m_databaseFile)) { Files.createDirectories(m_databaseFile.getParent()); byte[] file = ExtensionPoints.readURLAsBytes("http:...
[ "private void loadDatabase(){\n \t\n String db = jFieldDBFile.getText().trim();\n boolean badzip = false;\n \n Collection<String> zf = new LinkedList<String>();\n \n // handle zipcodes if zip filtering specified\n if(jCheckBoxZipFilter.isSelected()){\n\t \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the current battery voltage
double getBatteryVoltage() { double result = Double.POSITIVE_INFINITY; for (VoltageSensor sensor : hardwareMap.voltageSensor) { double voltage = sensor.getVoltage(); if (voltage > 0) { result = Math.min(result, voltage); } } return resu...
[ "public double getBatteryVoltage() {\n double result = Double.POSITIVE_INFINITY;\n for (VoltageSensor sensor : hardwareMap.voltageSensor) {\n double voltage = sensor.getVoltage();\n if (voltage > 0) { result = Math.min(result, voltage);\n }\n }\n return r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a station Graph for the given input matrix
public Graph createStationGraph(int[][] inputMatrix) { // set up a graph with nodes as stations and weighted cost edges to // other stations Node station = new Node(1); Graph graph = new Graph(station); for (int i = 1; i < inputMatrix.length + 1; i++) { graph.addNode(new Node(i)); } // add the nodes ...
[ "public GraphOfPorts(int nV) {\r\n //when creating a graph\r\n this.nV = nV;\r\n //this will be used to se the edges for our graph\r\n int[][] graphEdges = new int[nV][nV];\r\n //initalise weighted graph with edges weighted -1 (non existant)\r\n //scan through the rows and ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether the given date is a valid creation time.
public static boolean isValidCreationTime(Date date) { return (date!=null) && (date.getTime()<=System.currentTimeMillis()); }
[ "private boolean isValid(String creation_time) {\n\t\tSimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\", Locale.ITALY);\n\t\tDate now = new Date();\n\t\tDate olderDate = null;\n\n\t\ttry {\n\t\t\tolderDate = ISO8601DATEFORMAT.parse(creation_time);\n\t\t} catch (java.text.ParseExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make the network by calling the appropriate methods
protected abstract void makeNetwork();
[ "Network createNetwork();", "private PetriNet buildPaperNet(){\n //create nodes\n final var start = new PlaceImpl(URI.create(\"place://start\"));\n start.setMarkers(1);\n final var copy = new PlaceImpl(URI.create(\"place://copy\"));\n final var init = new PlaceImpl(URI.create(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a Compute button displaying the given text.
public ComputeButton(String label) { super(label); setBackground(Color.lightGray); enableEvents(AWTEvent.ACTION_EVENT_MASK); }
[ "public static JButton createButton(String text){\n return Block223MainPage.createButton(text);\n }", "public ComputeButton() {\r\n this(\"Compute!\");\r\n }", "JButton createButton(String text);", "private Button createButton(String text, String format) {\n Button btn = new Button();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the scroll bar's range.
private void updateScrollbarRange() { // TODO: This needs some work to prevent overscroll // Calculate the total number of rows needed to display ALL items int totalNumberOfRows = (int)Math.ceil( this.repo.size() / (double)AbstractGuiConstantsACT.ME_COLUMNS ); // Calculate the scroll based on how many rows ca...
[ "public void updateCursorAndScrollBar() {\n cursor.setX(currentText.getCursorX());\n int currentLine = currentText.getCursorY() / currentText.getTextHeight();\n scrollBar.setMax(Math.max(0, currentText.getLineCount() - windowHeight / currentText.getTextHeight()));\n if (currentLine <= sc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
In place update of the travel times on the links. Based on the flows on each links, updates the time taken to travers the link. Sets the values of travel times on each link object.
private void updateTravelTimes(double[] currentFlow) { for (int a = 0; a < L; a++) { long linkID = linkIDList.get(a); Link link = linkMap.get(linkID); double cost = link.getFree() * (1 + link.getAlpha() * Math.pow(currentFlow[a] / link.getCapacity(), link.getPower())); ...
[ "private void calculateTravelTime() {\n for(MyEdge edge : edges) {\n this.traveltime += edge.getTravelTime();\n }\n }", "public void updateTravelledAndVisited() {\n Storage storage = Main.getStorage();\n routeStatsCalculator.updateLeastTravelledRoute(storage.getHistory());\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apartment apartment = new Apartment(apartmentsCollection.size() + 1, Integer.parseInt(numOfRooms.getText()), bid, personsCollection.size() 1, Double.parseDouble(size.getText()), Double.parseDouble(price.getText()));
public void addApartment(int bid) throws IOException { Apartment apartment = new Apartment(apartmentsCollection.size() + 1, Integer.parseInt(numOfRooms.getText()), bid, cabinetMarker, Double.parseDouble(size.getText()), Double.parseDouble(price.getText())); try { // ...
[ "public static void addApartment(){\r\n System.out.println(\"\\nPlease enter in the address for the apartment you wish to add.\");\r\n scanner.nextLine(); // prevent double enter\r\n System.out.print(\"\\tStreet: \");\r\n String street = scanner.nextLine()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fixed64 leastSignificantID = 2;
public long getLeastSignificantID() { return leastSignificantID_; }
[ "long getLeastSignificantID();", "long getMostSignificantID();", "long getTestFixed64();", "long getTestSfixed64();", "public long getMostSignificantID() {\n return mostSignificantID_;\n }", "public long getMostSignificantID() {\n return mostSignificantID_;\n }", "int bitsPrecisionOf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Once Focus is no longer needed, it is abandoned, and the Music Player is stopped
public void abandonFocus() { audioMan = (AudioManager) ContextProvider.getContext().getSystemService(Context.AUDIO_SERVICE); audioMan.abandonAudioFocus(focusChangeListener); MusicController.pressStop(); }
[ "public void lostFocus() {\r\n sound.stop(\"mainmenu\");\r\n }", "private void giveUpAudioFocus() {\n Timber.d(\"giveUpAudioFocus\");\n if (audioManager.abandonAudioFocus(this) == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n audioFocus = AUDIO_NO_FOCUS_NO_DUCK;\n }\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modified date of this e s f match type.
@Override public void setModifiedDate(java.util.Date modifiedDate) { _esfMatchType.setModifiedDate(modifiedDate); }
[ "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_esfMatchResult.setModifiedDate(modifiedDate);\n\t}", "public void setModifiedDate(Date modifiedDate);", "public void setModified(Date modified)\n {\n this.modified = modified;\n }", "@Override\n\tpublic void setModifie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that the tag prefix search is caseinsensitive.
@Test public void testTagPrefixSearchCaseInsensitivity() { String tagPrefix = "ABC"; String tag = tagPrefix + random(); User user = TestUtils.createRandomUser(false); Blog blog = TestUtils.createRandomBlog(true, true, user); TaggingCoreItemUTPExtension filter = new Tagg...
[ "boolean caseSensitive();", "static boolean hasPrefix( String string, String prefix ) {\n if (HttpUnitOptions.getMatchesIgnoreCase()) {\n return string.toUpperCase().startsWith( prefix.toUpperCase() );\n } else {\n return string.startsWith( prefix );\n }\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get ICMSST Tax Base Type. Identifies a ICMSST Tax Base Type
public String getLBR_ICMSST_TaxBaseType();
[ "public String getLBR_ICMS_TaxBaseType();", "public String getTypeOfTax() {\n return typeOfTax;\n }", "public void setLBR_ICMSST_TaxBaseType (String LBR_ICMSST_TaxBaseType);", "public void setLBR_ICMS_TaxBaseType (String LBR_ICMS_TaxBaseType);", "public String getLBR_ICMS_TaxReliefType();", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the layer activators. Activators are executed in order around the Layer activation and passivation.
@SuppressWarnings( { "unchecked","varargs" } ) LayerAssembly withActivators( Class<? extends Activator<Layer>>... activators );
[ "public void activate() {\n neurons.forEach(Neuron::activate);\n }", "public void activateAll(IActivator activator, Long... toActivate) {\n\t\tif (! enabled) {\n\t\t\treturn;\n\t\t}\n\t\tfor (Long id : toActivate) {\n\t\t\tactivate(id, activator);\n\t\t}\n\t}", "public void setActivationFunction(Activ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'calle' field.
public void setCalle(java.lang.CharSequence value) { this.calle = value; }
[ "public expedidoEn.emisor.comprobante.Builder setCalle(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.calle = value;\n fieldSetFlags()[4] = true;\n return this; \n }", "public void setCalle(String calle) {\n this.calle = calle;\n }", "public String getCal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO completely remove AvailableTileAdapter
private void addAvailableTiles() { AvailableTileAdapter mAvailableTileAdapter = new AvailableTileAdapter(mRecords, mContext); int count = mAvailableTileAdapter.getItemCount(); for (int i = 0; i < count; i++) { mTileSpecs.add((String) mAvailableTileAdapter.mRecords.get(i)); ...
[ "TileItem getCurrentTile();", "@Override\r\n public void onTileAdded() {\r\n super.onTileAdded();\r\n //Log.d(TAG, \"on tile added running\");\r\n initTileState();\r\n }", "@Override\r\n public boolean isTileOccupied() {\r\n return false;\r\n }", "@Override\n public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all org.semanticwb.process.model.MultiInstanceLoopCharacteristics with a determined ModifiedBy
public static java.util.Iterator<org.semanticwb.process.model.MultiInstanceLoopCharacteristics> listMultiInstanceLoopCharacteristicsByModifiedBy(org.semanticwb.model.User value) { org.semanticwb.model.GenericIterator<org.semanticwb.process.model.MultiInstanceLoopCharacteristics> it=new org.semanti...
[ "public static java.util.Iterator<org.semanticwb.process.model.MultiInstanceLoopCharacteristics> listMultiInstanceLoopCharacteristicses()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.model.MultiInstanc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if stage containing observing Vertex is appropriate for inserting splitter vertex.
private boolean isAppropriateForInsertingSplitterVertex(final IRDAG dag, final IRVertex observingVertex, final IREdge observingEdge, final Map<IRV...
[ "public boolean isVertex();", "protected boolean shouldUseVBOs(DrawContext dc)\n {\n return dc.getGLRuntimeCapabilities().isUseVertexBufferObject();\n }", "boolean hasIsVertexOf();", "public synchronized boolean hasSplitParent(final JsonObject episode) {\n\t\treturn (getSplitParentId(episode) > -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the right neighbor.
public Board getRightNeighbor() { return rightNeighbor; }
[ "Lane getRightNeighbor();", "public Segment getRightNeighbor()\n\t{\n\t\treturn rightNeighbor;\n\t}", "N getRightNode();", "boolean hasRightNeighbor();", "public int getRightEdge() {\n return rightEdge;\n }", "private static Position getRightBottomNeighbor(Position curr, int side) {\n int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate values to be returned by next_token() // Symbol TOKEN ( int code , Objext value) // code from class sym // Symbol TOKEN ( int code ) == TOKEN (code , yytext () )
java_cup.runtime.Symbol TOKEN(int code) { return TOKEN(code, yytext()); }
[ "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n\n\tSymbol symbol = this.getScanner().next_token();\n\t/*if(symbol != null && symbol.value != null){\n\t\tSystem.out.println(symbol.toString() + \" \" + symbol.value.toString());\n\t}*/\n\tif(symbol.sym == sym.INVALID){\n\t\tSystem.err.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given a start and stop time, return an iterator over ranges in this granularity that should be rolled up into single points in the next coarser granularity. Here is an example: Given start/end (s,e), we need to return all the ranges in Y that correspond to rollup periods A,B,C. This involves returning ranges prior to (...
public static Iterable<Range> getRangesToRollup(Granularity g, final long startMillis, final long stopMillis) throws GranularityException { final long snappedStartMillis = g.coarser().snapMillis(startMillis); final long snappedStopMillis = g.coarser()....
[ "public abstract List<Interval<T>> getTimeIntervals(T start, T end);", "public static Map<Range, Iterable<Range>> mapFinerRanges(Granularity g, Range range) throws GranularityException {\n\n if(range.getStart() >= range.getStop())\n throw new IllegalArgumentException(\"start cannot be greater th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
logInfo(context, "Processing impex files:"); logInfo(context, "/heartb2bcommerceinitialdata/import/data/internalordergroups.impex"); importImpexFile(context, "/heartb2bcommerceinitialdata/import/data/internalordergroups.impex", false); logInfo(context, "/heartb2bcommerceinitialdata/import/data/essentialdata.impex"); im...
@SystemSetup(type = Type.PROJECT, process = Process.ALL) public void createProjectData(final SystemSetupContext context) { // logInfo(context, // "<i><b>/heartb2bcommerceinitialdata/import/data/essential-data.impex</b></i>"); // importImpexFile(context, // "/heartb2bcommerceinitialdata/import/data/essential...
[ "void importSampleDataProcess(final SystemSetupContext context)\r\n\t{\r\n\t\timportMarketCarrierData(context, PROCESS_DATA);\r\n\t\timportMarketCarrierData(context, CARRIER_DATA);\r\n\t}", "@Override\n\tpublic void process() {\n\t\tString dirName = BsvTableLookup.getInstance().getInputDir();//+ File.separator + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the day setting for the default constructor is working.
@Test public void testDefaultConstructorForDay() { OurDate date = new OurDate (); assertEquals ("Day is initialized to 0", 0, date.getDay(), EPSILON); }
[ "public WeatherDayTest()\n {\n }", "public boolean testNullDay(){\n\n timesheet = new Timesheet();\n\n try {\n timesheet.setDayHours(1, 20);\n } catch (NullPointerException ex) {\n return true;\n }\n\n return false;\n }", "@Test\n\tpublic void te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A helper method that list all ports accessible via rxtx and prints them on System.out.
public static void listSerialPorts() { println("available ports on system"); println("-------------------------"); Enumeration ports = CommPortIdentifier.getPortIdentifiers(); while (ports.hasMoreElements()) println(((CommPortIdentifier)ports.nextElement()).getName()); println("-------------------------...
[ "public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}", "private void listPorts() {\n\t\tint i = 1;\n\t\tfor (Portfolio port : getContext().getUserPorts())\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of addNewMaterial method, of class AddMaterialController.
@Test public void testAddNewMaterial() { System.out.println("addNewMaterial"); Material material = new Material("Acrylic", 10000.0, 100.0, 1000.0, 500.0, 100.0, true); instance.addNewMaterial(); instance.setMaterialData("Acrylic", 10000.0, 100.0, 1000.0, 500.0, 100.0, true); ...
[ "@Test\n public void testRegisterMaterial1() {\n System.out.println(\"addNewMaterial\");\n Material material = new Material(\"Acrylic\", 10000.0, 100.0, 1000.0, 500.0, 100.0, true);\n instance.addNewMaterial();\n instance.setMaterialData(\"Acrylic\", 10000.0, 100.0, 1000.0, 500.0, 100...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function chooses d jobs randomly and remove them from the schedule list. Then make two subsequences: one contains removed jobs and another contains the rest jobs.
public void destructSolution(){ Random rand = new Random(); int randomJobsCount = rand.nextInt(schedule.size()); ArrayList<Integer> indexRemovedList = new ArrayList<Integer>(); if (randomJobsCount == 0) randomJobsCount++; // choose random jobs and remove them. for(int i...
[ "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public void getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the rollup for the parallelized streams that is sorted based on the original (nonparallel) sort order.
TupleStream getSortedRollupStream(ParallelListStream plistStream, Metric[] rollupMetrics) throws IOException;
[ "public interface ParallelMetricsRollup {\n\n /**\n * Given a list of collections, return an array of TupleStream for each partition.\n *\n * @param partitions A list of collections to parallelize metrics computation across.\n * @return An array of TupleStream for each partition requested.\n * @throws IO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current control mode of the Talon. Please don't use this for anything other than logging.
@Override public String getControlMode() { return this.controlMode.name(); }
[ "public ControlMode getCurrentControlMode() {\n return currentControlMode;\n }", "public CurrentMode getCurrentMode();", "public PowerTimeLine getControlMode() {\n\t\treturn controlMode;\n\t}", "public ControlMode getRotatorControlMode()\r\n\t{\r\n\t\treturn rotator.getControlMode();\r\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Request the cardholder to perform the Cardholder verification specified by the kernel.
public void doCardHolderVerify(CVMMethod cvm) throws RemoteException { outputText("=> onCardHolderVerify | " + EMVInfoUtil.getCVMDataDesc(cvm)); Bundle param = new Bundle(); param.putByteArray(PinpadData.PIN_LIMIT, new byte[] { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12}); OnPinEntryListener listener = new OnPinEntr...
[ "void askLeaderCardActivation();", "void askBuyDevCards();", "void beginVCard();", "public void v_Verify_Guest2_Displayed(){\n\t}", "public void v_Verify_Guest11_Displayed(){\n\t}", "public CompletionStage<Result> verify()\n {\n IRequestValidator requestValidator=new CertVerifyRequestValidator()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bidirectional manytoone association to RelacionLaboral
@ManyToOne @JoinColumn(name="RLLB_ID") public RelacionLaboral getRelacionLaboral() { return this.relacionLaboral; }
[ "@ManyToOne\r\n\t@JoinColumn(name=\"MDLB_ID\")\r\n\tpublic ModalidadLaboral getModalidadLaboral() {\r\n\t\treturn this.modalidadLaboral;\r\n\t}", "boolean isManyToOne();", "public void _linkBase(AssociationEnd base1);", "RelationalDependency createRelationalDependency();", "public ForeignInfo foreignWhiteNo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column USERPAYTYPSIGNINFO.SIGNNAME
public String getSignname() { return signname; }
[ "public String getSignName() {\n return signName;\n }", "public void setSignName(String signName) {\n this.signName = signName;\n }", "public String getuSign() {\n return uSign;\n }", "public String getPayName() {\n return payName;\n }", "public String getSignCode() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementation of CopyListing::buildListing(). Creates the copy listing by "globbing" all sourcepaths.
@Override public void doBuildListing(Path pathToListingFile, DistCpContext context) throws IOException { List<Path> globbedPaths = new ArrayList<Path>(); if (context.getSourcePaths().isEmpty()) { throw new InvalidInputException("Nothing to process. Source paths::EMPTY"); } for (Path p ...
[ "public SourceLister() {\n this(defaultSrcDirs);\n }", "private void buildChanList(CTFile sourceFolder, ArrayList<String>ChanList, boolean fastSearch) {\n\n\t\tCTFile[] listOfFiles = sourceFolder.listFiles();\n\t\tif(listOfFiles == null) return;\n//\t\tCTinfo.debugPrint(\"buildChanList, folder: \"+sourc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a PatchServiceUsed from its string representation.
@JsonCreator public static PatchServiceUsed fromString(String name) { return fromString(name, PatchServiceUsed.class); }
[ "public PatchServiceUsed patchServiceUsed() {\n return this.patchServiceUsed;\n }", "public static @Nullable ServiceTemplate parse(@NonNull String template) {\n // check if the template contains a storage-name splitter\n var parts = template.split(\":\");\n if (parts.length == 0 || parts.length...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the delay between two nodes.
double getDelay(long srcID, long destID);
[ "public Integer getNodeDelay() {\r\n return this.nodeDelayProperty.get();\r\n }", "long getDelay();", "Duration getDelay();", "private double getNetworkDelay(final long src, final long dst) {\n return getSimulation().getNetworkTopology().getDelay(src, dst);\n }", "public double distance(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create event listener that listens for button click and runs the startQuiz method, which starts the quiz activity
@Override public void onClick(View v) { startQuiz(); }
[ "public void onButtonStartQuiz(View view) {\n if(radioButtonLevelOne.isChecked()) level = 1;\n if(radioButtonLevelTwo.isChecked()) level = 2;\n if(radioButtonLevelThree.isChecked()) level = 3;\n\n if(radioButton30.isChecked()) seconds = 30;\n if(radioButton60.isChecked()) seconds ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ANALYZE // Activates the ANALYZE mode.
static void setAnalyze(boolean analyze) { ANALYZE = analyze; }
[ "boolean getAnalyze() {\n\t\treturn ANALYZE;\n\t}", "public void analyze() throws SQLException {\n Statement stat = con.createStatement();\n\n try {\n stat.executeUpdate(\"ANALYZE\");\n } finally {\n stat.close();\n }\n }", "public boolean autoAnalyze() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Routine to check if the player has triggered the gate, accepts the player x,y,width,height
public boolean playerThrough(int px, int py, int pw, int ph){ Line2D.Double line = new Line2D.Double(p1,p2); //the gate line //check if line intersects the player's rectangle of space if(line.intersects(px, py, pw, ph)){ return true; //gate triggered } return false; //gate not triggered...
[ "public void checkCollision() {\n\t\txdest = x + dx; //calculates where player will be \n\t\tydest = y + dy;\n\t\t\n\t\t//if players next position is where a block is\n\t\tfor (int i = 0;i<tileMap.getBlocks();i++) {\n\t\t\tif(xdest==tileMap.getXMap(i) && ydest==tileMap.getYMap(i)) {\n\t\t\t\tdx = 0; //makes them n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
map&lt;string, string&gt; expressions = 3;
java.util.Map<java.lang.String, java.lang.String> getExpressions();
[ "public Map<Formal, Actual> substitutions();", "public void setExpressionMap(Map<String, String> expressionMap)\n {\n this.expressionMap = expressionMap;\n }", "<K, V> Map<K, V> evaluateToMap(Class<K> keyClass, Class<V> valueClass, String expression) throws ConstrettoExpressionException, ConstrettoConversi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Applies a block rotation to a block state. By default, this returns the provided block state.
@Deprecated public BlockState rotate(BlockState state, BlockRotation rotation) { return state; }
[ "@Override\r\n\tpublic IBlockState withRotation(IBlockState state, Rotation rot)\r\n {\r\n switch (rot)\r\n {\r\n case CLOCKWISE_180:\r\n return state.withProperty(NORTH, state.getValue(SOUTH)).withProperty(EAST, state.getValue(WEST)).withProperty(SOUTH, state.getValue(NOR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methods //Effects: This method declares the variable readFile of type Scanner using the class ManagerView. This readFile variable is then used to read any files from the folder TicketFiles. If any exceptions are caught, they will return that there exists a file. If no exceptions are caught, the method will return false...
public static boolean fileExistsChild() { try { ManagerView.readFile = new Scanner(new File("TicketFiles\\" + CustomerEntry.ticketNumber+".txt")); } catch (FileNotFoundException e) { return false; } catch (NullPointerException e) { return true; } ...
[ "public static void readTicketsFromFile()\n\t{\n\t\t \n\t\t \n\t\t //credit for date formatting: https://www.mkyong.com/java/how-to-convert-string-to-date-java/\n\t\t \n\t\t \n\t\t try{\n\t\t FileReader reader = new FileReader(\"OpenTickets.txt\");\n //BufferedReader combines the characters read into whole ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a couse with sprcifying course's name and course's student amount.
public Course(String name, int student_amount) { this.course_name = name; student_in_couse = new MyDynamicArray<Student>(student_amount); }
[ "public Course(String name) {\n this.name = name;\n // at first, a course has no registered student\n numberOfStudent = 0;\n }", "public Course (double creditHours) {\r\n\t\tname = \"A New Course\";\r\n\t\tnumGrade = 0;\r\n\t\tcredithours = creditHours;\r\n\t\tletterGrade = \"\";\r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the unread column for the specified MailItem. If the MailItem is a Conversation, Tag or Folder, sets the unread column for all related items.
public static void alterUnread(MailItem item, boolean unread) throws ServiceException { Mailbox mbox = item.getMailbox(); assert(Db.supports(Db.Capability.ROW_LEVEL_LOCKING) || Thread.holdsLock(mbox)); Connection conn = mbox.getOperationConnection(); PreparedStatement stmt = null; ...
[ "public void setUnread(boolean unread) {\r\n this.unread = unread;\r\n }", "public void setUnread(java.lang.String unread) {\n this.unread = unread;\n }", "public void setUnreadCount(int unreadCount) {\n this.unreadCount = unreadCount;\n }", "public void markNotificationsAsRead()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OM DB has the tenant state. But the user list in a Ranger role is tampered with. Expect sync service to restore that Ranger role to the desired state.
@Test public void testRecoverRangerRole() throws Exception { long startingRangerVersion = initBGSync(); createRolesAndPoliciesInRanger(true); long rangerVersionAfterCreation = bgSync.getRangerOzoneServicePolicyVersion(); Assert.assertTrue(rangerVersionAfterCreation >= startingRangerVersion);...
[ "@Test\n public void testConsistentState() throws Exception {\n long startingRangerVersion = initBGSync();\n\n // Create roles and policies in ranger that are\n // backed up by OzoneManger Multi-Tenant tables\n createRolesAndPoliciesInRanger(true);\n\n long rangerSvcVersionBefore = bgSync.getRangerO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A unique string that you specified when you created the Resolver rule. CreatorRequestId identifies the request and allows failed requests to be retried without the risk of running the operation twice.
public ResolverRule withCreatorRequestId(String creatorRequestId) { setCreatorRequestId(creatorRequestId); return this; }
[ "public String getCreatorRequestId() {\n return this.creatorRequestId;\n }", "public void setCreatorRequestId(String creatorRequestId) {\n this.creatorRequestId = creatorRequestId;\n }", "public final String createRequestId() {\n long requestId = currentId.addAndGet(1);\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the sum of all numerical digits in the String
public static int numeralSum(String s) { char[] numbers = s.toCharArray(); int sum = 0; for(int i = 0;i<numbers.length;i++) { if(Character.isDigit(numbers[i])) { int x = Character.getNumericValue(numbers[i]); sum += x; } } return sum; }
[ "public static int sumNumbers(String string){\n int sum =0;\n\n for(int i = 0; i < string.length(); i++){\n\n\n if(Character.isDigit(string.charAt(i))){\n\n int ascii = string.charAt(i);\n char val = ((char) ascii);\n int charval = Character.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
methods for resetting top panel textfields after sale/return button pressed
public void resetTextFields(){ wineField.setText(""); numbotField.setText(""); pricebotField.setText(""); }
[ "void resetTextFields();", "public void resetButtonListener() {\n\t\t//clear all user entries \n\t\tcustNumberTextField.setText(\"\");\n\t\tnameTextField.setText(\"\");\n\t\taddressTextField.setText(\"\");\n\t\tcityTextField.setText(\"\");\n\t\tstateTextField.setText(\"\");\n\t\tzipTextField.setText(\"\");\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form FrmBebida
public FrmBebida() { initComponents(); }
[ "public frm_registro_admision_ingreso_registro() {\n }", "FORM createFORM();", "public FrmInsertar() {\n initComponents();\n }", "public frm_tutor_subida_prueba() {\n }", "public FrmAbmAfiliado() {\n initComponents();\n }", "public static Result newForm() {\n return ok(new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if player is human and no cards selected
@Override public void onClick(View view) { if (game.getListOfPlayers().get(game.getNextPlayer()).getPlayerName().equals("Human") && selectedCard.isEmpty()) { makeToast("You have not selected a card yet."); } //if player is computer ...
[ "public void chooseHiddenPlayerCard() {\n // Instruct the player to make a choice\n displayText(cluedoGame.getOtherPlayer().getUserName() + \", pick a card to show\");\n }", "public void setAvail() {this.card = 0; this.play = true; }", "public boolean isEmpty(){\n return cardToDeal>=72; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a file in the relative path, relative to the internally set save directory. So, this returns a file in the save directory specified by the relativePath argument.
public File createFile(String relativePath) { return createFile(getSaveDir(), relativePath); }
[ "private File getFile(String relativePath) { \n StringBuffer path = new StringBuffer();\n path.append(rootDir.getAbsolutePath());\n path.append(File.separator);\n path.append(relativePath);\n return new File(path.toString());\n }", "public Resource createRelative(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__GetProperty__Group__2" $ANTLR start "rule__GetProperty__Group__2__Impl" InternalAADMParser.g:17069:1: rule__GetProperty__Group__2__Impl : ( ( rule__GetProperty__PropertyAssignment_2 ) ) ;
public final void rule__GetProperty__Group__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:17073:1: ( ( ( rule__GetProperty__PropertyAssignment_2 ) ) ) // InternalAADMParser.g:17074:1: ( ( rule__GetProperty__Pro...
[ "public final void rule__GetProperty__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:17061:1: ( rule__GetProperty__Group__2__Impl rule__GetProperty__Group__3 )\n // InternalAADMParser.g:17062:2: rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
send an API request to get the timeline json Fill the listview by creating the tweet objects from the json
private void populateTimeline( int page) { client.getHomeTimeline(Tweet.getMaxId(),page, new JsonHttpResponseHandler(){ //success @Override public void onSuccess(int statusCode, Header[] headers, JSONArray json) { Log.d("DEBUG", json.toString()); ...
[ "protected void populateTimeline() {\n client.getUserTimeline(getArguments().getString(\"screen_name\"), new JsonHttpResponseHandler() {\n final Context context = getActivity();\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get generation information by generation id
@GET @Path("/generation/{generationId}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public CommonGenerationDTO getGeneration(@PathParam("generationId") final Long generationId) { CcGenerationEntity generationEntity = service.findGenerationById(generationId); ...
[ "public long getGenerationId()\n {\n return this.generationId;\n }", "ICpGenerator getGenerator(String id);", "int getGeneration();", "String getContentGeneratorId();", "@NotNull\n public GCGeneration getGcGeneration() {\n return getGcGeneration(data, id.asUUID());\n }", "public int getG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
allows input for temp for the month
public void inputTempForMonth(int month) { System.out.println("Please enter the low temperature for " + MONTHS[month]); temps[month][1] = sc.nextInt(); System.out.println("Please enter the high temperature for " + MONTHS[month]); temps[month][0] = sc.nextInt(); }
[ "public void inputTempForYear() {\n\t\t\n\t\tfor (int i=0; i<12; i++)\n\t\t\tinputTempForMonth(i);\n\t}", "public void inputMonth () {\n\t\tSystem.out.print(\"Enter a month: \");\r\n\t\tmonth = input.nextInt();\r\n\t}", "public void addTempToList(int month, double temp)\r\n\t{\r\n\t\tswitch (month)\r\n\t\t{\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for distAppProofFlag.
public void setDistAppProofFlag(Character aDistAppProofFlag) { distAppProofFlag = aDistAppProofFlag; }
[ "public Character getDistAppProofFlag() {\n return distAppProofFlag;\n }", "public void setDistPermitProofFlag(Character aDistPermitProofFlag) {\n distPermitProofFlag = aDistPermitProofFlag;\n }", "public void setResidencyProofFlag(Character aResidencyProofFlag) {\n residencyProofFlag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A constructor which creates a LinkedList of character values from an array of chars
public LinkedString(char[] value) { numNodes = 0; Node head = null; for(int i = 0; i < value.length; i++) { this.insert(i, value[i]); } }
[ "public MyStringBuilder(char [] s)\n\t{\n if (s.length == 0)\n {\n firstC = null;\n lastC = null;\n length = 0; \n }\n else \n {\n firstC = new CNode(s[0]); //create first node\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a SYS.ALL_COLL_TYPES table reference
public AllCollTypes() { super("ALL_COLL_TYPES", org.jooq.util.oracle.sys.Sys.SYS); }
[ "private void createLMSTypeTable() throws SQLException\n {\n if (!database().hasTable(\"LMSType\"))\n {\n log.info(\"creating table LMSType\");\n\n database().executeSQL(\"CREATE TABLE LMSType (\"\n + \"OID INTEGER NOT NULL , \"\n + \"name TINYTEX...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a list of circles connected to outgoing arrows of the given circle.
private List<Circle> getOutCircles(Circle circle) { List<Arrow> outArrows = circle.getOutArrow(); List<Circle> outCircles = new LinkedList<Circle>(); for (Arrow outArrow : outArrows) { Shape target = outArrow.getTarget(); if (target instanceof Circle) { outCircles.add((Circle) target); } } return...
[ "private void addCircles(){\r\n Circle circle = new Circle(xPos + 0.5,yPos + 0.5,0.5); // For collision calculations in Physics, move the Circle xy position to the center.\r\n composingCircles.add(circle);\r\n }", "private void circle2circle(Circle circle, Block root) {\n\t\tassert (circle.getOut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the FDCUTPAYDETL table that match the criteria 'GTHTB_ZHBH = :gthtbZhbh'.
public Fdcutpaydetl[] findWhereGthtbZhbhEquals(String gthtbZhbh) throws FdcutpaydetlDaoException { return findByDynamicSelect( SQL_SELECT + " WHERE GTHTB_ZHBH = ? ORDER BY GTHTB_ZHBH", new Object[] { gthtbZhbh } ); }
[ "public Fdcutpaydetl[] findWhereGthtjhBjjeEquals(BigDecimal gthtjhBjje) throws FdcutpaydetlDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE GTHTJH_BJJE = ? ORDER BY GTHTJH_BJJE\", new Object[] { gthtjhBjje } );\r\n\t}", "public Fdcutpaydetl[] findWhereGthtjhHtbhEquals(String gthtjhHtbh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ends the current innermost set of nested namespace definitions. Reverts the namespaces involved to their previouslydeclared prefixes, and sets up for ending the new innermost set.
private void closeNamespaces() { // revert prefixes for namespaces included in last declaration DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop(); int[] deltas = info.m_deltas; String[] priors = info.m_priors; for (int i = deltas.length - 1; i >= 0; i--) { ...
[ "protected void decrementNesting() {\n --m_nestingDepth;\n if (m_nestingDepth >= 0) {\n while (m_nestingDepth == m_namespaceDepth) {\n closeNamespaces();\n }\n }\n }", "private static void unmarshalNamespaces(UnmarshallingContext ctx,\n Definitio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ID: 1213414 COMP242 Assignment Two Generic Interface, it parameterized over types All the functions would be accessible in the GenericList class
public interface MyGenericListInterface<T> { //Clears the list public void clear(); //Add an item to the end of the List public void add(T word); //Find an item in the List and returns true or false value if the word is found public boolean find(T word); //A way of iterating over the items in the List public...
[ "<T extends Comparable<T>> CustomList<T> perform (CustomList<T> list);", "public static void main(String[] args) {\n\t GenericClass<String> genericClass = new GenericClass<>();\n\t genericClass.setT(\"Alex\");\n //genericClass.setT(1); //-> This will raise a compile time error.\n System.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Config for STREAMING_AUTOML_OBJECT_TRACKING. .google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfig automl_object_tracking_config = 22;
com.google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfigOrBuilder getAutomlObjectTrackingConfigOrBuilder();
[ "com.google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfig getAutomlObjectTrackingConfig();", "com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig getObjectTrackingConfig();", "com.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigOrBuilder getOb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the globaly set http file transfer server to be used for content type application/vnd.gsma.rcsfthttp+xml.
public String getFileTransferServer();
[ "public String getFileServer() {\r\n\t\treturn fileServer;\r\n\t}", "public void setFileTransferServer(String serverUrl);", "public HTTPServer getHTTPServer() {\r\n\t\treturn server;\r\n\t}", "public static String getFsnetUrl() {\n return fsneturl;\n }", "java.lang.String getFsUrl();", "public S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds a registered minigame with the given name. The name is not case sensitive.
public Minigame findMinigame(String name) { for (var minigame : minigames) if (minigame.getName().equalsIgnoreCase(name)) return minigame; return null; }
[ "public Game searchGame(String name)throws Exception{\n\t\tfor(Game game : this.games){\n\t\t\tif(game.getName().equals(name)){\n\t\t\t\treturn game;\n\t\t\t}\n\t\t}return null;\n\t}", "public final ModernWindow findByName(final String name) {\r\n if (name == null) {\r\n return null;\r\n }\r\n\r\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads the bytes from the serial port into the given direct byte buffer using facilities of the underlying JVM and operating system. This method does not modify the direct byte buffer attributes position, capacity, limit and mark. The application design is expected to take care of this as and when required in appropriat...
@Override public int readBytesDirect(ByteBuffer buffer, int offset, int length) throws ControllerCommunicationException { try { return manager.readBytesDirect(handle, buffer, offset, length); } catch (IOException e) { throw new ControllerCommunicationException(e); } ...
[ "native static int readDirect(long serial, ByteBuffer buffer)\n\tthrows IllegalArgumentException, PortInterruptedException, IOException;", "public void readBytes(byte[] buffer) throws IOException;", "private void readSerial() {\r\n\t\twhile(myPort.available() > 0) {\r\n\t\t\tbyte[] newBuffer = new byte[512];\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new iterator, wrapping the given reader.
public ReaderIterator( MutableReader<DeserializationDelegate<T>> reader, TypeSerializer<T> serializer) { this.reader = reader; this.reusingDelegate = new ReusingDeserializationDelegate<T>(serializer); this.nonReusingDelegate = new NonReusingDeserializationDelegate<T>(serializer); ...
[ "public CsvRowIterator(final Reader reader) throws IOException {\n lineReader = new LineReader(reader);\n lineReader.skipLines(skipRows);\n // initialize nextRow so hasNext() returns properly\n advanceLine();\n }", "public abstract DBIterator NewIterator(ReadOpti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes an output stream. This ignores all exceptions that might be thrown.
public static void closeStream(OutputStream osOutput) { try { if (osOutput != null) { osOutput.close(); } } catch (IOException ignored) { } }
[ "protected void close() {\n\t\tif(sOutput != null) {\n\t\t\ttry {\n\t\t\t\tsOutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"error closing output stream\");\n\t\t\t}\n\t\t\t\n\t\t\tsOutput = null;\n\t\t}\n\t}", "public void close() {\n\t\tSystem.out.println(\"Close the output file.\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get red values of both color sensors to continuously update the values of
@Override public void run() { on_mode = true; while(on_mode) { try { leftColorSensor.getRedMode().fetchSample(leftRgbArr, 0); rightColorSensor.getRedMode().fetchSample(rightRgbArr, 0); leftRedVal = leftRgbArr[0] * 100; rightRedVal = rightRgbArr[0] * 100; Thread.sl...
[ "public void colorChange(){\n RawColor yellow = Constants.WOFConstants.YELLOW; // \n\n boolean isYellow = WOFHelpers.aproximateColor(yellow, sensorColor) < Constants.WOFConstants.COLOR_THRESHOLD; // if the color sensor is close to pure yellow\n\n boolean temp = false; \n if(isYellow != temp){ // switch ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides the best move for the Min (White) token to take.
public String getBestMoveMin() { return bestMoveMin; }
[ "Move getBestMove() {\n //System.out.println(\"AI chooses: \" + m.toString());\n return moves.get((int) (Math.random() * moves.size()));\n }", "public Move getBestMove() {\n\t\treturn bestMove;\n\t}", "private Move getBestMove() {\r\n\t\tSystem.out.println(\"getting best move\");\r\n\t\tChessCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the start position of the right hand side of the relation.
public void setRightStart (int rightStart) { this.rightStart = rightStart; }
[ "public void setRightEnd (int rightEnd) {\n this.rightEnd = rightEnd;\n }", "public void setRight (Node r) {\r\n\t\tright = r;\r\n\t}", "public void setRight( Node r ) \n\t{\n\t\tright = r;\n\t}", "public void setRight(BSTNode r) {\n this.right = r;\n }", "public void setRight(Lane right...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleBinaryNotDependency" $ANTLR start "ruleBinaryNotDependency" ../assignment6_configurator_DSL/srcgen/org/xtext/example/assignment6/parser/antlr/internal/InternalConfiguratorDSL.g:1033:1: ruleBinaryNotDependency returns [EObject current=null] : (otherlv_0= '(' ( (lv_not_1_0= 'NOT' ) ) otherlv_2= '(' (...
public final EObject ruleBinaryNotDependency() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token lv_not_1_0=null; Token otherlv_2=null; Token otherlv_6=null; Token otherlv_7=null; EObject lv_leftHand_3_0 = null; Enumerator...
[ "public final EObject ruleBaseBinaryDependency() throws RecognitionException {\n EObject current = null;\n\n EObject this_BinaryNotDependency_0 = null;\n\n EObject this_BinaryDependency_1 = null;\n\n\n enterRule(); \n \n try {\n // ../assignment6_configurato...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form LihatPasienInap
public LihatPasienInap() { initComponents(); }
[ "public frm_registro_admision_ingreso_registro() {\n }", "public SmjerForma() {\n initComponents();\n entitet = new Smjer();\n obrada = new ObradaSmjer(entitet);\n setTitle(Aplikacija.NASLOV_APP + \" Smjerovi\");\n ucitaj();\n }", "public FormaOperateri() {\n init...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checking if inputNumber is number. Checking by parsing the input text.
public boolean isNumber() { try { number = Integer.parseInt(inputNumber); return true; } catch (NumberFormatException e) { return false; } }
[ "private static boolean isNum(String input) {\n try {\n Integer.parseInt(input);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "private boolean isNumeric(String input){\n try { \n Integer.parseInt(input); \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the duplicate. Remove duplicate element in an string array
public static String[] removeDuplicate(String[] arr) { ArrayList<String> result = new ArrayList<String>(); for (int i = 0; i < arr.length; ++i) { String s = arr[i]; if (!result.contains(s)) result.add(s); } return result.toArray(new String[result...
[ "public void removeDups() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\" \" + internalArray[0] + \" \");\n int duplicateCount = 0;\n int i = 1;\n while (i < getCapacity()) {\n if (internalArray[i] != null) {\n // check fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column sm_account.account_mail
public void setAccountMail(String accountMail) { this.accountMail = accountMail; }
[ "public String getAccountMail() {\r\n\t\treturn accountMail;\r\n\t}", "public static void SetEmail(String mail) \n\t {\n\t\tcurrentactive.uemail=mail;\n\t }", "@Element\n public void setEmail (String newVar) {\n email = newVar;\n }", "public void setEmail(String value) {\r\n email = value;\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "execute" D:\\svn\\EasyCount\\src\\main\\java\\Trc.g:614:1: execute : KW_EXECUTE LPAREN defineVars executeBlock emitValue RPAREN > ^( TOK_EXECUTE defineVars executeBlock emitValue ) ;
public final TrcParser.execute_return execute() throws RecognitionException { TrcParser.execute_return retval = new TrcParser.execute_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token KW_EXECUTE140 = null; Token LPAREN141 = null; Token RPAREN145 = null; ParserRuleReturnScope...
[ "protected void visit_EXECUTE(ITreeNode node)\n {\n // You should *not* place your code right here. \n // Instead, you should override this method via a subclass.\n visitUnknown(node); // Default Behavior\n }", "public void setExecute(ValueExpression execute) {\n this.execute = e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Removes entire card from the window canvas
public void removeFromCanvas() { card.removeFromCanvas(); text.removeFromCanvas(); }
[ "private void clearScreen()\n {\n showText(\"\", getWidth()/2, getHeight()/2 );\n\n List objects = getObjects(null);\n\n if ( objects != null)\n {\n removeObjects(objects);\n }\n }", "private void clearGame() {\n\t\tlayoutHand.getChildren().clear();\n\t\tlayoutD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rebuild the contents of an comparator plugin menu for the given toolset.
public void rebuildComparatorMenu ( JPopupMenu topmenu, int channel, String tname, JMenu menu, ActionListener listener ) { PluginMenuLayout layout = null; TripleMap<String,String,VersionID,TreeSet<OsType>> plugins = null; MasterMgrClient client = acquireMasterMgrClient(); try ...
[ "public void\n rebuildToolMenu\n (\n JPopupMenu topmenu,\n int channel, \n String tname, \n JMenu menu, \n ActionListener listener\n ) \n {\n PluginMenuLayout layout = null;\n TripleMap<String,String,VersionID,TreeSet<OsType>> plugins = null;\n MasterMgrClient client = acquireMasterMgrClient(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for JobResp, using the alias name JobResp.
public String getJobResp() { return (String)getAttributeInternal(JOBRESP); }
[ "public void setJobResp(String value) {\n setAttributeInternal(JOBRESP, value);\n }", "public String getJob() {\r\n return (String) getAttributeInternal(JOB);\r\n }", "public String getJobReq() {\n return (String)getAttributeInternal(JOBREQ);\n }", "public String getJobId() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }