query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
appends first and last name into an arrayList
public ArrayList<String> getFullName(){ ArrayList<String> fullName = new ArrayList<>(); for(int i =0; i<firstName.size(); i++) { fullName.add(firstName.get(i) + " " + lastName.get(i)); } return fullName; }
[ "public static List addStudentInfo() {\r\n System.out.println(\"\\nAdd student information\");\r\n\r\n List info = new ArrayList();\r\n\r\n String nameF = getFirstName();\r\n String nameL = getLastName();\r\n String studentNo = getStudentNumber();\r\n\r\n info.add(0, nameF)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Looping through the ApplicableRegionSet from WorldGuard is different per implementation
public abstract Set<ProtectedRegion> getApplicableRegionsSet(Location location);
[ "public Set<Region> getAllRegions(World world){\n \t\tSet<Region> returnableRegions = new HashSet<Region>();\n \t\tif(regions.containsKey(world.getName())){\n \t\t\treturnableRegions.addAll(regions.get(world.getName()));\n \t\t}\n \t\treturn returnableRegions;\n \t}", "Collection<IRegion> getApplicableRegions(Loc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of detecterAnomalieNbrMinimalItem method, of class POJOCompteItem.
@Test public void testDetecterAnomalieNbrMinimalItem() { POJOCompteItem instance = genererInstanceTest(); instance.setDate1(new DateTime(2013, 1, 1, 0, 1).toDate()); instance.setDate2(new DateTime(2013, 1, 6, 0, 1).toDate()); System.out.println("detecterAnomalieNbrMinimalItem-----...
[ "@Test\n\tpublic void test02GivenNByItem() throws Exception {\n\t\tconf.set(\"data.splitter.givenn\", \"item\");\n\t\tconf.set(\"data.splitter.givenn.n\", \"1\");\n\t\tconvertor.processData();\n\n\t\tGivenNDataSplitter splitter = new GivenNDataSplitter(convertor, conf);\n\t\tsplitter.splitData();\n\n\t\tassertEqual...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Multi select component configurator.
public interface MultiSelectConfigurator<T, ITEM, B extends MultiSelectConfigurator<T, ITEM, B>> extends BaseSelectInputBuilder<Set<T>, MultiSelect<T>, T, ITEM, B> { }
[ "abstract public void cabMultiselectPrimaryAction();", "@VTID(35)\r\n void setMultiSelect(\r\n int rhs);", "public interface Multi extends SelectionModel {\n\n /**\n * Marks items as selected.\n * <p>\n * This method does not clear any previous selection state,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a number of items from the end of the list as a single transaction Try to use the more efficient removeLast if the delegate is a LinkedList This is a workaround for problems with the current diagnostics logging implementation
public void removeFromEnd(int numberOfItemsToRemove) { LinkedList l = delegate instanceof LinkedList ? (LinkedList)delegate : null; for ( int loop=0; loop < numberOfItemsToRemove; loop++) { if ( l != null) { l.removeLast(); } else { delegate.remove...
[ "SmartList<E> drop(int n);", "private E removeLastItemFromTailAndPullTailFromTree() {\n @SuppressWarnings(\"unchecked\")\n E removed = (E) tail[0];\n size--;\n pullTailFromTree(new Box<>());\n return removed;\n }", "private DoubleLinkedList<Integer> removeLastFromThreeEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This is a very popular interview problem and it has several variations. Initially, a bruteforce approach comes to mind. All we have to do is find the greatest difference in the array, such that the larger number occurs after the smaller number in the array. However, this has time complexity of O(n^2). Turns out, we d...
public int maxProfit(int[] prices) { int minPrice = Integer.MAX_VALUE, maxProfit = 0; for(int price : prices) { minPrice = Math.min(price,minPrice); maxProfit = Math.max(maxProfit, price - minPrice); } return maxProfit; }
[ "public int maxProfit(int[] prices) {\n // int max = 0;\n // for(int i=0; i<prices.length; i++){\n // for(int j=i+1; j<prices.length; j++){\n // int diff = -1 *(prices[i] - prices[j]);\n // if(diff > max){\n // max = diff;\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
using custom clock pane Create a clock and a label
public static void displayClock(Stage primaryStage) { ClockPane clock = new ClockPane(); String timeString = clock.getHour() + ":" + clock.getMinute() + ":" + clock.getSecond(); Label lblCurrentTime = new Label(timeString); // Place clock and label in border pane ...
[ "public ClockPanel() {\n Border border = BorderFactory.createLineBorder(Color.green, 5); //creates a border\n setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0));\n setLabels();\n setBackground(new Color(0, 0, 0));\n setBorder(border);\n setBounds(0, 0, 390, 170);\n s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scrolls to the end of the last data row.
public void scrollToEnd() { GridClientRpc clientRPC = getRpcProxy(GridClientRpc.class); clientRPC.scrollToEnd(); }
[ "public void scrollToEnd () {\n\t\tint len = getDocLength();\n\t\tsetCaretPosition(len);\n\t\tmoveCaretPosition(len);\n\t}", "public void scrollToBottom()\n {\n ensureIndexIsVisible(getModel().getSize() - 1);\n }", "public void selectLastRow() {\n\t\tif (dataTable.getRowCount()>0) {\n\t\t\tdataTabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check, if all instances of a canddiate are delete from one house. If so, the assumption was invalid: Get all instances of the candidate in the house If there are canddiates and the set equals the offSet, step was found
private void checkHouseDel(TableEntry entry, SudokuSet[] houseSets, int entityTyp) { // check all candidates for (int i = 1; i < entry.offSets.length; i++) { // in all houses for (int j = 0; j < houseSets.length; j++) { tmpSet.set(houseSets[j]); ...
[ "@Test\n public void testEliminationOfCandidateAtRandomWhenThereAreMultipleLeadingCandidates() {\n Map<Character, String> candidates = generateCandidates();\n for (int i = 0; i <2; i++) {\n Set<Candidate> candidateSet = candidates\n .entrySet()\n .st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the builder for the settings used for calls to deleteWorkflow.
public OperationCallSettings.Builder<DeleteWorkflowRequest, Empty, OperationMetadata> deleteWorkflowOperationSettings() { return getStubSettingsBuilder().deleteWorkflowOperationSettings(); }
[ "public UnaryCallSettings.Builder<DeleteWorkflowRequest, Operation> deleteWorkflowSettings() {\n return getStubSettingsBuilder().deleteWorkflowSettings();\n }", "public UnaryCallSettings.Builder<DeleteWorkflowInvocationRequest, Empty>\n deleteWorkflowInvocationSettings() {\n return deleteWorkf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this block is a brewing stand
public boolean isBrewingStand() { return this.type == Type.BREWINGSTAND; }
[ "public boolean isBlock() {\n return this.bedrockBlockDefinition != null;\n }", "private boolean isBusted()\n\t{\n\t\treturn (getHandValue() > BLACKJACK);\n\t}", "public boolean isGoodStanding() {\n return goodStanding;\n }", "public boolean isInGoodStanding() {\n return inGoodStand...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of safepointTime This is wallclock time spent running safepoint code.
public long getSafepointTime() { return safepointTime; }
[ "public long getSafepointSyncTime() {\n\t\treturn safepointSyncTime;\n\t}", "public void setSafepointTime(long safepointTime) {\n\t\tthis.safepointTime = safepointTime;\n\t}", "public void setSafepointSyncTime(long safepointSyncTime) {\n\t\tthis.safepointSyncTime = safepointSyncTime;\n\t}", "public Date getPo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form RECOVERY
public RECOVERY() { initComponents(); }
[ "public frm_registro_admision_ingreso_registro() {\n }", "public logForm() {\n initComponents();\n \n }", "public static Result newRun() {\n \t\tForm<models.NewRun> runForm = Form.form(models.NewRun.class);\n return ok(\n newRun.render(runForm)\n );\n \t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
surName get && set
public String getSurName(){ return this.surName; }
[ "public void setSurName(String surName);", "@AutoEscape\n\tpublic String getSurName();", "void setSurname( java.lang.String value );", "public void setSurname(String s) {\n this.surname = s;\n }", "public String getSurname()\n\t{\n\t\treturn surname;\n\t}", "java.lang.String getSurname();", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ouverture d'un socket relier au serveur
public void connexionServeur() { String serverIp = JOptionPane .showInputDialog("Entrez le nom du serveur."); try { socket = new Socket(serverIp, 4456); logger.info("Connexion au socket serveur."); Thread t = new Thread(new EnvoiPresence(socket)); t.start(); Thread t2 = new Thread(n...
[ "public void run(){\r\n try{\r\n // inizializzo la server socket\r\n ServerSocket server = new ServerSocket(this.listeningPort);\r\n\r\n msg(\"Socket server creata, entro nel ciclo di attesa\");\r\n\r\n // ATTENZIONE: siccome prima/dopo l'accept devo modificare il flag\r\n // listening, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of Automobile models from the server.
@Override public ArrayList<String> getAutomobileList() { Socket serverSocket = null; writer = null; reader = null; ArrayList<String> modelList = null; try { serverSocket = new Socket(host, port); writer = new ObjectOutputStream(serverSocket.getOutputStream()); reader = new ObjectInputStream(serverSo...
[ "java.util.List<com.google.devtools.testing.v1.IosModel> \n getModelsList();", "java.util.List<com.google.devtools.testing.v1.AndroidModel> \n getModelsList();", "public ArrayList<String> getAllModelList(){\n\t\tArrayList<String> autoNameList = new ArrayList<String>();\n\t\tfor (String key : automobil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an individual track
Track getTrack(int position);
[ "@Override\n public Track getTrackById(int id) {\n return trackRepository.findById(id).get();\n\n }", "@Override\n\tpublic Track getTrack(String trackId) {\n\t\tLOGGER.info(\"Getting Track by track id : \" + trackId);\n\t\tif(Util.isNull(trackId)) {\n\t\t\tthrow new IllegalArgumentException(\"To get ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter & Setter for Reservation
public Reservation getReservation() { return reservation; }
[ "public Long getReservation() {\n return reservation;\n }", "public Reservation getReservations() {\n return reservations;\n }", "Reservation createReservation();", "public int getReservationId() {\n return reservationId;\n }", "public int getReservationId() {\n\t\treturn thisRese...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make sure grouper can handle utf8
public static void verifyUtf8andTransactionsHelper() { //hibernate not ok yet, try next time starting up if (!GrouperDdlUtils.okToUseHibernate()) { return; } // Property configuration.detect.utf8.problems wasn't functioning as intended. Discourage its use if (!isBlank(GrouperCo...
[ "public ICodec<String> utf_8();", "@Override\n public boolean isUnicode()\n {\n return true;\n }", "@Test\n public void utf8Charset() throws BonitaException, InterruptedException {\n stubFor(post(urlEqualTo(\"/\"))\n .withHeader(WM_CONTENT_TYPE, equalTo(PLAIN_TEXT + \"; \" + WM_CH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display an avatar on the title display.
private void displayTitle(final AvatarId id) { displayHelper.displayTitle(id); }
[ "void displayMainTitleAvatar() {\n final Data input = new Data(2);\n input.set(MainTitleAvatar.DataKey.PROFILE, getProfile());\n input.set(MainTitleAvatar.DataKey.TAB_ID, MainTitleAvatar.TabId.CONTAINER);\n setInput(AvatarId.MAIN_TITLE, input);\n displayTitle(AvatarId.MAIN_TI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XRelationalExpression__Group__0" $ANTLR start "rule__XRelationalExpression__Group__0__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4493:1: rule__XRelationalExpression__Group__0__Impl : ( ruleXOtherOperatorExpression )...
public final void rule__XRelationalExpression__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4497:1: ( ( rul...
[ "public final void rule__XRelationalExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6103:1: ( ( r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Matches if value is a throwable with a cause that matches the matcher
@Factory public static <T extends Throwable, C extends Throwable> Matcher<T> withCause(final Matcher<C> matcher) { return new CustomTypeSafeMatcher<T>(CustomMatchers.fixedDescription("cause ", matcher)) { @Override protected boolean matchesSafely(T item) { return matc...
[ "public static <T extends Throwable> Matcher<T> hasCause(final Matcher<?> matcher) {\n return new ThrowableCauseMatcher<T>(matcher);\n }", "@Factory\n public static <T extends Throwable> Matcher<T> isThrowable(Class<?> type, Matcher<? super T> matcher) {\n final Matcher<T> typeMatcher = instan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resolve INCLUDE statements that are parameterized, i.e. that take the form INCLUDE MEMBER=LIB&ENV where the value of the symbolic parameter ENV is set at execution time. The symbolics passed into this method come from a list provided at execution time. These would typically be static and/or dynamic system symbols such ...
public void resolveParmedIncludes(ArrayList<PPSetSymbolValue> execSetSym) { this.LOGGER.finer( this.myName + " " + this.procName + " resolveParmedIncludes execSetSym = |" + execSetSym + "|" ); for (PPIncludeStatement i: this.includes) { ArrayList<PPSetSymbolValue> mergedSetSym = new Ar...
[ "public PPProc iterativelyResolveIncludes(\n\t\t\t\t\tArrayList<PPSetSymbolValue> execSetSym\n\t\t\t\t\t, File initialFile\n\t\t\t\t\t) throws IOException {\n\t\tthis.LOGGER.finer(\n\t\t\tthis.myName \n\t\t\t+ \" iterativelyResolveIncludes this = |\" \n\t\t\t+ this \n\t\t\t+ \"| initialFile = |\" \n\t\t\t+ initialF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Identifier Type'.
IdentifierType createIdentifierType();
[ "IdentifiersType createIdentifiersType();", "IdentifierType getIdentifierType();", "public IdentifierType get(String name);", "public interface Identifier<T> {\n\n /**\n * Enum type of value.\n *\n * @return the identifier type\n */\n IdentifierType type();\n\n /**\n * The value o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides the scope for a function declaration reference of a ReturnValueReference.
public final IScope scope_ReturnValueReference_function(final ReturnValueReference context, final EReference reference) { List<IEObjectDescription> descriptions = new ArrayList<IEObjectDescription>(); FunctionDeclaration funcdec = new ASTNodeBottomUpVisitor<FunctionDeclaration>() { @Override ...
[ "public final IScope scope_FunctionCall_function(final FunctionCall context, final EReference reference) {\n\t\tScopeFinder scopeFinder = new ScopeFinder(context);\n\t\tList<IEObjectDescription> descriptions = new ArrayList<IEObjectDescription>();\n\n\t\tfor (FunctionDeclaration funcdec : scopeFinder.getFunctionDec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method startTable sets up listener to set initial pawn positions
public void startTable(Table t, Button[][] bt) { for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { if (t.getTableCell(i, j).getPawn() == null) { if (!table.getTableCell(i, j).isFree()) { continue; } ...
[ "public void initTable() {\r\n\ttableHeader = lang.newText(new Coordinates(50, 50), \"Elo-Ranking\",\r\n\t\t\"tableHeader\", null, headerProps);\r\n\r\n\t\ttable = new String[startScores.length][3];\r\n\t\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t table[i] = new String[] { String.valueOf(i + 1),\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method creates and returns all available to JForex Reversal Amounts
public static List<ReversalAmount> createJForexPriceRanges() { List<ReversalAmount> result = new ArrayList<>(); result.add(ONE); result.add(TWO); result.add(THREE); result.add(FOUR); result.add(FIVE); for (int i = 6; i <= MAXIMAL_REVERSAL_AMOUNT; i ++) { result.add(new ReversalAmount(i)...
[ "public List retrieveCashReceipts(Deposit deposit);", "Collection <BaseAmountDTO> getBaseAmounts(BaseAmountFilter filter);", "@Override\n public List<Integer> getAvailableRefernceTable() throws HandleException {\n \n \n List<Atm_Denomination> dblist = atmDenominationRepository.findAll();\n \n Li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
select checkbox for contact based on name
public void selectContactByName(String name) { driver.findElement(By.xpath("//span[contains(text(),'"+ name +"')]//ancestor::td//" + "preceding-sibling::td//descendant::span[@class=\"private-checkbox__indicator\"]")).click(); }
[ "boolean selectCheckBox(String locator, boolean status);", "public static void selectCheckBox(WebElement obj, String objName) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(obj == null)\r\n\t\t\treturn;\r\n\t\tif (obj.isDisplayed()) {\r\n\t\t\tif(!obj.isSelected())\r\n\t\t\t{\r\n\t\t\t\tobj.click();\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the createSecret operation with null options model parameter
@Test(expectedExceptions = IllegalArgumentException.class) public void testCreateSecretNoOptions() throws Throwable { // construct the service constructClientService(); server.enqueue(new MockResponse()); // Invoke operation with null options model (negative test) secretsMa...
[ "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testGetSecretNoOptions() throws Throwable {\n // construct the service\n constructClientService();\n\n server.enqueue(new MockResponse());\n\n // Invoke operation with null options model (negative test)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the method getType takes a GET request including a specific type String. With help from the MenuItemService, will return a MenuItem list that contains only the specific type.
@Path("/type/{type}") @GET @Produces(MediaType.APPLICATION_XML) public List<MenuItem> getType(@PathParam("type") String type) { return ingrser.getItemType(type); }
[ "String getItemType();", "ItemType getType();", "@GetMapping(\"/type/{type}\")\n public List<ProductDto> getProductsByType(\n @PathVariable(\"type\") String type\n ){\n return productService.getProductsByType(type);\n }", "@GetMapping(value = \"/type/\")\r\n @ApiOperation(\"Finds...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifica la fecha de creacion.
public void setCreacion(Date creacion) { this.creacion = creacion; }
[ "public void setfCreacion(Date fCreacion) {\r\n this.fCreacion = fCreacion;\r\n }", "public void setCreat_at(Date creat_at) {\n this.creat_at = creat_at;\n }", "public void setCreattime(Date creattime) {\r\n this.creattime = creattime;\r\n }", "public void setCreatAt(Date creatAt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Copy Quote error transaction.
public String getCopyQuoteErrorTrans(Record inputRecord);
[ "public YesNoFlag isCopyQuoteError(Record inputRecord);", "public long getQUOTEID() {\r\n return quoteid;\r\n }", "ByteString getTransactionBytes() {\n return FutureHelper.quietGet(beginTxnFuture).getTransaction();\n }", "public com.microsoft.schemas.sharepoint.soap.CopyErrorCode getErrorCode() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Default PHP Descriptor for this block.
public void setDefaultPHPexeDescriptor(PHPexeDescriptor descriptor) { fDefaultDescriptor = descriptor; setButtonTextFromDescriptor(fDefaultButton, descriptor); }
[ "private void setUseDefaultPHP() {\n\t\tif (fDefaultDescriptor != null) {\n\t\t\tfDefaultButton.setSelection(true);\n\t\t\tfSpecificButton.setSelection(false);\n\t\t\tfEnvironmentsButton.setSelection(false);\n\t\t\tfExecutablesCombo.setEnabled(false);\n\t\t\tfEnvironmentsCombo.setEnabled(false);\n\t\t\tfireProperty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a PropertyValueListener to receive events about any property value change in this OWLModel. Note that the number of events is most likely very large and installing such a global listener may slow down the system significantly.
void addPropertyValueListener(PropertyValueListener listener);
[ "public void addValueChangeListener(Property.ValueChangeListener listener);", "void addPropertyListener(PropertyListener listener);", "@Override\n public void addPropertyChangeListener( PropertyChangeListener l )\n {\n if(listenerList == null) listenerList = new EventListenerList();\n listen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the path from node to the top.
private SinglyLinkedList<BinaryTreeNode<T>> pathToTop( final BinaryTreeNode<T> node) { BinaryTreeNode<T> n = (BinaryTreeNode<T>) node.getParent(); if (n == null) { return null; } SinglyLinkedList<BinaryTreeNode<T>> head = new SinglyLinkedListImp...
[ "private Stack<Node> getPath() {\n Stack<Node> finalPath = new Stack<>(); //Stack containing the final path of our algorithm\n\n\n Node current = goal;\n while (current.getParent() != null){\n finalPath.push(current);\n current = current.getParent();\n }\n fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the bank parameter data to the DB.
public void updateBankParameter(BankParameterData bankParameterData);
[ "public void saveBankParameter(BankParameterData bankParameterData);", "public void updateBusinessData(Map<String,Object> params) throws Exception;", "private void updateParameterInSave(ValidParameter<?> parameter) {\n save.setSettingsValue(nameMap.get(parameter.getCode()), parameter.getValue());\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shutdown all the running servers
public void shutdown() { for (TServer server : thriftServers) { server.stop(); } try { zookeeper.shutdown(); discovery.close(); } catch (IOException ex) { //don't care } }
[ "public synchronized void shutdown() {\n\n // 1 - We stop the servers\n Debug.signal( Debug.NOTICE, null, \"Shuting down servers...\" );\n gameServer.stopServer();\n accountServer.stopServer();\n gatewayServer.stopServer();\n\n // 2 - We perform some clean up\n gameServer = nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the Java class name of the error report valve class for new web applications.
public String getErrorReportValveClass() { return (this.errorReportValveClass); }
[ "public abstract Class<? extends WebPage> getErrorPage();", "protected String getErrorCSSClass() {\n return \"alert alert-error\";\n }", "String getClassNameOfCause();", "public void setErrorReportValveClass(String errorReportValveClass) {\n\n String oldErrorReportValveClassClass = this.error...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Direct Variable Resolver'.
DirectVariableResolver createDirectVariableResolver();
[ "DirectVariableResolver getVariableResolver();", "public interface ISolverVariable extends ISolverNode\n{\n\t/**\n\t * The domain of the variable.\n\t * <p>\n\t * Equivalent to:\n\t * <blockquote>\n\t * <pre>\n\t * getModelObject().getDomain();\n\t * </pre>\n\t * </blockquote>\n\t * \n\t * @since 0.07\n\t */\n\tp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the cellular number.
public void setCellularNumber(final String cellularNumber) { this.cellularNumber = cellularNumber; }
[ "public void setNumber(int r, int c, int nbr);", "public String getCellularNumber() {\n return cellularNumber;\n }", "public void setCellNum(Integer cellNum) {\n this.cellNum = cellNum;\n }", "public void setCellNo(int cellNo){\n\t\tthis.cellNo = cellNo;\n\t}", "public void setCelular(ja...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function Name: printShortestPathsLengths Input: none assumes dijkstra has already been called with some source Output:prints each vertex followed by the length of the shortest path from the source to it
public void printShortestPathsLengths(){ for (int vertex = 0; vertex < numVertices; vertex++){ System.out.println("Vertex " + (vertex+1) + ": " + adjLists[vertex].getCurrTotalWeight()); } }
[ "public void findShortestPaths() throws Exception {\n\t\t// Queue to store nodes with updated distance from the source node.\n\t\tQueue<axg137230_Node> queue = new LinkedList<>();\n\t\tqueue.add(nodes[source]); // add source node the queue.\n\t\twhile (!queue.isEmpty()) {\n\t\t\taxg137230_Node u = queue.remove();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1.Linebricks 2.TBricks 3.SBricks 4.RSBricks 5.LBricks 6.RLBricks default Square
private Brick generateBricks() { Brick randomBrick = null; Random rand = new Random(); int a = rand.nextInt(7); switch (a) { case 1: randomBrick = new LineBrick(); break; case 2: randomBrick = new LBrick(); break; case 3: randomBrick = new RLBrick(); break; case 4: randomBrick = new...
[ "float getBerryMultiplier();", "private void bricksSetup(){\t\t\t\n\t\t\t\t/**xStart is the x coordinate for the first brick on the base row */\t\n\t\t\tdouble xStart = (double) (getWidth() - ((NBRICKS_PER_ROW -1) * BRICK_SEP) - (NBRICKS_PER_ROW*BRICK_WIDTH))/2;\n\t\t\t\t/**yStart is the y coordinate for the firs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used check if the provided value passes all constraints on the given field.
public boolean apply(String fieldName, Object value) { try { ValueSet constraint = constraints.getSummary().get(fieldName); if (constraint != null && typeMap.get(fieldName) != null) { try (Marker marker = markerFactory.createNullable(typeMap.get(fieldName), ...
[ "protected abstract boolean onValidate(F field);", "public abstract boolean isValid(final JTextField field);", "void validate(Object fieldValue, CustomField fieldDefinition);", "public abstract FieldReport validate(int fieldSequence, Object fieldValue);", "private void checkValid() {\n FacetChecker.check...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the specified ServiceListener object to the context bundles's list of listeners.
void addServiceListener(ServiceListener listener);
[ "public void addServiceRegistrationListener(IJoynServiceRegistrationListener listener) {\n synchronized (lock) {\n if (logger.isActivated()) {\n logger.info(\"FTS Add a service listener\");\n }\n\n serviceListeners.register(listener);\n }\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one pole by id.
@Override @Transactional(readOnly = true) public Optional<Pole> findOne(Long id) { log.debug("Request to get Pole : {}", id); return poleRepository.findById(id); }
[ "@Transactional(readOnly = true)\n public Optional<LotDTO> findOne(Long id) {\n log.debug(\"Request to get Lot : {}\", id);\n return lotRepository.findById(id).map(lotMapper::toDto);\n }", "@Override\n @Transactional(readOnly = true)\n public PompeDTO findOne(Long id) {\n log.debu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This methods saves a string describing an action to the ActionHistory This action cannot be undone
public void saveAction(String action) { history.saveAction(action); guiController.updateHistory(); }
[ "public void saveAction(String stringAction) {\n\t\thistory.add(stringAction);\n\t\tsetUnsavedChanges(true);\n\t}", "public void saveAction(String stringAction, Action action, Object o) {\n\t\tString[] params = new String[2];\n\t\tparams[0] = stringAction;\n\t\tparams[1] = action.toString();\n\t\t\n\t\tundoHistor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the dot product between the 10 and 6 vectors
public double dot_6_10() { return x_10 * x_6 + y_10 * y_6; }
[ "public double dotProduct(Coordinates vectorA, Coordinates vectorB);", "public double dot(Vector v);", "public double dot_10_6() {\n return x_6 * x_10 + y_6 * y_10;\n }", "public static double dotProduct(List<Double> vector1, List<Double> vector2) {\n double dotProduct = 0;\n for (int i=0; i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the dependentFormat value for this GetMsgFormatResponse.
public void setDependentFormat(com.miitas.ws.postalsoft.www.DataServices.ServerX_xsd.GetMsgFormatResponseDependentFormat[] dependentFormat) { this.dependentFormat = dependentFormat; }
[ "public com.miitas.ws.postalsoft.www.DataServices.ServerX_xsd.GetMsgFormatResponseDependentFormat[] getDependentFormat() {\r\n return dependentFormat;\r\n }", "void setTargetFormat(ch.crif_online.www.webservices.crifsoapservice.v1_00.TargetReportFormat.Enum targetFormat);", "public void setDependentPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reduces the enumerable into an average based on the provided mapping function. Converts numbers into doubles to perform the calculations. Use multi reduce with custom Accumulators if you need more precision. As with all reduction functions, average will force iteration.
public <R extends Number> Optional<Double> average(Function<T, R> mappingFunction) { if(isEmpty()) { return Optional.empty(); } Accumulator<R, Double> sumAccumulator = new Accumulator<>(0.0, (acc, x) -> acc + x.doubleValue()); Accumulator<R, Double> countAccumulator = new Ac...
[ "double reduce(IReduceCallback<T, Double> callback, double accumulator);", "private Double getValuesAvg(Map<Integer, Double> map) {\n\t\t// Go over the values and compute the average\n\t\tDouble avg = 0.0;\n\t\tfor (Double entry : map.values()) {\n\t\t\tavg += entry;\n\t\t}\n\t\tavg /= map.size();\n\t\treturn avg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes a list of remote files or directories.
public void delete(List<String> paths) throws GRIDAClientException { try { StringBuilder files = new StringBuilder(); for (String file : paths) { if (files.length() > 0) { files.append(Constants.MSG_SEP_2); } files.appe...
[ "private void deleteFilesInNasFolder(String remoteDirectory, List<String> files) throws IOException{\n\t\tIterator<String> iterator = files.iterator();\n\t\tDocketFTPClient ftpClient = new DocketFTPClient(docketFtpClient);\n\t\twhile (iterator.hasNext()) {\n\t \t\tString fileName = iterator.next();\n\t \t\tftpC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the names of the files which matched at least one of the include patterns and none of the exclude patterns. The names are relative to the base directory.
String[] getIncludedFiles();
[ "public List<String> scan( List<String> files )\n throws\n IllegalStateException\n {\n// System.err.println(\"Scanning \\nbasedir=\"+basedir +\n// \" \\nincludes=\" + java.util.Arrays.toString(includes) +\n// \" \\nexcludes=\" + java.util.Arrays.toString(exclude...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
activity.runOnUiThread(() > textView.setText(e.getMessage()),Toast.makeText(activity, "fail", Toast.LENGTH_SHORT).show());
@Override public void onFailure(Call call, final IOException e) { activity.runOnUiThread(() -> { textView.setText(e.getMessage()); Toast.makeText(activity, "fail", Toast.LENGTH_SHORT).show(); }); }
[ "private void toastInUIThread(final String message){\n ControllerActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(ControllerActivity.this, message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
app_customize empty if completely no rememberme
@Override protected OptionalThing<String> getCookieRememberMeKey() { return OptionalThing.of(config.getCookieRememberMeShowbaseKey()); // if hybrid with cookie }
[ "private void dontShowThisAgain() {\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"isFirstAppLaunch\", false);\n editor.apply();\n }", "private void setRememberMeData() {\n if (session.getRememberEmail() != null && !session.getRememberEmail().equals(\"\")) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the number of segments building the curve
int getNumberOfCurveSegments();
[ "public int getNoOfCurveSegments()\n\t{\n\t\tif(viaWaypointList.isEmpty())\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn 10;\n\t}", "public int numberOfSegments() {\n return lineSeg.size();\n }", "public int numberOfSegments() {\n return lineSegs.length;\n }", "public int numberOfSegments() {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the input string is found in the 2D array either horizontally, vertically, or diagnoally in all directions
public static boolean hiddenString(char[][] arr2D, String str) { boolean foundMatchString = false; int rows = 0; int columns = 0; do { char[] horizontalArray = new char[arr2D[rows].length]; for(columns = 0; columns < arr2D[rows].length; columns++) { ...
[ "public static boolean contains(char[][] board, String s,\n int startRow, int startCol) {\n int rows = board.length;\n int cols = board[0].length;\n for (int dRow=-1; dRow<=1; dRow++)\n for (int dCol=-1; dCol<=1; dCol++)\n if (((dRow != 0) || (dCol != 0)) &&\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the userId list.
public void setUserIdList(List<String> userIdList) { this.userIdList = userIdList; }
[ "public void setUserIdList(String userIdList) {\n\t\tthis.userIdList = userIdList;\n\t}", "public void setUserIds(List<Long> userIds) {\r\n\t\tthis.userIds = userIds;\r\n\t}", "public void setUserIdentities(List<ACUserIdentity> userIdentities) {\n this.userIdentities = userIdentities;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the SSL Event feature.
protected void addSSLEventPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MQQueueManager_sSLEvent_feature"), //$NON-NLS-1$ getString("_UI...
[ "CamelNettyBindingModel setSsl(Boolean ssl);", "protected void addSSLKeyRepositoryPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the bonus max health.
float getBonusMaxHealth();
[ "public int getMaxHealth();", "public int getMaxHealth () {\r\n return health;\r\n }", "public int getMaxHealth() {\n return maxHealth;\n }", "public int getMaxHealth() {\n return this.maxHealth;\n }", "public int getMaxHealth()\r\n {\r\n \treturn maxHealth;\r\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form CalculatorGUI
public CalculatorGUI() { initComponents(); setTitle("Calculator"); //setLookAndFeel("Windows"); }
[ "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }", "public CalculatorGUI() {\n initComponents();\n }", "public Calculator()\n\t{\n\t\t\n\t\tsetSize(450,450);\n\n\t\tsetTitle(\"CALCULATOR\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds all usage information objects in an array to a heap.
private void addAllUsageInfos(PriorityQueue<UsageInfo> heap, UsageInfo[] infos) { for (int i = 0; i < infos.length; ++i) { heap.add(infos[i]); } }
[ "public static void main(String[] args)\r\n {\r\n ArrayHeapClass testClass = new ArrayHeapClass();\r\n String testValue;\r\n int index;\r\n\r\n for( index = 0; index < 25; index++ )\r\n {\r\n testValue = testClass.createHeapDataItem();\r\n\r\n System.out.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the name of the mounted tape file.
public String getTapeFilename() { if (this.tapeIo == null) { return null; } return this.tapeIo.getTapeFilename(); }
[ "public final String getName() {\n return file.getName();\n }", "String getDiskFileName();", "public String getName()\n {\n return( file );\n }", "public String getFileName() {\r\n \t\treturn this.torrentInfo.file_name;\r\n \t}", "java.lang.String getTruckFilename();", "String getSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /serviceformfields/:id : get the "id" serviceFormField.
@GetMapping("/service-form-fields/{id}") @Timed public ResponseEntity<ServiceFormFieldDTO> getServiceFormField(@PathVariable String id) { log.debug("REST request to get ServiceFormField : {}", id); ServiceFormFieldDTO serviceFormFieldDTO = serviceFormFieldService.findOne(id); return Resp...
[ "@RequestMapping(value = \"/fields/{id}\", method = { RequestMethod.GET })\n\tpublic ModelField id(@PathVariable Long id) {\n\t\treturn fieldService.retrieve(id);\n\t}", "@RequestMapping(method = RequestMethod.GET, value = \"/{formularioId}\")\r\n\tpublic FormularioDTO get(@PathVariable(\"formularioId\") int form...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
quickly checks the size of a image url without downloading it
public int checkPictureSize(String url) { URL testUrl = null; try { //Log.d("test url", url); testUrl = new URL(url); } catch (MalformedURLException e) { e.printStackTrace(); } URLConnection conn = null; try { conn = testUr...
[ "public void checkSizeInBackground(String url) {\n final String passIn = url;\n Thread thread = new Thread() {\n\n public void run() {\n try {\n\n size = checkPictureSize(passIn);\n\n } catch (Exception e) {\n e.printStackT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column agc_finacial_data.agcStrctFinancRatIncm
public Double getAgcStrctFinancRatIncm() { return agcStrctFinancRatIncm; }
[ "public void setAgcStrctFinancRatIncm(Double agcStrctFinancRatIncm) {\n\t\tthis.agcStrctFinancRatIncm = agcStrctFinancRatIncm;\n\t}", "public Double getAgcFinancRatIncm() {\n\t\treturn agcFinancRatIncm;\n\t}", "public void setAgcFinancRatIncm(Double agcFinancRatIncm) {\n\t\tthis.agcFinancRatIncm = agcFinancRatI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the box of obstacles
public void addObstacle() { //upper wall vary x y is min fixed for(double i = xMinB ; i <xMaxB ; i+=3 ) { ArrayList<Double> arg = new ArrayList<Double>(); arg.add(2.0);arg.add(i);arg.add(yMinB); if(i<doorLeft || i>doorRight) //door in the room obstInfo.add(arg); } for (...
[ "private void createObstacles() {\n float xGap;\n int currentRow = 0;\n\n // Create all the obstacles\n for (int i = 0; i < numberOfObstacles; i++) {\n // Make the gaps between the obstacles random between 0 and 4 cell-widths\n xGap = cellWidth * randomGenerator.nex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the MapModel.
public static void set_MapModel(MapModel _MapModel) { CurrentGameSession._MapModel = _MapModel; }
[ "public static MapModel get_MapModel() {\r\n return _MapModel;\r\n }", "public void setModel(IModel m);", "@Test\n public void testSetMap() throws Exception {\n // Setup\n final int ID = 0;\n\n // Run the test\n modelUnderTest.setMap(ID);\n\n // Verify the results...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
display horizontal borders of each block
public static void displayGrid(int arr[][]) { for (int row = 0; row < arr.length; row++) { for (int i = 1; i <= arr.length; i++) { if (row%W == 0 && row != arr.length -1 && row != 0) { if (i%W != 0) //odd { System.out.print("+==="); } else //even { ...
[ "public abstract void makeBorders();", "private void printHorizontalDivider(int width) {\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tprintHorizontalDivider();\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Test\n public void testBorderHorizontal() {\n System.out.println(\"borderHorizontal\");\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "test" /run/media/abhi/0cc7e6ad008e43cdb47df3ed6f127f92/home/abhi/dacapo9.12bachsrc (2)/benchmarks/bms/jython/build/grammar/Python.g:1029:1: test[expr_contextType ctype] : (o1= or_test[ctype] ( ( IF or_test[null] ORELSE )=> IF o2= or_test[ctype] ORELSE e= test[expr_contextType.Load] > ^( IF[$o1.start, acti...
public final PythonParser.test_return test(expr_contextType ctype) throws RecognitionException { PythonParser.test_return retval = new PythonParser.test_return(); retval.start = input.LT(1); PythonTree root_0 = null; Token IF183=null; Token ORELSE184=null; PythonParser....
[ "public final PythonParser.or_test_return or_test(expr_contextType ctype) throws RecognitionException {\n PythonParser.or_test_return retval = new PythonParser.or_test_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token or=null;\n List list_right=null;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify 'CheckAll' check box is check or uncheck
public void verifyCheckAllCheckBoxIsCheckOrUncheck(boolean isCheck) { waitForVisibleElement(eleCheckAllCheckBox, "CheckAll check box"); if (isCheck) { if (!eleCheckAllCheckBox.isSelected()) { AbstractService.sStatusCnt++; NXGReports.addStep("TestScript Failed:...
[ "public void checkOrUnCheckCheckAllCheckBox(boolean isCheck) {\n try {\n waitForVisibleElement(eleCheckAllCheckBox, \"'CheckAll' check box\");\n hoverElement(eleCheckAllCheckBox, \"Hover 'CheckAll' check box\");\n if (isCheck) {\n if (!eleCheckAllCheckBox.isSel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads a saved Network from the file with the given filename.
public static Network loadNetwork(String filename) throws IOException, InvalidNetworkException { Network network = new Network(); BufferedReader bufferedReader = new BufferedReader( new FileReader(filename) ); String currentLine = bufferedReader.re...
[ "public static Network loadNetwork(String file)\n {\n try {\n FileInputStream fileIn = new FileInputStream(file);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n Network network = (Network) in.readObject();\n in.close();\n fileIn.close();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets ith "precondition" element
public void setPreconditionArray(int i, com.walgreens.rxit.ch.cda.POCDMT000040Precondition precondition) { synchronized (monitor()) { check_orphaned(); com.walgreens.rxit.ch.cda.POCDMT000040Precondition target = null; target = (com.walgreens.rxit.ch.cda.POCDMT0000...
[ "PreCondition getPreCondition();", "public void addPrecondition(Precondition precondition);", "public void setPreviousElement(Element<T> previousElement) \n\t{\n\t\tthis.previousElement = previousElement;\n\t}", "public com.walgreens.rxit.ch.cda.POCDMT000040Precondition addNewPrecondition()\n {\n sy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Arguments__Group_0__4__Impl" $ANTLR start "rule__Arguments__Group_0_3__0" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5195:1: rule__Arguments__Group_0_3__0 : rule__Arguments__Group_0_3__0__Impl rule__Arguments__Group_0_3__1 ;
public final void rule__Arguments__Group_0_3__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5199:1: ( rule__Arguments__Group_0_3__0__Impl rule__Argument...
[ "public final void rule__Arguments__Group_0__3() 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:5130:1: ( rule__Arguments__Group_0__3__Impl rule__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to remove zero from day and month value in date for 01 to 09
public static String trimDayAndMonthOfDate(String date){ String[] dateArray= date.split("/"); String dayOfDate = dateArray[0]; String monthOfDate = dateArray[1]; String yearOfDate = dateArray[2]; String trimmedDate ; String[] DaysMonthsWithZero = {"01","02","03"...
[ "public String yyyymmdd() {\r\n\t\tint month = calendar.get(Calendar.MONTH) + 1, day = calendar\r\n\t\t\t\t.get(Calendar.DAY_OF_MONTH);\r\n\t\treturn calendar.get(Calendar.YEAR) + \"-\"\r\n\t\t\t\t+ (month < 10 ? \"0\" + month : String.valueOf(month)) + \"-\"\r\n\t\t\t\t+ (day < 10 ? \"0\" + day : String.valueOf(da...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loop over SQL expressions and filter them individually
protected SQLExpressionIF[] filterExpressions(SQLExpressionIF[] exprs) { for (int i=0; i < exprs.length; i++) { exprs[i] = filterExpression(exprs[i]); } return exprs; }
[ "List<T> filter(String filterSequence) throws SQLException;", "Subquery all();", "private ArrayList<String> transformQueries() {\n\t\tArrayList<Query> blogQueries = mw.getQueries();\n\t\tArrayList<String> convQueries = new ArrayList<String>();\n\t\t\n\t\tfor (Query q: blogQueries) {\n\t\t\tString str = q.toStri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all options list.
List<Option> findAllOptions();
[ "List<WebElement> getAllOptions();", "public List<WebElement> getallOptions() { return se.getOptions(); }", "public synchronized Iterator<String> getAllOptions() {\n\t\tSet<String> names = optionTable.keySet();\n\t\tIterator<String> itr = names.iterator();\n\t\treturn itr;\n\t}", "public Set<?> a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all 'is_a' ancestors of a given term considering only paths within its Ontology
private Vector<String> getAncestors(String term) { Vector<String> ancestors = new Vector<String>(1,1); ancestors.add(term); if(ancestorMap.contains(term)) ancestors.addAll(ancestorMap.get(term).keySet()); return ancestors; }
[ "private Vector<String> getExtendedAncestors(String term)\r\n\t{\r\n\t\tVector<String> ancestors = getAncestors(term);\r\n\t\tint index;\r\n\t\tint size = 0;\r\n\t\twhile(size != ancestors.size())\r\n\t\t{\r\n\t\t\tindex = size;\r\n\t\t\tsize = ancestors.size();\r\n\t\t\tfor(int i = index; i < size; i++)\r\n\t\t\t{...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Looks at all place ids in the PersonActivity and looks up the continent in the countryContinentRelation
private Map<String, Integer> getContinentEnrichment(PersonActivity in) { List<String> places = in.getCategoryKeys(CategoryType.PLACE); Map<String, Integer> continents = places.stream().map(place -> countryContinentRelation.get(place)) .filter(x -> x != null) .collect(Collectors.groupingBy(Function.identity(...
[ "public HashMap<ContinentName, CountryName[]> getContinents() { return continents; }", "private void extractContinents(Map<String, Continent> continents) {\n for (Continent continent : continents.values()) {\n List<Country> countryList = new ArrayList<>();\n for (Country c2 : continent.getCountries()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The leadership initialization factory bean which will create a LeaderInitiator to kick off the leader election process within this node for the cluster if Zookeeper is configured.
@Bean @ConditionalOnBean(CuratorFramework.class) public LeaderInitiatorFactoryBean leaderInitiatorFactory( final CuratorFramework client, final ZookeeperLeadershipProperties zookeeperLeadershipProperties ) { final LeaderInitiatorFactoryBean factoryBean = new LeaderInitiatorFactoryBea...
[ "@Bean\n @ConditionalOnMissingBean(CuratorFramework.class)\n public LocalLeader localLeader(\n final GenieEventBus genieEventBus,\n final LeadershipProperties leadershipProperties\n ) {\n return new LocalLeader(genieEventBus, leadershipProperties.isEnabled());\n }", "public void l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a java object modeling the passed row.
public Object getModelObject(SQLRowAccessor row) { check(row); if (this.getModelClass() == null) return null; final Object res; // seuls les SQLRow peuvent être cachées if (row instanceof SQLRow) { // MAYBE make the modelObject change ...
[ "public Object getObject(int row);", "public Object getRowObject(int row)\n\t{\n\t\tif (row < 0 || row >= dataTypes.size())\n\t\t\treturn null;\n\t\treturn dataTypes.elementAt(row);\n\t}", "public Object getObject(int row) {\n return objectMap.get(row);\n }", "public ContactModel getRowAsObject(int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate all primes lower or equal to the limit.
public int[] generatePrimes(int limit);
[ "PrimeResult generatePrimeNumbers(Integer limit) throws InvalidInputException;", "private void genPrimes(){\n long longBitSetLimit = Long.parseLong(this.LIMIT);\n this.primeBitSet.set(0,false); // 0 is not a prime\n this.primeBitSet.set(1,false); // 1 is not a prime\n for (long p = 2; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates panel with parameters for MLP
private JPanel createMlpPane() { JPanel mlpPane = new JPanel(); mlpPane.setBorder(BorderFactory.createTitledBorder("MLP")); mlpPane.setLayout(new GridLayout(0, 2)); JLabel middleNeuronsLabel = new JLabel("Number of Middle Neurons"); mlpPane.add(middleNeuronsLabel); SpinnerNumberModel middleNeuronsSnm = ne...
[ "private JPanel createParameters() {\n\t\t// MLP\n\t\tJPanel mlpPane = createMlpPane();\n\n\t\t// KNN\n\t\tJPanel knnPane = createKnnPane();\n\n\t\t// LDA\n\t\tJPanel ldaPane = createLdaPane();\n\n\t\t// SVM\n\t\tJPanel svmPane = createSvmPane();\n\n\t\t// Correlation\n\t\tJPanel correlationPane = createCorrelation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows the user to set the price of a specific material Pre: The list of prices for the materials has been initialized Post: The price of the material in the selected store has been stored
public static int[] setPrice(String store, int[] materialsPrice, int i, Scanner sc){ if (store.equalsIgnoreCase("Homecenter")){ System.out.println("Ingrese el precio del material " + (i+1) + " en Homecenter:"); }else if (store.equalsIgnoreCase("FerreteriaCentro")){ System.out.println("Ingrese e...
[ "public void setPrice(double price);", "public void setMprice(int value) {\r\n this.mprice = value;\r\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public static void editItemPrice(Item selectedItem) {\n Scanner inputScanner = new Scanner(System.in);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
runTest1() basic connection and query test
public void runTest1() { System.out.println("Test 1 - Starting transaction..."); try { conn = dao.connect(); // establish db connection conn.setAutoCommit(false); rset = dao.executeSQLQuery("SELECT * FROM Account"); // execute query - NOTE: no semicolon at end of query resultSetStr = dao.pr...
[ "public void startTesting() {\n\n\t\t//The following loop will be done nstest.MAX_ITERATIONS times after which we exit the thread\n\t\t// Note that the connection is frequently opened & closed. Autocommit is left on, so\n\t\t// per connection, we make MAX_OPERATIONS_PER_CONN number of transaction batches\n\t\t// E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the component from the connections List of this Terminal. Called by circuit's removeComponent() method
public void disconnect(Component c) { connections.remove(c); }
[ "public synchronized void removeComponent(Component c) { components.remove(c); }", "public void removeComponent(Component c);", "public void removeConnection(){\n this.connectedTo = null;\n this.visible = true;\n }", "public void remove(Component component);", "public void removeConnection(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
== dig holes is origin sudoku board to generate playable game
private void digHoleSudoku(int difficulty){ Random r=new Random(); int pos; blankBlockLeft=30+difficulty*5; for(int i=0;i<30+difficulty*5;i++){ pos=r.nextInt(81); // from 0 to 80 if(sudokuDisplay[pos/9][pos%9]!='.') sudokuDisplay[pos/9][pos%9]='.'; // dig hole else // if a...
[ "public void generateSudoku(int difficulty){ \n\t\tfor(int i=0;i<9;i++){ // check row , i is row, j is column\n\t \tfor(int j=0;j<9;j++){\n\t \t\tsudokuDisplay[i][j]='.';\n\t \t}\n\t\t}\n\t\t// first use random r to generate the position of all 1\n\t\tRandom r=new Random();\n\t\t\tfor (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRulePrimitiveTypeIdentifier" $ANTLR start "rulePrimitiveTypeIdentifier" ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/srcgen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:670:1: rulePrimitiveTypeIdentifier : ( ( rule__PrimitiveTypeIdentifier__Alternatives...
public final void rulePrimitiveTypeIdentifier() throws RecognitionException { int stackSize = keepStackSize(); try { // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:674:2: (...
[ "public final void rulePrimitiveType() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:625:1: ( ( ( rule__PrimitiveType__Alternatives ) ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .POGOProtos.Rpc.QuestGoalProto goals = 3;
public POGOProtos.Rpc.QuestGoalProtoOrBuilder getGoalsOrBuilder( int index) { if (goalsBuilder_ == null) { return goals_.get(index); } else { return goalsBuilder_.getMessageOrBuilder(index); } }
[ "@java.lang.Override\n public POGOProtos.Rpc.QuestGoalProtoOrBuilder getGoalsOrBuilder(\n int index) {\n return goals_.get(index);\n }", "@java.lang.Override\n public java.util.List<? extends POGOProtos.Rpc.QuestGoalProtoOrBuilder> \n getGoalsOrBuilderList() {\n return goals_;\n }", "com.pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Intent intent=new Intent(this,AgentMedicalListActivity.class); startActivity(intent);
public void startSearch(View view){ Intent intent=new Intent(this,Agentlist.class); startActivity(intent); }
[ "@Override\n public void onClick(View view) {\n /* Start New Intent to process VisitTravelSites Class */\n /******************************************************/\n Intent i = new Intent(getBaseContext(), VisitTravelSites.class);\n startActivit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computation of ngrams Compute ngrams from given word
private Set<String> generateNgrams(String word, int gramSize) { String realWord = "$$" + word + "$$"; int start = 0; int end = start + gramSize - 1; Set<String> ngrams = new HashSet<String>(); while (end < realWord.length()) { ngrams.add(realWord.substring(start, end + 1)); start++; ...
[ "private void calculateNGrams() {\n\t\t\n\t\t\n\t\t// determine n grams\n\t\tSet<Suffix> cityNames = properties.getCityNames();\n\t\tfor (Suffix cityName : cityNames) {\n\t\t\tString str = cityName.getStr();\n\t\t\tchar[] letters = new char[str.length()+4];\n\t\t\tletters[0] = sow;\n\t\t\tletters[1] = sow;\n\t\t\tl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Vehiculo/VehiculosOperations.java . Generated by the IDLtoJava compiler (portable), version "3.2" from Vehiculo.idl domingo 18 de noviembre de 2018 02H56' COT
public interface VehiculosOperations { boolean insertarVehiculo (String matricula, int id_domiciliario, String marca); boolean actualizarVehiculo (String matricula, int id_domiciliario, String marca); boolean eliminarVehiculo (String matricula); String consultarVehiculo (String matricula); void shoutdo...
[ "public void calculaVoronoi() {\n\n\t\tnubeSitios.ordenarXY();\n\t\tampliarDimension(); // elevar los sitios del plano al espacio\n\n\t\tt[0] = System.currentTimeMillis();\n\t\ttry {\n\n\t\t\tpoliedro = new Poliedro(sitiosElevados, tambase);\n\n\t\t\tt[1] = System.currentTimeMillis();\n\n\t\t\tmetodo = poliedro.met...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method getAllAssetUserActorRegistered get All Actors Registered in Actor Network Service and used in Sub App Community
List<ActorAssetUser> getAllAssetUserActorInTableRegistered() throws CantGetAssetUserActorsException;
[ "List<ActorAssetUser> getAllAssetUserActorInTableRegistered(BlockchainNetworkType blockchainNetworkType) throws CantGetAssetUserActorsException;", "List<ActorAssetUser> getAllAssetUserActorConnected(BlockchainNetworkType blockchainNetworkType) throws CantGetAssetUserActorsException;", "Set<UnregisteredActorInfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column tb_user.last_used_device
public void setLastUsedDevice(String lastUsedDevice) { this.lastUsedDevice = lastUsedDevice == null ? null : lastUsedDevice.trim(); }
[ "void setLastUsed(long value) {\n this.lastUsed = value;\n }", "public void setLastUsed(Date lastUsed) {\r\n\t\tthis.lastUsed = lastUsed;\r\n\t}", "public void setLastUsedTimestamp(long lastUsedTimestamp) {\n this.lastUsedTimestamp = lastUsedTimestamp;\n }", "public void setLastUse() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the menu gutter fill alpha. Menu gutter is the part of the menu where checkmarks and icons are painted.
public static float getMenuGutterFillAlpha() { return RadianceCoreUtilities.getMenuGutterFillAlpha(); }
[ "public Double getFillAlpha() {\r\n\t\treturn fillAlpha;\r\n\t}", "public float getFillAlpha() {\n return this.fillColor.getA();\n }", "Double getFillOpacity();", "public double getFillOpacity() {\r\n return fillOpacity;\r\n }", "Color getLevelFillColor(int index);", "protected Color g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensure that the score is in the valid range
private void validateScore(int pins) { if (pins < 0) { throw new IllegalArgumentException("score cannot be less than zero"); } if (pins > TOTAL_PINS) { throw new IllegalArgumentException("score cannot be greater than " + TOTAL_PINS); } }
[ "public boolean checkScore() {\r\n return !(this.scoreTable.getRank(this.score.getValue()) > this.scoreTable.size());\r\n }", "private void validateBounds() {\n if (lowerBound > upperBound) {\n log.warn(String\n .format(\"Given bounds are out of order (Low: %.4f, Hig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns predicted target classes for first target variable name
public Nominal firstClasses() { return classes.get(firstTargetVar()); }
[ "public Nominal classes(String targetVar) {\n return classes.get(targetVar);\n }", "public void predict()\n {\n int correctPrediction = 0;\n if (numClass == 2)\n {\n for (int i = 0; i < testSet.size(); i++)\n {\n double dotProduct = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of nets associated with the OPFAC.
public int getOpfacNetCount() { return opfacData.getOpfacNetCount(); }
[ "public int getNumNetworkCopies(){\n synchronized (networkCopiesLock){\n return this.networkCopies.size();\n }\n }", "public int getNS() {\n\t\tHashSet<String> uniquePokeType = new HashSet<>();\n\t\tIterator<Pokemon> it = caughtPoke.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tPokemon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method sets the value of the database column COST_PLAN.DELIVERY_PLAN_12
public void setDeliveryPlan12(Double deliveryPlan12) { this.deliveryPlan12 = deliveryPlan12; }
[ "public void setPAYMENT_PLAN_NBR(BigDecimal PAYMENT_PLAN_NBR)\r\n {\r\n\tthis.PAYMENT_PLAN_NBR = PAYMENT_PLAN_NBR;\r\n }", "public void setPLAN_NBR(BigDecimal PLAN_NBR) {\r\n this.PLAN_NBR = PLAN_NBR;\r\n }", "public void setDeliveryPlan1(Double deliveryPlan1) {\r\n this.deliveryPlan1 = d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the max output of the drive. Useful for scaling the drive to drive more slowly.
public void setMaxOutput(double maxOutput) { drive.setMaxOutput(maxOutput); }
[ "public void setMaxOutput(double maxOutput){\n m_drive.setMaxOutput(maxOutput);\n }", "public void setMaxOutput(double maxOutput) {\n m_drive.setMaxOutput(maxOutput);\n }", "public void setXMaxOutput(double maxOutput)\r\n {\r\n XMaxSpeedPercent = maxOutput;\r\n }", "public void setYMaxOut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for MODIFIED_DATE using the alias name ModifiedDate.
public Date getModifiedDate() { return (Date) getAttributeInternal(MODIFIEDDATE); }
[ "public Date getDateModified() {\n return (Date)getAttributeInternal(DATEMODIFIED);\n }", "public Date getDateModified()\n {\n return (Date)getAttributeInternal(DATEMODIFIED);\n }", "public Date getModifiedDate() {\n return (Date)getAttributeInternal(MODIFIEDDATE);\n }", "public Timestamp g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updates the openRestaurants list with all of the restaurants that are currently open and are not disliked by the user
public void getOpenRestaurants(String day, int time) { List<Restaurant> temp = new ArrayList<>(); for (int i = 0; i < allRestaurants.length; i++) { if (allRestaurants[i].isOpen(day, time) && !(isUnlikedRestaurant((allRestaurants[i])))) { temp.add(allRestaurants[i]); ...
[ "public List<Restaurant> getOpenRestaurantsList() {\n return openRestaurants;\n }", "public void openRestaurant() {\r\n isOpen = true;\r\n }", "public void refreshRestaurants() {\n //reset offset and restaurants list\n restaurantViewModel.setOffset(30);\n restaurantViewM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }