query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Retrieves the set of action types with the specified system tags.
@GET @Path("/actions/systemTags/{tags}") public Collection<RESTActionType> getActionTypeBySystemTag(@PathParam("tags") String tags, @HeaderParam("Accept-Language") String language) { String[] tagsArray = tags.split(","); Set<ActionType> results = new LinkedHashSet<>(); for (String tag : ...
[ "@GET\n @Path(\"/conditions/systemTags/{tags}\")\n public Collection<RESTConditionType> getConditionTypesBySystemTag(@PathParam(\"tags\") String tags, @HeaderParam(\"Accept-Language\") String language) {\n String[] tagsArray = tags.split(\",\");\n Set<ConditionType> results = new LinkedHashSet<>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of Add method, of class MathOp.
public void testAdd() { System.out.println("Add"); Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E300, -1.1E300}, {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E300, -1.1E300}, {-6., 0., -1., 0., 2....
[ "@Test\n public void testAdd() {\n System.out.println(\"testing add\");\n Arithmetic arithmetic = new Arithmetic(); \n \n assertEquals(\"unexpected result of addition\", 8, arithmetic.add(3,5));\n assertEquals(\"unexpected result of addition\", 6, arithmetic.add(0,6));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: Tests that the advancedSearch returns valid SearchResponse records when refined by certification criteria Expected Result: Completes without error and returns some SearchResponse records
@Transactional @Test public void test_advancedSearch_refineByCertificationCriteria_CompletesWithoutError() throws EntityRetrievalException, JsonProcessingException, EntityCreationException, InvalidArgumentsException { SearchRequest searchFilters = new SearchRequest(); List<String> certificationCriteria = n...
[ "@Transactional\n\t@Test\n\tpublic void test_advancedSearch_refineByCertificationCriteriaAndCqms_CompletesWithoutError() \n\t\t\tthrows EntityRetrievalException, JsonProcessingException, EntityCreationException,\n\t\t\tInvalidArgumentsException {\n\t\tSecurityContextHolder.getContext().setAuthentication(adminUser);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete metadata for an item, used for modify param: itemid, label, agentId
public void deleteItemMetaData(Long itemId, String label, String agentId);
[ "void rawDelete(Context context, Item item) throws SQLException, AuthorizeException, IOException\n {\n // Check authorisation here. If we don't, it may happen that we remove the\n // metadata but when getting to the point of removing the bundles we get an exception\n // leaving the database ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the Symbol for the specified name if known, treating the name as caseinsensitive. If there is a parent symbol table then looks up in that after if not found here (unless the name is "this").
public Symbol getSymbolIgnoreCase(String name) { Iterator<Map.Entry<String, Symbol>> iter = symbols.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, Symbol> symbolEntry = iter.next(); String key = symbolEntry.getKey(); if (key.equal...
[ "public Symbol getSymbol(String name)\r\n {\r\n if (symbols.containsKey(name))\r\n {\r\n return symbols.get(name);\r\n }\r\n if (parentSymbolTable != null && !name.equals(\"this\"))\r\n {\r\n return parentSymbolTable.getSymbol(name);\r\n }\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops stamina update task.
public void stopUpdateStaminaTask() { // IF BLOCKING // Check for existing task and cancel it. if (_blockGaugeUpdateTask != null && !_blockGaugeUpdateTask.isDone()) _blockGaugeUpdateTask.cancel(true); updateClientStunGauge(GaugeExecutionType.DISPLAY); }
[ "public void safeStop() {\r\n isRunning = false;\r\n TMSWorker.getTaskMap().remove(String.valueOf(taskpo.getId()));\r\n }", "public void stopMTS() {\n\t\t//\n\t}", "public void stopTask() {\r\n\t\tquit = true;\r\n\t}", "public void stopTask() {\n\t\tquit = true;\n\t}", "public void stopThre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the information from the given OngoingActivityData into the notification builder and build the notification.
@RestrictTo(RestrictTo.Scope.LIBRARY) @NonNull static Notification extendAndBuild(@NonNull NotificationCompat.Builder builder, @NonNull OngoingActivityData data) { Notification notification = extend(builder, data).build(); // TODO(http://b/169394642): Undo this if/when the bug is fix...
[ "@RestrictTo(RestrictTo.Scope.LIBRARY)\n @NonNull\n static NotificationCompat.Builder extend(@NonNull NotificationCompat.Builder builder,\n @NonNull OngoingActivityData data) {\n ParcelUtils.putVersionedParcelable(builder.getExtras(), EXTRA_ONGOING_ACTIVITY,\n data);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Abfrage ob der KeyProvider null ist oder nicht.
public static ProvidesKey<Nutzer> getKeyProvider() { if (KEY_PROVIDER != null) { return KEY_PROVIDER; } else { return null; } }
[ "Optional<String> keyManagerFactoryProvider();", "boolean isSetCryptProvider();", "@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }", "public boolean requiresKey()\n {\n return getKey() != null;\n }", "@Test\n public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows the string value of the Node in question to be extracted as a String. Additionally, the string is formatted to remove any unwanted default characters. E.g: if a Node is displayed in XML as 13, then this method will extract the "13" from the Node as a String
public String extractStringFromNode(Node node) { Node content = node.getChildNodes().item(0); //the child Node of the node in question. This is what holds the data String value = content.toString(); //converts it to a string value = value.substring(8, value.length() - 1); //formats to only the required character...
[ "private String getNodeValue(Node node) {\r\n\t\tif (node==null)\r\n\t\t\treturn \"\";\r\n\t\tNode subnode = node.getFirstChild();\r\n\t\tif (subnode == null)\r\n\t\t\treturn \"\";\r\n\t\tString string = subnode.getNodeValue();\r\n\t\tif (string == null)\r\n\t\t\treturn \"\";\r\n\t\treturn string;\r\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate credentials and go to next screen if correct
public void validate() { // Go to next screen if valid user id and password if (checkPassword()) { String message = userIdTextView.getText().toString(); Intent intent = new Intent(this, Main2Activity.class); intent.putExtra(EXTRA_MESSAGE, message); startA...
[ "private void validate(String userName, String userPassword){\n if((userName.equals(\"admin\")) && (userPassword.equals(\"1234\"))){\n Intent i = new Intent(MainActivity.this, Nextpage.class);\n startActivity(i);\n }else {\n counter--;\n Info.setText(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the allowVirtualNetworkAccess property: Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
public Boolean allowVirtualNetworkAccess() { return this.innerProperties() == null ? null : this.innerProperties().allowVirtualNetworkAccess(); }
[ "public Boolean isRemoteAccessAllowed() {\n return this.remoteAccessAllowed;\n }", "public Boolean allowPublicAccessWhenBehindVnet() {\n return this.allowPublicAccessWhenBehindVnet;\n }", "public VirtualNetworkPeeringInner withAllowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the chart width.
public DJPieChartBuilder setWidth(int width) { this.chart.getOptions().setWidth(width); return this; }
[ "public void setWidth(int value) { width = value; }", "public void setBarWidth(double width) {\n this.barWidth = width;\n }", "public void setWidth(int w) { fWidth = w; }", "public void setWidth( int w );", "void setWidth(int width);", "private void setWidth( int w )\n {\n this.width =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bash commands Creates bash command. The command returns the age of the most recently modified file as the number of seconds (note that it's not in miliseconds!) form the epoch
private static String mkFindYoungestModificationTimestampSecCommand(final String path, final String findExec) { return findExec + " " + path + " -printf \"%T@\\\\n\" | sort -n | head -1 "; }
[ "long getLastModifyTime();", "long getLastModifiedTime() throws FileSystemException;", "long getCreationTime(String path) throws IOException;", "private static String mkListByOldestModifiedCommand(final String directoryPath)\n {\n // -A: show all entries except of . and ..\n // -1: show one e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that accepts a StoreData, parent frame, and the number of events that don't exist...
EmptyDay(StoreData viewData, final JFrame parent, int numOfEvents){ layout = new GridBagLayout(); GridBagConstraints con = new GridBagConstraints(); scroll = new JScrollPane(masterPane); masterPane.setLayout(layout); this.add(scroll, BorderLayout.CENTER); // Listener for button that sends user back to week...
[ "public ArrayStore(int size) { \n super(size);\n }", "public Event(double time, EventStore store) {\r\n\t\tthis.time = time;\r\n\t\tthis.store = store;\r\n\r\n\t}", "public SimulatorEvent( long timestamp ) {\r\n // Store the timestamp\r\n this.timestamp = timestamp;\r\n // Set the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if default route is set
public boolean isDefaultRouteSet() { return mDefaultRouteSet.get(); }
[ "private boolean verifyRoute(RouteMeta meta) {\n String path = meta.getPath();\n\n if (path == null || !path.startsWith(\"/\")) { // The path must be start with '/' and not empty!\n return false;\n }\n if (meta.getGroup() != null) { // Use default group(the first word in pat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//GENEND:|179getter|2| //GENBEGIN:|182getter|0|182preInit Returns an initiliazed instance of backCommand8 component.
public Command getBackCommand8() { if (backCommand8 == null) {//GEN-END:|182-getter|0|182-preInit // write pre-init user code here backCommand8 = new Command("Back", Command.BACK, 0);//GEN-LINE:|182-getter|1|182-postInit // write post-init user code here }//GEN-BEGIN:|182...
[ "public Command getBackCommand1 () {\nif (backCommand1 == null) {//GEN-END:|39-getter|0|39-preInit\n // write pre-init user code here\nbackCommand1 = new Command (\"Back\", Command.BACK, 0);//GEN-LINE:|39-getter|1|39-postInit\n // write post-init user code here\n}//GEN-BEGIN:|39-getter|2|\nreturn backCommand1;\n}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
In this case, a previous request to the token endpoint returned an ID token. If this is sent to this endpoint, we are to check that there is an active logon for the user (=there is a transaction for that name here) and return a success but no body. Otherwise, we throw an exception.
protected boolean CheckIdTokenHint(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String callback) { if (!httpServletRequest.getParameterMap().containsKey(ID_TOKEN_HINT)) { return false; } UsernameFindable ufStore = null; String rawIDToken = S...
[ "@Override\n public boolean isActiveTenantExistent(Long userId, Long tenantId) throws SystemException {\n try {\n return isActiveTenantExistentRequester(userId, tenantId);\n } catch (TokenExpiredException expiredException) {\n refreshToken();\n try{\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Decrement the hop by 1
public void decrementHops() { this.hopCount--; }
[ "public int decrement(){\n\t\treturn set(get()-1);\n\t}", "public void decrement() {\r\n\t\tcurrentSheeps--;\r\n\t}", "public void backward(int numSteps);", "public void decrement(){\n\t\tlength--;\n\t}", "public DebouncedFlowControl decrementBacklog()\n {\n return adjustBacklog(-1);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for abstract nodes which are used as cursors for navigating data structures (e.g., lists and trees). A position stores an element.
public interface Position<E> { /** * Returns the element contained in the node * @return the element contained in the node */ public E element(); }
[ "public interface Position {\n\n\t\t/**\n\t\t * Returns the value stored at this position.\n\t\t * \n\t\t * @return the value stored at this position.\n\t\t */\n\t\tComparable getValue();\n\t}", "public interface PositionalList<Element> {\n\n /** Returns the number of elements in the list. */\n int size();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is arrow displayed.
@Override public boolean isArrowDisplayed(String arrow) { setLogString("Check " + arrow + " Arrow is displayed", true, CustomLogLevel.HIGH); if (arrow.equalsIgnoreCase("Left")) { return isDisplayed(getDriver(), By.className(BACKWARD_ICON), TINY_TIMEOUT); } else if (arrow.equalsI...
[ "public boolean isShowArrow() {\r\n\t\treturn showArrow;\r\n\t}", "@Override\n public boolean isArrowNotDisplayed(String arrow) {\n\n setLogString(\"Check \" + arrow + \" Arrow is not displayed\", true, CustomLogLevel.HIGH);\n if (arrow.equalsIgnoreCase(\"Left\")) {\n return isDisplaye...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a service description for registrating with JmDNS. The properties hashtable must map property names to either Strings or byte arrays describing the property values.
public ServiceInfo(String type, String name, int port, int weight, int priority, Hashtable props) { this(type, name, port, weight, priority, new byte[0]); if (props != null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(256); ...
[ "private String getServiceProperties(Properties properties) {\n String s = \"<ul>\";\n Enumeration<Object> e = properties.keys();\n while (e.hasMoreElements()) {\n String key = (String) e.nextElement();\n String value = properties.get(key).toString();\n s += \"<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the payment information.
void setPaymentInformation(String information);
[ "public void setPayment(double payment) {\n this.payment = payment;\n }", "public void setPaymentInfo(com.turkcelltech.cpgw.ws.PaymentInfo paymentInfo) {\n this.paymentInfo = paymentInfo;\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public void setPayment(BigDecimal paymen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the documentation of the whole wsdl
public String getServiceDocumentation() { Element el = wsdlObject.getDocumentationElement(); if (el == null) return ""; return el.getTextContent(); }
[ "public interface WSDLDocInterface extends XSDDocInterface {\r\n\r\n\t/**\r\n\t * Gets the all wsdl operations.\r\n\t *\r\n\t * @return the all operations\r\n\t */\r\n\tpublic List<OperationHolder> getAllOperations();\r\n\t\r\n\t/**\r\n\t * Gets the service name.\r\n\t *\r\n\t * @return the service name\r\n\t */\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A copy constructor that creates a deep copy of the given AvlTree.
public AvlTree(AvlTree tree){ }
[ "public Object clone()\r\n {\r\n AVLTree<T> copy = null;\r\n\r\n try\r\n {\r\n copy = (AVLTree<T>) super.clone();\r\n\r\n }\r\n catch (CloneNotSupportedException e)\r\n {\r\n return null;\r\n }\r\n\r\n if (root != null)\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
buildFixed Returns a FixedPuckemon.
private FixedPuckemon buildFixed(int id, int level){ List<Object> data = excelReader.getExcelData(id); return new FixedPuckemon(id,level,(String)data.get(0), dissectListTypes((String)data.get(1)),(int) data.get(2),(int)data.get(3) ,(int)data.get(4),(int)data.get(5),dissectList((String)da...
[ "Fixed createFixed();", "interface FixedPointNumberBuilder extends Builder<HDF5FixedPointNumber, FixedPointNumberBuilder> {\n FixedPointNumberBuilder withByteOrder(HDF5ByteOrder hdf5ByteOrder);\n\n FixedPointNumberBuilder withLoPadBit(int loPadBit);\n\n FixedPointNumberBuilder withHiPadBit(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the contents of the EAR code pane.
public String getEARCode() { return mEARTextPane.getText(); }
[ "public CodePane getEARTextPane() {\n return mEARTextPane;\n }", "public String screenContents() {\r\n return frame.contents() ;\r\n }", "public String getContents () {\n return contents;\n }", "@Override\n public String getAssembly() {\n return assemblyView.getText();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'avatar_url' field.
public java.lang.CharSequence getAvatarUrl() { return avatar_url; }
[ "public String getAvatar_url() {\r\n return avatar_url;\r\n }", "public java.lang.CharSequence getAvatarUrl() {\n return avatar_url;\n }", "String getAvatarUrl();", "Uri getAvatarUrl();", "public String getAvatar()\n\t{\n\t\treturn this.avatar;\n\t}", "public String getAvatar() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update view pager when query finishes
public void updateViewPager (){ if (bf.pager != null) bf.pager.getAdapter().notifyDataSetChanged(); }
[ "protected void updatePager(VdbResultSetBean data) {\n int numPages = ((int) (data.getTotalResults() / data.getItemsPerPage())) + (data.getTotalResults() % data.getItemsPerPage() == 0 ? 0 : 1);\n int thisPage = (data.getStartIndex() / data.getItemsPerPage()) + 1;\n \n long totalResults =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
3 7vf9jtj9i8rg0cxrstbqswuck static void loadtriangle(pointnlink_t pnlap, pointnlink_t pnlbp, pointnlink_t pnlcp)
@Unused @Original(version="2.38.0", path="lib/pathplan/shortest.c", name="loadtriangle", key="7vf9jtj9i8rg0cxrstbqswuck", definition="static void loadtriangle(pointnlink_t * pnlap, pointnlink_t * pnlbp, pointnlink_t * pnlcp)") public static void loadtriangle(__ptr__ pnlap, __ptr__ pnlbp, __ptr__ pnlcp) { ENTERING("...
[ "@Unused\n@Original(version=\"2.38.0\", path=\"lib/pathplan/shortest.c\", name=\"triangulate\", key=\"73cr7m3mqvtuotpzrmaw2y8zm\", definition=\"static void triangulate(pointnlink_t ** pnlps, int pnln)\")\npublic static void triangulate(ST_pointnlink_t pnlps[], int pnln) {\nENTERING(\"73cr7m3mqvtuotpzrmaw2y8zm\",\"t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an Actor who has the given Monsters.
public Actor(String name, String face, List<Monster> monsters) { this.name = name; this.face = face; this.monsters = monsters; }
[ "Actor createActor();", "public void createActors() {\n for (int i = 0; i < NUM_PLAYERS; i++)\n actors[i] = new Actor();\n }", "private void addAndCreateMonster() {\n int roll;\n Monster monster = new Monster();\n roll = rand.nextInt(100) + 1;\n monster.setType(r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks whether or not there are double values in the given list of sorting entries. If so, adds a zero width whitespace to it, so that they won't be identical. (BarChart will draw them over one another otherwise)
public static ArrayList<SortingEntry> checkForDoubles(ArrayList<SortingEntry> list){ for(int i = 0; i < list.size(); i++){ int count = 1; for(int j = 0; j < list.size(); j++){ if(list.get(i).getValue().equals(list.get(j).getValue()) && i != j){ Sortin...
[ "public void insertionNumberSortDouble()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Double.parseDouble(AL.get(possibleIndex - 1).toString()) < Double.parseDouble(temp.toString()))\n\t\t {\n\t\t\t AL.set(po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the user system property for connection persistence
public static void setRepositoryPersistenceUser(String user) { System.setProperty(REPOSITORY_PERSISTENCE_CONNECTION_USERNAME, user); }
[ "public void setUser(String dbms, String user) {\n properties.setProperty(\"user\" + dbms, user);\n }", "public void setDatabaseUser(String sDatabaseUser) throws IOException;", "public void setWStoreUser (String WStoreUser);", "SQLUserAuthenticator() {\n this.server = GlobalProperties.getProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column cal_fault_elevator.area_id
public Integer getArea_id() { return area_id; }
[ "public Integer getAreaId() {\r\n return areaId;\r\n }", "public Integer getAreaId() {\n return areaId;\n }", "public String getArea_id(){\r\n\t\treturn this.area_id ;\r\n\t}", "public int getAreaId() {\r\n return areaId;\r\n }", "public int getAreaNo() {\n return areaNo_;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test failed run of job creation with job id containing invalid characters.
@Test(expected = BadRequestException.class) public void testCreateJob_Failure_InvalidJobId_Asterisk() throws Exception { JobsPut.createOrUpdateJob("partition", "067e6162-3b6f-4ae2-a171-2470b6*dff00", makeJob()); }
[ "@Test(expected = BadRequestException.class)\n public void testCreateJob_Failure_InvalidJobId_Period() throws Exception {\n JobsPut.createOrUpdateJob(\"partition\", \"067e6162-3b6f-4ae2-a171-2470b6.dff00\", makeJob());\n }", "private static void testFail() throws Throwable {\n Scheduler userIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fail the semaphore and stop it from distributing further permits. Subsequent attempts to acquire a permit fail with `exc`. This semaphore's queued waiters are also failed with `exc`.
public synchronized void fail(Throwable exc) { closed = Optional.of(exc); for (CompletableFuture<Permit> future : waitq) { future.cancel(true); } waitq.clear(); }
[ "@TestInfo(testType = TestInfo.TestType.UNIT)\n public void testReleaseSemaphoreOnBaseException() {\n // how many simultaneous queries to support\n int slots = 5;\n AlwaysFailSearcher baseSearcher = new AlwaysFailSearcher();\n final TrafficLimitingSearcher searcher = new TrafficLimiti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called if a compile is aborted.
public void compileAborted(Exception e) { }
[ "public void aborted();", "@Override\n public void compilationFinished(boolean aborted, int errors, int warnings, @NotNull CompileContext compileContext) {\n IntelliJEvent e = new IntelliJEvent(System.currentTimeMillis(), TYPE, \"finished\");\n e.addExtraData(\"aborted\", String.valueOf(aborted))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gives the pair of actions [player 1's action, player 2's action] at some time
public int[] getActionPair(int round) { int[] pair = new int[2]; pair[0] = player1.getAction(round); pair[1] = player2.getAction(round); return pair; }
[ "boolean beats(IPlayerAction opponentPlayerAction);", "private void playGame(PlayerInformation player1, PlayerInformation player2) {\n\t\t\tint[] playerPoints = { 0, 0 };\n\t\t\tdouble rounds = Math.random() * (parameters.R - parameters.R * 0.9 + 1) + parameters.R * 0.9;\n\t\t\tint r0 = (int) rounds;\n\n\t\t\tACL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigns this runtime filter to the corresponding plan nodes.
public void assignToPlanNodes() { Preconditions.checkState(hasTargets()); builderNode.addRuntimeFilter(this); builderNode.fragment.setBuilderRuntimeFilterIds(getFilterId()); for (RuntimeFilterTarget target : targets) { target.node.addRuntimeFilter(this); // fragme...
[ "public void setNodeAttributeFilter( AttributeFilter filter )\n \t{\n \t\tnodeAttributeFilter = filter;\n \t}", "public void addNodeFilter (INodeFilter filter);", "public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.sh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get "string" at caret offset out of given text stringboundary: whitespace characters
public static String getStringLeftOfOffset(CharSequence text, int cursorOffset) { return grabString(text, cursorOffset - 1, false); }
[ "public static String getWordLeftOfOffset(CharSequence text, int cursorOffset) {\n\t\treturn grabWord(text, cursorOffset - 1, false);\n\t}", "public String getWordUnderCursor() {\r\n\t\t\r\n\t\t//we cannot search backward, so we start from the beginning: \r\n\t\tString text = getAllText();\r\n\t\tint index = getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a salesOrder, that already exists in the database
@Override public int updateSalesOrder(SalesOrder salesOrder) throws Exception { if(salesOrder == null) return 0; if(getSalesOrderById(salesOrder.getOrderId(), true) == null) return 0; PreparedStatement query = _da.getCon().prepareStatement("UPDATE SalesOrder SET contactsKey = ?, deliveryKey = ?, orde...
[ "Order updateOrder(Long orderId, Order order);", "Order updateOrder(Order order);", "@Override\n public void update(RentalOrder order) {\n LOGGER.debug(\"update({})\", order);\n dao.update(order);\n }", "@Test\n public void testUpdateOrder() {\n Order addedOrder = new Order();\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the avg online cm rx power of this upstream channel history.
@Override public void setAvgOnlineCmRxPower(double avgOnlineCmRxPower) { _upstreamChannelHistory.setAvgOnlineCmRxPower(avgOnlineCmRxPower); }
[ "@Override\n\tpublic void setAvgOnlineCmUsPower(double avgOnlineCmUsPower) {\n\t\t_upstreamChannelHistory.setAvgOnlineCmUsPower(avgOnlineCmUsPower);\n\t}", "@Override\n\tpublic double getAvgOnlineCmRxPower() {\n\t\treturn _upstreamChannelHistory.getAvgOnlineCmRxPower();\n\t}", "@Override\n\tpublic double getAvg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new DefaultEntity that decorates the provided node.
public DefaultEntity(Node<A> node) { super(node); events = new Vector<Event<A>>(); }
[ "public DDFNodeEntity() {\r\n // Set default value\r\n super.setIsDynamic(false);\r\n super.setIsLeafNode(true);\r\n super.setMaxOccurrence(-1L);\r\n }", "Entity makeEntity(String tag, Entity parent);", "public DefaultNode() {\n this(\"\");\n }", "Node<E> createNewNode();", "PlainEntityStar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether event point already exists within the queue.
public boolean contains(EventPoint ep) { BalancedBinaryNode<EventPoint,EventPoint> bn = events.getEntry(ep); return (bn != null); }
[ "public boolean contains(EventPoint ep) {\n\t\treturn events.contains(ep);\n\t}", "public boolean hasEvent() {\n \t\treturn ((data[MapBlock.BLOCK_SIZE - 1] & this.eventBit) != 0);\n \t}", "public boolean hasPushEvent();", "public synchronized boolean checkForDuplicates(Event event){\n // loop through a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a CalendarEvent object to the data model.
public CalendarEvent addEvent(CalendarEvent p_calendarEvent) { String stringifiedDate = String.valueOf(p_calendarEvent.getDay()) + String.valueOf(p_calendarEvent.getMonth()) + String.valueOf(p_calendarEvent.getYear()); if (_events.containsKey(stringifiedDate)) { if (dayContainsEvent(_events...
[ "private void addToCalendar() {\r\n if (!requireCalendarPermissions())\r\n return;\r\n\r\n if (CalendarUtil.createEntry(this, event))\r\n onAddToCalendarSuccess();\r\n else\r\n onRequireCalendarPermissionsDenied();\r\n }", "public VEvent addEvent(String cal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test 23 Returns a DoubleLinkedList for the "[] > add(A) > [A]" scenario
private DoubleLinkedList<Integer> addElementFromNewList() { DoubleLinkedList<Integer> list = new DoubleLinkedList<Integer>(); list.add(new Integer(1)); return list; }
[ "private DoubleLinkedList<Integer> addAfterFromOneElementList() {\n\t\t\n\t\tDoubleLinkedList<Integer> list = new DoubleLinkedList<Integer>();\n\t\tlist.addToRear(new Integer(1));\n\t\tlist.addAfter(new Integer(2), new Integer(1));\n\t\treturn list;\n\n\t}", "private DoubleLinkedList<Integer> addElementFromTwoEle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the back button event
@Override public void handleOnBackPressed() { }
[ "void onBackButtonClicked();", "void onBackButtonPressed();", "@Override public void onBackPressed() { }", "public void onBackPressed();", "@Override\r\n public void onBackPressed() {\r\n if (mBackPressedListener != null) {\r\n mBackPressedListener.backPressed();\r\n }\r\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
VDMTOOLS END Name=TestEditarObjeto VDMTOOLS START Name=TestEliminarSegmento KEEP=NO
public void TestEliminarSegmento () throws CGException { sentinel.entering(((DiagramaTesteSentinel) sentinel).TestEliminarSegmento); try { Segmento seg = new Segmento(new String("nome1"), geradorId()); Segmento seg1 = new Segmento(new String("nome2"), geradorId()); Segmento seg11 = new Segme...
[ "public void TestEditarSegmento () throws CGException {\n\n sentinel.entering(((DiagramaTesteSentinel) sentinel).TestEditarSegmento);\n try {\n\n Segmento seg = new Segmento(new String(\"s\"), geradorId());\n Segmento seg2 = null;\n Integer tamanho = null;\n Vector unArg_3 = null;\n u...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compares two input Job objects
@Override public int compare(Job job1, Job job2) { return job2.getProfit() - job1.getProfit(); }
[ "@Override\n public int compareTo(Job anotherJob)\n {\n return this.getId() - anotherJob.getId();\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Job)) {\n return false;\n }\n Job otherJob = (Job) other;\n\n if (other == this) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Second ball is allowed only if there is NO strike in the Frame or for 10th Frame even of the Strike is involved.
public boolean isSecondBallAllowed() { return !isStrike() || isBonusShotAllowed(); }
[ "public boolean isStrike(){\r\n\t\tif( this.firstThrow == 10 )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public void addStrikeForTeamB(View view) {\n if (gameInning % 2 == 0) {\n if (team_b_strike < 2) {\n team_b_strike = team_b_strike + 1;\n displayStrik...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Define the language code which will be used to display the documentation. The language code is 2 digits and lowercase: en, fr, ....
void setLanguageCode(String languageCode);
[ "public String getDOC_LANG() {\r\n return DOC_LANG;\r\n }", "public void setLanguage(String language);", "java.lang.String getLanguageCode();", "public abstract String getDefaultLanguage();", "public interface LanguageInterface {\r\n\r\n /** Internal identification of the english language setti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the country feature name for the given coordinates.
public String getCountryFeature() { return (String) this.getAdditionalTagValue( GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTRY); }
[ "public String getCountryName();", "java.lang.String getCountyName();", "java.lang.String getCountry();", "public String getCountryName() {\n return name;\n }", "org.apache.xmlbeans.XmlString xgetCountry();", "public String getCountryName(){\r\n\t\treturn countryName;\r\n\t}", "public org.apac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
finds out the length of the register's queue.
public int getQueueLength() { return queue.length(); }
[ "public abstract int getQueueLength();", "public abstract int computeQueueLength();", "int size() {\n return queue.size();\n }", "public int size() {\n return queue.size();\n }", "public int getQueueSize(){\n\t\treturn queue.size();\n\t}", "public int lenQenq(){\n\t\treturn size;\n\n\t}", "long ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Rescaled subnet layer.
public RescaledSubnetLayer(int scale, @Nullable Layer layer) { this.scale = scale; if (null != this.layer) this.layer.freeRef(); this.layer = layer; }
[ "interface WithSubnet {\n /**\n * Specifies subnet.\n * @param subnet The ID of the subnet from which the private IP will be allocated\n * @return the next definition stage\n */\n WithCreate withSubnet(SubnetInner subnet);\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set/Update a given Available object from information in the Available edition dialog box
@Override public void getEditedAvailable(Available editedAvailable) { if (null == editedAvailable) return ; // Global parameters // editedAvailable.setSummary(_AvailSummaryTextBox.getValue()) ; LdvTime tStartDate = new LdvTime(0) ; tStartDate.initFromJavaDate(_AvailFromDateBox.getValue()) ; Ldv...
[ "public void initAvailableDialogDialog(final Available editedAvailable)\n\t{\n\t\t_AvailDescripTextBox.setText(editedAvailable.getDescription()) ; \n\t\t_AvailSummaryTextBox.setText(editedAvailable.getSummary()) ;\n\t\t\n\t\tLdvTime tStart = editedAvailable.getDateStart() ;\n\t\t_AvailFromDateBox.setValue(tStart.to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleNullExp" $ANTLR start "ruleNullExp" InternalOCLlite.g:1444:1: ruleNullExp : ( ( rule__NullExp__Group__0 ) ) ;
public final void ruleNullExp() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalOCLlite.g:1448:2: ( ( ( rule__NullExp__Group__0 ) ) ) // InternalOCLlite.g:1449:2: ( ( rule__NullExp__Group__0 ) ) { // InternalOCL...
[ "public final void rule__NullExp__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:8672:1: ( ( 'null' ) )\n // InternalOCLlite.g:8673:1: ( 'null' )\n {\n // InternalOCLlite.g:8...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
What is the best move in the current position? Call alphabeta on all of the legal moves and find the one that evaluates highest.
public int getBestMove(Board b) { // YOUR CODE HERE }
[ "private Move getBestMove() {\r\n\t\tSystem.out.println(\"getting best move\");\r\n\t\tChessConsole.printCurrentGameState(this.chessGame);\r\n\t\tSystem.out.println(\"thinking...\");\r\n\t\t\r\n\t\tList<Move> validMoves = generateMoves(false);\r\n\t\tint bestResult = Integer.MIN_VALUE;\r\n\t\tMove bestMove = null;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of crawl method, of class MancroCrawlerHU.
@Ignore public void testCrawl() { System.out.println("crawl"); MancroCrawlerHU instance = new MancroCrawlerHU(); instance.crawl(); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
[ "@Ignore\n public void testCrawlCategory() throws Exception {\n System.out.println(\"crawlCategory\");\n String url = \"\";\n String outputFilePath = \"\";\n ZONES zone = null;\n ASSETS asset = null;\n CONDITIONS condition = null;\n MancroCrawlerHU instance = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public BaseDataResponse loginScoin(Map dataRequest);
public AdbLoginResponse loginScoinFromAdb(AdbLoginScoinRequest adbLoginScoinRequest);
[ "void loginRequest(ITCHServer session, LoginRequest packet) throws IOException;", "Login.Req getLoginReq();", "User loginUserRequest (String username, String password);", "com.bingo.server.msg.REQ.LoginRequest getLogin();", "public abstract void login(\r\n com.google.protobuf.RpcController co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates a FirewallPolicy to a Firewall. A firewall policy defines how to monitor and manage your VPC network traffic, using a collection of inspection rule groups and other settings. Each firewall requires one firewall policy association, and you can use the same firewall policy for multiple firewalls.
java.util.concurrent.Future<AssociateFirewallPolicyResult> associateFirewallPolicyAsync(AssociateFirewallPolicyRequest associateFirewallPolicyRequest);
[ "private void createFirewall() throws IOException {\n Firewall firewallRule = new Firewall()\n .setName(\"cloud-loadtest-framework-firewall-rule\")\n .setDescription(\"A firewall rule to allow the driver to coordinate load test instances.\")\n .setAllowed(ImmutableList.of(\n new F...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test syncing a typed URL from server to client.
@Test @LargeTest @Feature({"Sync"}) public void testDownloadTypedUrl() throws Exception { addServerTypedUrl(URL); SyncTestUtil.triggerSync(); waitForClientTypedUrlCount(1); // Verify data synced to client. List<TypedUrl> typedUrls = getClientTypedUrls(); Asse...
[ "@Test\n @LargeTest\n @Feature({\"Sync\"})\n public void testDownloadDeletedTypedUrl() throws Exception {\n // Add the entity to test deleting.\n addServerTypedUrl(URL);\n SyncTestUtil.triggerSync();\n waitForClientTypedUrlCount(1);\n\n // Delete on server, sync, and veri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the user has gallery permissions enabled. If not, then ask for gallery permissions. If gallery permissions are enabled, then starts an upload from gallery activity. If not, then does nothing.
public static void CheckPermissionsGallery(Activity activity) { REQUEST_CODE = 2; int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); // if we don't have permissions ten ask from the user if (permission != PackageMa...
[ "public void askGalleryPermission() {\n name.onEditorAction(EditorInfo.IME_ACTION_DONE); // Hide keyboard\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the pipeline for factoid questions.
protected void initFactoid() { // question analysis Ontology wordNet = new WordNet(); // - dictionaries for term extraction QuestionAnalysis.clearDictionaries(); QuestionAnalysis.addDictionary(wordNet); // - ontologies for term expansion QuestionAnalysis.clearOntologies(); QuestionAnalysis.addOn...
[ "public void init() {\n Properties props = new Properties();\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse, dcoref\");\n props.put(\"parse.maxlen\", \"100\");\n pipeline = new StanfordCoreNLP(props);\n\n\n\n }", "public void initialize() throws PipelineExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application.
public java.lang.String getLeaderboardId() { return leaderboardId; }
[ "java.lang.String getLeaderId();", "public String getLeaderboardIdentifier () {\n\t\tif (customClass) {\n\t\t\treturn objc_leaderboardIdentifierSuper(getSuper(), leaderboardIdentifier);\n\t\t} else {\n\t\t\treturn objc_leaderboardIdentifier(this, leaderboardIdentifier);\n\t\t}\n\t}", "java.lang.String getLobbyI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the mw st p.
public void setMwStP(final String mwStP) { this.mwStP = mwStP; }
[ "public void setIMwStP(final String iMwStP) {\n\t\tthis.iMwStP = iMwStP;\n\t}", "public void setMwStPO(final String mwStPO) {\n\t\tthis.mwStPO = mwStPO;\n\t}", "public String getMwStP() {\n\t\treturn this.mwStP;\n\t}", "public void setMwStO(final String mwStO) {\n\t\tthis.mwStO = mwStO;\n\t}", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the schematic to be built for this element
@NotNull public Schematic getSchematic(int level, boolean destroyed) { return BunkerSchematics.getWithoutThrow( getName().replaceAll(" ", "-").toLowerCase() + "-" + level + (destroyed ? "-destroyed" : "")); }
[ "public final Schematic getSchematic() {\n return getSchematic(this.level, this.destroyed);\n }", "public static Technology getSchematicTechnology()\n \t{\n String t = cacheSchematicTechnology.getString();\n \t\tTechnology tech = Technology.findTechnology(t);\n if (tech == null) return M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets holdback of this object, this is supposed to be called just once during its initialization. Manager of LOD relies on constant value of this attribute, during whole simulation.
public void setHoldback(Holdback holdback);
[ "void setHold(boolean b)\n\t\t{\n\t\t\thold = b;\n\t\t}", "public void setback() {\n\t\tif (canNotSetback()) return;\n\t\tdata.state.isSettingback = true;\n\t\trunSync(() -> player.teleport(new Location(player.getWorld(), data.movement.fx, data.movement.fy, data.movement.fz, player.getLocation().getYaw(), player....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Person's Photo Filename
public void setPhotoFileName(String filename) { this.photoFileName = filename; }
[ "public void setOriginalFilename(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALFILENAME, value);\r\n\t}", "public void setOriginalFileName(String newValue);", "public static void setOriginalFilename( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for the COM property "RepeatItemsOnEachPrintedPage"
@VTID(105) void setRepeatItemsOnEachPrintedPage( boolean rhs);
[ "@VTID(104)\r\n boolean getRepeatItemsOnEachPrintedPage();", "Builder setPageRepeated(int repeatPage) {\n\t\t\tthis.repeatPage = repeatPage;\n\t\t\treturn this;\n\t\t}", "public void setIPrintCnt(int iPrintCnt) {\n this.iPrintCnt = iPrintCnt;\n }", "@Override\n\tprotected void populateItem(final Lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleCORBA_SmartSoft" $ANTLR start "ruleCORBA_SmartSoft" InternalComponentDefinition.g:1328:1: ruleCORBA_SmartSoft : ( ( rule__CORBA_SmartSoft__Group__0 ) ) ;
public final void ruleCORBA_SmartSoft() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalComponentDefinition.g:1332:2: ( ( ( rule__CORBA_SmartSoft__Group__0 ) ) ) // InternalComponentDefinition.g:1333:2: ( ( rule__CORBA_SmartSoft__Group...
[ "public final void ruleACE_SmartSoft() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:1282:2: ( ( ( rule__ACE_SmartSoft__Group__0 ) ) )\n // InternalComponentDefinition.g:1283:2: ( ( rule__ACE_SmartSof...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This tests getCurPos() when Player is first init. If the player always starts in the first room (index 0), then the method should return 0.
@Test public void testInitCurPos() { Player plyr = new Player(); assertEquals(0, plyr.getCurPos()); }
[ "@Test\r\n public void getPositionTest() {\r\n assertEquals(0, player.getPosition());\r\n }", "public int getCurrentPlayerRealPosition();", "public long getCurrentPosition() {\n return player != null ? player.getCurrentPosition() : 0;\n }", "private void determinePlayerPosSpecial() {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Creates an instance of CSDLL but using the comparator
public CSDLL(Comparator<E> comparator){ this.size = 0; this.dummyHeader = new Node<E>(this.dummyHeader, this.dummyHeader, null); this.comparator = comparator; }
[ "public SortedSqrtDecomposition(Comparator<T> comparator) {\n this(10, comparator);\n }", "public DMSQueueEntryComparator()\n {\n\n }", "public VoucherSorter(Comparator<TravelVoucher> comparator){\n this.comparator = comparator;\n }", "protected BaseComparator() {}", "private stati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the user id sent from the request using claims Before the request reaches any controller, it will first go to our CustomAuthenticationFilter which adds the claims to the request
private String getUserId(HttpServletRequest request){ final Claims claims = (Claims) request.getAttribute("claims"); if(claims == null) return null; return claims.getId(); }
[ "@Override\n protected String getUserId(HttpServletRequest req) throws ServletException, IOException {\n return Utils.getUserId(req);\n }", "public String getUserIdFromRequest(String requestUri);", "java.lang.String getClaimId();", "public void requestClaimInIdToken(String claim, RequestedClaimAdditiona...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method 10: A method that checks if the AI is losing on a row
public static boolean AILosingOnRow(char[][] board) { //Using a for loop to go through each row for(int i= 0; i<board.length; i++) { //Calling countNumCharacters and hasSpaceCharacter to find out if there is an empty space //and if all the other cells contain 'x's ...
[ "public boolean playerLoses(){\n return (curPlayerRow == curTrollRow && curPlayerCol == curTrollCol);\n }", "private boolean gameIsntOver(){\r\n\t\tif(countBricks != 0 && attempt != 0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "private boolean gameIsOver() {\n\t\treturn turn >= N...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ez az ervenyes lepes alapja
protected Lepes ervenyesLepes(Palya palya){ return null; }
[ "@Override\r\n public Lepes kovetkezoLepes(Beolvas be, Palya palya) {\r\n return ervenyesLepes(palya);\r\n }", "@Override\r\n\tpublic void aloitaPalvelu() { // Aloitetaan uusi palvelu, asiakas on jonossa palvelun aikana\r\n\t\tTrace.out(Trace.Level.INFO, \"Lisätään asiakas: \" + jono.peekLast().getId...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests to be sure the problem represents all the moves.
@Test public void testMoves() { initializeMoves(); assertTrue(fillX != null); assertTrue(fillY != null); assertTrue(emptyX != null); assertTrue(emptyY != null); assertTrue(xToY != null); assertTrue(yToX != null); }
[ "@Test\n public void testThatCorrectMovesAreFound() {\n Solver solver = new Solver();\n PuzzleState state = new PuzzleState(Arrays.asList(CANNIBAL, CANNIBAL),\n Arrays.asList(MISSIONARY, MISSIONARY, CANNIBAL, MISSIONARY), PuzzleState.Position.LEFT_BANK);\n\n // get available m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call the DAO method to delete all items
void deleteAllItemsRepo() { ItemDatabase.databaseWriteExecutor.execute(() -> mItemDao.deleteAllItems()); }
[ "public void deleteAll() {\n new Thread(new DeleteAllRunnable(dao)).start();\n }", "public void deleteAll() {\n mRepository.deleteAllData();\n }", "public void deleteAllProducts();", "public void deleteAll()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prueba de insercion para HashMap
@Test public void insertarHashtest() { mapaPrueba2.put("Horse", "Caballo"); }
[ "public abstract void putAll(AbstractIntHashMap map);", "public int insert( _key_ key, _val_ value );", "abstract HashMap generateHashMap();", "private static void createMap()\n\t {\n\t\t \n\t\t hm.put(1, \"a\");hm.put(2, \"b\");hm.put(3, \"c\");hm.put(4, \"d\");hm.put(5, \"e\");\n\t\t hm.put(6, \"f\");hm.put...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates an instance of the Decorator class.
public Decorator(Behaviour behaviour) { this.behaviour = behaviour; }
[ "public Decorator() {\n }", "private static void decoratorDemo() {\n\t System.out.println(\"\\nThe Decorator pattern allows us to add functionality to an already existing object without altering any of its structure.\"+\n\t \"\\nSimply wrapping the objects adds features.\");\n\t System.out.println(\"\\nThis de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Translates a text location into an offset into the text held by the editor.
public int getOffsetFromTextLocation(TextLocation location) { return bjEditor.getOffsetFromLineColumn(convertLocation(location)); }
[ "OffsetLocation moveTextIndex(CharSequence sequence);", "OffsetLocation moveTextIndex(CharSequence sequence, int offset, int length);", "public TextLocation getTextLocationFromOffset(int offset)\n {\n return convertLocation(bjEditor.getLineColumnFromOffset(offset));\n }", "public SourcePosition o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts DateTime string to LocalDateTime.
public static LocalDateTime getLocalDateTime(String strDateTime) { try { return getLocalDateTime(strDateTime, "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); } catch (ParseException ex) { try { return getLocalDateTime(strDateTime, "yyyy-MM-dd'T'HH:mm:ss'Z'"); }...
[ "public static LocalDateTime unmarshal(String dateTime) {\n \tDateTimeFormatter format = DateTimeFormatter.ISO_LOCAL_DATE_TIME;\n \treturn LocalDateTime.parse(dateTime, format);\n }", "public LocalDateTime stringToDateTime(String inputDateTime) {\n return stringToDateTime(inputDateTime, dateTimeFo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the service capabilities document. This method is intended to facilitate unit testing.
public void setServiceCapabilities(Document cswCapabilities) { this.cswCapabilities = cswCapabilities; }
[ "public void setCapabilities(String capabilities) {\n this.capabilities = capabilities;\n }", "public void setCapabilities(Capabilities capabilities) {\n\t\tthis.capabilities = capabilities;\n\t}", "public void setCapabilities(ArrayList<Fact> capabilities) {\n this.capabilities = capabilities;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the message handler. Must be called on WebKit Thread.
public synchronized void createHandler() { if (mHandler != null) { return; } mHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case CLEAR_ALL: nativeCle...
[ "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:47.205 -0500\", hash_original_method = \"7339E0A10658134ACC2105D49EF71E34\", hash_generated_method = \"A7DB82BE290D3AE425288F9384EFF5B5\")\n \npublic synchronized void createHandler() {\n if (mHandler == ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor of Mocha object.
public Mocha() { ui = new Ui(); parser = ui.createParser(); storage = new Storage("data/tasks.txt"); tasks = new TaskList(storage.loadData()); }
[ "public HockeyTeamTest()\n {\n }", "private Tester() {\n }", "public TestManager() {\n }", "public TownContestTest()\n {\n }", "public PerezosoTest()\n {\n }", "public ContribuinteTeste() {\n }", "public CoroTest() { }", "public TesteUnit()\n {\n }", "public AllLaboT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Google user info.
public GoogleUserInfo(Map<String, Object> attributes) { this.attributes = attributes; }
[ "public GoogleAuthenticatorAccount() {\n }", "public UserInfo()\n {\n }", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "Exchange" element
void unsetExchange();
[ "void unsetElementOperation();", "void unsetSettlement();", "void unsetXdescelement2();", "void unsetXdescelement1();", "public Builder clearExchangeTransactionID() {\n exchangeTransactionID = null;\n fieldSetFlags()[9] = false;\n return this;\n }", "void unsetValueAttachment();", "voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor Creates a new MemManager object.
public MemManager( int poolSize ) { this.poolSize = poolSize; memoryPool = new byte[poolSize]; // creates a twoWayLinkedList that will store HashMaps defining the // blocks // of free space within our pool freeBlock = new HashMap<Integer, Integer>( 1 ); freeB...
[ "public MemoryManager getMemManager() {\r\n\t\treturn memManager;\r\n\t}", "public static Memory getInstance(){\n if (mem == null) mem = new Memory(4000);\n return mem;\n }", "public Memory() {\n super(OcPlatform.NAMESPACE, \"memory\");\n }", "@objid (\"a31e0ccd-0135-4f50-bd4f-6c429...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the corresponding state of a LO task in LO automata zone
public State findStateLO(String task) { State ret = null; boolean found = false; Iterator<State> it = loSched.iterator(); while (it.hasNext() && !found) { State s = it.next(); if (s.getTask().contentEquals(task)) { ret = s; found = true; } } return ret; }
[ "public State findStateHI(String task) {\n\t\tState ret = null;\n\t\tboolean found = false;\n\t\t\n\t\tIterator<State> it = hiSched.iterator();\n\t\twhile (it.hasNext() && !found) {\n\t\t\tState s = it.next();\n\t\t\tif (s.getTask().contentEquals(task)) {\n\t\t\t\tret = s;\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If str is a version number like 3.17, then this returns 1000 times its numeric valuee.g., 3170. Otherwise, it returns 1.
public static int VersionToNumber(String str) { boolean error = false ; int i = 0; int result = 0; int digitsAfterDecimal = 0; boolean afterDecimal = false; while ((!error) && i < str.length()) { char c = str.charAt(i); if (('0' <= c) && (c <= '9')) { result = 10 * re...
[ "private static int versionNumToNumeric(String str) {\r\n str = str.replaceAll(\"\\\\.\", \"\");\r\n final String zero = \"0\";\r\n\r\n if (str.length() == 3) {\r\n StringBuffer str_bufferBuffer = new StringBuffer();\r\n str_bufferBuffer.append(str);\r\n str_buf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the disguise type
public DisguiseType getType() { return disguiseType; }
[ "Kind getKind();", "DvkType getType();", "public Kind getTypeKind()\n {\n return null;\n }", "public String Type()\t{\r\n\t\treturn BrickFinder.getDefault().getType();\r\n\t}", "String getTypeDescription();", "DiagramType getType();", "EntityType<?> getDisguiseType();", "long getType();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ end map Replace the existing map with the specified one.
protected void map(Map map) { this.map = map; }
[ "void setMap(Map map);", "public void replaceMap(String selected_map_id, int index) {\n campaign.replaceMap(selected_map_id, index);\n }", "public void setMap(Map map) {\n this.map = map;\n }", "private void changeMap(Map<Integer, List<Note>> map) {\r\n Objects.requireNonNull(map);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return name of last name field
public String getLastNameFieldName() { return getStringProperty(LAST_NAME_FIELD_NAME_KEY); }
[ "java.lang.String getLastname();", "@Override\n\tpublic String getLastname() {\n\t\treturn model.getLastname();\n\t}", "public String getLastName() {\n return last_name;\n }", "public java.lang.String getLast_Name() {\n return last_Name;\n }", "public String getLast_name() {\n return la...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the currency associated with the practice.
private Currency getCurrency() { return UBLHelper.getCurrency(practiceRules, currencies, factory); }
[ "String getCashCollateralCurrency();", "public Currency getCurrency() {\n return curr(getValue());\n }", "public String currency() {\n return this.innerProperties() == null ? null : this.innerProperties().currency();\n }", "String getTradeCurrency();", "public String getCurrency()\n\t{\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .VideoBookmark bookmarks = 1 [(.description) = "list of bookmarks we want to store."];
java.util.List<? extends SteamMsgVideo.VideoBookmarkOrBuilder> getBookmarksOrBuilderList();
[ "java.util.List<SteamMsgVideo.VideoBookmark> \n getBookmarksList();", "public java.util.List<? extends SteamMsgVideo.VideoBookmarkOrBuilder> \n getBookmarksOrBuilderList() {\n return bookmarks_;\n }", "public java.util.List<? extends SteamMsgVideo.VideoBookmarkOrBuilder> \n getBo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column FreeHost_Product_VPS.CDNMB11
public Integer getCdnmb11() { return cdnmb11; }
[ "public void setCdnmb12(Integer cdnmb12) {\r\n this.cdnmb12 = cdnmb12;\r\n }", "public void setCdnmb11(Integer cdnmb11) {\r\n this.cdnmb11 = cdnmb11;\r\n }", "public Integer getCdnmb12() {\r\n return cdnmb12;\r\n }", "public Integer getCdnmb10() {\r\n return cdnmb10;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
abstract method to find patient information by checking specified last name.
Patient findByLastName(String lastName);
[ "public Patient findPatient(String name, String mrn) {\n return null;\n }", "public void search(String LastName)\n {\n //delare variables to hold file types\n BufferedReader fIn = null;\n \n //try to open the file for reading\n try\n {\n fIn = new BufferedReader(ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Switches the main engine (powering forward acceleration) off.
public void stopMainEngine() { isMainEngineOn = false; }
[ "public void setEngineOff();", "public void stopMainEngine() {\n isMainEngineOn = false;\n }", "public void stopEngine() {\n currentSpeed = 0;\n }", "public void stopEngine() { currentSpeed = 0; }", "public void powerOff() {\n\t\tif (isOn || isPowering) {\n\t\t\t// Power down\n\t\t\tisOn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__OpenCSV__Group__0__Impl" $ANTLR start "rule__OpenCSV__Group__1" InternalCsv.g:1245:1: rule__OpenCSV__Group__1 : rule__OpenCSV__Group__1__Impl rule__OpenCSV__Group__2 ;
public final void rule__OpenCSV__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCsv.g:1249:1: ( rule__OpenCSV__Group__1__Impl rule__OpenCSV__Group__2 ) // InternalCsv.g:1250:2: rule__OpenCSV__Group__1__Impl rule__OpenCSV__G...
[ "public final void rule__OpenCSV__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1222:1: ( rule__OpenCSV__Group__0__Impl rule__OpenCSV__Group__1 )\n // InternalCsv.g:1223:2: rule__OpenCSV__Group__0__Impl ru...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the colormap to be used for the filter.
public void setColormap(Colormap colormap) { this.colormap = colormap; }
[ "@Field(11)\n public Pix colormap(Pointer<PixColormap> colormap) {\n this.io.setPointerField(this, 11, colormap);\n return this;\n }", "public JAWT_X11DrawingSurfaceInfo setColormapID(long val) {\n accessor.setLongAt(colormapID_offset[mdIdx], val, md.pointerSizeInBytes());\n return this;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__TaskDefinition__OutAttributeAssignment_4_2" $ANTLR start "rule__TaskDefinition__ResultsAssignment_7" InternalTaskDefinition.g:3192:1: rule__TaskDefinition__ResultsAssignment_7 : ( ruleTaskResult ) ;
public final void rule__TaskDefinition__ResultsAssignment_7() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalTaskDefinition.g:3196:1: ( ( ruleTaskResult ) ) // InternalTaskDefinition.g:3197:2: ( ruleTaskResult ) { ...
[ "public final void rule__TaskDefinition__Group__7__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:1214:1: ( ( ( ( rule__TaskDefinition__ResultsAssignment_7 ) ) ( ( rule__TaskDefinition__ResultsAssignment_7 )* )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the task as done.
public void done() { isDone = true; }
[ "public void markAsDone() {\n\t\tdoneTheTask = true;\n\t}", "public void taskDone() {\n System.out.println(\"check\");\n this.done = true;\n }", "public void setAsDone(Task task) {\n task.setStatus(true);\n }", "public void markAsDone() {\n this.isDone = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }