query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to this BigDecimal's. Throws an ArithmeticException if this is not possible. This call is typically used to increase the scale, in which case it is guaranteed that there exists a BigDecimal of the specified scale and the corre...
public BigDecimal setScale(int scale) { return setScale(scale, ROUND_UNNECESSARY); }
[ "public BigDecimal setScale(int scale, int roundingMode) {\r\n\tif (scale < 0)\r\n\t throw new ArithmeticException(\"Negative scale\");\r\n\tif (roundingMode < ROUND_UP || roundingMode > ROUND_UNNECESSARY)\r\n\t throw new IllegalArgumentException(\"Invalid rounding mode\");\r\n\r\n\t/* Handle the easy cases *...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the length of the packet buffer
public int getPacketLength() { return this.mPacketLength; }
[ "public int getPacketLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n return buffer.length;\n }", "public int getLength() {\r\n\t\treturn this.buffer.getLength();\r\n\t}", "public int getPacketHeaderLength();", "public int getPacketLength() {\n return TfsConstant.INT_SIZE *...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get enabled feature set.
public Set<String> getEnabledFeatures() { return enabledFeatures; }
[ "@Override\n public Set<Feature> getFeatureSet() {\n Set<Feature> features = new HashSet<Feature>();\n features.add(Feature.all);\n return features;\n }", "public Collection<T> getFeatureset() {\n return featureset;\n }", "public FeatureSet getFeatures() {\n\treturn fea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method clicks on Return button.
public TeamListPage pressReturnButton() { controls.getReturnButton().click(); return new TeamListPage(); }
[ "public void clickEnterButton(){\r\n\t\tActions act=new Actions(driver);\r\n\t\tact.sendKeys(Keys.ENTER).build().perform();\r\n\t}", "public void click_ReEnterButton() {\n\t\telement(\"ReEnter_Btn\").click();\n\t}", "public void clickEnter(){\r\n\t\tActions actions = new Actions(driver);\r\n\t\tAction sendEsc =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the content type at the given offset of the given document.
public static String getContentType(IDocument document, String partitioning, int offset, boolean preferOpenPartitions) throws BadLocationException { if (document instanceof IDocumentExtension3) { IDocumentExtension3 extension3= (IDocumentExtension3) document; try { return extension3.getContentType(partition...
[ "DocumentType getDocumentType();", "public String getDocumentType();", "Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType();", "public final String getType(int nodeOffset) {\r\n\t\treturn nodes[nodeOffset];\r\n\t}", "ContentType getType();", "public int getFromDocType (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this should return items that are not visible when performing the search for controls.
public boolean shouldFindInvisibleControls() { return controlFinder.shouldFindInVisibleControls; }
[ "public boolean hasVisibleItems();", "protected boolean shouldShowItemNone() {\n return false;\n }", "public abstract void validateVisibleItems();", "@Override\r\n\tpublic boolean isVisible()\r\n\t{\n\t\treturn !getFormScreen().getMode().equals(Mode.LIST_VIEW);\r\n\t}", "public void checkFilterVis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates a car textfield. If valid, asks to add another to the form. If empty, deletes the field (unless it's the last one, in which case it just empties it).
private boolean validateCarTextField(TextField txtCar) { if (txtCar.getText().matches("^\\s*$")) //If new value is blank { if (_root.getChildren().indexOf(txtCar) != _root.getChildren().size() - 1) //If not the last one. _root.getChildren().remove(txtCar); } ...
[ "private void addCarField()\n {\n TextField newCarID = new TextField();\n if (_root.getChildren().size() > 0) //If _root is not the first field.\n newCarID.setPromptText(\"Add another...\");\n newCarID.focusedProperty().addListener(new ChangeListener<Boolean>() {\n @Ove...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get notification but also set descriptor to Enable notification. You need to wait couple of seconds before you could use it (at least in the mi band 2)
private void getNotificationsWithDescriptor(UUID service, UUID Characteristics, UUID Descriptor) { if (myGatBand == null) { Timber.w("can't get notifications"); // not initialized? return; } BluetoothGattService myGatService = myGatBand.getService(service); if (myGatService != null) {...
[ "void enableNotifications();", "public void enableLovNotification(boolean enable);", "boolean getAllowNotifications();", "private void enableHRNotification() {\n\t\tLog.d(TAG, \"Enabling heart rate notifications\");\n\t\tmBluetoothGatt.setCharacteristicNotification(mHrsCharacteristic, true);\n\t\tBluetoothGat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the standard, default RemoteViewsFactory method.
public StackRemoteViewsFactory(Context context, @SuppressWarnings("UnusedParameters") Intent intent) { mContext = context.getApplicationContext(); }
[ "Views createViews();", "View createView();", "public abstract ViewHolderFactory<VH> getFactory();", "ViewContainer createViewContainer();", "private void registerViews() {\n\t}", "public ViewFactory getViewFactory()\n {\n return this;\n }", "private static RemoteViews createAppWidgetRemote...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the field's operator and values. It's the responsibility of the caller to trim values if they don't want leading/trailing white space.
public void setFieldValues(String op, List values) { if (op == null || op.trim().length() == 0) throw new IllegalArgumentException( "operator must not be null or empty"); if (!isValidOperator(op)) throw new IllegalArgumentException( "Invalid operator specified f...
[ "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the verification button for the dialog.
public JButton getVerifyButton() { return VerifyButton; }
[ "public JButton getVerify(){\n\t\t return this.verify;\n\t }", "public WebElement getPopUpOkBtn(){\n \treturn getElement(alertOkBtn);\n }", "public Button getConfirmButton() {\n return confirmButton;\n }", "public Button getOKButton()\n {\n return getButton( IDialogConstants.OK_ID ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of AudioFeatures retrieved by the API.
public List<AudioFeature> getSongFeatures() { return songFeatures; }
[ "List<Feature> getFeatures();", "public List<String> getAvailableFeatures() {\n parseFeatures();\n return af.featureArray;\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public String[] getFeatures(){\n\t\treturn this.features;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the invariant epcChargeBearer.
@Test public void testEpcChargeBearer01() throws Throwable { List<IInterpretationResult> results; results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY + "/epcChargeBearer", MODELINSTANCE_NAME_01, Arrays .asList(new String[] { "DirectDebitTransactionInformation1" })); assertNotNu...
[ "@Test\r\n\tpublic void testEpcChargeBearer03() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcChargeBearer\", MODELINSTANCE_NAME_03, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets departure city index
private void setCityDepartureIndex() { foundDeparture = false; int pos = 0; while (pos < cities.size() && !foundDeparture) { if (cities.get(pos).getName().equalsIgnoreCase(cityDeparture.trim())) { foundDeparture = true; departureCityIndex = pos; // for...
[ "void setCity(int index, int value) {\n cityList[index] = value;\n }", "void setCity(int index, int value) {\n cityList[index] = value;\n }", "public static void setCity(int index, City c){\n allCities.set(index, c);\n }", "private void setCityArrivalIndex() {\n foundArrival = f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is responsible to set the value to the xls file.
public static boolean gtnSetXLCellDatavalue(String sheetName,String path,int colNum, double data,int RowNum,int rowNumber){ try{ FileInputStream fis1; fis1=fis; fis=new FileInputStream(path); fis1=new FileInputStream(path); workbook...
[ "public static void setExcelFile(String filePath, String shName)\n\t{\n\t\t//open excel file\n\t\ttry {\n\t\t\tlogger.info(\"creating file inputstream object and setting up file path and sheet\");\n\t\t\tFileInputStream fis = new FileInputStream(filePath);\n\t\t\t\n\t\t\tlogger.debug(\"creating new object for workb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a reference to the TreeNode that has the given label. The return value is null if the label is not found.
public TreeNode getNodeReference(String label) { TreeNode found = null; for (int i = 0; i < this.getBranch().length; i++) { if (this.getLabel().equals(label)) { return this; } else { if (this.getBranch()[i] != null) { found = this.getBranch()[i].getNodeReference(label); if (found != null)...
[ "public PhyloTreeNode findTreeNodeByLabel(String label) {\n return findTreeNodeByLabel(overallRoot, label);\n }", "private static PhyloTreeNode findTreeNodeByLabel(PhyloTreeNode node,String label) {\n if(node == null)\n return null;\n if(node.getLabel().equals(label))\n return nod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds the synthetic target with the given name for the given project.
void build(String name, Project project);
[ "@ImplementedBy(DefaultSyntheticTargetFactory.class)\npublic interface SyntheticTargetFactory {\n /**\n * Builds the synthetic target with the given name for the given project.\n *\n * @param name The name of the target.\n * @param project The project.\n */\n void build(String name, Project project);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Asserts a value. If the given value is false, the assertion fails and a AssertionException is raised.
public static void assertMsg(boolean assertValue, String message) throws AssertionException { if (!assertValue) { if (message == null || message.length() == 0) { throw new AssertionException("Failed assertion"); } else { ...
[ "@Test\n\tpublic void testIsValue() {\n\t\tassertTrue(Preconditions.isValue(\"value\"));\n\t\tassertFalse(Preconditions.isValue(null));\n\t\tassertFalse(Preconditions.isValue(\"\"));\n\t}", "final protected void assertFalse(Object pTestValue) {\n\t\tthis.assertSimpleValue(pTestValue, Boolean.FALSE);\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete all orders in the cart for the checkin.
public void deleteCartOrders(CheckIn checkIn) { checkNotNull(checkIn, "checkIn was null"); checkNotNull(checkIn.getId(), "checkIn id was null"); checkNotNull(checkIn.getBusiness(), "checkIn business was null"); Objectify ofy = orderRepo.ofy(); List<Key<Order>> orderKeys = ofy.query(Order.class).ancestor(chec...
[ "private void deleteCartAll() {\n cartTable.getItems().removeAll(componentsCart);\n\n //Clear ComponentsCart List\n componentsCart.clear();\n updateTotal();\n }", "private void deleteAllOrders() {\n if (mCursorAdapter != null && !mCursorAdapter.isEmpty()) {\n // Delete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the current Map Size
static void saveMapSize(JPanel map) { File path = new File("save" + File.separatorChar + "mapSize.mpy"); try { if (!path.exists()) { new File("save").mkdir(); } FileOutputStream file = new FileOutputStream(path); ObjectOutputStream mapProperties = new ObjectOutputStream(file); mapProperties.write...
[ "public void saveSize() {\n m_History.setProperty(WIDTH, \"\" + getSize().width);\n m_History.setProperty(HEIGHT, \"\" + getSize().height);\n\n saveHistory();\n }", "static Dimension getSavedMapSize() {\n\t\tFile path = new File(\"save\" + File.separatorChar + \"mapSize.mpy\");\n\t\tif (path.exists()) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a main view in the devint controller class.
public static void unregisterMainView(View<?> view) { DevintController.mainViews.remove(view); }
[ "public void deleteView()\n\t{\n\t\tclearUpHeader();\n\t\tframe.add(deleteView, BorderLayout.NORTH);\n\t\tupdate();\n\t}", "public void remViewName(){\n ((ViewDMO) core).remViewName();\n }", "public void removeView(IView view)\r\n { this.views.remove(view);\r\n }", "void rmview(String viewName)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written. Writing starts at position pos in the BLOB value; len bytes from the given byte array are written. The array of bytes will overwrite the existing bytes in the Blob object starting at th...
public int setBytes(final long pos, final byte[] bytes, final int offset, final int len) throws SQLException { if (bytes == null) { throw Util.nullArgument("bytes"); } final OutputStream os = setBinaryStream(pos); try { os.write(bytes, offset, len); ...
[ "@Override\n public void write(final byte b[], final int off, final int len) {\n synchronized (ByteArrayStreams.this) {\n checkStatus();\n if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {\n throw new IndexOutOfBoundsException();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads the highscore of the specified world
@SuppressWarnings("unchecked") private void loadScores(final String worldName) { File file = Hello.getPlugin().getServer().getWorldContainer(); File worldFolder = new File(file, worldName); File path = new File(worldFolder, PERSISTANCE_FILE); //if Highscore doesn't exist, don't try loading it if (!path.e...
[ "private void loadHighScore() {\n this.myHighScoreInt = 0;\n \n final String userHomeFolder = System.getProperty(USER_HOME); \n final Path higheScoreFilePath = Paths.get(userHomeFolder, HIGH_SCORE_FILE);\n \n final File f = new File(higheScoreFilePath.toString());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Property name : Bath water volume setting 1 EPC : 0xE7 Contents of property : Used to specify the bath water volume in liters, and to acquire the current setting. Value range (decimal notation) : 0x00.0xFD (0.253 liters) Data type : unsigned char Data size : 1 byte Unit : liter Access rule : Announce undefined Set opti...
protected void onGetBathWaterVolumeSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
[ "protected void onGetBathWaterVolumeSetting3(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "protected byte[] getBathWaterVolumeSetting1() {return null;}", "protected void onSetBathWaterVolumeSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Promulgation Service Handling Registers the promulgation service
public void registerPromulgationService(BasePromulgationService service) { services.put(service.getServiceId(), service.getClass()); log.info("Registered promulgation service " + service.getServiceId()); }
[ "private BasePromulgationService instantiatePromulgationService(String type) {\n return instantiatePromulgationService(services.get(type));\n }", "@PostConstruct\n public void init() {\n promulgationManager.registerPromulgationService(this);\n }", "public void setPromoreimService(Promorei...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
7. An equals method that accepts a MonthRain object as an argument and returns: true if the monthName equals the argument object's monthName false if the monthName does not equal the argument object's monthName REMEMBER to use equals method comparison for Strings
public boolean equals(MonthRain c) { if (this.monthName.equals(c.getMonthName())) { return true; } return false; }
[ "@Override\n public boolean equals(Object obj) {\n return ((obj instanceof Month) && \n (this.year == ((Month) obj).year && this.month == ((Month) obj).month)); \n }", "public boolean isEqual(MonthDay other) {\n if(month == other.month && day == other.day) {\n return true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a test that proves that having an answer accepted gives the answerer a 15 point reputation boost
@Test public void acceptedAnswerGivesAnswererReputationPoints() throws Exception { alice.acceptAnswer(bobAnswer); assertEquals("Answer's reputation doesn't goes up by 15",15,bob.getReputation()); }
[ "double scoreAnswer(Question question, Answer answer);", "@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }", "@Test\n void CorrectGuessEditDistanceReplacement() {\n Question testQuestion = new Question(Round.JEOPARDY, \"Test Category\", new GregorianCalendar(2018, 7, 7...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new request entity
@Deprecated public Request createRequestEntity(Request request) throws RequestCreationException;
[ "public void createRequest(Request request);", "public Request createRequest();", "void create(Object entity);", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest addNewEvSORequest();", "public long createRequest(Request _request) throws RequestManagerException, PersistenceResourceAccessE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor takes 4 parameters: n,s,d,i and assigns them to instance variables name, strength, dexterity, intelligence. Also uses the dice instance to assign a random number to maxlife. CurrentLife is initialized to maxlife
public Character(String n, int s, int d, int i) { this.name=n; this.strength=s; this.dexterity=d; this.intelligence=i; this.maxLife=dice.roll()+50; this.currentLife=maxLife; }
[ "public Dwarf()\n {\n \n super(\n Randomizer.nextInt(MAX_DWARF_HP-MIN_DWARF_HP)+MIN_DWARF_HP, \n Randomizer.nextInt(MAX_DWARF_STR-MIN_DWARF_STR)+MIN_DWARF_STR\n );\n \n }", "public Dinosaur()\n {\n this.type = \"Dino\";\n this.age = 0;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Remove the vertex from the graph. Can pass a node or string as variable
public void removeVertex(Node vertex){ if(vertex == null){ System.out.println("err: can't find vertex"); }else{ this.removeVertex(vertex.getLabel()); } }
[ "public void removeVertex(String vertex);", "public void removeVertex();", "public void removeVertex(V toRemove);", "public void vertexRemoved(final GraphView<V, E>.VisualVertex vertex);", "public V removeVertex(V v);", "public boolean removeVertex(V vertex);", "public void removeEdge(String vertex1, St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
load any scene with the specified name/path from resources/scenes
public void loadScene(String sceneName) { // clear the old data from the scene game.uiObjects.clear(); // load scene file Document sceneFile = new ResourceLoader().getXMLFile(String.format("/scenes/%s", sceneName)); // get main node of file Node mainNode = sceneFile.getDocumentElement(); // get every elem...
[ "public final void LoadScene(){\n Load();\n }", "public void Load() {\n\t\tsceneLoaded = false;\n\n\t\tfor (int i = 0 ; i < gameObjects.size();i++) {\n\t\t\tGameObject gO = gameObjects.get(i);\n\t\t\tEngine.Instance.AddObject(gO);\n\n\t\t}\n\t\tEngine.Instance.currentScenes.add(this);\n\t\tsceneLoaded =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Component activated notification. Called when the component is activated. All component dependencies are resolved at that moment. Use this method to initialize the component. The default implementation of this method is storing the Bundle owning that component in a class field. You can use the bundle object to lookup f...
@Override public void activate(ComponentContext context) { this.bundle = context.getRuntimeContext().getBundle(); }
[ "@Activate\n protected void activate(ComponentContext componentContext) {\n\n try {\n BundleContext bundleContext = componentContext.getBundleContext();\n\n bundleContext.registerService(ExtensionManager.class, new ExtensionManagerImpl(), null);\n\n // Load extension data ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
f0 > VariableDeclaratorId() f1 > [ "=" VariableInitializer() ]
public void visit(VariableDeclarator n) { n.f0.accept(this); n.f1.accept(this); }
[ "public final void variableDeclarator() throws RecognitionException {\n int variableDeclarator_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"variableDeclarator\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(384, 1);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / Second level copy methods; uncompressed data Method called for the simple case where we can just read all data into single buffer (and do that in throttled block), then write it out at our leisure.
protected void _readAllWriteAllUncompressed(OutputStream out, final byte[] copyBuffer, final long offset, final int dataLength) throws IOException { _readAll(out, copyBuffer, offset, dataLength); // and write out like so final long start = (_diagnostics == null) ? 0L : _t...
[ "protected void _readAllWriteAllCompressed(final OutputStream out, final byte[] copyBuffer,\n final long offset, final long dataLength)\n throws IOException\n {\n // important: specify no offset, file length; data offset/length is for _uncompressed_\n int inputLength = (int) _file...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the IPv4 address version constant.
@Test public void testAddressVersion() { assertThat(Ip4Address.VERSION, is(IpAddress.Version.INET)); }
[ "@Test\n public void testVersion() {\n Ip4Address ipAddress;\n\n // IPv4\n ipAddress = Ip4Address.valueOf(\"0.0.0.0\");\n assertThat(ipAddress.version(), is(IpAddress.Version.INET));\n }", "@Test\n public void testValueOfInetAddressIPv4() {\n Ip4Address ipAddress;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The list of response details of each document. repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2;
com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata .IndividualBatchDeleteStatusOrBuilder getIndividualBatchDeleteStatusesOrBuilder(int index);
[ "java.util.List<\n ? extends\n com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata\n .IndividualBatchDeleteStatusOrBuilder>\n getIndividualBatchDeleteStatusesOrBuilderList();", "java.util.List<\n com.google.cloud.documentai.v1beta3.BatchDeleteDocum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a PlayerDatabase to a data stream.
public abstract void write(PlayerDatabase _db, OutputStream _outputStream) throws IOException;
[ "public void writeDatabase();", "void savePlayerData(PlayerData playerData);", "public static void writePlayerToFile(Player p)\r\n {\r\n try{\r\n //Create an \"players.txt\" file with an ObjectOutputStream\r\n FileOutputStream fileOut = new FileOutputStream(\"players.txt\", true)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sharing and retrieving cards
@POST("appuser/card/{cardId}/share") Call<CreditsResponse> shareCard(@Header("X-AMCA-APP-USER-TOKEN") String token, @Path("cardId") long cardId);
[ "private void share() {\n\t //Constructs the VCard object\n VCard vcard = new VCard();\n StructuredName name = new StructuredName();\n\n name.setFamily(friend.getLastName());\n name.setGiven(friend.getFirstName());\n vcard.setStructuredName(name);\n\n Address address = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To be called when the user wishes to go to the navigation view
public void goToNavigation() { navigationController.setStartAddress(currAddress); stateHandler.updateCurrentState(ViewStates.NAVIGATION_ACTIVE); }
[ "void openNavigationView();", "void navigateTo(String view);", "public void sendNavigation() {\n action = Action.Navigate;\n tracker.getDispatcher().dispatch(this);\n }", "private void goToNavActivity() {\n Intent i = new Intent(MainActivity.this, NavActivity.class);\n startActi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return copy of scene names in order
public Collection<String> getScenes() { Vector<String> scenes = new Vector<String>(); if (mScenesInOrder!=null) scenes.addAll(mScenesInOrder); return scenes; }
[ "java.lang.String getSceneName();", "public final List<SceneData> allSceneData() {\n ArrayList<SceneData> result = new ArrayList<SceneData>();\n\n for (int i = 0; i < scenes.size(); i++) {\n Scene scene = scenes.get(i);\n if (scene.getDisplayName() == null) {\n s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the groups from the set of groups to which this project belongs. Use with caution!
public void clearGroups() { this.groups = null; }
[ "public void clearGroups()\n\t\t{\n\t\t\tif(this.m_groups == null)\n\t\t\t{\n\t\t\t\tm_groups = new Vector();\n\t\t\t}\n\t\t\tm_groups.clear();\n\t\t}", "public void clearGroups() {\n\t\tcollisionGroups.clear();\n }", "public void removeGroupsAllRegs(String[] groups) throws RemoteException{\n Iterator...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the CRM State Senate persistence.
public CrmStateSenatePersistence getCrmStateSenatePersistence() { return crmStateSenatePersistence; }
[ "public contact.manager.service.CrmStateSenateLocalService\n\t\tgetCrmStateSenateLocalService() {\n\n\t\treturn crmStateSenateLocalService;\n\t}", "public void setCrmStateSenatePersistence(\n\t\tCrmStateSenatePersistence crmStateSenatePersistence) {\n\n\t\tthis.crmStateSenatePersistence = crmStateSenatePersistenc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns "" if Parameters.getFocusMode() returns null
@Override public String getFocusValue() { Camera.Parameters parameters = this.getParameters(); String focus_mode = parameters.getFocusMode(); // getFocusMode() is documented as never returning null, however I've had null pointer exceptions reported in Google Play return convertFocusM...
[ "public FocusMode getFocus() {\n return getSelectedParameters().getValue(FOCUS_MODE);\n }", "String focused();", "public Integer getFocusflag() {\n return focusflag;\n }", "public boolean getFocus() {\n return focus;\n }", "private IFieldProvider getFocusPro() {\n\t\tint iCount...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setRecentColors sets the recent colors called by our color chooser.
public void setRecentColors(String s) { shortcutValue(s, GENERAL_RECENT_COLORS); }
[ "private void resetColors(JFXButton clickedRecentColorButton) {\n int indexOfChosenColor = recentColorsButtons.indexOf(clickedRecentColorButton) + 1;\n Color newMainColor = colorsQueue.get(indexOfChosenColor);\n colorsQueue.remove(indexOfChosenColor);\n colorsQueue.push(newMainColor);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleSquareBracketedClauseCS" $ANTLR start "entryRuleNavigatingArgCS" InternalMyDsl.g:8356:1: entryRuleNavigatingArgCS returns [EObject current=null] : iv_ruleNavigatingArgCS= ruleNavigatingArgCS EOF ;
public final EObject entryRuleNavigatingArgCS() throws RecognitionException { EObject current = null; EObject iv_ruleNavigatingArgCS = null; try { // InternalMyDsl.g:8356:56: (iv_ruleNavigatingArgCS= ruleNavigatingArgCS EOF ) // InternalMyDsl.g:8357:2: iv_ruleNavigatin...
[ "public final EObject entryRuleNavigatingArgExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleNavigatingArgExpCS = null;\n\n\n try {\n // InternalMyDsl.g:5024:59: (iv_ruleNavigatingArgExpCS= ruleNavigatingArgExpCS EOF )\n // InternalMyDsl.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case execution method, calls keyword execution method for each keyword
public void execute(){ for(Keyword keyword : keywordList){ Log.openKeyword(keyword); keyword.execute(); } }
[ "@Test\n public void keywordsTest() {\n // TODO: test keywords\n }", "public void executeTest(MultiTestMethod method);", "public void invokeTest() {\n\t\t\t\n\t\t}", "@Test\r\n public void testCalculateForKeyword() {\r\n System.out.println(\"calculateForKeyword\");\r\n String[][]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing hashCode() method for Student
@Test public void testHashCode() { // student 3 has different credits from students 1 and 2 Student s1 = new Student(FIRST_NAME, LAST_NAME, ID, EMAIL, PASSWORD); Student s2 = new Student(FIRST_NAME, LAST_NAME, ID, EMAIL, PASSWORD); Student s3 = new Student(FIRST_NAME, LAST_NAME, ID, EMAIL, PASSWORD, CREDITS);...
[ "@Test\n\tpublic void testHashCode() {\n\t\tUser s1 = new Faculty(first, last, id, email, password, courses);\n\t\tUser s2 = new Faculty(first, last, id, email, password, courses);\n\t\tUser s3 = new Faculty(first, last, id, email, validPassword, courses);\n\t\tUser s4 = new Faculty(first, last, id, validEmail, pas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate that the expiration time of the JWT token has not been violated. If it has then throw an AuthenticationException. Override this method in subclasses in order to customize the expiration validation behavior.
protected boolean validateExpiration(SignedJWT jwtToken) { boolean valid = false; try { Date expires = jwtToken.getJWTClaimsSet().getExpirationTime(); if (expires == null || new Date().before(expires)) { LOG.debug("JWT token expiration date has been " + "successfully validated");...
[ "@Test(expected = JwtVerifyException.class)\n public void testJwtCannotBeUsedAfterExpiration() throws Exception {\n JwtClaims claims = JwtClaims.JwtClaimsBuilder.newInstance()\n .addIssuedAt(Date.from(Instant.now().minusSeconds(6L * 60))) // six minutes ago\n .addExpirationTi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private String lawSuitId; private String lawSuitId;
public String getLawSuitId() { return lawSuitId; }
[ "public String getId() { return studentId; }", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSuscriptorsOneAndTwo(int suscriptorsOneAndTwo){\n this.suscriptorsOneAndTwo = suscriptorsOneAndTwo;\n}", "public SportType getSportType(){return sportType;}", "public String getBetId(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method calls a matching method inside the container, and passes the phone parameter to find a customer with the phone number. The method then returns the found customer.
public Customer getCustomer(int phone) { return CustomerContainer.getInstance().getCustomer(phone); }
[ "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "Customer getCustomerBy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleJvmParameterizedTypeReference" $ANTLR start "entryRuleJvmArgumentTypeReference" InternalCsv.g:379:1: entryRuleJvmArgumentTypeReference : ruleJvmArgumentTypeReference EOF ;
public final void entryRuleJvmArgumentTypeReference() throws RecognitionException { try { // InternalCsv.g:380:1: ( ruleJvmArgumentTypeReference EOF ) // InternalCsv.g:381:1: ruleJvmArgumentTypeReference EOF { if ( state.backtracking==0 ) { before(g...
[ "public final void entryRuleJvmArgumentTypeReference() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:2064:1: ( ruleJvmArgumentTypeReference EOF )\n // ../org.xtext.guicemodule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the dtls property.
public short getDtls() { return dtls; }
[ "public Long getDlsbsdsj() {\n return dlsbsdsj;\n }", "public Date getValdStrtDt() {\n\t\treturn valdStrtDt;\n\t}", "public String getLdfValue()\n {\n return ldfValue;\n }", "@ApiModelProperty(value = \"Status dts of campaign or flow\")\r\n public String getStatusDts() {\r\n return stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String builder for DataDTO.
@Override public String toString() { StringBuilder builder = new StringBuilder(DEFAULT_DATA_DTO_SIZE); builder.append("{'name':'").append(name).append(",'value':").append(value).append("},"); return builder.toString(); }
[ "private String createStringData(){\n\t\tStringBuilder str = new StringBuilder();\n\n\t\tstr.append(\"Data Pilgrim\").append(System.lineSeparator());\n\t\tstr.append(\"Name: \").append(this.name).append(System.lineSeparator());\n\t\tstr.append(\"Surname: \").append(this.surname).append(System.lineSeparator());\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the releasability of the product. This data is extracted from the Product object.
public String getReleasabilityDescription();
[ "public Object getProduct() {\n return mProduct;\n }", "public ProductStatus getProductStatus() {\n return productStatus;\n }", "public T getProduct() {\n return this.product;\n }", "public int getItHasProduct() {\n return itHasProduct;\n }", "io.grafeas.v1.VulnerabilityAssessmen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "amountOpen" element
public void unsetAmountOpen() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(AMOUNTOPEN$8, 0); } }
[ "public void unsetAmount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(AMOUNT$6, 0);\n }\n }", "void unsetSettlementAmount();", "void unsetAmount();", "void unsetDebitAmount();", "void unsetCreditAmount();", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the '_2300DTP01DateTimeQualifier' field
public java.lang.CharSequence get2300DTP01DateTimeQualifier$1() { return _2300DTP01DateTimeQualifier; }
[ "public java.lang.CharSequence get2300DTP01DateTimeQualifier$1() {\n return _2300DTP01DateTimeQualifier;\n }", "public java.lang.CharSequence get2430DTP01DateTimeQualifier$1() {\n return _2430DTP01DateTimeQualifier;\n }", "public java.lang.CharSequence get2430DTP01DateTimeQualifier$1() {\n return _...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spawns a default wave of monsters.
private void defaultWave() { Location loc; int ran; for (int i = 0; i < wave + noOfPlayers; i++) { loc = ArenaManager.spawnpoints.get(i % noOfSpawnPoints); ran = random.nextInt(dCreepers); CreatureType mob; ...
[ "private void specialWave()\n {\n Location loc;\n CreatureType mob;\n \n int ran, count;\n boolean slime = false;\n boolean wolf = false;\n \n // 5 on purpose - Ghasts act weird in Overworld.\n switch (random.nextInt(5))\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an aircraft list sorted by flight range.
List<Aircraft> getSortedAircraftList();
[ "public List<IAircraft> getSortedByFlightRangeAircraftList(Airline airline) {\n List<IAircraft> aircraftList = airline.getAircraftList();\n aircraftList.sort(Comparator.comparingInt(IAircraft::getFlightRange));\n return aircraftList;\n }", "List<AirlineFlightDelays> listArrivalFlightDelays...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column yjk_device.two_stage_mode_id
public Long getTwoStageModeId() { return twoStageModeId; }
[ "public void setTwoStageModeId(Long twoStageModeId) {\n this.twoStageModeId = twoStageModeId;\n }", "public Long getModeId() {\n return modeId;\n }", "public Integer getModeId() {\n return modeId;\n }", "public void setModeId(Long modeId) {\n this.modeId = modeId;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Division__Group_1__1__Impl" $ANTLR start "rule__Division__Group_1__2" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:8088:1: rule__Division__Group_1__2 : rule__Division__Group_1__2__Impl ;
public final void rule__Division__Group_1__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:8092:1: ( rule__Division__Group_1__2__Impl ) ...
[ "public final void rule__End__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10576:1: ( rule__End__Group__1__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String in `YYYYMMDD` format, e.g. `20171031` per the ISO 8601 extended format for calendar dates. The end of a date range (inclusive)
@ApiModelProperty(value = "String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601 extended format for calendar dates. The end of a date range (inclusive)") public String getEndDate() { return endDate; }
[ "java.lang.String getEndDateYYYY();", "public DateRange getDateRange();", "void setEndRange( String endRange );", "public String getEndString() {\n SimpleDateFormat date = new SimpleDateFormat(\"MM/dd/yyyy\");\n return date.format(end.getTime());\n }", "public String getEndDateString() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the data dir.
private File getDataDir(){ File file = new File(this.configManager.getConfigDirectory() + File.separator + DATA_DIR); if(!file.exists()){ file.mkdirs(); } return file; }
[ "private static String getDataDir() {\n return self.get(\"dataDir\");\n }", "public String getDataDir() {\n return dataDir.getAbsolutePath();\n }", "public String getDataDir() {\n\t\treturn dataDir;\n\t}", "public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int32 snapshot_exitcode = 4;
public int getSnapshotExitcode() { return snapshotExitcode_; }
[ "int getSnapshotExitcode();", "public int getSnapshotExitcode() {\n return snapshotExitcode_;\n }", "int getImageExitcode();", "int getExitCode();", "int getExitCode() {\n if (statsMoved.size() > 0 || recordingsMoved.size() > 0) {\n return 0;\n }\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the startTime property.
public long getStartTime() { return startTime; }
[ "public java.lang.Long getStartTime() {\n return startTime;\n }", "public java.lang.Long getStartTime() {\n return startTime;\n }", "public static long getStartTime() {\n return startTime;\n }", "public java.lang.Long getStartTime() {\n return start_time;\n }", "public Calendar get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PartiturTask__Group__3" $ANTLR start "rule__PartiturTask__Group__3__Impl" InternalPartitur.g:824:1: rule__PartiturTask__Group__3__Impl : ( ( rule__PartiturTask__Alternatives_3 ) ) ;
public final void rule__PartiturTask__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalPartitur.g:828:1: ( ( ( rule__PartiturTask__Alternatives_3 ) ) ) // InternalPartitur.g:829:1: ( ( rule__PartiturTask__Alternatives_3...
[ "public final void rule__Entity__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:1190:1: ( ( ( rule__Entity__Alternativ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the leader of given team.
public native static GameTeamMember leader(GameTeamMember oper1);
[ "public Team getTeamByID(Long teamId);", "POGOProtos.Rpc.Team getTeam();", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given two nonnegative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: The length of both num1 and num2 is < 110. Both num1 and num2 contains only digits 09. Both num1 and num2 does not contain any leading zero. You must not use any builtin BigInteger library or convert the inpu...
public String multiply(String num1, String num2) { if (num1 == null || num2 == null) return "0"; int[] digits = new int[num1.length() + num2.length()]; for (int i = num1.length() - 1; i >= 0; i--) { for (int j = num2.length() - 1; j >= 0; j--) { int product = (num1.ch...
[ "public String multiply_2(String num1, String num2) {\n\t int m = num1.length(), n = num2.length();\n\t int[] pos = new int[m + n];\n\t \n\t for(int i = m - 1; i >= 0; i--) {\n\t for(int j = n - 1; j >= 0; j--) {\n\t int mul = (num1.charAt(i) - '0') * (num2.charAt(j) - '0'); \n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
redirection to error page is only for bin flow and when the item couldnot be added to cart
public boolean shouldRedirectToErrorPage(SparkCartBean cart, boolean isBinFlow){ if(cart.getTotalItemsInCart() == 0 && isBinFlow) { return true; } if(isBinFlow && cart.isBuyerRestricted()){ return true; } if(cart.isBuyerStateInvalid()){ return true; } return false; }
[ "@Override\n public void addItem(Product product) {\n boolean isAdded = shopViewModel.addItemToCart(product);\n if (isAdded){\n Snackbar.make(requireView(),product.getName() + \"Added to Cart\",Snackbar.LENGTH_LONG)\n .setAction(\"Check out\", new View.OnClickListener(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the image that is under the singletouch point, or return null (canceling the drag op) if none
public MultiTouchEntity getDraggableObjectAtPoint(MultiTouchController.PointInfo pt) { float x = pt.getX(), y = pt.getY(); int n = mImages.size(); for (int i = n - 1; i >= 0; i--) { ImageEntity im = (ImageEntity) mImages.get(i).getEntity(); if (im.containsPoint(x, y)) ...
[ "public Image getTieUnder();", "ImageViewTouchBase getMainImage();", "@Override\r\n\tpublic Image getDragImage() {\n\t\treturn img == null ? super.getDragImage() : img;\r\n\t\t//return super.getDragImage();\r\n\t}", "public GPoint getTileTouched(TouchEvent event) {\n\t\tdouble x = (event.x + mapOffsetX) / (do...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate IDF for the unknown words based on the candidate places
public static List<Double> CalculateIDF(List<String> lstSrcWords, List<List<String>> lstlstCandidateWords, int nIgnoreIdx) { String sWord = ""; int nOccurrenceCnt = 0; int nPlaceCnt = lstlstCandidateWords.size(); double fIDF = 0.0; List<Double> lstSrcIDF = new ArrayList<Double>(); for (int i=0; ...
[ "private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deepPrint Deep print object
default String deepStringify() { return (new ObjectStringifer.DeepObjectPrinter()).toString(this); }
[ "public void toPrint(){\n System.out.println(\"--- START OBJECT DETAILS ---\");\n System.out.println(\"RaceCar Engine: \" + raceCarEngine.toString());\n for(int i=0; i<4; i++){\n System.out.println(\"RaceCar Tire: \" + (i+1) + \" \" + raceCarTire[i].toString());\n }\n S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column T_CUST_TRADE.CUSTNO
public String getCustno() { return custno; }
[ "public String getCustNo() {\n return custNo;\n }", "public java.lang.String getCustNo() {\n return custNo;\n }", "java.lang.String getCustomerOrderNumber();", "public String getLstCustNo() {\n return lstCustNo;\n }", "public Integer getCustNum() {\n return custNum;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methods under test: void printStackTrace(PrintWriter), where PrintWriter flushes automatically
public void testPrintStackTracePrintWriter_True() { Throwable th; ByteArrayOutputStream ba = new ByteArrayOutputStream(); PrintWriter ps = new PrintWriter(ba, true); th = prepareThrowables(); th.printStackTrace(ps); assertEquals("incorrect info in printed stack trace", ...
[ "void printStackTrace(PrintWriter writer);", "public void test_DumpStackTrace() {\n Itk.dumpStackTrace() ;\n }", "public void testPrintStackTracePrintStream() {\n Throwable th;\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintStream ps = new PrintStream(ba);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the output directory name fragment corresponding to the transition, and append it to the existing name fragment in buildConfigOptions.
private static void updateOutputDirectoryNameFragment( BuildConfiguration.Options buildConfigOptions, Map<String, Object> transition) { String transitionString = ""; for (Map.Entry<String, Object> entry : transition.entrySet()) { transitionString += entry.getKey() + ":"; if (entry.getValue() !...
[ "private String getOutputName() throws MojoExecutionException\n {\n if ( MSBuildPackaging.isSolution( mavenProject.getPackaging() ) )\n {\n throw new MojoExecutionException( \"Internal error: Cannot determine single output name for a solutions\" );\n }\n String projectFileN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Distribution__ProbAssignment_0_1" $ANTLR start "rule__Distribution__ExpressionAssignment_0_3" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10351:1: rule__Distribution__ExpressionAssignment_0_3 : ( ruleNatural ) ;
public final void rule__Distribution__ExpressionAssignment_0_3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10355:1: ( ( ruleNatural ) ) // ....
[ "public final void rule__Uniform__ExpressionAssignment_0_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10400:1: ( ( ruleNatural ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a directed graph, return an array list of node numbers that have been topologically sorted. (That is, if there is an edge from node a to node b, b must come after a in the graph.) You may assume that there are no cycles in G (so it is always possible to sort.) EXTRA CREDIT: Do not assume there are no cycles, and ...
static public ArrayList<Integer> topologicalSort(Graph G) { // TODO // Creates a deep copy of the graph ListGraph Copy = (ListGraph) G.clone(); // ArrayList to return ArrayList<Integer> f = new ArrayList<Integer>(); // Queue that stores nodes with indegree = 0 Queue<Integer> S = new LinkedList<Integer>();...
[ "public Iterable<Integer> topologicalSort(Digraph G) {\n if (cycle() != null) \n System.out.print(\"Oops...we have a cycle here: \");\n \n ArrayList<Integer> postorder = new ArrayList<Integer>();\n resetArrays();\n for (int v = 0; v < G.V(); v++)\n if (!marke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ (nonJavadoc) Recursively calls setMaximizedControl for all direct parents that are itself Splitters.
public void setMaximizedControl(Control control) { if (control == null || control == getMaximizedControl()) super.setMaximizedControl(null); else super.setMaximizedControl(control); // recursively walk upward Composite parent= getParent(); if (parent instanceof Splitter) ((Splitter) parent)...
[ "public void maximizeAll() {\n\t\tif ( ! isSingle() ) {\n\t\t\tfor ( VConcertinaTabInterface tabInterface : tabs ) {\n\t\t\t\tmaximize( tabInterface );\n\t\t\t}\n\t\t}\n\t}", "public void setMaximizable(boolean maximizable);", "public MaximizedControlPanel(GUI p){\n\t\tparent = p;\n\t\tthis.setBorder(BorderFact...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the startCol coordinate from yArg
private void buildStartCol(String yArg) { startCol = decodeStartArg(yArg); }
[ "public abstract int getCol(int x);", "public int getStartCol() {\n\t\treturn window.startCol;\n\t}", "public void setStartY(double y)\n {\n startycoord=y; \n }", "public float getStartY() {return startY;}", "public abstract int findColForWindow(int x);", "public final int getStartColumn() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Append a switch and value to the command line. There is no guarantee this action happens before the switch is needed.
public abstract void appendSwitchWithValue(String switchString, String value);
[ "@Override\n public void appendSwitchWithValue(String switchString, String value) {\n mSwitches.put(switchString, value == null ? \"\" : value);\n\n // Append the switch and update the switches/arguments divider mArgsBegin.\n String combinedSwitchString = SWITCH_PREFIX + swit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
external imap SSL port Use getExternalImapSSLPortAsString to access value as a string.
@ZAttr(id=783) public int getExternalImapSSLPort() { return getIntAttr(Provisioning.A_zimbraExternalImapSSLPort, -1); }
[ "@ZAttr(id=782)\n public int getExternalImapPort() {\n return getIntAttr(Provisioning.A_zimbraExternalImapPort, -1);\n }", "@ZAttr(id=787)\n public String getExternalImapSSLHostname() {\n return getAttr(Provisioning.A_zimbraExternalImapSSLHostname, null);\n }", "@ZAttr(id=183)\n pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WMS connector input parameters
public static void userInputWMS() { String wmsGetCapabilitiesURL = "http://maps.heigit.org/osm-wms/service?service=wms&version=1.1.1&request=GetCapabilities"; String wmsLayer = "osm_auto:all"; String wmsFormat = "image/png"; String wmsVersion = "1.1.1"; //see url, it is already defined String wmsSRS = "EP...
[ "public static void userInputWMS() {\n\t\tString wmsGetCapabilitiesURL = \"http://maps.heigit.org/osm-wms/service?service=wms&version=1.1.1&request=GetCapabilities\";\n\t\tString wmsLayer = \"osm_auto:all\";\n\t\tString wmsFormat = \"image/png\";\n\t\tString wmsVersion = \"1.1.1\"; //see url, it is already defined\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field706' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField706() { field706 = null; fieldSetFlags()[706] = false; return this; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }", "private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wird der Konstruktor ohne Parameter aufgerufen, wird der Winzer Max Musterwinzer erzeugt
public Winzer() { this("Max", "Musterwinzer"); }
[ "public Max()\r\n {\r\n }", "Max createMax();", "public Giao_Dien_Tim_Max() {\n initComponents();\n }", "public LimitingMonitor(){\n\t\tmaxActive = MaxActive.defaultValue.factory.getInstance();\n\t\t\n\t}", "public Maximum_and_Mnimum() {\n initComponents();\n }", "public MinMax()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the Gamefield according to the count of players
public void createGamefield() { if (playerList == null) playerList = new ArrayList<>(); if (playerList.size() < 1) { createGameField(chordImpl.getID()); Collections.sort(playerList); playerList.remove(ownPlayer); ownPlayer.setShips(); GUIMessageQueue.getInstance().addMessage("Field Created!"); }...
[ "private void createPlayers(int numPlayers) {\n players.clear();\n for (int i = 0; i < numPlayers; i++) {\n Player p = new Player(i);\n players.add(p);\n }\n }", "private void createPlayers(int numPlayers) {\r\n\t\tplayerList = new PlayerList(numPlayers);\r\n\t}", "private void createPlayers...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to get the fake account to be used with SyncAdapter, or make a new one if the fake account doesn't exist yet. If we make a new account, we call the onAccountCreated method so we can initialize things.
public static Account getSyncAccount(Context context) { // Get an instance of the Android account manager AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); // Create the account type and default account Account newAccount...
[ "private static Account getSyncAccount(Context context) {\n // Get an instance of Android Account Manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n\n // Create the account type and the default account\n Accoun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
click view all Intake ID
public void clickViewAllIntakeID() throws AcisException { logger.info("Clicking view all Intake ID"); waitForPageLoad(); waitForPageLoadTill(10); waitForElement(dashboardIframe); switchToFrameByWebElement(dashboardIframe); waitForPageLoadTill(5); waitForElement(refreshDashboard); clickWebElement(ref...
[ "public void clickonViewAll()\r\n\t{\r\n\t objpojo.getwrapper().actionclick(btnviewall);\r\n\t}", "public void click_ViewAll() {\n if (viewAll.isDisplayed()) {\n viewAll.click();\n\n } else {\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n view...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method is called upon events in the JRipples EIG
void jRipplesEIGChanged(JSwingRipplesEIGEvent evt);
[ "public interface JSwingRipplesEIGListener {\n\t/**\n\t * The method is called upon events in the JRipples EIG\n\t * @param evt\n\t * \t an event that occured in the JRipples EIG\n\t */\n\tvoid jRipplesEIGChanged(JSwingRipplesEIGEvent evt);\n}", "public void TopDreiEvent();", "public void eventsProcessed() {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether the user is in the NONE state.
public boolean isNone() { return state == State.NONE; }
[ "public boolean isNullUpdateUser()\n\t{\n\t\treturn ((this.flagsNul & 0x4)!=0);\n\t}", "public boolean isNone() {\n if (var == null)\n return (flags & (PRIMITIVE | ABSENT | UNKNOWN)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n else\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set LEDS on/off according to the temperature range.
public void range(){ //set pin value 1 for(int j=0;j<=temperatureRange;j++){ setGpioPin(j, 1); } if(temperatureRange!=7){ //set pin value 0 for(int j=temperatureRange;j<8;j++){ setGpioPin(j, 0); } } }
[ "void setShutterLEDState(boolean on);", "public void setLEDFront ( int onOff )\n {\n assert flukeConnected() : \"Scribbler does not have a Fluke board\";\n assert onOff==LED_ON || onOff==LED_OFF : \"setLEDFront: onOff value invalid\";\n\n if( onOff == LED_OFF )\n _setFluke( SET_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the guideItemsHistory attribute of the GuideSheetHistory object
public GuideItemsHistory getGuideItemsHistory() { return guideItemsHistory; }
[ "public List<String> getHistory() {\n\t\treturn history;\n\t}", "public History getHistory() {\n return history;\n }", "public java.util.List<pb4server.ActivityHistoryVo> getHistoryInfosList() {\n return historyInfos_;\n }", "@Override\n\tpublic java.lang.String getHistory() {\n\t\treturn _wfms_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model. This is expected to be called by the GUI thread, holding a readl...
public int viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) { int pos; // return position int index; // child index to forward to Shape ca; // child allocation index = getViewIndexAtPoint(x, y, a); index = Math.max(index, 0); if (index < g...
[ "private void calculateBound() {\n View v = mView;\n float left = v.getLeft() * v.getScaleX() + v.getTranslationX();\n float top = v.getTop() * v.getScaleY() + v.getTranslationY();\n float right = v.getRight() * v.getScaleX() + v.getTranslationX();\n float bottom = v.getBottom() *...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the List index of the first Server with room in their waiting queue.
private int findFirstWithRoom(int limit) { for (int i = 0; i < this.serverList.size(); i++) { if (!this.serverList.get(i).isFull(limit)) { return i; } } return Shop.DOES_NOT_EXIST; }
[ "private int findIdleServer() {\n for (int i = 0; i < this.serverList.size(); i++) {\n if (this.serverList.get(i).isIdle() && this.serverList.get(i).isEmptyQueue() &&\n !this.serverList.get(i).isResting()) {\n return i;\n }\n }\n return Sh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/int a = 10, b= 20; System.out.println("Before Swapping"); System.out.println(a); System.out.println(b); a = ab; b = a/b; a = a/b; a = a+b; b = ab; a = ab; System.out.println("After swapping"); System.out.println(a); System.out.println(b); } }
public static void main(String[] args) { System.out.println("enter a number for A"); Scanner scan = new Scanner(System.in); int a = scan.nextInt(); System.out.println("enter a number for B"); Scanner scan1 = new Scanner(System.in); int b = scan1.nextInt(); System.out.println("before swapping"); System.out.println(a)...
[ "public static void main(String[] args) {\n int temp, a = 10, b = 20;\n System.out.println(\"Before swapping\");\n System.out.println(\"a = \" + a + \" and b = \" + b);\n temp = a;\n a = b;\n b = temp;\n System.out.println(\"After swapping\");\n System.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints message ins the message bar
public void printMessage(String message) { messageBar.printMessage(message); }
[ "private void showMessage(String msg) {\r\n msgBar.setText(msg);\r\n }", "void printToConsoleAndGui (String message){\n System.out.println(message);\n setGuidedUserInterfaceMsg(message);\n }", "public void showMessage(String message)\n {\n bjEditor.writeMessage(message);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The format is based on 1.5 release behavior which can be revealed by the following code: System.out.println(new CheckboxGroup());
@Override public String toString() { toolkit.lockAWT(); try { return (getClass().getName() + "[" + //$NON-NLS-1$ "selectedCheckbox=" + current + "]"); //$NON-NLS-1$ //$NON-NLS-2$ } finally { toolkit.unlockAWT(); } }
[ "public CheckboxGroup getCheckboxGroup() {\n return group;\n }", "public ActivityPaneLogLevelButtonGroup() {\n super();\n }", "public String toString(){\n\t\treturn \"group [\" + id +\"]\";\n\t}", "private JCheckBox getXmlOutputCheckbox() {\n if (xmlOutputCheckbox == null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the flag that states if an exception has been caught or not.
protected void setExceptionCaught() { this.exceptionCaught = true; }
[ "public static void setExitOnException(boolean flag) {\n exitOnException = flag; \n }", "public void setExceptionOn(boolean flag)\n {\n this.setProperty(GUILoggerSeverityProperty.EXCEPTION, flag);\n }", "public static void setThrowExceptions(boolean te)\n {\n throwExceptions = te;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of Genetic
public Genetic() { }
[ "public void create() {\n GeneticConfiguration cfg =\n new GeneticConfiguration(config, mutation_rate, recombination_rate);\n population = new ArrayList(size);\n for (int ix = 0; ix < size; ix++)\n population.add(cfg.makeRandomCopy());\n }", "public Genetic (int popSize, int generations) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
XmuCoreDependencyView: 'dependency' typeIndicator=TypeIndicator? dependentType=UnorderedTupleTypeLiteralWithInitializer body=XmuCoreStatement;
public XmuCoreDependencyViewElements getXmuCoreDependencyViewAccess() { return pXmuCoreDependencyView; }
[ "String getDependencyExpression();", "java.lang.String getVduDependsOnRef();", "public interface Dependable {\n\n /**\n * This method is called by the Dependency Manager when the\n * Dependable object should be updated.\n * This method is called when the actual definition or dependencies of \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get list of state warning by sub commodity.
public List<String> getStateWarningBySubcommodity(String subcomcd) throws CheckedSoapException{ List<String> listReturn = new ArrayList<>(); GetStateWarningBySubcommodityRequest request = new GetStateWarningBySubcommodityRequest(); request.setAuthentication(this.getAuthentication()); request.getPDOMISUBCOMCD...
[ "public List<SubCommodityStateWarning> findBySubCommodity(SubCommodityStateWarning subCommodityStateWarning) {\n\t\tif(subCommodityStateWarning.getKey() != null && subCommodityStateWarning.getKey().getSubCommodityCode() != null){\n\t\t\treturn this.repository.findByKeySubCommodityCode(subCommodityStateWarning.getKe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces SQC procedure HR05GetCitizenship from ZHRI105A.SQC This procedure retrieves a record from the Citizenship table with matching Employee ID and Country Code, plus the corresponding two letter country abbreviation from the Country table.
public static PsCitizenship findByEmployeeIdAndCountryCode(String employeeId, String countryCode) { EntityManagerFactory emfactory = Persistence.createEntityManagerFactory("PStoAS400Bridge"); EntityManager em = emfactory.createEntityManager(); try { List<PsCitizenship> resultList = (List<PsCitizenship>) ...
[ "public static String findCountryIsoAlpha2CodeByEmployeeIdAndCountryCode(String employeeId, String countryCode) {\n\t\tEntityManagerFactory emfactory = Persistence.createEntityManagerFactory(\"PStoAS400Bridge\");\n\t\tEntityManager em = emfactory.createEntityManager();\n\t try {\n\t \tList<String> resultList ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }