query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
This is the constructor for the mood list adapter
public MoodListAdapter(ArrayList<Mood> moodHistory) { this.moodHistory = moodHistory; initArrays(); }
[ "public void setMoodList(ArrayList<Mood> moodList) {\n this.moodList = moodList;\n }", "public MoodController(int mood){\n this.mood = new Mood(mood);\n }", "public MilesAdapter(Activity context, ArrayList<Album> miles) {\n super(context, 0, miles);\n }", "public FilmList() {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the platform specific ending for native dynamic libraries.
public static String getPlatformSpecificLibraryEnding(String os) { VParamUtil.throwIfNull(os); if (os.equals(OS_MAC)) { return "dylib"; } else if (os.equals(OS_LINUX)) { return "so"; } else if (os.equals(OS_WINDOWS)) { return "dll"; } ...
[ "public static String getPlatformSpecificLibraryEnding() {\n return getPlatformSpecificLibraryEnding(getOS());\n }", "public static String GetNativeLibraryDirectoryName() {\n String directory = null;\n\n switch (OS.CURRENT_OS) {\n case LINUX:\n directory = _LINUX;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function retrieves a floating point property of a buffer. note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this function may be used by OpenAL extensions.
@ALvoid void alGetBufferf(@ALuint int buffer, @ALenum int pname, @Result float value);
[ "public FloatBuffer asFloatBuffer()\n{\n buffer.position(offset);\n return buffer.asFloatBuffer();\n}", "public native float getValueFloat();", "Double getFreeFloat();", "@Override\n public float readFloat() {\n float f = Bits.getFloat(positionAddr);\n\n addPosition(4);\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends an offer to a resource, inviting them to join a team.
public void sendOffer(Offer offer) { }
[ "public void establishDealOffer() {\n DealOffer offer = new DealOffer();\n \n int moneyToOffer = (Integer)this.playersMoneyMap.get(currentPlayer).getValue();\n offer.offerCash(moneyToOffer);\n \n Map<JCheckBox, Space> thisPlayerMap = playersCheckBoxes.get(currentPlayer);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given x is a valid xposition for this game object.
public boolean isValidX(double x) { if(getWorld() != null) return (x >= 0 && x < getWorld().getWorldWidth()); return x >= 0; }
[ "@Raw\n\tprivate boolean isValidXCoordinate(double x) {\n\t\tif (getWorld() == null)\n\t\t\treturn true;\n\t\treturn (x < getWorld().getWidth() && x >= 0);\n\t}", "public static boolean isValidX(int x, int width)\n {\n if (x >= 0 && x < width)\n {\n return true;\n }\n else\n {\n return f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the difference of 2 complex numbers
public ComplexNumber subtract(ComplexNumber cn1, ComplexNumber cn2) { return new ComplexNumber(cn1.getRe() - cn2.getRe(), cn1.getIm() - cn2.getIm()); }
[ "public static Complex difference(Complex c1, Complex c2) {\n \tComplex result = new Complex();\n \tresult.Re = c1.Re - c2.Re;\n \tresult.Im = c1.Im - c2.Im;\n \treturn result;\n }", "public Complex subtract(Complex other) {\n double SubReal = real - other.real;\n double SubImaginary ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
splits bitstring into two halves, L and R
public static List<String> splitBitStrings(String bitString){ List<String> LR = new ArrayList<String>(); String L = bitString.substring(0,(bitString.length()/2)); String R = bitString.substring((bitString.length()/2),bitString.length()); LR.add(L); LR.add(R); return LR; }
[ "BitField getLSBs(int digits);", "public static String decodeBitsAdvanced(String bitsInput) {\n \t \n \t \n \t String bits = bitsInput.replaceAll(\"(^[0]+)|([0]+$)\", \"\");\n \t \n \t //bits = bits.replaceAll(\"010\", \"00\");\n \t //bits = bits.replaceAll(\"101\", \"11\");\n \t \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Kind of kludge, but we seemingly have two ways of representing journalkeys in the ambra.xml This only works as plosone is the same as "PLoSONE". Not all journal names use this same convention. These terms need to be corrected! However, any changes made to these keys will cause user search Alerts to be lost. A data migr...
private String translateJournalKey(String journal) { Set<Journal> journals = journalService.getAllJournals(); for(Journal j : journals) { if(j.getJournalKey().toLowerCase().equals(journal)) { return j.getJournalKey(); } } throw new RuntimeException("Can not find journal of name:" +...
[ "public Journal getJournal(String journalKey);", "public void setJournal(String journal);", "void setJournal(java.lang.String journal);", "java.lang.String getJournal();", "public void crossPubArticle(String articleDoi, String journalKey) throws Exception;", "public String getJournal();", "org.apache.xm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An array of abbreviations (first 3 letters) of English names of the days of the week that this hour object applies to (i.e. [\"mon\", \"tue\"]). Each day can only appear once within all of the hours objects in this feed.
@ApiModelProperty(required = true, value = "An array of abbreviations (first 3 letters) of English names of the days of the week that this hour object applies to (i.e. [\"mon\", \"tue\"]). Each day can only appear once within all of the hours objects in this feed.") @NotNull @Valid public List<Day> getDay...
[ "public static String[] getAllFullDaysOfWeek() {\n String[] namesOfDays = {\"monday\", \"tuesday\", \"wednesday\",\n \"thursday\", \"friday\", \"saturday\", \"sunday\"};\n return namesOfDays;\n }", "public static String[] getAllDaysOfWeek() {\n String[] namesOfDays = {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true iff a leaf in the subtree whose root is this object satisfies the specified predicate.
public boolean canFindLeafSuchThat(Predicate<XNodeLeaf> p) { return this instanceof XNodeParent ? Stream.of(((XNodeParent) this).sons).anyMatch(c -> c.canFindLeafSuchThat(p)) : p.test((XNodeLeaf) this); }
[ "default boolean anyMatch(Predicate<TreeNode<NODE_TYPE>> predicate) {\n if (predicate.test(this)) {\n return true;\n }\n for (NODE_TYPE child : children()) {\n if (child.anyMatch(predicate)) {\n return true;\n }\n }\n return false;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string ClientSegment = 2 [(.validation.regex) = ""];
public Builder setClientSegmentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; clientSegment_ = value; onChanged(); return this; }
[ "public Builder setClientSegment(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n clientSegment_ = value;\n onChanged();\n return this;\n }", "java.lang.Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the sourceFaction's opinion of the targetFaction
public DiplomaticRelation getRelation(Faction sourceFaction, Faction targetFaction){ if(sourceFaction == null || targetFaction == null) return DiplomaticRelation.neutral; //TODO finish this return DiplomaticRelation.neutral; }
[ "public abstract Relation getRelationTo(ConquerFaction faction);", "public static Impact getImpact(Factor source, Factor target) {\n\t\tfor (Impact impact : source.getInfluences()) {\n\t\t\tif (impact.getTarget() == target) {\n\t\t\t\treturn impact;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Attack getBes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the treeview control associated with the given index
public AutomationTreeView getTreeView(int index) { return new AutomationTreeView(this.getControlByControlType(index, ControlType.Tree), this.automation); }
[ "public Control getControl(int index) {\n\t\tif (index < 0 || index >= controls.size())\n\t\t\treturn null;\n\t\treturn controls.get(index);\n\t}", "public View elementAt(int index)\n {\n return children.elementAt(index);\n }", "public View getGuest(int anIndex) { return getChild(anIndex); }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Define just a simple addObservations for int[][] states where there are just numVars variables Given one time sample of a homogeneous array of variables (states), add the observations of all sets of numVars of these, defined by the offsets in groupOffsets from every point in the array.
public void addObservations(int[] states, int[] groupOffsets) { for (int c = 0; c < states.length; c++) { // Add the marginal observations in, and compute the joint state value int jointValue = 0; for (int i = 0; i < numVars; i++) { int thisValue = states[(c + groupOffsets[i] + states.length) % stat...
[ "public void addObservations(int[][] states, int[] groupOffsets) {\r\n\t\tfor (int t = 0; t < states.length; t++) {\r\n\t\t\tfor (int c = 0; c < states[t].length; c++) {\r\n\t\t\t\t// Add the marginal observations in, and compute the joint state value\r\n\t\t\t\tint jointValue = 0;\r\n\t\t\t\tfor (int i = 0; i < nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Observation Component'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseObservationComponent(ObservationComponent object) { return null; }
[ "public T caseObservation(Observation object) {\n\t\treturn null;\n\t}", "public @Nullable ObsValue getObsValue() {\n if (value == null || conceptType == null) return null;\n switch (conceptType) {\n case CODED:\n return ObsValue.newCoded(value, valueName);\n cas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on People Plus Link.
public zoho clickPeoplePlusLink() { peoplePlus.click(); return this; }
[ "public ItemPage clickGooglePlusLink() {\n googlePlus.click();\n return this;\n }", "public HomePage clickGooglePlusLink() {\n googlePlus.click();\n return this;\n }", "public void ClickAddPeople(){\t\n\t\tlnkAddPeople.click();\n\t}", "public void clickUserIDLink() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a prereq to this path
public void addPrerequisite(Prerequisite prereq) { prerequisites.add(prereq); }
[ "void addPrerequisites(List<String> prereq) {\n _prerequisites.addAll(prereq);\n }", "void addPath(Path p);", "private void addPath (String fullPath, DependencyOrigin origin) {\n if (!fullPath.equals(currentFilePath)) // don't add self to dependencies\n fileDependencies.add(n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Ftplet for the given name.
public synchronized Ftplet getFtplet(String name) { if (name == null) { return null; } return ftplets.get(name); }
[ "public Protocol getProtocol(String name) {\n for (Protocol p : mProtocols) {\n if (p.getId() != null && p.getId().equals(name)) {\n return p;\n }\n }\n return null;\n }", "public TeleportDestination get(String name) {\n\t\tfor (TeleportDestination warp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
read json file wrap to WorkFlowDef
public static WorkFlowDef parse(AbstractResource resource) { try { return OM.readValue(resource.read(), WorkFlowDef.class); } catch (IOException e) { throw new AgoutiException(e); } }
[ "private JSONObject importFlowJSON (Path pathToFolder) {\n // Create a JSONParser to parse the content of the file\n JSONParser parser = new JSONParser();\n\n // The JSONObject instance that will be returned\n JSONObject flow;\n\n try{\n // Read and parse the json file\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the floodFill() returned a multiple of five
private boolean multipleOfFive() { boolean[][] tempBoard = new boolean[board.length][board[0].length]; for (int i = 0; i < board.length; i++) { System.arraycopy(board[i], 0, tempBoard[i], 0, board[0].length); } for (int i = 0; i < tempBoard.length; i++) { for (in...
[ "public boolean isAllFlooded() {\n boolean floodstatus = true;\n int index = 0;\n while (floodstatus && index < this.board.size()) {\n floodstatus = this.board.get(index).flooded;\n index += 1;\n }\n return floodstatus;\n }", "private boolean getFillMod(int fill){\n if(fill>1){ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the bindings parameter from this channel
public Map<String, ChannelBindings> getBindings() { return this.bindings; }
[ "@Override\n protected String getBindingKey() {return _parms.bindingKey;}", "public VarBindingDef getBinding()\n {\n return binding_;\n }", "public String getChannelParam() {\n return channelParam;\n }", "public java.lang.String[] getBindingKey() {\r\n return bindingKey;\r\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the gem to be edited in the dialog.
public void setGem(Gem gem) { this.gem = gem; gemNameField.setText(gem.getGemName()); gemValueField.setText(Integer.toString(gem.getGemValue())); gemDescripField.setText(gem.getDescription()); }
[ "public void setEditDialogType() {\n filePath = \"/xhtml/buttons/editButton.xhtml\";\n }", "public void setEditingTool(ITool aTool) {\r\n\t\tif (theEditingTool != null) {\r\n\t\t\ttheEditingTool.setEditableWhiteBoard(null);\r\n\t\t\ttheWhiteBoard.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\r\n\t\t}\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A factory that can be used for generating UpdateData queries
@Injectable @Global public interface UpdatePlayerDataFactory { /** * * @param runner the query executor to run this query on * @param data the bean of data to send to the SQL server * @param tableName the name of the table to update the data to * @param saveMode weather the time sensitive data such as queu...
[ "Update createUpdate();", "DataModel getUpdateDataModel();", "UpdateExpression createUpdateExpression();", "public abstract String getUpdateQuery();", "Updates createUpdates();", "UpdateType createUpdateType();", "UpdateQuery<T, K> update();", "UpdateT createUpdateT();", "public interface QbUpdate e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add staffFileSetting method, to modify staff.txt content. New addition
public void staffFileSetting() { staffsInfo(); boolean isValidInput = false; System.out.println("\nTo add a new staff member, please enter \"A\"." + "\nTo delete an existing staff member, please enter \"D\"." + "\nTo go back to previous menu, please enter \"Q\"." + "\nTo end t...
[ "public void setStaff(java.lang.String staff) {\n this.staff = staff;\n }", "public void userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks the storage type is allowed.
public void verifyAllowedType(String storageType) throws FHIROperationException { if (!ConfigurationFactory.getInstance().isStorageTypeAllowed(storageType)) { throw buildExceptionWithIssue("storageType is disallowed", IssueType.NOT_SUPPORTED); } }
[ "private void checkStorage()\n\t{\n\t\t// Get the external storage's state\n\t\tString state = Environment.getExternalStorageState();\n\n\t\tif (state.equals(Environment.MEDIA_MOUNTED))\n\t\t{\n\t\t\t// Storage is available and writeable\n\t\t\texternalStorageAvailable = externalStorageWriteable = true;\n\t\t}\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRule_EquationsKey" $ANTLR start "rule_EquationsKey" InternalGaml.g:995:1: rule_EquationsKey : ( 'equation' ) ;
public final void rule_EquationsKey() throws RecognitionException { int rule_EquationsKey_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 68) ) { return ; } // InternalGaml.g:999:2: (...
[ "public final void entryRule_EquationsKey() throws RecognitionException {\n int entryRule_EquationsKey_StartIndex = input.index();\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 67) ) { return ; }\n // InternalGaml.g:987:1: ( rule_EquationsKey EOF )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The loadKeywords instance method is invoked. Loads the keywords file based on the selected file path.
public void actionPerformed(ActionEvent e) { loadKeywords(); }
[ "private void loadKeywords() {\n try {\n // Loads the Keywords file.\n this.vigenere.loadKeywords(new File(this.fcKeywords.getSelectedPath()));\n // Displays the loaded keywords in the JList.\n this.displayKeywords();\n } catch (Exception ex) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getPulkovo19953DegreeGKZone23 method, of class GaussKrugerPulkovo1995.
@Test public void testPulkovo19953DegreeGKZone23() { testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone23()); }
[ "@Test\n public void testPulkovo19953DegreeGKZone59() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone59());\n }", "@Test\n public void testPulkovo19953DegreeGKZone61() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone61());\n }", "@Test\n public void testPulkovo19953DegreeGKZone24() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the businessObjNm property.
public void setBusinessObjNm(String aBusinessObjNm) { businessObjNm = aBusinessObjNm; }
[ "public void xsetBusinessName(org.apache.xmlbeans.XmlString businessName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(BUSINESSNAME$16, 0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Publishes the specified object to the default topic. That is, the object will be put into a MessagePipeline before actually being published as an ObjectMessage, with the specified messageType, to the message service. If this MessageServiceClient is not a publisher on the default topic yet, it will automatically add its...
public void publish(final Serializable object, final String messageType) { publishTo(getDefaultTopicName(), object, messageType); }
[ "public void publishNow(final Serializable object, final String messageType)\r\n throws MessageServiceException {\r\n publishNowTo(getDefaultTopicName(), object, messageType);\r\n }", "public void publishNowTo(final String topicName, final Serializable object, final String messageType)\r\n throws ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modified date of this e s f tournament.
@Override public void setModifiedDate(java.util.Date modifiedDate) { _esfTournament.setModifiedDate(modifiedDate); }
[ "@Override\n public void setModifiedDate(java.util.Date modifiedDate) {\n _leagueDay.setModifiedDate(modifiedDate);\n }", "public void setModified(Date modified)\n {\n this.modified = modified;\n }", "public void setModifiedDate(Date modifiedDate);", "@Override\n\tpublic void setModi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Create invalid draft with invalid zipcode
@Test public void draft_invalid_zipcode(){ fill_in_post("title", "body", "999999999999999"); WebElement cont = driver.findElement(By.name("go")); cont.click(); assertTrue(driver.findElements(By.cssSelector("span.err")).size() > 0); List<WebElement> list = driver.findElements(By.xpath("//*[contains(text(),...
[ "@Test\n void runInputValidatorFailOnNonNumericZip() {\n\n parameterMap.get(\"zip\")[0] = \"fas\";\n boolean isValidInput = inputValidator.runInputValidator(parameterMap);\n\n assertEquals(false, isValidInput);\n }", "private void validateZip(Integer zipCode) {\r\n\t\tif (zipCode < 0 ||...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the storageAccount value.
public String storageAccount() { return this.storageAccount; }
[ "public StorageAccount storageAccount() {\n return this.storageAccount;\n }", "public String storageAccountId() {\n return this.storageAccountId;\n }", "public FileStorageAccount getAccount() {\n return account;\n }", "public String getStorageAccountName() {\n return this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get configured provider name.
public String getProviderName( ) { return this.providerName; }
[ "public String getProviderName();", "public String getProviderClassName();", "public String providerDisplayName() {\n return this.providerDisplayName;\n }", "public ProviderName provider() {\n return this.provider;\n }", "@Override\n public String getProviderName() {\n return m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String demo = "172.16.254.1"; String demo = "2001:0db8:85a3:0:0:8A2E:0370:7334"; String demo = "256.256.256.256";
public static void main(String[] args) { String demo = "2001:0db8:85a3:0:0:8A2E:0370:7334:"; String demo1 = ":2001:0db8:85a3:0:0:8A2E:0370:7334:"; System.out.println(Arrays.toString(demo1.split(":"))); System.out.println('f' - '0'); //49 54 Q468_validate_ip_address s = new Q468_...
[ "@Test\n public void fromString_valid() {\n Object[][] tests = {\n {\"0.2.3.4/8\", ip(\"0.2.3.4\"), NumBits.IPV4, 8},\n {\"192.0.2.0/24\", ip(\"192.0.2.0\"), NumBits.IPV4, 24},\n {\"3.4.5.6/1\", ip(\"3.4.5.6\"), NumBits.IPV4, 1},\n {\"3.4.5.6/32\", ip(\"3.4.5.6\"), NumBits.IPV4, 32},\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return lowest y value of the lowest Alien.
public double getLowestValueY() { double lowestY = 0; for (int i = 0; i < this.army.size(); i++) { List<Alien> column = this.army.get(i); Rectangle rect = column.get(column.size() - 1).getCollisionRectangle(); double lowerLine = rect.getUpperLeft().getY() + rect....
[ "public int getLowestY() {\n\t\treturn lowY;\n\t}", "@Override\n\tpublic int getLowestY() {\n\t\treturn vertexDL.getY();\n\t}", "public float getLowestY(List x) {\n\treturn movingAverage.getLowestY(x);\n }", "public double getMinY()\n\t{\n\t\tdouble smallest;\n\t\tif (this.manualYAxis)\n\t\t{\n\t\t\tsmalle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a default viewer position.
public ViewerPosition3D() { }
[ "ViewWindowConfigurator position(int x, int y);", "public void initInitialView() {\n final float eyeX = 0.0f;\n final float eyeY = 0.0f;\n final float eyeZ = 1.5f;\n\n // We are looking toward the distance\n final float lookX = 0.0f;\n final float lookY = 0.0f;\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the int to a String and calls the write(String) method
public void write(int i){ write(Integer.toString(i)); }
[ "public void writeInt(int anInt)\n {\n String line;\n //------------\n // se obtiene el String del int\n line = Integer.toString(anInt);\n writeString(line);\n eof = false;\n }", "public void write(int value) {\n\t}", "public void writeInt(int i) {\n\t\tif (!socke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optimLoadEffectiveSRVData_TranformMatrix done // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////...
public void optimLoadEffectiveSRVData_Standard() { //--SRVDataInit --// optimLoadEffectiveSRVDataInit(); // -- BondsRV Baukasten Effective: data handling --// //--Loading the SRV-slice into JOM - 3D// // -- BondsRV Should be Reduced [nYears x numDKF x numEle ] --// this.bondsRVEf...
[ "public int perform_LMVM() {\n if (_inequality_width > 0) {\n int nvars = _fb.Size() * 2;\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars / 2; i++) {\n x[i] = _va.get(i);\n x[i + _fb.Size()] = _vb.get(i);\n }\n \n // int inf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /:id : get the "id" consequencia.
@RequestMapping(method = RequestMethod.GET, value = "/{id}") public ResponseEntity<ConsequenciaDTO> getConsequencia(@PathVariable Long id) { log.debug("REST request to get Consequencia : {}", id); ConsequenciaDTO consequenciaDTO = consequenciaService.findOne(id); return ResponseUtil.wrapOrNo...
[ "@GetMapping(\"/{id}\")\n\tpublic String getById(@PathVariable int id) {\n\t\tSystem.out.println(\"recuperer la commande avec l'id= \" +id);\n\t\tOptional<Commande> optional = commandeRepository.findById(id);\n\t\tif (optional.isPresent()) {\n\t\t\tSystem.out.println(\"Commande= \" +optional.get());\n\t\t} else {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Update a Pricing by id
@PutMapping("/{id}") public ResponseEntity<?> updatePricing(@PathVariable("id") long id, @RequestBody Pricing category) { checkResourceFound(this.pricingService.get(id)); pricingService.update(id, category); return ResponseEntity.ok().body("Pricing has been updated successfully."); }
[ "public boolean updatePricingForId(int productId, Pricing pricing);", "public Product updateProductPrice(int id,double price) throws NoPriceGivenException;", "void updateBookPrice(int bookId,double bookprice);", "public void updateOrderPrice(int id, double price) throws DataException;", "void updateOfProduc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Enum__Group_11__0__Impl" $ANTLR start "rule__Enum__Group_11__1" InternalMyDsl.g:1711:1: rule__Enum__Group_11__1 : rule__Enum__Group_11__1__Impl ;
public final void rule__Enum__Group_11__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:1715:1: ( rule__Enum__Group_11__1__Impl ) // InternalMyDsl.g:1716:2: rule__Enum__Group_11__1__Impl { pushFollow...
[ "public final void rule__Enum__Group_11__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:1688:1: ( rule__Enum__Group_11__0__Impl rule__Enum__Group_11__1 )\n // InternalMyDsl.g:1689:2: rule__Enum__Group_11__0__Imp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /preguntas/:id : get the "id" pregunta.
@RequestMapping(value = "/preguntas/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<Pregunta> getPregunta(@PathVariable Long id) { log.debug("REST request to get Pregunta : {}", id); Pregunta pregunta = preguntaReposito...
[ "public Pregunta getPregunta(int id);", "public int getIdPregunta() {\n return idPregunta;\n }", "public static String findByIdCatalogoPregunta(Long id) {\n\t\treturn \"/findByIdCatalogoPregunta/\" + id;\n\t}", "public int getIdResposta(int idPergunta)\r\n\t{\r\n\t\treturn ((Integer)perguntasRespost...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click a chess button to select the chess
@FXML public void clickChess(ActionEvent event) { resultLabel.setText(""); movingBtn = (Button) event.getSource(); movingBtnPos = (Pane) movingBtn.getParent(); }
[ "public static void selecting_greenbox() {\n\n driver.findElement(By.xpath(\"//*[@class='greenbox']\")).click();\n }", "public void Click() {\n\t\tUtility.waitForPageUntilElementIsVisible(By.xpath(\".//*[@id='content']/div/div[2]/div/div/div[2]/ul/li/a\"),4000).click();\r\n\t\t//board name\r\n\t\t//Util...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns boolean that determines whether it is going left or not. used during image generation for entity
public boolean isGoingLeft(){ return goingLeft; }
[ "public boolean isGoingLeft() {\n return direction.getX() < 0.0f;\n }", "public boolean isLeft() {\n\t\treturn state == State.LEFT;\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\tel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the Java class name of the Context implementation class for new web applications.
public void setContextClass(String contextClass) { String oldContextClass = this.contextClass; this.contextClass = contextClass; support.firePropertyChange("contextClass", oldContextClass, this.contextClass); }
[ "public void setWebContext (String WebContext);", "public String getContextClass() {\n\n return (this.contextClass);\n\n }", "public void setClassnameToUse(String value)\r\n {\r\n getSemanticObject().setProperty(bsc_classnameToUse, value);\r\n }", "public SurfWebApplicationContext() \r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column b_brokeranswered.lastmodified
public void setLastmodified(Date lastmodified) { this.lastmodified = lastmodified; }
[ "public void setLastModified(Date lastModified) {\r\n this.lastModified = lastModified;\r\n }", "public void updateLastModified() {\n Context context = getContext();\n try {\n Date lastModified = new java.sql.Timestamp(new Date().getTime());\n myRow.setColumn(\"modifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attach a file to a loggedTime Adds a file to an existing loggedTime.
public void addLoggedTimeFile(Integer loggedTimeId, String fileName) throws ApiException { addLoggedTimeFileWithHttpInfo(loggedTimeId, fileName); }
[ "public Attachment addAttachment(Object logId, InputStream file, String name)\n\t throws Exception;", "public void addLoggedTimeFileByURL(RecordFile body, Integer loggedTimeId) throws ApiException {\n addLoggedTimeFileByURLWithHttpInfo(body, loggedTimeId);\n }", "void addAttachment(File attachment)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Collapses the discrete key/grid to not contain extra key definitions.
@Override public void collapse() { Grid2DByte weatherGrid = getWeatherGrid(); if (weatherGrid == null) { return; } // make a histogram, indicating what is and what isn't // used in the weather keys boolean[] used = new boolean[keys.length]; int[] ...
[ "private void prepSupplementalKeys() {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), \"clear\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"clear\", new KeyAction(\"C\"));\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the necessary imports options for this completion option
ImportOption[] getImports();
[ "public List getImports();", "Set<String> usedImports();", "Import[] getImports();", "public Map getImports();", "ImportsOperations getImportsOperations();", "ImportList getImportList();", "@Override\n public List<String> genImportList() {\n List<String> importsL = new ArrayList<String>();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string dnum = 1;
String getDnum();
[ "public Builder setDnum(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n dnum_ = value;\n onChanged();\n return this;\n }", "public void setNumDdd(String numDdd) {\n this.numDdd = numDdd;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send an object to all connected endpoints.
default void sendToAll(Serializable object) throws IOException, NoSuchEndpointException { getConnectedEndpoints().parallelStream().forEach(endpoint -> { try { send(object, endpoint); } catch(IOException e) { e.printStackTrace(); System.err....
[ "public void send() {\n sessions.getAll().forEach(new Consumer<Session>() {\n\n @Override\n public void accept(Session t) {\n t.getAsyncRemote().sendObject(converter.from(null, repo.getAll()));\n\n }\n });\n }", "public synchronized void send(final ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column t_analyse_avgline_result.return_rate
public void setReturnRate(Double returnRate) { this.returnRate = returnRate; }
[ "public void setReturnRate(double returnRate) {\n this.returnRate = returnRate;\n }", "public void setACTUAL_RATE_OF_RETURN(BigDecimal ACTUAL_RATE_OF_RETURN)\r\n {\r\n\tthis.ACTUAL_RATE_OF_RETURN = ACTUAL_RATE_OF_RETURN;\r\n }", "public void setEXPECTED_RATE_OF_RETURN(BigDecimal EXPECTED_RATE_OF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine from the passed Augmented Image what playing card is being detected
public handDetermination.Card parseCard(AugmentedImage card) { String imageName = card.getName(); String[] splitString = imageName.split("[_.]+"); byte[] values = new byte[2]; boolean faceCard = false; //check if the Augmented Image is a King if (splitString[1].equalsIgnoreCase("KING...
[ "@Override\n public int recognize(BufferedImage img) {\n return 0;\n }", "public void victoryCardFind();", "private AugmentedImage detectMarker(Frame frame) {\n for (AugmentedImage augmentedImage : frame.getUpdatedTrackables(AugmentedImage.class)) {\n if (augmentedImage.getTrackin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DomainModel__Group__4__Impl" $ANTLR start "rule__DomainModel__Group__5" InternalDomain.g:432:1: rule__DomainModel__Group__5 : rule__DomainModel__Group__5__Impl rule__DomainModel__Group__6 ;
public final void rule__DomainModel__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDomain.g:436:1: ( rule__DomainModel__Group__5__Impl rule__DomainModel__Group__6 ) // InternalDomain.g:437:2: rule__DomainModel__Group__5__I...
[ "public final void rule__DomainModel__Group_5__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDomain.g:787:1: ( rule__DomainModel__Group_5__4__Impl )\n // InternalDomain.g:788:2: rule__DomainModel__Group_5__4__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 clientIpV4 = 3; IPV4
@Override public int getClientIpV4() { return clientIpV4_; }
[ "int getClientIpV4();", "@Override\n public int getClientIpV4() {\n return clientIpV4_;\n }", "boolean hasClientIpV4();", "java.lang.String getIpv4();", "io.particle.firmwareprotos.ctrl.Network.Ipv4Config getIpv4Config();", "int getClientIp();", "boolean getIpv4Compat();", "int getIp();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RFC 6637 Section 7 Implements KDF( X, oBits, Param ); Input: point X = (x,y) oBits the desired size of output hBits the size of output of hash function Hash Param octets representing the parameters Assumes that oBits <= hBits Convert the point X to the octet string, see section 6: ZB' = 04 || x || y and extract the x p...
private static byte[] KDF(PGPDigestCalculator digCalc, ECPoint s, int keyLen, byte[] param) throws IOException { byte[] ZB = s.getAffineXCoord().getEncoded(); OutputStream dOut = digCalc.getOutputStream(); dOut.write(0x00); dOut.write(0x00); dOut.write(0x00); ...
[ "int getHashLength();", "Bytes32 getRootHash();", "private static BigInteger Hash(String term, int printBits)\n {\n BigInteger baseHash = new BigInteger(\"14695981039346656037\");\n Long seed = 1099511628211L;\n long hash_mod = (long)java.lang.Math.pow(2, printBits);\n for(int i =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XAttributeType__Group_5__1" $ANTLR start "rule__XAttributeType__Group_5__1__Impl" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:3786:1: rule__XAttributeType__Group_5__1__Impl : ( ( rule__XAttributeType__TypeGuidAs...
public final void rule__XAttributeType__Group_5__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:3790:1: (...
[ "public final void rule__XAttributeType__Group_5__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set unbalanced quota values for nodes
@Test public void testQuotaResetter() { adminClient.quotaMgmtOps.setQuotaForNode(STORE_NAME, QuotaType.GET_THROUGHPUT, 0, 1000L); // verify whether quota values initialized assertEquals(Long.parseLong(adminClient.quotaMgmtOps.getQuotaForNode(STORE_NAME, ...
[ "void setDefaultUserQuota(long val);", "void setAliquotaRitenuta(java.math.BigDecimal aliquotaRitenuta);", "@Test\n public void testExceedsQuotaOnStartup() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user\", ConfigFactory.empty());\n // Ensure that the current...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all articles available from the provided author.
public List<Article> findAllArticlesForAuthor(String author) { SearchResponse searchResponse = client.prepareSearch(INDEX_BASE) .setQuery(termsQuery("author", author)) .get(); SearchHit[] hits = searchResponse.getHits().hits(); return Arrays.stream(hits) ...
[ "List<Article> findByAuthor(final String author);", "@Override\n\tpublic List<ArticleBean> getArticlesByAuthorName(String authorName) {\n\t\treturn WebscrapperUtil.searchByAuthorName(authorName);\n\t}", "public List<cn.edu.kmust.flst.domain.flst.tables.pojos.Article> fetchByArticleAuthor(String... values) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get value for company_code
public String getCompany_code() { return (String) get("company_code"); }
[ "public String getCompany_code() {\n return company_code;\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getCompanyCode() {\n return this.companyCode;\n }", "public java.lang.String getCompanyCode() {\n return companyCode;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
JSONRPC Method DoRegistration, register new Customer
@Override public JSONDoRegistrationResult DoRegistration(JSONDoRegistrationData data) throws Exception{ JSONDoRegistrationResult v_res = new JSONDoRegistrationResult(); if (!m_CustomerProvider.checkIdentificator(data.getAccount().getEmail())) { v_res.addStatus(JSONDoRegistrationResult.US...
[ "public void register(Customer customer);", "void registerCustomer(Customer customer);", "public void registerCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_REGISTER_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.phoneno...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Access method for the Fractal Panel object
public FractalPanel getFractalPanel(){ return _fractalPanel; }
[ "public final Panel getPanel()\r\n\t{\r\n\t\treturn panel;\r\n\t}", "JComponent getPanel();", "public JPanel getParticlePanel ()\r\n \t{\r\n \t\treturn (m_particlePanel);\r\n \t}", "public SensorPanelPresenter getPanel(){\n return this.panel;\n }", "public PanelCanvas getPanelCanvas() {\r\n\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Esta funcion devuelve un array de strings donde se almacenan las salas vecinas de la sala donde se encuentre el jugador cuyo id se le pasa a la funcion
public static String[] verSalasVecinas(int a) { int sala =0; String[] salasVecinas; for( sala = 0;sala< GestorPartida.getContSalas(); sala++) { if(GestorPartida.getJugadores()[a].getSala().equalsIgnoreCase(GestorPartida.getSalas()[sala].getNombre() )) { break; } } salasVecinas=GestorPartida.getSalas...
[ "private String buscaEnArray(ArrayList<Student> lista, int id){\n for (int i=0; i<lista.size(); i++){\n if(lista.get(i).getId_student() == id){\n return lista.get(i).getName() + \" \" + lista.get(i).getSurname1();\n }\n }\n return null;\n }", "public Li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the dataEncryption property: The Data Encryption for CMK.
public DataEncryption dataEncryption() { return this.innerProperties() == null ? null : this.innerProperties().dataEncryption(); }
[ "public com.microsoft.schemas.office.x2006.encryption.CTEncryption getEncryption()\n {\n \treturn encryption;\n }", "public java.lang.String getEncryptedData() {\r\n return encryptedData;\r\n }", "public Encryption getEncryption() {\n return this.encryption;\n }", "public Encrypti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of toAstnode method of class AbsolutePathNode.
@Test public void testToAstnode() { System.out.println("RelativePathNode - testToAstnode"); final AbsolutePathNode instance = new AbsolutePathNode(); final String expResult = "AbsolutePathNode()"; final String result = instance.toAstnode(); System.out.printf("Expected: %s\n",...
[ "@Test\n public void testToRulenode() {\n System.out.println(\"AbsolutePathNode - testToRulenode\");\n final AbsolutePathNode instance = new AbsolutePathNode();\n final String expResult = \"apath\";\n final String result = instance.toRulenode();\n System.out.printf(\"Expected: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Valid reverse range return list of prime numbers test
@Test public void validReverseRangeGenerateListTest() { List<Integer> listOfPrime = primeNumber.generate(7920, 7900); assertTrue(listOfPrime.contains(7901)); assertTrue(listOfPrime.contains(7907)); assertTrue(listOfPrime.contains(7919)); }
[ "public static List<Integer> getPrimeNumbers(int range){\r\n\t\tList<Integer> numbers = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor(int i = 2; i < range; i++){\r\n\t\t\tif(i <= 3){\r\n\t\t\t\tnumbers.add(i);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint sqr = (int) Math.floor(Math.sqrt(i));\r\n\t\t\t\t// if even or is ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove the properties of the governance service. Both the guid and the qualified name is supplied to validate that the correct governance service is being deleted. The governance service is also unregistered from its governance engines.
@Override public void deleteGovernanceService(String userId, String guid, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, ...
[ "public void removeDeviceServiceLink();", "public void removeServiceEntry(String linkName);", "void unsetServiceId();", "@Override\n public void deleteGovernanceEngine(String userId,\n String guid,\n String qualifiedNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method filter the nodes that is in the range of distance and duration from the start point..
public void filterByDistance() { String url = "http://turritour.000webhostapp.com/api/getsearchparametersbyemail/?userEmail=sofisofi@outlook.com"; JsonArrayRequest request = new JsonArrayRequest (url, new Response.Listener<JSONArray>() ...
[ "public void filterByEuclides(LinkedList<Node> nodesList)\n {\n MyLinkedList nodesForRoutesList = new MyLinkedList();\n\n // Se compara, los datos suministrados con los de cada estudiante\n for (Node node:nodesList)\n {\n Location locationA = new Location(\"punto A\");\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if lOp is less than rOp
public ResultValue lessThan(ResultValue lOp, ResultValue rOp) throws Exception { // Booleans can only be compared in == and != operations if (lOp.type == SubClassif.BOOLEAN || rOp.type == SubClassif.BOOLEAN) throw new Exception("Unable to do < operation on a boolean value"); ...
[ "public ResultValue lessOrEqual(ResultValue lOp, ResultValue rOp) throws Exception\r\n {\r\n // Booleans can only be compared in == and != operations \r\n if (lOp.type == SubClassif.BOOLEAN || rOp.type == SubClassif.BOOLEAN)\r\n throw new Exception(\"Unable to do <= operation on a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The converse operation to exists. If the predicate returns true for all elements in the input sequence then 'forAll' returns true otherwise return false. forAll: (A > bool) > A list > bool
public static <A> boolean forAll(final Function<A, Boolean> f, final Iterable<? extends A> input) { return !exists(not(f), input); }
[ "public static <A> Function<Iterable<A>, Boolean> forAll(final Function<? super A, Boolean> f) {\r\n return input -> Functional.forAll(f, input);\r\n }", "public static <A> boolean exists(final Function<? super A, Boolean> f, final Iterable<A> input) {\r\n for (final A a : input)\r\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself.
public void createFieldEditors() { addField( new BooleanFieldEditor( PreferenceConstants.PRETTY_CML, "&Pretty print CML", getFieldEditorParent())); bioclipseLogging = new BooleanFieldEditor( PreferenceConstants.BIOCLIPSE_LOGGING, "&Use Bioclipse Logging", getFieldEditorParent()); addField(...
[ "public void createFieldEditors() {\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SPACES_PER_TAB, \"Spaces per tab (Re-open editor to take effect.)\", getFieldEditorParent(), 2 ) );\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SECONDS_TO_REEVALUATE, \"Seconds between syntax reevaluation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the API used to transfer a Volume from one tenant/project to another
BlockVolumeTransferService transfer();
[ "public interface BlockVolumeService extends RestService {\n\n /**\n * The volume type defines the characteristics of a volume\n *\n * @return List of VolumeType entities\n */\n List<? extends VolumeType> listVolumeTypes();\n\n /**\n * Deletes the specified VolumeType\n *\n * @p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the hash of all lens and resource matches.
public LensMatchHashMap getLensMatches() { return this._lensMatches; }
[ "byte[] getInfoHash();", "public String getHash(List<ExtenderResource> extenderResources) throws ExtenderClientException {\n MessageDigest md = ExtenderClientCache.getHasher();\n getHash(extenderResources, md);\n return hashToString(md.digest());\n }", "ics23.HashOp getHash();", "java....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets event handler usage counts.
public abstract Map<Object,Map<String,Integer>> getEventHandlerCounts();
[ "long getReceivedEventsCount();", "long getListenerCount();", "public int getEventCount() {\n\t\t\treturn eventCount;\n\t\t}", "int getNumberOfEvents();", "public int getNumberOfEvents() {\n return size();\n }", "public int getListenerCount();", "public long getSeHandlerCount() {\n\t\treturn s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to set discounted price
private void setDiscountedPrice() { seekbarNewprice.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { tvDiscountPerc.setText(progress * 5 + "%"); tr...
[ "public abstract void setDiscountRate(double discountRate);", "public void setDiscounted(final DiscountedPrice discounted);", "public void setDiscount(double aDiscount) {\r\n discount = aDiscount;\r\n }", "public void setDiscount(double value) {\n this.discount = value;\n }", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of an element at [state,index] in 'b' matrix to val.
public void setB(int state, int index, double val){ if(index >= M || index < 0 || state < 0 || state >= N){ System.err.println("Illegal state or index number"); System.exit(-1); } b[state][index] = val; }
[ "public void set(String state, Integer index, Element value) {\r\n\t\tif (data.keySet().contains(state))\r\n\t\t\tdata.get(state).set(index, value);\r\n\t}", "void set(int idx, int val);", "public abstract void setElem(int bank, int i, int val);", "public void setA(int state1, int state2, double val){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The meat of the program. Uses all the volunteer info to schedule a day, using a priority queue and updating priorities based on required shifts TODO: Make it so a volunteer cannot have two shifts in a row!
public void schedule () { // Step 1: Set up a priorityQueue of volunteers PriorityQueue<Volunteer> vols = new PriorityQueue<Volunteer>(volToId.keySet()); HashSet<Volunteer> volsOnBreak = new HashSet<Volunteer>(); // Volunteers on break to be ignored for a loop // Now, for each row in the schedule, fill it f...
[ "public void scheduleBreaks() {\n\t\tTreeSet<Volunteer> volTree = new TreeSet<Volunteer>(); \n\t\tfor (Volunteer v : volunteers) {\n\t\t\tvolTree.add(v);\n\t\t}\n\t\tIterator<Volunteer> vols = volTree.iterator();\n\t\tTreeSet<Integer> breakSet = stationToIndex.get(\"br\");\n\t\tArrayList<Integer> breakIndices = new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new line builder using the specified polyline and layer and drawing events from the specified world window. Either or both the polyline and the layer may be null, in which case the necessary object is created.
public ConnectorBuilder(final WorldWindow wwd, RenderableLayer lineLayer) { this.wwd = wwd; LayerList layers = this.wwd.getModel().getLayers(); this.anLayer = (AnnotationLayer) this.wwd.getModel().getLayers().getLayerByName("Label Layer"); this.measurer = new LengthMeasurer(); markerLayer = (MarkerLayer...
[ "Polyline createPolyline();", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get assigned professor of a practicing from datatabase. This method it's used as a support to take an action on a practitioner by the coordinator.
@Override public Professor getAssignedProfessorByPractitionerID(int idPractitioner) throws SQLException { Professor professor = null; try(Connection conn = database.getConnection() ) { String statement = "SELECT PROF.id_person, PROF.cubicle, PROF.staff_number, PERSPROF.name, PERSPROF.pho...
[ "String getProfessor();", "public Professor professor() {\n ////\n return professor;\n }", "public Professor getProfessor() {\r\n\t\treturn prof;\r\n\t}", "public int getProfessorID() {\n return professorID;\n }", "public Professor getById(int id) {\r\n\r\n\t\tProfessor professor ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
left, center, right Triangular constructor. The left, right and center points along the xaxis characterize the triangular distribution.
public Triangular(double left, double center, double right) { a = left; b = center; c = right; if( !(left<=center && center <=right) ) throw new RuntimeException(); }
[ "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public Triangle()\n {\n\n this(new Point(-0.5f, (float)-Math.tan(Math.PI / 6), 0f), new Point(\n 0.5f,\n (float)-Ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleNumAlt" $ANTLR start "ruleNumAlt" ../org.osate.xtext.aadl2.properties/srcgen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPropertiesParser.g:1757:1: ruleNumAlt returns [EObject current=null] : (this_RealTerm_0= ruleRealTerm | this_IntegerTerm_1= ruleIntegerTerm | this_SignedConsta...
public final EObject ruleNumAlt() throws RecognitionException { EObject current = null; EObject this_RealTerm_0 = null; EObject this_IntegerTerm_1 = null; EObject this_SignedConstant_2 = null; EObject this_ConstantValue_3 = null; enterRule(); ...
[ "public final EObject entryRuleNumAlt() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleNumAlt = null;\n\n\n try {\n // ../org.osate.xtext.aadl2.properties/src-gen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPropertiesParser.g:1749:2: (iv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the rover is currently in a garage or not.
protected boolean isRoverInAGarage() { return (BuildingManager.getBuilding(getVehicle()) != null); }
[ "public boolean hasGarage() {\r\n return garage.equals(\"Y\");\r\n }", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "public boolean gearCaptured() {\n if (irGearSensor.getVoltage() >= GEAR_CAPTURED) {\n return true;\n }\n return f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the value of a given option in the config file
public void updateConfigValue(ConfigOption option, String value) { String updatedFile = ""; String restAfter = ""; String restBefore = ""; File configFile = new File(this.fileName); try { Scanner reader = new Scanner(configFile); if (option == ConfigOption.SOUNDEFFECTS) { String newLineVal...
[ "void setOption(String name, Object value);", "private void updateOptionInDb(final GlusterVolumeOptionEntity option) {\n // update the option value if it exists, else add it\n GlusterVolumeOptionEntity existingOption = getGlusterVolume().getOption(option.getKey());\n if (existingOption != nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete all instances of a char in the message list.
public void delete(char toRemove) { int i = 0; while(message.validIndex(i)) { char temp = message.get(i).toString().charAt(0); // If the current char should be deleted if(temp == toRemove) { message.deleteAt(i); --i; ...
[ "void delete(SpCharInSeq spCharInSeq);", "public void removeCharacter(Character c) {\n chars.remove(c);\n }", "public static void removeOneCharacter (List<Character> listCP){\n System.out.println(\"enter the index of your character : \");\n int ch = getUserChoice();\n System.out.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setObservaciones method, of class Ejemplar.
@Test public void testSetObservaciones() { System.out.println("setObservaciones"); String observaciones = ""; Ejemplar instance = new Ejemplar(); instance.setObservaciones(observaciones); }
[ "@Test\n public void testSetObservaciones() {\n System.out.println(\"setObservaciones\");\n String observaciones = \"\";\n Usuario instance = new Usuario();\n instance.setObservaciones(observaciones);\n // TODO review the generated test code and remove the default call to fail....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates all the RotamerEnergyJobs we need to get rotamer and rotamer pair energies for an entire rotamer space.
public static List<Future<Result>> createEnergyJobs(List<List<Rotamer>> rotamerSpace, Peptide startingPeptide, Set<RotamerPair> incompatiblePairs, ConcurrentHashMap<Rotamer,Double> tempMap1, ConcurrentHashMap<RotamerPair,Double> tempMap2, ...
[ "public static DEEenergyCalculator analyze(RotamerSpace rotamerSpace)\n {\n // estimate the number of rotamers and rotamer pairs\n int totalRotamers = RotamerSpace.countRotamers(rotamerSpace.rotamerSpace);\n int estimated = ( ( totalRotamers * (totalRotamers - 1) ) / 2 ) - rotamerSpace.incom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EventProp__Group_2__2__Impl" $ANTLR start "rule__EventProp__Group_2__3" InternalSymboleoide.g:7312:1: rule__EventProp__Group_2__3 : rule__EventProp__Group_2__3__Impl rule__EventProp__Group_2__4 ;
public final void rule__EventProp__Group_2__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSymboleoide.g:7316:1: ( rule__EventProp__Group_2__3__Impl rule__EventProp__Group_2__4 ) // InternalSymboleoide.g:7317:2: rule__EventProp__G...
[ "public final void rule__EventProp__Group_3__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7451:1: ( rule__EventProp__Group_3__2__Impl rule__EventProp__Group_3__3 )\n // InternalSymboleoide.g:7452:2: rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the current page header
void setPageHeader(PageHeader pageHeader);
[ "public void setPageHeader(String header)\n {\n // ignore\n }", "@Override\n public void setHeaderText(String pageHeader) {\n this.pageHeader = pageHeader;\n float strHeight = Constants.HEADER_FONT.getFontDescriptor().getFontBoundingBox().getHeight() / 1000 * Constants.FONT_SIZE;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decode a contract list of Uris which might include fragment identifier references we should immediately resolve.
Contract decodeContract(String s, XElem elem) { StringTokenizer st = new StringTokenizer(s, " "); ArrayList acc = new ArrayList(); while(st.hasMoreTokens()) acc.add(decodeRefUri(st.nextToken(), elem)); return new Contract((Uri[])acc.toArray(new Uri[acc.size()])); }
[ "private void decodePeerList(List peers)\n {\n this.peers = new ArrayList<>();\n\n // Loop through all of the peers in the list\n for (int i = 0; i < peers.size(); i++)\n {\n try\n {\n // Get peer's dictionary from the list\n Map<Byt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test requests by URN.
public void testHttpUrnRequest() throws Exception { for (FileDesc fd : gnutellaFileView) { String uri = "/uri-res/N2R?" + fd.getSHA1Urn().httpStringValue(); BasicHttpRequest request = new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1); sendRequestThat...
[ "@Test\n public void atrnTest() {\n assertEquals(\"atrn1\", authResponse.getAtrn());\n }", "public void testTraditionalGetForReturnedUrn() throws Exception {\n for (FileDesc fd : gnutellaFileView) {\n String uri = LimeTestUtils.getRelativeRequest(fd.getSHA1Urn());\n\n Bas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops (pauses) the game and the rendering.
public void stopGame() { getGameThread().stop(); getRenderer().stopRendering(); }
[ "public void stop() {\n\t\tsetRunning(false);\n\t\ttry {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tballList.clear();\n\t\tparticles.clear();\n\t\trepaint();\n\t}", "public synchronized void stopGame() {\r\n this.state = GameState.STOPPED;\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This test will fail with different hash codes unless we add an IDPattern.equals() method that explicitly defines object equality as, for instance, having identical values in each of its instance variables. IDPattern pattern = IDGeneratorSerializer.deserialize(DEFAULT_SERIALIZED_ID_PATTERN); assertEquals(pattern, new ID...
public void testDeserializeIDGenerator() { }
[ "public void testStringID() {\n String testID = generator.generatePrefixedIdentifier(\"test\");\n assertNotNull(testID);\n assertTrue(testID.matches(\"test\" + ID_REGEX));\n }", "public void testNullID() {\n String testID = generator.generatePrefixedIdentifier(null);\n assert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
domain status. enum values are akin to those of zimbraAccountStatus but the status affects all accounts on the domain. See table below for how zimbraDomainStatus affects account status. active see zimbraAccountStatus maintenance see zimbraAccountStatus locked see zimbraAccountStatus closed see zimbraAccountStatus suspe...
@ZAttr(id=535) public void setDomainStatusAsString(String zimbraDomainStatus) throws com.zimbra.common.service.ServiceException { HashMap<String,Object> attrs = new HashMap<String,Object>(); attrs.put(Provisioning.A_zimbraDomainStatus, zimbraDomainStatus); getProvisioning().modifyAttrs(this,...
[ "DomainStatus getDomainStatus();", "@ZAttr(id=535)\n public ZAttrProvisioning.DomainStatus getDomainStatus() {\n try { String v = getAttr(Provisioning.A_zimbraDomainStatus); return v == null ? null : ZAttrProvisioning.DomainStatus.fromString(v); } catch(com.zimbra.common.service.ServiceException e) { re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To convert user parameters with serial number into a single array of string
public static String[] getSerialParameterValues(String parameter, int length, HttpServletRequest request) { String ret[] = new String[length]; for (int i = 0; i < length; i++) { ret[i] = request.getParameter(parameter + "" + (i + 1)); } return ret; }
[ "private static String[] createStringArray(Parameter p) {\n String[] temp = new String[p.getStringList().size()];\n for (int g = 0; g < p.getStringList().size(); g++) {\n temp[g] = p.getStringList().get(g);\n }\n return temp;\n }", "private String parsePerameterArray(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
O BOTAO DE TRANSFERENCIA SEMPRE REDIRECIONA PARA A ESTORIA "TRANSFERIR PACIENTE" O BOTAO DE CADASTRO DE PACIENTES SEMPRE REDIRECIONA PARA A ESTORIA "CADASTRAR PACIENTE" Controla o redirecionamento de pagina do botao 'EXTRATO'
public String redirecionarBotaoExtrato() { this.prontuario = censoSelecionado.getProntuario(); this.dthrLancamento = censoSelecionado.getDthrLancamento(); this.codigoLeitos = censoSelecionado.getQrtoLto(); String retorno = ""; if (censoSelecionado.getTipo() != null && (DominioTipoCensoDiarioPacientes.L...
[ "public String pesquisaTransferencias()//verifica todas as trasnferencias pendentrtes no sistema, ou seja, com tipo 1\n\t{//tipo 0 é trasnferencia normal, original do sistema e tipo 2 é trasnferencia ja retornada e recebida\n\t\tString pesquisa = \"SELECT T.*, P.*, E.*, E.unidade as NomeDestino, E.empresaID as clie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method implement the file auto get operation. The method supports continue auto get file with restart capability. It also supports automatic reconnection after server reboot.
private boolean _autoGetPull() throws SessionException { long queryInterval = this._queryInterval == null ? _MINUTE_MS : Long.parseLong(this._queryInterval) * _MINUTE_MS; String ftString = FileType.toFullFiletype( (Strin...
[ "private void loadCurrentFile() {\n Log.d(TAG, \"Retrieving...\");\n final DriveFile file = mCurrentDriveId.asDriveFile();\n\n // Retrieve and store the file metadata and contents.\n mDriveResourceClient.getMetadata(file)\n .continueWithTask(new Continuation<Metadata, Task...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mimics the POSIX dup2(2) function, returning a new descriptor that references the same open channel but with a specified fileno.
public ChannelDescriptor dup2(int fileno) { synchronized (refCounter) { refCounter.incrementAndGet(); if (DEBUG) getLogger("ChannelDescriptor").info("Reopen fileno " + fileno + ", refs now: " + refCounter.get()); return new ChannelDescriptor(channel, fileno, originalM...
[ "public void dup2Into(ChannelDescriptor other) throws BadDescriptorException, IOException {\n synchronized (refCounter) {\n refCounter.incrementAndGet();\n \n if (DEBUG) getLogger(\"ChannelDescriptor\").info(\"Reopen fileno \" + internalFileno + \", refs now: \" + refCounter.get());\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_analyse_avgline_result.total_buy_num
public Double getTotalBuyNum() { return totalBuyNum; }
[ "@Override\n\tpublic double getTotalBalance() {\n\t\tString qStr = \"SELECT balance_Amount FROM Account\";\n\t\tTypedQuery<Double> query = entityManager.createQuery(qStr, Double.class);\n\t\tList<Double> totalBalance_List= query.getResultList();\n\t\t\n\t\tif(!totalBalance_List.isEmpty())\n\t\t{\n\t\t\tString qStr1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SosoBoardDTO dto = entityToDTO(sosoJobBoard); List result = sosoBoardRepository.getListByCategory(category);
@Override public List<SosoBoardDTO> getListByCategory(SosoJobBoard sosoJobBoard) { return null; }
[ "List<CategoriaDTO> obtenerCategorias(String estado);", "List<EvenementChevreDTO> findAll();", "@GetMapping(\"/getAllCompanytoBoardMember\")\n public List<CompanyToBoardMember> getAllCompanyToBoardMember(){\n return relationService.getAllCompanyToBoardMember();\n }", "public List<DTO> findAll();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }