query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
/ Generator to generate D Its a very smart generator and generates the best possible solution for D using it knowledge of the transformation from Problem A to Problem B & etc Generator to generate D Create Attribute list for fictional solution D for 2x 1 problems
public Map <String, Map<String, String>> generateSolution( RavensProblem problem, Map <String, HashMap<String, String>> mapObj, Map <String, HashMap<String, String>> deletedAttrsMap, Map <String, HashMap<String, String>> addedAttrsMap, Comparer compObj, List <String> deletedObjList, M...
[ "private static void generate_attributes_generic() {\n\t\tArrayList <IntExpr> arrtemp1 = new ArrayList<IntExpr>();\n\t\tint index = 0;\n\t\tfor (Map.Entry<String, ArrayList> entry : Attributes_Gen.entrySet()) {\n\t\t\tString nwindex = \"\" + getIndex();\n\t\t\tArrayList<IntExpr> arr = new ArrayList<IntExpr>();\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the limitUsageRate value for this DetailedPbocStatisticsInfo.
public void setLimitUsageRate(java.lang.Double limitUsageRate) { this.limitUsageRate = limitUsageRate; }
[ "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "public java.lang.Double getLimitUsageRate() {\n return limitUsageRate;\n }", "public void setBytesReadPerSecondMax(Double bytesReadPerSecondMax) {\n this.bytesReadPerSecondMax = bytesReadPerSec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is new is default style.
public boolean isNewIsDefaultStyle() { return myNewIsDefaultStyle; }
[ "abstract protected void setDefaultStyles();", "protected void initDefaultStyle()\r\n {\n }", "public String getDefaultStyle()\n {\n return strategy.getDefaultStyle();\n }", "protected void assertCommandBoxShowsDefaultStyle() {\n assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the String representations associated with the input unit. otherStringsToo = false
public static final ArrayList<String> GetStringsForUnit(Units unit) { return GetStringsForUnit(unit, false); }
[ "public String toUnitString()\n {\n StringBuilder buf = new StringBuilder();\n buildUnitString(buf);\n return buf.toString();\n }", "public String[] getUnitOfMeasureStrings()\n {\n return(unitOfMeasureStrings);\n }", "public final ArrayList<String> GetStringsForCurrentUni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unregisters the given renderer from this graphics object
static void removeRenderer(Renderer renderer) { renderers.remove(renderer); }
[ "public void destroy() {\n renderer.destroy();\n }", "public void removeRenderer(Integer idGCodeProvider) throws GkException{\n\t\tRS274GCodeRenderer renderer = getRendererByGCodeProvider(idGCodeProvider);\n\t\texecutionService.removeExecutionListener(renderer);\n\t\tcacheRenderer.remove(renderer);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.tensorflow.AutotuneResult.GemmKey reference_gemm = 12;
tensorflow.Autotuning.AutotuneResult.GemmKeyOrBuilder getReferenceGemmOrBuilder();
[ "tensorflow.Autotuning.AutotuneResult.GemmKey getReferenceGemm();", "tensorflow.Autotuning.AutotuneResult.GemmKey getGemm();", "tensorflow.Autotuning.AutotuneResult.GemmKeyOrBuilder getGemmOrBuilder();", "tensorflow.Autotuning.AutotuneResult.FailureResult getFailure();", "tensorflow.Autotuning.AutotuneResul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a count of all Sendsms entity
public Integer countSendsmss() { return ((Long) sendsmsDAO.createQuerySingleResult("select count(o) from Sendsms o").getSingleResult()).intValue(); }
[ "public int getSendCount();", "public static int countSentBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }", "public long countAllUserEntitys()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the AccessRole associated with the label.
Role findAccessRole(String label) throws TalentStudioException;
[ "Role findResourceRole(String label) throws TalentStudioException;", "public String getRolelabel() {\n return rolelabel;\n }", "CodeableConcept getRole();", "Role getRole(String roleName);", "public int getRoleForName(IASTName name);", "String getRoleName();", "im.turms.common.constant.GroupMe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is enabled compress image.
public boolean isEnabledCompressImage() { boolean isCompress = AppSettings.getInstance() .isEnabledCompressingImageFromDB(); Logger.d(TAG, "isEnabledCompressImage = " + isCompress); return isCompress; }
[ "public abstract boolean isUsingCompression();", "public boolean isCompressionEnabled() {\r\n return compressionEnabled;\r\n }", "public void setEnableCompressImage(boolean compressImage) {\n Logger.d(TAG, \"isEnabledCompressImage = \" + compressImage);\n AppSettings.getInstance().setCom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
5. Admin will assigned "Heart Doctor (Heart Surgeon)" to the cardiac ward and "Baby Doctor (Pediatrician)" to the two pediatric wards. If the admin assigns the wrong doctor to the wrong ward, an error will be displayed. changed baby doctor to kelly doctor because testdata is already present testadminassignhcp
public void testadminassignhcp() throws Exception { driver = (HtmlUnitDriver) login("9000000001", "pw"); driver.findElement(By.xpath("//div[@id='iTrustMenu']/div/div[3]/div/h2")).click(); driver.findElement(By.linkText("Manage Wards")).click(); new Select(driver.findElement(By.name("hospitals"))).selectByVisibl...
[ "@Test\n\t\tpublic void g_LC_TS_28_assignto_bde() throws Exception{ // ts28_tc001 (Hardik)\n\t\t\t//expanding and clicking on assign lead link\t\n\t\t help.expand();\n\t\t\tstartup(\"assignlead\",\"Assign Leads\");\n\t\t\tnew Select(driver.findElement(By.name(bdm.getProperty(\"service_name\")))).selectByVisible...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates given custom field of a given user. (asynchronously) Updates given custom field of a given user.
public com.squareup.okhttp.Call updateCustomFieldAsync(CustomFieldDTO body, Long userId, String customFieldKey, final ApiCallback<CustomFieldDTO> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestLis...
[ "void updateUser(User user);", "public void customFieldUpdateTest() {\n final long customFieldId = 5634;\n\n // Define campaign\n final CustomField customField = new CustomField();\n customField.setId(customFieldId);\n customField.setName(\"Updated API Test CustomField \" + Syst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a string, return the integer value constructed from the digits, 0 9, that appear in the string, ignoring all other characters. Return 0 if there are no digits in the string. Note: java.lang.Character.isDigit(char) tests a char value to see if it is a digit. Alternately, the char value can be checked for the range...
private static int extractInt(String str) { String num = ""; for (int i = 0; i < str.length(); i++) { if (java.lang.Character.isDigit(str.charAt(i))) num += str.charAt(i); } return (num.equals("")) ? 0 : java.lang.Integer.parseInt(num); }
[ "public static int extractInt(String str){\n //uses Stringbuilders instead of appending strings for faster operation\n StringBuilder s = new StringBuilder();\n for(int i = 0; i < str.length(); i++){\n if(str.charAt(i) >= '0' && str.charAt(i) <= '9'){\n s.append(str.cha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create security settings in the specified location.
public void createSecuritySettings(com.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCreateSecurit...
[ "public LocationSettings createLocationSettings() {\n // Using an anonymous subclass as the constructor is protected.\n // This is done to deter instantiation of LocationSettings elsewhere without using the\n // getInstance() helper method.\n return new LocationSettings(this){};\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets listener to specific TextField Enable write on textField only digits Input.
void listenerForOnlyDigitsInput(TextField textField) { textField.textProperty().addListener((ChangeListener<? super String>) new ChangeListener<String>() { public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) { if (!newValue.matches("\\d*")) { ...
[ "public static void numericTextOnly(TextField textField) {\n\n\t\ttextField.textProperty().addListener(new ChangeListener<String>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n\t\t\t\tif (!newValue.matches(\"\\\\d*\")) {\n\t\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__S_Display__NameAssignment_2" $ANTLR start "rule__S_Display__FacetsAssignment_3" InternalGaml.g:18117:1: rule__S_Display__FacetsAssignment_3 : ( ruleFacet ) ;
public final void rule__S_Display__FacetsAssignment_3() throws RecognitionException { int rule__S_Display__FacetsAssignment_3_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 1083) ) { return ; } ...
[ "public final void rule__S_Species__FacetsAssignment_3() throws RecognitionException {\n int rule__S_Species__FacetsAssignment_3_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 1007) ) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The Check Hosted Service Name Availability operation checks for the availability of the specified cloud service name. (see for more information)
HostedServiceCheckNameAvailabilityResponse checkNameAvailability(String serviceName) throws IOException, ServiceException, ParserConfigurationException, SAXException;
[ "Future<HostedServiceCheckNameAvailabilityResponse> checkNameAvailabilityAsync(String serviceName);", "CheckNameAvailabilityResult checkNameAvailability(String name);", "Mono<CheckNameAvailabilityResult> checkNameAvailabilityAsync(String name);", "private boolean serviceAvailable() {\n if (service == n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks and requests for external storage permissions if the app is started at the first time.
private void checkMinimumPermissionsForThisScreen() { //Check reading permissions & writing permission to populate the HEX files & show program list if(mPrefs.getBoolean(FIRST_RUN, true)) { if(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) ...
[ "void askForExternalStoragePermission();", "public void requestPermissionsIfNeeded() {\n ArrayList<String> requiredPermissions = new ArrayList<String>();\n checkIfPermissionGranted(requiredPermissions, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n checkIfPermissionGranted(requiredPermissions...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests DbTimeEntryRejectReasonDAOgetAllRejectReasonsForEntry(long) for accuracy. It verifies DbTimeEntryRejectReasonDAOgetAllRejectReasonsForEntry(long) is correct.
public void testGetAllRejectReasonsForEntry() throws Exception { long[] rejectReasonIds = dao.getAllRejectReasonsForEntry(timeEntry.getId()); assertEquals("There should be no reject reason for time entry.", 0, rejectReasonIds.length); }
[ "public void testGetAllRejectReasonsForEntry() throws Exception {\r\n TimeEntry timeEntry = AccuracyTestHelper.createTimeEntry(null);\r\n delegate.createTimeEntry(timeEntry, true);\r\n long[] rejectReasonIds = delegate.getAllRejectReasonsForEntry(timeEntry);\r\n assertEquals(\"Expected n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "between_key" main.java.PLSQLKeys.g:2464:1: between_key : SQL92_RESERVED_BETWEEN ;
public final between_key_return between_key() throws RecognitionException { between_key_return retval = new between_key_return(); retval.start = input.LT(1); Object root_0 = null; Token SQL92_RESERVED_BETWEEN540=null; Object SQL92_RESERVED_BETWEEN540_tree=null; try {...
[ "public List<Value> getBetween(String key1, String key2);", "private String constructBetweenQuery(String firstOperator, String secondOperator, String columnName, String glueOperator) {\r\n String queryPart = firstOperator;\r\n queryPart += SPACE;\r\n queryPart += DOUBLE_POINTS;\r\n que...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prevent a "Connection" header from being added to the response
public ConnectionOptions withSuppressConnectionHeader(Boolean suppressConnectionHeader) { this.suppressConnectionHeader = suppressConnectionHeader; return this; }
[ "@Test\n\tpublic void testThatServerIgnoresHeadersListedInConnectionHeaderFieldOfAn_HTTP_1_0_Request()\n\t\t\tthrows Exception {\n\t\tString url = \"/\";\n\t\tHttpClient client = new DefaultHttpClient();\n\t\tHttpContext context = new BasicHttpContext();\n\t\tHttpHost target = getDefaultTarget();\n\t\tString toIgno...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pick a random value of the ITEM enum.
public static ITEM getRandomItem() { Random random = new Random(); return values()[random.nextInt(values().length)]; }
[ "public static Item getRandomItem() {\n\t\treturn getRandomItem(true);\n\t}", "private FallingItems selectFallingItem() {\n\t\tFallingItems[] itemsArray = FallingItems.values();\n\t\t\n\t\tint randomIndex = rand.nextInt(itemsArray.length);\n\t\t\n\t\treturn itemsArray[randomIndex];\n\t}", "public Item generateI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the Contingencies field.
public void setContingencies(entity.Contingency[] value) { __getInternalInterface().setFieldValue(CONTINGENCIES_PROP.get(), value); }
[ "public void setContingencies(entity.Contingency[] value) {\n __getInternalInterface().setFieldValue(CONTINGENCIES_PROP.get(), value);\n }", "public void setContinents(HashMap<String, Continent> continents) {\n\t\tthis.continents = continents;\n\t}", "public void addToContingencies(entity.Contingency elemen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new default KieBase using the given configuration. The returned KieBase will be detached from this KieContainer and then will NOT be updated when the KieContainer itself will be updated to a newer version of the KieModule.
KieBase newKieBase(KieBaseConfiguration conf);
[ "KieBase newKieBase(String kBaseName, KieBaseConfiguration conf);", "private static KnowledgeBase createKnowledgeBase() {\n\t\t//Create knowledgeBuilder\n\t\tKnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();\n //Add drl file into builder\n\t\tReader reader = new InputStreamReader(Si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a Sprite object from this map.
public void removeSprite(Sprite sprite) { sprites.remove(sprite); }
[ "public void removeSprite(Sprite s) {\r\n spriteList.remove(s);\r\n }", "public void removeSprite(Sprite s) {\r\n sprites.remove(s);\r\n }", "public void removeSprite(Sprite s) {\r\n this.spriteCollection.remove(s);\r\n }", "public void removeSprite(Sprite s) {\r\n sprites.removeSp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses the iTunes Library located at the specified location.
public LibraryParser(final String libFileLocation) throws LibraryParseException, NoChildrenException { this.root = new XMLParser().parseXML(libFileLocation); this.allPlaylists = new PlaylistRetriever(root).retrievePlaylist(); this.allTracks = new TracksRetriever(root).getTracks(); this.plistTrackMap = new P...
[ "public ItemParser(SenLibrary library)\n {\n this.library = library;\n }", "Collection<SongInfo> parse(InputStream inputStream) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n final ITunesResponse response = mapper.readValue(inputStream, ITunesResponse.class);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the column statistics of a partition.
CatalogColumnStatistics getPartitionColumnStatistics( ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws PartitionNotExistException, CatalogException;
[ "private List<PgColumn> getColumnsWithStatistics() {\n final List<PgColumn> list = new ArrayList<PgColumn>();\n \n for (PgColumn column : columns) {\n if (column.getStatistics() != null) {\n list.add(column);\n }\n }\n \n return list;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check is user marked that the current territory has barracks.
boolean hasBracksSelected();
[ "public boolean isCheckersInBar(Player pCurrent) {\n\t\treturn !getBar(pCurrent.getColor()).isEmpty();\n\t}", "public boolean containsBars(long pk);", "public boolean isAtBar() {\n\t\treturn isAtBar;\n\t}", "private boolean checkTreasure() {\n return snk.getTail().equals(this.treasure);\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calcul du numero d'une maille dans le buffer d'eqfses coordonnees geographiques
public int getNumMaille(float i, float j) { int deltai=(int) (this.mailleobservateur_i-i); int deltaj=(int) (this.mailleobservateur_j-j); int pos_reli = this.centre_relatif + deltai; int pos_relj = this.centre_relatif + deltaj; System.out.println(mailleobservateur_i +" "+ mailleobservateur_j +" / "+ delta...
[ "int getLngE6();", "int getLatE6();", "public int getQuantidadeEmail() {\n\t\tint contador = 0;\n\t\tfor (int i=0; i<this.quantidadeEmail; i++) {\n\t\t\tif (emails[i] != null) {\n\t\t\t\tcontador++;\n\t\t\t}\n\t\t}\n\t\treturn contador;\n\t}", "long getCoordinates();", "public int getLngE6() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends the 'data' byte array to the connected terminal. Returns the number of bytes sent. An exception may be raised if the connection fails or not all the data can be sent for some reason. It is expected that the return value should equal the length of data.
public int send(byte[] data) throws NotConnectedException, IOException;
[ "protected void sendBytes(char[] data){\n\t\tlog.debug(\">>> Writing \"+data.length+\" bytes of data\");\n\t\tflushOutput();\n\t\tostrm.write(data);\n\t}", "public void send( byte[] data ) throws NotYetConnectedException {\n\t\tconn.send( data );\n\t}", "public void send(Object data) {\n eventLoop.submit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change the selected name range.
public void setNameRange( AjaxRequestTarget target, NameRange range ) { nameRange = range; nameRangePanel.setSelected( target, range ); addWhosWhoTable(); target.addComponent( whosWhoTable ); }
[ "void changeName(String newName) {\n this.setName(newName);\n for (int i = 0; i < regions.length; i++) {\n regions[i].setSuperregion(newName);\n }\n }", "public native void setJSRange(JSSel selection, RangeImpl.JSRange range)\r\n /*-{\r\n\t// delete all ranges then recreate.....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
metoda odigraj(Koordinati poteza) najprej preveri, ce je poteza veljavna ce je, spremeni vrednost igralca na potezi ter ga nastavi na nasprotnika
public boolean odigraj(Koordinati poteza) { if (this.jeVeljavnaPoteza(poteza)) { plosca[poteza.getX()][poteza.getY()] = igralecNaPotezi.getPolje(); // Potezo dodamo v odigranePoteze. this.odigranePoteze.add(poteza); igralecNaPotezi = igralecNaPotezi.nasprotnik(); return true; } else r...
[ "public void odigraj(Koordinati poteza) {\n\t\tint[] kvadratek = new int[2];\n\t\tkvadratek[0] = poteza.getX();\n\t\tkvadratek[1] = poteza.getY();\n\t\tint st_kvadratka = (kvadratek[1] + 1) * (igra.dimenzija_polja_x() + 1) + kvadratek[0] + 1;\n \t\tif (platno.prvi) platno.izbrana_polja.get(\"1\").add(st_kvadratka);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a heuristically determined maximum search depth based on characteristics of BOARD.
private static int maxDepth(Board board) { /** FIXME? */ return 4; }
[ "private static int maxDepth(Board board) {\r\n return 4;\r\n }", "int getMaximumScanDepth();", "int getMaximumDepth();", "public int getMaxDepth();", "private Board depthLimitedSearch(int limit){\n\t\tint nodesExpanded = 0;\n\t\tvisitedNodes = new ArrayList<Board>();\n\t\t\n\t\t//create new stack...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PharmacyEnd// This method clicks on PA List on left navigation bar
public void clickOnPAList() { wait.waitForElementToBeClickable(element("link_paListing")); executeJavascript("document.getElementById('pa-list').click()"); logMessage("User clicks on PA List on left navigation bar"); }
[ "public void clickOnVehicleListSideBar() {\r\n\t\tsafeClick(groupListSideBar.replace(\"Group List\", \"Vehicle List\"), SHORTWAIT);\r\n\r\n\t}", "public static String _otb_navigationitemclick() throws Exception{\nmostCurrent._sm.HideMenus();\n //BA.debugLineNum = 421;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a path to a list of conflict sets if it is a minimal path (this only results in a minimal list of paths if paths are added in order, after sorting)
private void addConflict(Path p, Vector<Path> paths) { for(Path q : paths) if(p.contains(q)) return; paths.add(p); }
[ "private List<Path> filterMinScorePath(List<Path> paths) {\r\n List<Path> result = new ArrayList<>();\r\n int minSco = Integer.MAX_VALUE;\r\n for (Path pa : paths) {\r\n if (minSco > pa.score) {\r\n minSco = pa.score;\r\n result.clear();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notifies all registered edges of creation or deletion of a visual component
private void notifyEdges(final long id, VisuScenegraphComponent comp) { for (VisuScenegraphEdge e : edgeSources.get(id)) { e.setSource(comp); } for (VisuScenegraphEdge e : edgeTargets.get(id)) { e.setTarget(comp); } }
[ "private void processChange(VisuChange c) {\r\n\r\n if (c instanceof VisuDeleteComponent) {\r\n long id = ((VisuDeleteComponent)c).getId();\r\n VisuScenegraphComponent comp = componentTrackers.remove(id);\r\n if (comp != null) {\r\n comp.delete();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the functions options from the properties that have been set
@Nonnull public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.startDate != null) { result.add(new com.microsoft.graph.options.FunctionOption("startDate", st...
[ "@Nonnull\n public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() {\n final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>();\n if(this.array != null) {\n result.add(new com.microsoft.graph.options.FunctionOption(\"array\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Counts the number of steps based on sensor data.
public static int countSteps(double[] times, double[][] accelData) { double[] accelMags = calculateMagnitudesFor(accelData); double accelMagMean = calculateMean(accelMags); double accelStanDev = calculateStandardDeviation(accelMags, accelMagMean); int stepCounter = 0; for (int i = 1; i < accelMags....
[ "@Override\n\tpublic int countSteps() {\n\t\tint steps = 0;\n\t\tdouble[][] accels = data.getDataForColumns(new String[] { \"x acc\", \"y acc\", \"z acc\" });\n\n\t\t/* you implement this section */\n\n\t\treturn steps;\n\t}", "Integer getTotalStepCount();", "public static void incrementSensorsCount(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns names of all attributes of specified model item.
public List<String> listItemAttributes(final String itemType, final String itemName){ activate(); final List<String> names = new ArrayList<>(); Display.syncExec(new Runnable() { @Override public void run() { DefaultCTabItem tabItem = new DefaultCTabItem(1); tabItem.activate(); ModelE...
[ "public Set<String> getAllAttributeNames() {\n\t\treturn Attrs.keySet();\n\t}", "public List<String> getAttributeNames() {\n\t\treturn new ArrayList<>(attributes.keySet());\n\t}", "public java.util.Collection getAttributeNames()\r\n {\r\n if (null != m_Attributes)\r\n {\r\n return m_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the isXmlList property.
public void setIsXmlList(boolean isXmlList) { this.isXmlList = isXmlList; if(isXmlList){ this.setNillable(false); } }
[ "public boolean isXmlList() {\r\n return this.isXmlList;\r\n }", "public void setIsXmlValue(boolean isXmlValue) {\r\n this.isXmlValue = isXmlValue;\r\n }", "public boolean isSetSsiList() {\n return this.ssiList != null;\n }", "public void setIsSetPriceList (boolean IsSetPriceList);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Physical Device'.
PhysicalDevice createPhysicalDevice();
[ "public Physical makePhysicalComponent() {\r\n\t\tphys = new Physical(getPin().getWidth(), getPin().getResetValue(),\r\n\t\t\t\tgetPin().isDriveOnReset());\r\n\t\treturn phys;\r\n\t}", "LogicalDevice createLogicalDevice();", "ManagementLogicalDevice createManagementLogicalDevice();", "Device createDevice();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XCastedExpression__Group_1__1__Impl" $ANTLR start "rule__XCastedExpression__Group_1_0__0" InternalDroneScript.g:7817:1: rule__XCastedExpression__Group_1_0__0 : rule__XCastedExpression__Group_1_0__0__Impl ;
public final void rule__XCastedExpression__Group_1_0__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:7821:1: ( rule__XCastedExpression__Group_1_0__0__Impl ) // InternalDroneScript.g:7822:2: rule__XCastedExpress...
[ "public final void rule__XCastedExpression__Group_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6098:1: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add all of the cookies associated with this view to the response. This makes sure that we persist all of the cookies.
public final void finalizeCookies(HttpServletResponse res) { for (Cookie c : updatedCookies) { res.addCookie(c); } }
[ "public void setResponseCookies(HashMap cookies);", "void addCookie(HttpServletResponse response, Cookie cookie);", "@NonNull Collection<HttpCookie> cookies();", "Response addCookie(Cookie cookie);", "Response addCookie(String name, String value);", "public RequestCookies getCookies() {\n return co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Supported API: false Sets the elements.
public void setElements(List<Element> elements) { this.elements = elements; }
[ "public void setElements(List<Element> elements) {\n this.elements = elements;\n }", "public void setElements(List<Element> elements) {\r\n\t\tthis._elements = elements;\r\n\t}", "private void setElements() {\r\n fillChoiceBoxTheme();\r\n setOnAction();\r\n setTooltips();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
createArtListing method creates an ArtListing instance that is persisted in the database
@Transactional public ArtListing createArtListing(Double price, PostVisibility aVisibility, String aDescription, String aTitle, String aIdCode, Artist aArtist) { ArtListing al = new ArtListing(price, aVisibility, aDescription, aTitle, aIdCode, aArtist); entityManager.persist(al); entityManager...
[ "@Transactional\n public ArtPiece createArtPiece(PieceLocation aBasicLocation, String aAddressLocation,\n String aIdCode, ArtListing aArtListing) {\n ArtPiece apiece = new ArtPiece(aBasicLocation, aAddressLocation, aIdCode, aArtListing);\n entityManager.persist(apiece);\n entityManager.merge(aArtList...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data repository for the Header entity.
@SuppressWarnings("unused") @Repository public interface HeaderRepository extends JpaRepository<Header, Long> { }
[ "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DsheadertemplateRepository extends JpaRepository<Dsheadertemplate, Long> {\n\n}", "@SuppressWarnings(\"unused\")\npublic interface OsiSegmentStructureHdrRepository\n\t\textends JpaRepository<OsiSegmentStructureHdr, Long>, OsiSegmentStructureHdrReposito...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starting from a node go up in the hierarchy until an MReport is found
public static MReport getReport(ANode node) { ANode parent = node.getParent(); MReport reportNode = null; while (reportNode == null && parent != null) { if (parent instanceof MReport) { reportNode = (MReport) parent; } else if (parent instanceof MPage) { parent = ((MPage) parent).getRealParent(); ...
[ "public void traceBackToRoot(){\n TreeNode start = this.goalNode.getParentNode();\n while(start != startNode){\n edgeList.add(new Edge(start,start.getParentNode(), 255, 2));\n start = start.getParentNode();\n }\n }", "private void morisTraversal() {\r\n\t\tNode curren...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleParameterTimeSignature" $ANTLR start "ruleParameterTimeSignature" ../ufscar.Compiladores2/srcgen/ufscar/compiladores2/parser/antlr/internal/InternalMusy.g:343:1: ruleParameterTimeSignature returns [EObject current=null] : (otherlv_0= 'TIME_SIGNATURE' otherlv_1= ':' ( (lv_tsig_2_0= ruleTimeSignature...
public final EObject ruleParameterTimeSignature() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; EObject lv_tsig_2_0 = null; enterRule(); try { // ../ufscar.Compiladores2/src-gen/ufscar/compi...
[ "public final EObject entryRuleParameterTimeSignature() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleParameterTimeSignature = null;\n\n\n try {\n // ../ufscar.Compiladores2/src-gen/ufscar/compiladores2/parser/antlr/internal/InternalMusy.g:335:2: (iv_rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
new methods exposed Determine the configured ChaseOption.
public ChaseOption getChaseOption() { return chaseOption; }
[ "AnalysisOption getFoundOption();", "String getOption();", "public abstract String getCmdOption ( );", "int getOption();", "@Override\n\tpublic IKeyword option() { return option; }", "Option findOption(final String trigger);", "OPTION createOPTION();", "public Options getOptions();", "DhcpOption() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column STORE_ZHUANGCHECKD.BUMEN
public String getBumen() { return bumen; }
[ "public String getBunm() {\r\n return bunm;\r\n }", "public java.lang.Long getTglBerakhirOtomatisBuatJadwal() {\n return tgl_berakhir_otomatis_buat_jadwal;\n }", "public int getBMU() { return this._BMUindex; }", "public static String getBills(){\n return \"select * from current_bills\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXAnnotationElementValueOrCommaList" $ANTLR start "entryRuleXAnnotationElementValue" InternalDsl.g:3738:1: entryRuleXAnnotationElementValue returns [EObject current=null] : iv_ruleXAnnotationElementValue= ruleXAnnotationElementValue EOF ;
public final EObject entryRuleXAnnotationElementValue() throws RecognitionException { EObject current = null; EObject iv_ruleXAnnotationElementValue = null; try { // InternalDsl.g:3739:2: (iv_ruleXAnnotationElementValue= ruleXAnnotationElementValue EOF ) // InternalDsl...
[ "public final EObject entryRuleXAnnotationElementValueOrCommaList() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXAnnotationElementValueOrCommaList = null;\n\n\n try {\n // InternalDsl.g:3619:2: (iv_ruleXAnnotationElementValueOrCommaList= ruleXAnnotation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enable Virtual Memory address translation.
public void enableVirtualMemory() { ptbrReg = ps.addUnsigned ("PTBR", Integer.class, true); ptbr = ptbrReg.getNonClockedPort(); mem = is.memImp.getPort (new VirtualMemoryMMU()); }
[ "@Override\n public synchronized void setVramBase(int vrambase)\n {\n this.startAddress=vrambase;\n this.stopAddress=vrambase+getScreenSizeInBytes();\n }", "public void setUseVM(boolean useVM) {\r\n this.useVM = useVM;\r\n }", "public void set_mem_address(int mem_address) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the dailies from the api, and returns them as a ParsedDailyAchievements object that holds all the data of the current achievements
public static ParsedDailyAchievements getDailies() throws FailedHttpCallException { String result = null; Gson gson = new Gson(); String url = UrlBuilder.getDailyURL(); HttpGetRequest getRequest = new HttpGetRequest(); try { result = getRequest.execute(url).get(); ...
[ "private void getAllAchievements() {\n this.achievements = Constants.dbConnection.getAchievements();\n }", "List<Achievement> getAchievementsForUser(int userId);", "java.util.List<proto.Achievement> \n getAchievementsList();", "proto.Achievement getAchievements(int index);", "public static Ar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get bucket by name
@Nullable public Bucket getBucket(String name) throws Exception { List<Bucket> buckets = oss.listBuckets(); for (Bucket bucket : buckets) { if (bucket.getName().equals(name)) { return bucket; } } return null; }
[ "List<BucketEntity> getBucketsByName(String name);", "<V> RBucket<V> getBucket(String name, Codec codec);", "java.lang.String getBucket();", "public String getBucket();", "<V> RJsonBucket<V> getJsonBucket(String name, JsonCodec<V> codec);", "Map<String, Object> getBucket(String key);", "BucketEntity get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given two int values, return whichever value is larger. However if the two values have the same remainder when divided by 5, then the return the smaller value. However, in all cases, if the two values are the same, return 0. Note: the % "mod" operator computes the remainder, e.g. 7 % 5 is 2.
public int maxMod5(int a, int b) { if (a == b) return 0; return a % 5 == b % 5 ? Math.min(a, b) : Math.max(a, b); }
[ "public static int maxMod5(int a, int b) {\n if (a == b) {\n return 0;\n }\n if (a % 5 == b % 5) {\n if (a < b) {\n return a;\n } else {\n return b;\n }\n } else if (a > b) {\n return a;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isNull: Este metodo indica si el nodo que lo invoco es nulo
public boolean isNull(){ return false; }
[ "public boolean isNull() { return isNull; }", "public boolean isNull() {\n return this.data == null;\n }", "public boolean isNull() {\n return originalValue == null;\n }", "boolean isNullOmittable();", "private boolean isNull(Object anObject) {\n\t\tif(anObject == null) {\n\t\t\treturn t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Crear unha clase chamada mclase que implemente a interfaz serializable (implements Serializable). Dita clase debe ter tres atributos : unha variable String (nome) outra int (numero1) e outra double (numero2)
public static void main(String[] args) throws FileNotFoundException, IOException, ClassNotFoundException { MClase obx = new MClase("ola",-7,2.7E10); //Archivos de escritura FileOutputStream escribir = new FileOutputStream("/home/oracle/Desktop/Eje11/serial.txt"); ObjectO...
[ "public interface FaturacaoFilialI extends Serializable {\n /**\n * Devolve array de dados de faturação.\n * @return Array de dados.\n */\n FaturacaoMesI[] getFaturacaoFilial();\n\n /**\n * Altera array de dados de faturação.\n * @param f Array de dados novo.\n */\n void setFatur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Create on 20180606 Sub DateTime And Convert To ReportDay
public static int SubDateTimeAndConvertToReportDay(int amount, int calendarType) { // Create an instance of SimpleDateFormat used for formatting // the string representation of date (month/day/year) DateFormat df = new SimpleDateFormat("yyyyMMdd"); // Get the date today using Calend...
[ "public static int ConvertDateTimeToReportDay()\n {\n // Create an instance of SimpleDateFormat used for formatting\n // the string representation of date (month/day/year)\n DateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\n // Get the date today using Calendar object.\n D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes p(tag | previous tag) = the transmission probability. Requires that we've trained. Adds the possibility of backoff.
public Probability getSmoothedProbTagGivenPrevTag(int tag, int prevTag) { if(smoother.equals(SMOOTHING.oneCountSmoothing)) { if(debugMode) System.out.printf("backoff prob tag prev tag\np(%s | %s)\n", getTagFromKey(tag), getTagFromKey(prevTag)); // really small number for lambda -> 1e-100, or 1 // Probability ...
[ "public Probability getSmoothedProbWordGivenTag(int word, int tag) {\n\t\tif(smoother.equals(SMOOTHING.oneCountSmoothing)) {\n\t\t\tif(debugMode) System.out.printf(\"backoff prob word given tag\\np(%s | %s)\\n\", getWordFromKey(word), getTagFromKey(tag));\n\t\t\t// really small number for lambda -> 1e-100, or 1\n//...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Waits TextArea by text.
public static TextArea waitTextArea(Container cont, String text, boolean ce, boolean ccs, int index) { return(waitTextArea(cont, new TextAreaByTextFinder(text, new DefaultStringComparator(ce, ccs)), index)); }
[ "public static TextArea waitTextArea(Container cont, String text, boolean ce, boolean ccs) {\n\treturn(waitTextArea(cont, text, ce, ccs, 0));\n }", "public void waitForTextDisplay(final By by, final String text)\n {\n WebDriverWait myWait = new WebDriverWait(driver, DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to generate message used to sync filelists
public static Message generateSyncFileListMessage(Integer timeStamp, ProcessIdentifier syncMachine, SDFS sdfs) { SyncFilesListMessage.Builder syncFileListMessageBuilder = SyncFilesListMessage.newBuilder(); for(FileIdentifier fileIdentifier : sdfs.ge...
[ "private String createMessageText(boolean hasError) {\n\t\tif (hasError) {\n\t\t\treturn errorToSend;\n\t\t} else {\n\t\t\tStringBuilder fileString = new StringBuilder();\n\t\t\tString folderPrefix = \"\";\n\t\t\tString[] foldersToSend = folderNames.split(\", \");\n\t\t\tfor (String folderString : foldersToSend) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the condition data applying to this call.
public ConditionData getCondition() { if (this.condition == null) this.condition = new ConditionData(); return this.condition; }
[ "String getCondition();", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public Conditionable getCondition();", "public String getCondition() {\n return condition;\n }", "cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();", "Condition getCond();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the optional player name if present.
String getPlayerName();
[ "public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public String getPlayerName();", "public String getDisplayName ( ) {\n\t\treturn handleOptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the equivalent enum of the file
public static FileType valueOf(File file){ String fileName = file.getName().toUpperCase(); return FileType.valueOf(fileName.substring(fileName.lastIndexOf(".")+1)); }
[ "String getEnum();", "JEnumeration getCorrespondingEnum();", "MetaTypeRef getEnum_();", "public static TasklistEnum enumOf(String fileName) {\n\t\t\tfor (TasklistEnum enumType : TasklistEnum.values()) {\n\t\t\t\tif (enumType.filename.equals(fileName)) {\n\t\t\t\t\treturn enumType;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Package__ClassAssignment_4_3_1" $ANTLR start "rule__XClass__IsAbstractAssignment_1" InternalXModel.g:2685:1: rule__XClass__IsAbstractAssignment_1 : ( ( 'isAbstract' ) ) ;
public final void rule__XClass__IsAbstractAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXModel.g:2689:1: ( ( ( 'isAbstract' ) ) ) // InternalXModel.g:2690:2: ( ( 'isAbstract' ) ) { // InternalXM...
[ "public final void rule__XClass__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalXModel.g:739:1: ( ( ( rule__XClass__IsAbstractAssignment_1 )? ) )\n // InternalXModel.g:740:1: ( ( rule__XClass__IsAbstractAss...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the index of the word which has the lemma or 1 if not found.
public int indexOfWord(String lemma) { checkLemmaIsNotNull(lemma); for (int i = 0; i < words.size(); i++) { if (words.get(i).getLemma().equalsIgnoreCase(lemma)) { return i; } } return -1; }
[ "private int indexOf(String word) {\n\t\tfor (int i = 0; i < size; i++)\n\t\t\tif (word.equals(words[i]))\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}", "public abstract int getWordIx(CharSequence word);", "public int getOrAddIndex(W word);", "public int getIndex(String message, String word) {\n int current...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleAction" $ANTLR start "entryRuleOpenCSV" InternalCsv.g:129:1: entryRuleOpenCSV : ruleOpenCSV EOF ;
public final void entryRuleOpenCSV() throws RecognitionException { try { // InternalCsv.g:130:1: ( ruleOpenCSV EOF ) // InternalCsv.g:131:1: ruleOpenCSV EOF { if ( state.backtracking==0 ) { before(grammarAccess.getOpenCSVRule()); } ...
[ "public final void entryRuleAction() throws RecognitionException {\n try {\n // InternalCsv.g:105:1: ( ruleAction EOF )\n // InternalCsv.g:106:1: ruleAction EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getActionRule()); \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DEFINITION 1.12: For any M, N, x, define [N/x]M to be the result of substituting every free occurrence of variable x in M by N, and changing bound variables to avoid clashes. The precise definition is as follows: a) [N/x]x=N. b) [N/x]a=a. c) [N/x](PQ)=([N/x]P [N/x]Q). d) [N/x](x.P)=x.P. e) [N/x](y.P)=y.P (if x is not i...
public abstract void substitute(LambdaTerm N, Variable x);
[ "public abstract ASTTerm substitute(ASTVariable var, ASTTerm expr);", "@Override\r\n void findIdentifiersInLambda(List<SourceModification> identifierList, ArrayStack<String> boundVariablesStack, ParseTreeNode patternVarListNode, ParseTreeNode boundExprNode, ParseTreeNode optionalCALDocNodeForLetDefn) {\r\n\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for property userCell.
public String getUserCell() { return userCell; }
[ "protected Cell getCell() {\n\t\treturn cell;\n\t}", "public void setUserCell(String userCell) {\n\t\tthis.userCell = userCell;\n\t}", "public TableCell getCell() {\n return cell;\n }", "public int getCell(){ return cell; }", "public AwtCell getCell() {\r\n return this;\r\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to calculate the critical mass of a cell
int calculatecriticalmass(int x,int y){ if(x==0 && y==0 || x==9 && y==14 || x==9 && y==0 || x==0 && y==14) return 1; else if(x==0 || x==9 || y==0 || y==14) return 2; else return 3; }
[ "private double mass() {\n\t\tdouble bucketMass = 0;\n\t\tfor (var i=0; i<numBuckets; i++) {\n\t\t\tbucketMass += buckets[i].mass;\n\t\t}\n\t\treturn bucketMass + wheelMass;\n\t}", "public double getMass();", "public double molarMass(){\n double c = comp.getCarbon()* PhysicalProperties.MOLARMASS_C;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call .next on the current ToDoList object display that item
@FXML public void NextItemClicked(ActionEvent actionEvent) { List.nextItem(); DisplayList.setText(List.getItem()); }
[ "@Override\r\n\tpublic ToDo next() {\r\n\t\tif(this.hasNext()) {\r\n\t\t\treturn todos[position++];\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public ToDoItem getToDoItem() {\n return toDoItem;\n }", "public void nextItem() {\n results.editOrViewNextItem();\n onWalk(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the label of the received call.
private void initCallLabel(JLabel callLabel) { Iterator<? extends CallPeer> peersIter = incomingCall.getCallPeers(); boolean hasMorePeers = false; String text = ""; ImageIcon imageIcon = ImageUtils.getScaledRoundedIcon(ImageLoader .getImage(ImageLoader.D...
[ "private void initialiseLabels() {\n conjunctionLabel.setText(null);\n initialiseRequirementIndexLabel();\n initialiseOrLabel();\n }", "public LLabel() {\n this(\"\");\n }", "private void initLabel()\r\n\t{\r\n\t\tif (!initializedPoint)\r\n\t\t{\r\n\t\t\tthrow new NullPointerEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tells this SpellCorrector to use the given file as its dictionary for generating suggestions.
public void useDictionary(String dictionaryFileName) throws IOException { dictionary = new Trie(); File file = new File(dictionaryFileName); Scanner scanner = new Scanner(file); while (scanner.hasNext()) { String word = scanner.next(); dictionary.add(word); } scanner.clo...
[ "public static void readFile() throws IOException{\n\t\t\n\t\tMisspelled = new QuadraticProbingHashTable <String>(); //initializing hashTable\n\t\tRepeated = new QuadraticProbingHashTable <String>(); //initializing hashTable\n\t\tSystem.out.println(\"Please enter a file to spell check>> \");\n\t\tScanner scan = new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The primary impact that this recommendation can have while trying to optimize for one category. .google.cloud.recommender.v1.Impact primary_impact = 5;
@java.lang.Override public com.google.cloud.recommender.v1.ImpactOrBuilder getPrimaryImpactOrBuilder() { return primaryImpact_ == null ? com.google.cloud.recommender.v1.Impact.getDefaultInstance() : primaryImpact_; }
[ "@java.lang.Override\n public com.google.cloud.recommender.v1.Impact getPrimaryImpact() {\n return primaryImpact_ == null\n ? com.google.cloud.recommender.v1.Impact.getDefaultInstance()\n : primaryImpact_;\n }", "public com.google.cloud.recommender.v1.Impact getPrimaryImpact() {\n if (prim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "durationToWaitForStartSimulationDirectiveMSecs" attribute
org.apache.xmlbeans.XmlLong xgetDurationToWaitForStartSimulationDirectiveMSecs();
[ "long getDurationToWaitForStartSimulationDirectiveMSecs();", "org.apache.xmlbeans.XmlLong xgetDurationToWaitForJoinSimulationResponseMSecs();", "void setDurationToWaitForStartSimulationDirectiveMSecs(long durationToWaitForStartSimulationDirectiveMSecs);", "void xsetDurationToWaitForStartSimulationDirectiveMSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parcourt le dossier passe en parametre et le nom de l'image de la on capture chaque pixel puis on le met en niveau de gris puis on le simplifie de facon qu'il sois entre (1 et 1) puis en stock chaque pixel d'une image dans le tableau de pixel apres avoir parcouru touts les pixels d'une image on stock se tableau dans la...
protected static void capture_pixel(String repertoir, String nom, ArrayList <CodeNumber> codepixel) throws ConversionException { float [] pixel; pixel = chiffrer_image(repertoir + "/" + nom); CodeNumber leCode = new CodeNumber(256); try { leCode.setNombre(Integer.parseInt(nom.charAt(0) + "")); } catch (Num...
[ "public void pasarImagenGris() {\n\t\tColor colorRGB;\n\t\tint colorGris;\n\t\tmatrizPixelesGris = new ArrayList<ArrayList<Integer>>();\n\t\tfor (int i = 0; i < imagen.getWidth(); i++) {\n\t\t\tmatrizPixelesGris.add(new ArrayList<Integer>());\n\t\t\tfor (int j = 0; j < imagen.getHeight(); j++) {\n\t\t\t\tcolorRGB =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract the two tickers from a string with the format "TICKER1 for TICKER2"
public static String[] splitTickers(String exchangeName){ String[] a = exchangeName.split(" "); String[] b = new String[2]; b[0] = a[0]; b[1] = a[2]; return b; }
[ "Ticker getTicker(String pair) throws IOException;", "java.lang.String getTicker();", "String getTickerName(int num);", "private static String[] extractSetOfTokensToMatch(String hintentry) throws ParseException{\n\t\tString[] both = hintentry.split(\":\");\n\t\tif (both.length>2){\n\t\t\tlogger.warn(\"Incorre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string user_nm = 2;
java.lang.String getUserNm();
[ "public Builder setUserNm(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n userNm_ = value;\n onChanged();\n return this;\n }", "String getUsernameParam();", "void setUserCreate(java.lang.Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
populate list of reports
private void populateReports() { Vector<IReport> reports = new Vector<IReport>(); reports.add(new AccountsReport()); reports.add(new BalloonSummaryReport()); reports.add(new EventFeedReport()); reports.add(new EventFeed2013Report()); reports.add(new NotificationsReport(...
[ "public List<Report> getReports();", "@Override\r\n public List<Report> getAllReports() {\r\n List<Report> reportList = reportDAO.findAll();\r\n if(reportList == null){\r\n reportList = new ArrayList<Report>();\r\n }\r\n return reportList;\r\n }", "public List<Report...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encrypt the signed XML payload document.
public static Document encryptSignedXmlPayloadDoc(Document signedXmlDoc, PublicKey publicEncryptKey) throws XMLEncryptionException, HandlerException { String jceAlgorithmName = "DESede"; Key symmetricKey; try { KeyGenerator keyGenerator = KeyGenerator.getInstance(jceAlgorithmName); symme...
[ "public String signAndEncryptXmlForCiti(String payloadXml)\n throws XMLSecurityException, HandlerException {\n Document payloadDoc = convertXmlStrToDoc(payloadXml);\n PrivateKey clientPrivateKey = isPROD\n ? getClientPrivateKey(KEYSTORE_ALIAS_PROD, KEYSTORE_PASSWORD_PROD)\n : getClientPriva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test a variation for a modification combination with nonterminal modifications; the number of modifications is less than the number of AA that can be affected by the modifications.
@Test public void testGenerateVariations_3() throws UnknownAAException { Peptide peptide = new Peptide(1, 1356, new AminoAcidSequence("AKEYNNYKYEKNAK")); Set<ModificationCombination> modificationCombinations = new HashSet<ModificationCombination>(); ModificationCombination modification...
[ "@Test\r\n public void testGenerateVariations_2() throws UnknownAAException {\r\n Peptide peptide = new Peptide(1, 1356, new AminoAcidSequence(\"AKEYNNYKYEKNAK\"));\r\n\r\n Set<ModificationCombination> modificationCombinations = new HashSet<ModificationCombination>();\r\n ModificationCombina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a maze from a table of cells.
public Maze(Cell[][] cells, Point start, Point end) { this.height = cells.length; this.width = cells[0].length; this.data = cells; this.start = start; this.end = end; }
[ "public void buildMazeGrid (){\n int id = 0;\n gridMaze = new Cell[this.width][this.height];\n for(int i = 0; i < height; i++){\n for(int j = 0; j < width; j++){\n gridMaze[j][i] = new Cell(id);\n id++;\n }\n }\n }", "public void m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get Hotel Contract List Count according to conditions
public int getHotelContractListCount(Map conditions);
[ "public int getHotelListCount(Map conditions);", "public int getTravelGroupListCount(Map conditions);", "int getCountForConditionCompany(Long companyId);", "public int count(String neighbourhood, int lowerPrice , int upperPrice)\n {\n int count=0;\n AirbnbDataLoader loader = new AirbnbDataLoade...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieves all local commits that do not yet exist on the remotetracking branch of the current branch
@NonNull List<ICommit> getUnPushedCommits() throws AditoGitException;
[ "public List<Commit> getAllCommits(Project project, String branchName);", "@NotNull\n public Collection<String> getCommonTrackingBranches(@NotNull String remoteBranch) {\n Collection<String> trackingBranches = null;\n for (GitRepository repository : myRepositories) {\n Collection<String> tb = getTrack...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
METHOD: executeRun Purpose: allows the named subject to execute some arbitrary private code. It has no access to any of the state objects, and so should be irrelevant to the security of the system. It models whatever processing the subject may do with the value it has just read.
public void executeRun(String subjectName) { SecureSubject sub = null; SecureObject obj = null; int subLevel = 0; boolean subjectExists = false; int mask = 0; // in the case of subject Lyle executing the run operation if(subjectName.equalsIgnoreCase("Lyle")){ // check if subject exists for(Secure...
[ "public IState execute();", "public static Object executeExpression(final Object compiledExpression, final Object ctx) {\n return ((ExecutableStatement) compiledExpression).getValue(ctx, null);\n }", "ProgramState execute(ProgramState state) ;", "public abstract void executeUnit();", "void execu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From an object of type PathItem, extract all the operations and covert them in a list of OperationInfo objects.
private static List<OperationInfo> createRestGenOperations(String path, PathItem pathItem, Map<String, Method> swaggerCodegenMethods, Map<String, CodegenOperation> swaggerCodegenOperations) { List<OperationInfo> operations = new ArrayList<>(); HashMap<HTTPMethod, Operation> httpMethodOperationMap = new...
[ "ListIterable<Operation<Handler>> getOperations();", "public List<OperationHolder> getAllOperations();", "public ArrayList<Operation> getOperations(String view, String xpath) throws JDOMException {\n\t\tString dsid = getDSIDfromXPath(xpath);\n\t\tString varid = getVarIDfromXPath(xpath);\n\t\treturn getOperation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDEAL_PROMISSORY_FX.RIPS_STRUCT_DEAL_NUMBER
public void setRIPS_STRUCT_DEAL_NUMBER(BigDecimal RIPS_STRUCT_DEAL_NUMBER) { this.RIPS_STRUCT_DEAL_NUMBER = RIPS_STRUCT_DEAL_NUMBER; }
[ "public BigDecimal getRIPS_STRUCT_DEAL_NUMBER()\r\n {\r\n\treturn RIPS_STRUCT_DEAL_NUMBER;\r\n }", "public void setRIPS_STRUCT_CHART_NUMBER(BigDecimal RIPS_STRUCT_CHART_NUMBER)\r\n {\r\n\tthis.RIPS_STRUCT_CHART_NUMBER = RIPS_STRUCT_CHART_NUMBER;\r\n }", "public void setLINKED_DEAL_NO(BigDecimal LINK...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "timestamp" element
public void unsetTimestamp() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(TIMESTAMP$8, 0); } }
[ "public void unsetTimestamp()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(TIMESTAMP$28);\n }\n }", "public void unsetTimeStamp()\r\n {\r\n synchronized (monitor())\r\n {\r\n check...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests_SRS_IOTHUBSSLCONTEXT_34_018: [This constructor shall generate a temporary password to protect the created keystore holding the private key.] Tests_SRS_IOTHUBSSLCONTEXT_34_019: [The constructor shall create default SSL context for TLSv1.2.] Tests_SRS_IOTHUBSSLCONTEXT_34_020: [The constructor shall create a keystor...
@Test public void constructorWithCertAndKeySuccess() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, CertificateException, UnrecoverableKeyException { //arrange final String publicKeyCert = "someCert"; final String privateKey = "someKe...
[ "@Test\n public void constructorCreatesSSLContext() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, CertificateException\n {\n //arrange\n testCollection.add(mockedCertificate);\n generateSSLContextExpectations();\n\n //act\n\n IotHub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Model tests for ComAdobeCqHistoryImplHistoryServiceImplProperties
@Test public void testComAdobeCqHistoryImplHistoryServiceImplProperties() { // TODO: test ComAdobeCqHistoryImplHistoryServiceImplProperties }
[ "@Test\n public void testComDayCqReportingImplConfigServiceImplProperties() {\n // TODO: test ComDayCqReportingImplConfigServiceImplProperties\n }", "@Test\n public void historyMetadataTest() {\n // TODO: test historyMetadata\n }", "@Test\n public void testComDayCqDamCoreImplUiPrevi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate bitlength of contents of the first len elements an int array, assuming there are no leading zero ints.
private static int bitLength(int[] val, int len) { if (len == 0) return 0; return ((len - 1) << 5) + bitLengthForInt(val[0]); }
[ "public static int IntArraySize(int length) { //int[]'s are serialised in the form 'int[] length, ints'\n return Integer.BYTES + (Integer.BYTES * length); //Return the size of an int[] of length 'length'.\n }", "static int bitLengthForInt(int n) {\n return 32 - Integer.numberOfLeadingZeros(n);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of HexBinarySG.
public HexBinarySG(SGFactory pFactory, SchemaSG pSchema, XSType pType) throws SAXException { super(pFactory, pSchema, pType); }
[ "Binary createBinary();", "public Binary() {\n }", "public HexGame() {\n /* FIXME */\n }", "public FBinPacking(){}", "public wsihash create(long wsihashId);", "@Test\n public void testHexStringConstructor() {\n LOGGER.info(\"hex string constructor\");\n final String hexString = instance....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A string entry in a player queue.
public QueueEntry(String playerName, String string) { this(playerName, string, null, EntryType.STRING); }
[ "public void addPlayer(String name) {\n if (!queue.contains(name)) queue.add(name);\n }", "@Test\n void testCanGetElementFromSingleQueue() {\n IQueue queue = new StringQueue(10);\n queue.offer(\"hello\");\n assertEquals(\"hello\", queue.element());\n assertEquals(\"hello\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the metadata fetch operation against the target repositories of the provided source repository. If the metadata is found, it is downloaded and placed into the source repository filesystem.
ProxyFetchResult fetchMetadataFromProxies( ManagedRepository repository, String logicalPath );
[ "protected abstract Repository resolveRepository(String path, String url) throws IOException;", "private void prepareSourceRepos() {\n \t\tif (sourceRepos == null || sourceRepos.isEmpty())\n \t\t\treturn;\n \t\tfor (Iterator iter = sourceRepos.iterator(); iter.hasNext();) {\n \t\t\tObject next = iter.next();\n \t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reads the file and creates a hashmap based on it.
private void readFile(){ //path to the file with the protein id's and the conversion factors. Path file = Paths.get("C:\\Users\\Rutger\\Desktop\\conversionfactors.txt"); Charset charset = Charset.forName("US-ASCII"); try(BufferedReader reader = Files.newBufferedReader(file, charset)...
[ "public HashMap<String, String> loadDictionary() {\n\t\t// Reading line by line from buffered reader\n\t\t// Adapted from\n\t\t// https://stackoverflow.com/questions/17678862/reading-lines-with-bufferedreader-and-checking-for-end-of-file\n\t\ttry {\n\t\t\t// initiate the file\n\t\t\tFile f = new File(fileName);\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return list of statements where variable is assigned in a "for" loop declaration
public ArrayList assignmentInFor(String what) { ArrayList assignInFor = new ArrayList(); HashMap whereaboutsMap = (HashMap) analysedMap.get(what); Set statementSet = whereaboutsMap.keySet(); Iterator it = statementSet.iterator(); while (it.hasNext()) { String st...
[ "public ArrayList assignmentInForEach(String what) {\r\n ArrayList assignInForEach = new ArrayList();\r\n HashMap whereaboutsMap = (HashMap) analysedMap.get(what);\r\n Set statementSet = whereaboutsMap.keySet();\r\n Iterator it = statementSet.iterator();\r\n while (it.hasNext()) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encode une chaine de caracteres en hexa.
public static String hexaEncode(String str) { char[] chars = str.toCharArray(); StringBuilder strBuilder = new StringBuilder(); for (int i = 0; i < chars.length; i++) { strBuilder.append(Integer.toHexString(chars[i])); } return strBuilder.toString(); }
[ "public String encodeHex(String hexa) {\n if (!hexa.matches(\"^[0-9a-fA-F]+$\")) {\n return \"\";\n }\n\n final List<Long> matched = new ArrayList<Long>();\n final Matcher matcher = WORD_PATTERN.matcher(hexa);\n\n while (matcher.find()) {\n matched.add(Long.parseLong('1' + matcher.group(), ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Listen for message from simulation engine.
public FrameworkMessage listenForMessageFromSimulationEngine( final SYSTEM_TYPE targetSystemType, final String clientID) { return commonMessagingImplementationAPI.listenForMessageFromSimulationEngine( targetSystemType, clientID); }
[ "void onMessageReceived(Message message);", "public SimMessage receive();", "void systemMessageReceived(IMSession session, Message message);", "private void listenForMessages ()\r\n\t{\n\t\t\r\n\t\tclient.getEventDispatcher().on(MessageCreateEvent.class)\r\n\t // subscribe is like block, in that it will *r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("Handle subEvents up to last line.");
private void handleSubEventsUpToCurrentLine() { int curLine = currentLinePosition; currentSLPosition -= 1; skipToNextEvent(); currentLinePosition = curLine; for (int i = 0; i <= currentLinePosition; i++) { handleSubEvent(currentSubEvents.get(i)); } rep...
[ "public void newLine(NewLineEvent e);", "protected abstract OutputEvent getNextOutputEvent();", "@Override\n\t\tpublic synchronized void SubGHzEvent(SubGHzEventObject evt){\n\t\t\tif(evt.getEventType() == SubGHzEventObject.DATA_AVAILABLE){\n\t\t\t\tString inputLine;\n\t\t\t\ttry {\n\t\t\t\t\tinputLine=input.rea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
validates if a String is a valid NHS number expects NHS numbers without any delimiters or spacers (NNNNNNNNNN) returns null if empty, true if valid, false if not valid
public static Boolean isValidNhsNumber(String toTest) { if (Strings.isNullOrEmpty(toTest)) { return null; } if (toTest.length() != 10) { return Boolean.FALSE; } int sum = 0; char[] chars = toTest.toCharArray(); for (int i=0; i<9; i++) { ...
[ "protected void validateNHS() {\r\n patientNHSNumber = nhs.getText().toString();\r\n\r\n if (!patientNHSNumber.matches(\"^\\\\d{10}$\")) {\r\n nhs.setError(getString(R.string.incorrect_nhs_format));\r\n } else {\r\n showLoadingScreen(true);\r\n task = new Patien...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adjust the height of tracks so that all tracks fit in the available height of the panel. This is not possible in all cases as the minimum height for tracks is respected.
private boolean fitTracksToPanel(DataPanelContainer dataPanel) { boolean success = true; int availableHeight = dataPanel.getVisibleHeight(); int visibleTrackCount = 0; // Process data tracks first Collection<TrackGroup> groups = dataPanel.getTrackGroups(); // Count v...
[ "public void updateHeight() {\n Rectangle repaintBounds = getBounds();\n parent.getScene().paintImmediately(repaintBounds);\n\n // set new height compute while repainting.\n setBounds(new Rectangle(bounds));\n\n parent.getScene().repaint(repaintBounds);\n setChanged();\n notifyObservers();\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }