query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Initializes the elements on screen Makes policy TextView scrollable Adds on click listeners to accept and decline buttons Accept button OnClick returns RESULT_OK and finishes activity Decline button OnClick returns RESULT_CANCELED and finishes activity
private void initButtons() { Button accept = (Button) findViewById(R.id.button_accept); Button decline = (Button) findViewById(R.id.button_decline); TextView textView = (TextView) findViewById(R.id.policyTextView); textView.setMovementMethod(new ScrollingMovementMethod()); accept...
[ "private void initViews() {\n setCardListener(R.id.accomodation_card_need, R.id.accomodation_card_edittext_need);\n setCardListener(R.id.food_card_need, R.id.food_card_edittext_need);\n setCardListener(R.id.clothes_card_need, R.id.clothes_card_edittext_need);\n setCardListener(R.id.medic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property Pi_libelle.
public java.lang.String getPi_libelle() { return Pi_libelle; }
[ "public void setPi_libelle(java.lang.String Pi_libelle) {\r\n this.Pi_libelle = Pi_libelle;\r\n }", "public String getLibelle() {\n\t\treturn this.libelle;\n\t}", "public String getLibelle() {\r\n return libelle;\r\n }", "public String getLibelle() {\n return this.libelle;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns drift information for resources in a stack instance. ListStackInstanceResourceDrifts returns drift information for the most recent drift detection operation. If an operation is in progress, it may only return partial results.
java.util.concurrent.Future<ListStackInstanceResourceDriftsResult> listStackInstanceResourceDriftsAsync( ListStackInstanceResourceDriftsRequest listStackInstanceResourceDriftsRequest, com.amazonaws.handlers.AsyncHandler<ListStackInstanceResourceDriftsRequest, ListStackInstanceResourceDriftsResul...
[ "java.util.concurrent.Future<ListStackInstanceResourceDriftsResult> listStackInstanceResourceDriftsAsync(\n ListStackInstanceResourceDriftsRequest listStackInstanceResourceDriftsRequest);", "java.util.concurrent.Future<ListStackResourcesResult> listStackResourcesAsync(ListStackResourcesRequest listStac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculs du temps d'acheminement d'un message
public void calculTimes(MessageI m) { long t = new Timestamp(System.currentTimeMillis()).getTime(); try { this.times.add(t - m.getTimeStamp().getTime()); } catch (Exception e) { e.printStackTrace(); } }
[ "public SendMessage getTime()\n\t{\n\t\tSendMessage send = null;\n\t\t\t\t\n\t\tif (hours == 0 && minutes == 0 && seconds == 0)\n\t\t{\n\t\t\tsend = new SendMessage(id, \"Die Fragezeit wurde noch nicht festgelegt. Benutze den Befehl /settime um die Fragezeit festzulegen.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsend = ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function that informs user they won the game by printing a win message in the screen
public void GameWin () { wordDashes.setText(mysteryWord); guessBttn.setVisible(false); guessFullWord.setVisible(false); AnswerBox.setDisable(true); //can no longer use the text box resultMessage.setText(" Great Job!!\nYou Guessed the Word!!"); playAgain.setVisible(true); }
[ "public void winGame() {\n\t\t\twinLabel.setText(\"Win record: \" + winRecord);\n\t\t\tdisableButtons();\n\t\t\trecordMoves();\n\t\t\tbestMovesLabel.setText(\"Best Moves score: \" + bestMoves);\n\t\t\t// MessageDialog informs player number of the number of moves it took to win.\n\t\t\tJOptionPane.showMessageDialog(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new AccessibilityTester for the specified component to perform the specified tests.
public AccessibilityTester(Component component, TestSettings set){ parent = component; testSettings = set; // Logs read from arguments debugLog = Boolean.getBoolean("a11ytest.log"); TAB_TRAVERSAL_TIME_OUT = 15000; try{ TAB_TRAVERSAL_TIME_OUT ...
[ "public ReportGenerator(AccessibilityTester at){\n tester = at;\n }", "public static Tester makeTester (Class<? extends Testable> tests) {\n TestMake testing = new TestMake( tests );\n\n return testing;\n }", "Automation createAutomation();", "public interface TestDesigner extends T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets starting angle because startingAngle is a static variable and must be cleared for every use.
public void setStartingAngle() { Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES); startingAngle = angles.firstAngle; }
[ "public void resetStartingAngle() {\n startingAngle = 0;\n }", "public void resetAngle()\r\n {\r\n this.setAngle(0);\r\n }", "private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n startAngles = last...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a borrower to the database and updates the list/table.
private void addBorrower() { Borrower newBorrower = addBorrowerView.display(); if (newBorrower != null && handler.addBorrower(newBorrower)) { System.out.println(newBorrower.getFirstName() + " was added"); } else { //System.out.println("Failed to add borrower"); } ...
[ "public void addBorrower(int bid, String password, String name,\n\t\t\tString address, String phone, String sinOrStNo, Date expiryDate,\n\t\t\tString type) {\n\t\tPreparedStatement ps;\n\t\tResultSet rs;\n\t\ttry {\n\t\t\tps = con.prepareStatement(\"INSERT INTO BORROWER VALUES (?,?,?,?,?,?,?,?)\");\n\t\t\tps.setInt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show snack bar when no internet connection available
void showSnackBarWhenNoInternet();
[ "public void showEneableMessageIfNeeded() {\n if (!isNetworkAvailable()) {\n displayPromptForEnablingInternet();\n }\n }", "private void showSnackBar() {\n\n final Snackbar snackbar = Snackbar.make(mView.mRelativeLayout,\n getResources().getString(R.string.interne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A role is a collection of permissions which can be guarded by constraints and assigned to a user. Instead of assigning each permission to a user separately the role is used as container. The role can not only contain multiple permissions, but also be guarded by constraints and change itself over time (dynamic role).
public interface Role extends Serializable { /** * Returns a permission reply if one of the permissions were able to provide answer to the request whether the action is allowed to be executed in current * context. * * @param action * - action * @return {@link PermissionReply} * @throws Acces...
[ "public void setRole(Role role);", "Role createRole();", "public interface RolePermissionMapper {\n /**\n * Sets the context for this {@link RolePermissionMapper}\n *\n * @param context\n */\n void setContext(AuthorizationMapperContext context);\n\n /**\n * @param name the name of the role\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the reclamationCloseComment value for this TradeHistoryEntryVo.
public void setReclamationCloseComment(java.lang.String reclamationCloseComment) { this.reclamationCloseComment = reclamationCloseComment; }
[ "public java.lang.String getReclamationCloseComment() {\n return reclamationCloseComment;\n }", "public void setCloseResion(String closeResion) {\n this.closeResion = closeResion;\n }", "public void setClose(Double close) {\n this.close = close;\n }", "public void setClose(double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensures the rematch command attempts to reestablish the server connection.
@Test public void testRematchAttemptsToEstablishServerConnection() throws Exception { PowerMockito.whenNew(Communicator.class).withParameterTypes( IMessageFactory.class, String.class).withArguments( any(MessageFactory.class), any(String.class)).thenReturn( mockCommunicator); when(mockCommun...
[ "@Override\n \tpublic void reconnectionSuccessful() {\n \t}", "public boolean reInitOnNewConnection();", "public void handleRequestRematch() {\n boolean rematch = (boolean) IO.promptInput(\n \"Would you like a rematch (y/n)?\",\n new BooleanValidator()\n );\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if the tweet id is all digit
private void validateId(String id) { if (!id.matches("[0-9]+")) { throw new IllegalArgumentException("Invaild Tweet Id"); } return; }
[ "private boolean CheckID(String id) {\n\t\tif ((!id.matches(\"([0-9])+\") || id.length() != 9) && (!id.matches(\"S([0-9])+\") || id.length() != 10)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean checkId(String userId){\n \n if(userId.length()!=8){\n System.out.pri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Auxiliary function help to create one KML file to the project
public static void finalKML(String toKML) { // The final KML data String kmlFinal=""; String kmlstart = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n" + " <Document> <Folder><name>Wifi Networks</name>\n"; kmlFinal=kmlFinal+kmlstart; Strin...
[ "private void makeKMLString(){\n kmlString = \"<Placemark><visibility>1</visibility>\";\n\n if(name != \"\" && name != null){\n\t\t kmlString +=\"<name>\"+name+\"</name>\";\n\t }\n\n //set time stamp\n //we may not always want this\n //TODO: need to add an UI option:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of initSession method, of class SessionManager.
@Test public void testInitSession() { System.out.println("initSession"); assertNotNull(sm); boolean result = sm.initSession("test1", programsHome, programsHome + "files1/", requester); assertFalse(result); result = sm.initSession("test2", programsHom...
[ "public abstract void initialize(ISession session);", "private void initSession() {\n\n\t\tprintStart(\"initSession\");\n\t\t// Set attributes for initSession\n\t\tsession.setTransId(\"ABC-12345-XYZ\");\n\t\tsession.setVersion(\"1.0\");\n\t\tsession.setLang(\"en\");\n\n\t\t// Initialize the session\n\t\ttry {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the incoming messages about managing hierarchy.
public void onMessage(A3Message message){ try{ switch(message.reason){ case Constants.HIERARCHY: /* This message is like * "senderAddress Constants.HIERARCHY numberOfSubgroups name1 name2 ..." * or "Constants.HIERARCHY numberOfSubgroups", if the hierarchy is empty. * * If I receive...
[ "void hierarchyChanged();", "private void handleMessage(EcologyMessage msg) {\n // Check the message type and route them accordingly.\n switch ((Integer) msg.fetchArgument()) {\n // A message destined for a room\n case ROOM_MESSAGE_ID:\n forwardRoomMessage(msg);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property alt.
public java.lang.String getAlt() { return alt; }
[ "public Double getAlt() {\r\n\t\treturn alt;\r\n\t}", "@JsxGetter(@WebBrowser(IE))\n public String getAlt() {\n final String alt = getDomNodeOrDie().getAttribute(\"alt\");\n return alt;\n }", "public final String getAltAttribute() {\n return getAttributeValue(\"alt\");\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the contents of this instance to be that of an actor. Removes any prior contents.
public void setContents(Actor actor) { this.actor = actor; this.broadcast = null; this.network = null; this.serdes = null; }
[ "public void setActor(Actor actor);", "public void setActor(Atom actor)\r\n\t{\r\n\t\tthis.actor = actor;\r\n\t}", "public void setActor(Actor actor) {\n\t\t_incrementVersion();\n\t\t_actor = actor;\n\t}", "public void destroyActor() {\n this.remove();\n }", "public void setActorDef(ActorDef actor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that moving the caret left when it's before the prompt will cycle it to the prompt.
public void testLeftBeforePromptMovesToPrompt() { _text.setCaretOffset(1); _controller.moveLeftAction(); assertEquals("Left arrow doesn't move to prompt when caret is before prompt.", _doc.getPromptPos(), _text.getCaretOffset()); }
[ "public void testCaretMovementCyclesWhenAtPrompt() throws EditDocumentException {\n _doc.insertText(_doc.getLength(), \"test text\", InteractionsDocument.DEFAULT_STYLE);\n _controller.moveToPrompt();\n \n _controller.moveLeftAction();\n assertEquals(\"Caret was not cycled when moved left at the promp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the taxiiLookbackPeriod property: The lookback period for the TAXII server.
public TiTaxiiDataConnectorProperties withTaxiiLookbackPeriod(OffsetDateTime taxiiLookbackPeriod) { this.taxiiLookbackPeriod = taxiiLookbackPeriod; return this; }
[ "public OffsetDateTime taxiiLookbackPeriod() {\n return this.taxiiLookbackPeriod;\n }", "public TiTaxiiDataConnector withTaxiiLookbackPeriod(OffsetDateTime taxiiLookbackPeriod) {\n if (this.innerProperties() == null) {\n this.innerProperties = new TiTaxiiDataConnectorProperties();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ExcelDataWrite() overloaded method will be used in order to write the integer data into the xls sheet.
public void ExcelDataWrite(String sheetname, int rownum, int cellnum, int data) throws InvalidFormatException { try { Workbook wb = WorkbookFactory.create(new FileInputStream(Excelpath)); Sheet sh = wb.getSheet(sheetname); Row rw = sh.getRow(rownum); Cell ce = rw.createCell(cellnum); ce.se...
[ "@SuppressWarnings(\"unchecked\")\r\n public void export(String dataTableId, String type)\r\n {\r\n excelWorkbook = ExcelFactory.instance().getExcelWorkbook(type);\r\n\r\n CSSParser parser = new CSSParser();\r\n\r\n // Gets the datatable\r\n UIData dataTable = (UIData) FacesContext.getCurren...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This initialize function is really for declaring a new permutation of a peptide sequence In this function call, the origPepSeq string is the original MODIFIED string
void initialize(String origPep, String curSeq, int z, TIntDoubleHashMap mcp) { peptide = origPep; pepLen = peptide.length(); charge = z; modPosMap = mcp; // deal with the N-terminus and C-terminus values if(curSeq.startsWith("[")) { modPosMap.put(constants.NTERM_MOD, globals.ntermMass); modPep...
[ "protected void initProteinParms() {\n this.kmerSize = 8;\n this.inFile = null;\n this.idColumn = \"1\";\n this.protColumn = \"aa_sequence\";\n }", "void setPCRPrimerSeq(java.lang.String pcrPrimerSeq);", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSeq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the cluster document counts
public void populateClusterDocumentCount(int k) { try { //FileOutputStream foutlog=new FileOutputStream(logFileName); logText = "\nPopulating Cluster document count"; //foutlog.write(logText.getBytes()); for(int row = 0; row < k; row++) { int sum = 0; for(int col = 0; col < nDocuments; c...
[ "int getTotalDocumentCount();", "public Integer countCatDocumentoss();", "private int readDocumentCount() {\n try (ElasticsearchConnection es = new ElasticsearchConnection()) {\n\n final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n\n String user = CONF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method (int) The reminder method. Possible values are the METHOD constants in Titanium.Android.Calendar. Platforms: android, Since: 1.5
public native void setMethod(int method) /*-{ this.@com.pmt.wrap.titanium.android.calendar.Reminder::handler.method = method; }-*/;
[ "public native int getMethod() /*-{\n\t\treturn this.@com.pmt.wrap.titanium.android.calendar.Reminder::handler.method;\n\t}-*/;", "public void setReminderNumber(int reminderNumber);", "public int getReminderNumber();", "private void reminderMethod(){\n Intent intent = new Intent(this, NotifyService.cla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the marshaller that converts a tree data structure from Java objects to XML, reusing any existing marshaller.
public Marshaller getMarshaller() throws JAXBException { return getMarshaller(true); }
[ "public Marshaller getMarshaller(XMLObject xmlObject) {\n Marshaller marshaller;\n\n marshaller = getMarshaller(xmlObject.getSchemaType());\n\n if (marshaller == null) {\n marshaller = getMarshaller(xmlObject.getElementQName());\n }\n\n return marshaller;\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the canary player manager
public CanaryPlayerManager getPlayerManager() { return playerManager; }
[ "PlayerManager getPlayerManager();", "public static PlayerConfigManager getPlayerConfigManager() {\n return playerConfigManager;\n }", "public static Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public MultiplayerGameManager getMultiplayerGameManager() {\n return this.multiplayerGameM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for the COM property "Priority"
@DISPID(1610874911) //= 0x6004001f. The runtime will prefer the VTID if present @VTID(62) void setPriority( int pnPri);
[ "public void setPriority(java.lang.Integer value);", "public void setPriority(Priority priority);", "public void setPriority (Priority pr)\r\n\t{\r\n\t\tpriority = pr;\r\n\t}", "void setPriority(int priority);", "public void setPriority(double priority) {\n this.priority = priority;\n }", "void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methods Constructor input: contextThe context of the application. If you're calling from an Activity, just use 'this'. nameThe name of the database file. If null, then the default filename is used. factoryUsed for creating Cursor objects. 'null' is the default and will create a new Cursor. versionThe number of the data...
public DatabaseHelper (Context context, String name, CursorFactory factory, int version) { super (context, name != null ? name : DatabaseFilesHelper.DB_DEFAULT_FILENAME, factory, version != 0 ? version : DATABASE_VERSION); Log.i(tag, "Called the full database Constructor!!!"); m_contex...
[ "public DatabaseHelper (Context context, String name) {\n\t\tsuper (context,\n\t\t\tname,\n\t\t\tnull,\n\t\t\tDATABASE_VERSION);\n\n\t\tLog.i(tag, \"Called the 2nd minimal Constructor!!!\");\n\t\tm_context = context;\n\t\tm_filename = name;\n\t}", "public DBOpenHelper(Context context) {\n super(context, DA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends all the tasks from the tasklist to the taskregistry in order to save to a json file.
public void storeTaskList(Context context){ //new JSONWriter("database.json", context); new TaskRegistry(context).storeTasks(taskList); }
[ "public void saveTasks() {\n try {\n BufferedWriter taskWriter = new BufferedWriter(new FileWriter(path));\n String tasks = \"\";\n for (Task task : TaskList.getTaskLists()) {\n tasks += task.toSaveString() + \"\\n\";\n }\n taskWriter.writ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Current status of this PRESET; see list of all [Status Codes](
@ApiModelProperty(required = true, value = "Current status of this PRESET; see list of all [Status Codes](https://www.optile.io/opg#285186)") @NotNull @Valid public Status getStatus() { return status; }
[ "public int value() {return status; }", "@java.lang.Override\n public com.google.maps.mapsplatformdatasets.v1alpha.State getStatus() {\n com.google.maps.mapsplatformdatasets.v1alpha.State result =\n com.google.maps.mapsplatformdatasets.v1alpha.State.forNumber(status_);\n return result == nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remove the mapping for the given proxy ID
void removeIDMapping(Object clientId) { Long mappedId = realIDs.remove(clientId); if (mappedId != null) { wireIDs.remove(mappedId); } }
[ "void removeIDMapping(Long mappedId) {\n Object clientId = wireIDs.remove(mappedId);\n if (clientId != null) {\n realIDs.remove(clientId);\n }\n }", "public void removeAgentServiceLocationMapping(long id);", "protected void deleteById(ID id) {\n map.remove(id);\n }", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renew authentication based on a header token.
AuthenticationToken renewAuthentication(String headerToken);
[ "public abstract long renewToken(Token<T> token, String renewer)\n throws IOException;", "@RequestMapping(value = \"/renew\", method = RequestMethod.PATCH)\n public void renew(@RequestHeader(\"X-CS-Auth\") String auth,\n @RequestHeader(\"X-CS-Session\") String sessionId) {\n se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for current user name
public String getCurrentUserName() { return this.currentUserName; }
[ "public String getCurrentUserName() {\n\t\treturn currentUser.getName();\n\t}", "public java.lang.String getUser_name() {\r\n return user_name;\r\n }", "public String getUserName(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_NAME, null);\n }", "public final String g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Logout dal modulo di autenticazione di firebase
public void logout() { FirebaseAuth.getInstance().signOut(); //elimino la "sessione" LazyInitializedSingleton lazyInitializedSingleton = LazyInitializedSingleton.getInstance(); lazyInitializedSingleton.clearInstance(); //ritorno alla pagina di login ...
[ "@Override\n public void logout() {\n firebaseAPI.logout();\n }", "public void firebaseSignOut() {\n firebaseAuth.signOut();\n }", "public void logout() {\n FirebaseAuth.getInstance().signOut();\n //elimino la \"sessione\"\n LazyInitializedSingleton lazyInitializedSin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column n_biz_user.registration_id
public void setRegistrationId(String registrationId) { this.registrationId = registrationId == null ? null : registrationId.trim(); }
[ "public void setRegistrationId(String registrationId) {\r\n\t\tthis.registrationId = registrationId;\r\n\t}", "public String getRegistrationId() {\r\n\t\treturn registrationId;\r\n\t}", "String getRegistrationId();", "public String getRegistrationId() {\n\t\treturn registrationId;\n\t}", "public void setReg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets editor visibility. If the editor is associated with a dialog, sets the dialog visibility.
@Override public void setVisible(boolean value) { if(this.getTabCount() <= 0) { return; // no editor actually exists } if (dialog != null) { dialog.setVisible(value); super.setVisible(value); } else { super.setVisible(value); } if (value) { UIBuilder.playSound("sounds/fordps3_boop....
[ "public void setAllEditorsVisible() {\n setAllEditorsVisible(useEditors);\n }", "public void setEditor(Editor editor) {\n this.currentEditor = editor;\n refreshView();\n }", "public void setVisibilityForGameAndMenu(boolean visibility)\n\t{\n\t\tgameFrame.setVisible(visibility);\n\t\ts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current channel
public Channel getCurrentChannel(){ return EPGContentHandler.instance().getCurrentChannel(); }
[ "public String getChannel() {\n return channel.getText();\n }", "public String getChannel() {\n return channel;\n }", "public String getChannel() {\r\n\t\treturn channel;\r\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public int getChannel()\r\n\t{\r\n\t\treturn chan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessing this URL to get the particular ticket
@GetMapping(value="/ticket/{ticketId}") public Ticket getTicketById(@PathVariable("ticketId") Integer ticketId){ return ticketBookingService.getTicket(ticketId); }
[ "de.uniba.rz.io.rpc.TicketRequest getTicket();", "public Ticket viewTicket(String id) {\n try {\n HttpGet request = new HttpGet(\"https://codingtestrishabh.zendesk.com/api/v2/tickets/\" + id + \".json\");\n//\t\t\t\t\t\n String auth = \"rishiorveth@gmail.com\" + \"/token:RzDVCdSBtia3W...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for final mark
public int getFinalMark() { return finalMark; }
[ "public int getFinalMark()\n {\n return finalMark;\n }", "public int getMark() {\n return mark;\n }", "public int getMark()\n {\n return mark;\n }", "public Mark getMark() {\n\t\treturn mark;\n\t}", "public String getMark() {\r\n return mark;\r\n }", "public S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts from fastq to fasta only if the quality is not low
public void convert() throws IOException { // Build the readers. FileReader fr = new FileReader(fastq); BufferedReader br = new BufferedReader(fr); FastqReader fqr = new FastqReader(br); // Build the writers. FileWriter fw = new FileWriter(fasta); PrintWriter pw =...
[ "public void convert() throws IOException\n\t{\n\t\t// Build chain of readers.\n\t\tFileReader fr = new FileReader(fastq);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tFastqReader fqr = new FastqReader(br);\n\n\t\t// Build chain of writers.\n\t\tFileWriter fw = new FileWriter(fasta);\n\t\tPrintWriter pw = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find or create a first Customer of the current user company.
@Override public Customer getFirstCustomer(User user) { Company company = user != null ? user.getCompany() : getApplContext().getUserCompany(); Customer firstCustomer = getSession().createQuery(Customer.class).setLimit(1).orderBy(Customer.id).uniqueResult(); if (firstCustomer == null) { ...
[ "private Contact getFirstContact(Integer customerId) throws Exception {\n assert customerId != null;\n Contact firstContact = null;\n beginTx();\n try {\n final Customer customer = (Customer) getEnvironment().getSessionFactory()\n .getCurrentSession().load(Customer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the discountAmount property value
public void setDiscountAmount(MMDecimal discountAmount) { this.discountAmount = discountAmount; }
[ "public void setDiscount(double value) {\n this.discount = value;\n }", "public void setDiscountAmount(java.lang.Double value) {\n this.discountAmount = value;\n }", "public void setDiscount(double aDiscount) {\r\n discount = aDiscount;\r\n }", "public com.diviso.graeshoppe.order.avro....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleEntryPointSpec" $ANTLR start "entryRuleExitPointSpec" ../org.yakindu.sct.statechart.expressions/srcgen/org/yakindu/sct/statechart/parser/antlr/internal/InternalExpressions.g:1790:1: entryRuleExitPointSpec returns [EObject current=null] : iv_ruleExitPointSpec= ruleExitPointSpec EOF ;
public final EObject entryRuleExitPointSpec() throws RecognitionException { EObject current = null; EObject iv_ruleExitPointSpec = null; try { // ../org.yakindu.sct.statechart.expressions/src-gen/org/yakindu/sct/statechart/parser/antlr/internal/InternalExpressions.g:1791:2:...
[ "public final EObject entryRuleExitPointSpec() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleExitPointSpec = null;\r\n\r\n\r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1843...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column PDSCI.PUB_ELEMENT.ELEMENT_VAR_NAME
public void setElementVarName(String elementVarName) { this.elementVarName = elementVarName; }
[ "public void setElementNameForHibernate(SC elementName) {\n _elementName = elementName;\n }", "public String getElementVarName() {\r\n\t\treturn elementVarName;\r\n\t}", "public void setELEMENT_ID(String ELEMENT_ID) {\r\n this.ELEMENT_ID = ELEMENT_ID == null ? null : ELEMENT_ID.trim();\r\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
caseName is the test case Name caseResult is the test case result status: true or false print result in result log file
public void printCaseResult(String caseName, boolean caseResult) { String caseValue; if (caseResult) caseValue = "pass"; else caseValue = "failure"; logger.info(caseName + " : " + caseValue); }
[ "public void testCaseExecutionStatus(ITestResult result, String testName) {\r\n try {\r\n if (result.getStatus() == ITestResult.SUCCESS) {\r\n log(\"\");\r\n log(\"***********************\" + testName + \" has PASSED. \" + \"**************************\");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Colours of a card game are saved in colours.
public void fillColours() { this.colours = new String[4]; this.colours[0] = "diamonds"; this.colours[1] = "hearts"; this.colours[2] = "spades"; this.colours[3] = "clubs"; }
[ "private void applyColourPreferences() {\n int card = MainActivity.sharedPrefs.getInt(\"cardColour\",0);\n int text = MainActivity.sharedPrefs.getInt(\"textColour\",4);\n ConstraintLayout layout = findViewById(R.id.gameLayout);\n switch (card) {\n case 1:\n this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////// Method checks portrait(if yes, is server fragment available), or landscape //////////////////// and sets the 'server status' TextView
public void setServerStatus(String status){ if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){ if(getSupportFragmentManager().findFragmentById(R.id.fragment_container) != null && getSupportFragmentManager().findFragmentById(R.id.fragment_con...
[ "public void updateServerStatus() {\n waitForFrameLoaded();\n nuxeoFrame.updateMainButton();\n nuxeoFrame.updateLaunchBrowserButton();\n nuxeoFrame.updateSummary();\n }", "private void updateViews() {\r\n \t\r\n // Back in the UI thread -- update our UI elements\r\n \t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "focusNode"
@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present @VTID(9) ms.html.IHTMLDOMNode focusNode();
[ "public String getFocusElement() {\n\t\treturn focusElement;\n\t}", "public Control getFocus()\r\n\t{\r\n\treturn _focus;\r\n\t}", "public LwComponent getFocusComponent() {\n return focusComponent;\n }", "public Component getFocusComponent() {\n\t\treturn focusComponent;\n\t}", "public Component getFocu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method prints the employee details.
public void printEmp() { System.out.println("name : " + name); System.out.println("salary :" + salary); }
[ "private void printEmployeeDetails() {\n\n\t\tSystem.out.println(\"Writing employee details to console :\\n\" + list);\n\t}", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSyst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delete a ListContainer from the named container
void deleteListContainer(Object id, String containerName) throws IOException;
[ "void deleteListContainer(Object id) throws IOException;", "void deleteListContainer(ContainerId id) throws IOException;", "public void deleteContainer(int id);", "Future<Void> deleteContainer(String container);", "public void deleteContainer(String name)\r\n \t\tthrows NoSuchElementException, IllegalArg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the asset manage req handle with the primary key or returns null if it could not be found.
@Override public AssetManageReqHandle fetchByPrimaryKey(long handleId) throws SystemException { return fetchByPrimaryKey((Serializable)handleId); }
[ "@Override\n\tpublic AssetManageReqHandle fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\tAssetManageReqHandle assetManageReqHandle = (AssetManageReqHandle)EntityCacheUtil.getResult(AssetManageReqHandleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\tAssetManageReqHandleImpl.class, primaryKey)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the words of the glossary between startPage (included) and endPage (included) parameters.
public List<Word> pages(int startPage, int endPage) { List<Word> list = new ArrayList<Word>(); startPage = startPage - 1; endPage = endPage - 1; int startWord = WORDS_PER_PAGE * startPage; int endWord; if (endPage + 1 == this.numberOfPages()) { endWord = this.words.size() - 1; } else { endW...
[ "public List<Word> getWordsStartingAt(int start);", "public List getWordEntries();", "void findGlossaryRelations(Text qText, Text cText) {\n\t\tHashtable[] f = new Hashtable[1];\n\t\tHashtable filter = new Hashtable();\n\t\tfilter.put(Token.ISNOT_STOPWORD, new Boolean(true));\n\t\tf[0] = filter;\n\t\tToken.setF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use TeledonRequest.newBuilder() to construct.
private TeledonRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "public Request createRequest();", "teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType();", "private LesenRPCRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private Request(c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
invert a string. EXAMPLE: "abc" == "cba"
private String invertString(String text) { String reverseText = ""; for(int i = text.length(); i >= 1; i--) { reverseText += text.substring((i - 1), i); } return reverseText; }
[ "public String reverseString(String s);", "private String invertBitString(String bitString) {\r\n return bitString.replaceAll(\"0\", \"x\").replaceAll(\"1\", \"0\").replaceAll(\"x\", \"1\");\r\n }", "public static String flip( String s )\n {\n\tint size = s.length();\n\tLatkes t = new Latkes( size );...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ecs_ego_user_relationship.follower_id
public Long getFollowerId() { return followerId; }
[ "public Long getFollowedId() {\n return followedId;\n }", "public void setFollowerId(Long followerId) {\n this.followerId = followerId;\n }", "public Long getFollow_id() {\r\n return follow_id;\r\n }", "public Follow getFollowByFollowingAndFollowerId(Follow follow);", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.bingo.server.msg.FightAgreeExitGameRequest FightAgreeExitGameRequest = 9;
com.bingo.server.msg.Fight.FightAgreeExitGameRequestOrBuilder getFightAgreeExitGameRequestOrBuilder();
[ "com.bingo.server.msg.Fight.FightAgreeExitGameRequest getFightAgreeExitGameRequest();", "com.bingo.server.msg.Fight.FightExitGameRequest getFightExitGameRequest();", "com.bingo.server.msg.Fight.FightExitGameRequestOrBuilder getFightExitGameRequestOrBuilder();", "public com.bingo.server.msg.Fight.FightExitGame...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string editorial_notes = 7;
java.lang.String getEditorialNotes();
[ "public int getNoteNumber();", "private String getFactoredString(String note) {\n\t\t\n\t\tif (note.charAt(note.length() - 1) == '5') {\n\t\t\t\n\t\t\tString[] command = note.split(\"~\");\n\t\t\talarmnote = command[0];\n\t\t\talarm_type = 0;\n\t\t\t\n\t\t\treturn \"One Shot Alarm\";\n\t\t}\n\t\t\n\t\tString[] co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleStringExp" $ANTLR start "entryRuleBooleanExp" InternalDOcl.g:3244:1: entryRuleBooleanExp returns [EObject current=null] : iv_ruleBooleanExp= ruleBooleanExp EOF ;
public final EObject entryRuleBooleanExp() throws RecognitionException { EObject current = null; EObject iv_ruleBooleanExp = null; try { // InternalDOcl.g:3244:51: (iv_ruleBooleanExp= ruleBooleanExp EOF ) // InternalDOcl.g:3245:2: iv_ruleBooleanExp= ruleBooleanExp EOF ...
[ "public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // ../org.osate.xtext.aadl2.properties/src-gen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPropertiesPars...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the initialBalance property.
public void setInitialBalance(double value) { this.initialBalance = value; }
[ "public void setInitialCashBalance(double amount) {\n simulator.setCashBalance(amount);\n }", "public Account(double initialBalance)\r\n\t{\r\n\t\t// modify the account balance if the value of the variable \"initialBalance\" is greater than 0; otherwise, the account balance remains 0\r\n\t\tif (initialB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column user_company.fax_no
public String getFaxNo() { return faxNo; }
[ "public String getFaxNo() {\n return faxNo;\n }", "public String getFaxNo() {\n return faxNo;\n }", "public String getFax() {\r\n return (String) get(\"fax\");\r\n }", "public java.lang.String getFax_number() {\n return fax_number;\n }", "@Override\n\tpublic java.lang.Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
java.lang.Object Determines whether another object is equal to this FulltextMatch. The result is true if and only if the argument is not null and is a FulltextMatch object that has the same property, relation type, and value.
@Override public boolean equals( final Object obj ) { if (this == obj) { return true; } if (!(obj instanceof FulltextMatch)) { return false; } FulltextMatch other = (FulltextMatch)obj; Collection<S...
[ "public boolean isEqual(Navajo o);", "@Override\n public boolean equals(Object obj) {\n boolean result = false;\n\n if(obj.getClass().equals(getClass())) {\n FieldEvaluator fieldEvaluator = (FieldEvaluator) obj;\n result = this.leftValue.equals(fieldEvaluator.leftValue) &&\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates an unique cpnID for all places and all transitions in this model. No cpnIDs are generated for any places and transitions in a model that is a submodel of any transition in this model.
public void generateCpnIDs() { // for all places, generate a cpnID Iterator places = this.getPlaces().iterator(); while (places.hasNext()) { ColoredPlace place = (ColoredPlace) places.next(); place.setCpnID(ManagerID.getNewID()); } // for all transitions, generate a cpnID Iterator transitions = this.g...
[ "@Override\n public long generateNewContractId() {\n return idCounter++;\n }", "private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the parameters property: Notebook parameters.
public Map<String, NotebookParameter> getParameters() { return this.parameters; }
[ "public PA getParameters();", "public Parameters getConfigParameters();", "public Map<String, RunbookParameter> parameters() {\n return this.parameters;\n }", "public Parameters getParameters() {\r\n return params;\r\n }", "public ParameterPanel getParameterPanel() {\n return m_parameters;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
El misil aumenta la velocidad en X
public void movimientoMisil(){ posMisilX += misilVelocidadX; //Posicion de la bola en Y posMisilY += misilVelocidadY; }
[ "protected List<Casilla> buscarVecinos(int x, int y) {\r\n\t\tList<Casilla> vecinos = new ArrayList<Casilla>();\r\n\t\tvecinos = buscarVecinosAux(x, y, this.tableroSG.get(y).get(x).getColor());\r\n\t\tfor (int i = 0; i < vecinos.size(); i++) {\r\n\t\t\ttableroSG.get(vecinos.get(i).getColumna()).get(vecinos.get(i).g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/public SupermarketPage query(SupermarketPage page) throws DaoException; /public SupermarketOrder querySupermarketOrderByStorageId(Long storageId) throws DaoException;
public List<SupermarketOrder> querySupermarkerByOrderId(SupermarketOrder supermarketOrder) throws DaoException;
[ "PageResult<AllotOrderDO> selectByQueryWithPage(AllotOrderQuery query);", "GoodsOrder selectByPrimaryKey(String id);", "@Query(\"SELECT new thiendz.j5.assignment.model.ReportProduct(od.product, SUM(od.price * od.quantity), SUM(od.quantity) AS s) FROM OrderDetail od GROUP BY od.product ORDER BY (s) DESC\")\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete a state from a type.
public void deleteState(String type, String state) { TaskType tt = getType(type); TaskState ts = getState(type, state); if (tt != null && ts != null) tt.states.remove(ts); }
[ "public void delete(Type type);", "@Override\n\tpublic void removeState(ActorState state) {\n\t\tmyStates.remove(state);\n\t}", "public void deleteNextState(String type, String state, String nextstate) {\r\n\t\tTaskState st = getState(type, state);\r\n\t\tif (st != null)\r\n\t\t\tst.nextStates.remove(nextstate)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the bottom right corner of the heat map for use when drawing over the image
public Point getHeatMapBR() { return heatMapBR; }
[ "public Point getHeatMapBL() {\n return new Point(heatMapTL.x, heatMapBR.y);\n }", "public Point getHeatMapTR() {\n return new Point(heatMapBR.x, heatMapTL.y);\n }", "private Point getUpper() {\n int upperX;\n int upperY;\n upperY = (int) (gameCanvas.getHeight() + mapOff...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method to get the term result for a term ID
private void getTermResult(String idTerm){ TermResultJsonHandler tJsonHandler = new TermResultJsonHandler(this); OrdabankiRestClientUsage tClient = new OrdabankiRestClientUsage(); boolean connected = ((ResultInfo) getActivity()).getConnectionsDetector().confirmConnection(); if (connected...
[ "public abstract String getTerm(String id);", "public String getTermId() {\n return termId;\n }", "private String getTerm(ITermbase p_tb, long p_entryId) throws Exception\n {\n String entryXml = p_tb.getEntry(p_entryId);\n XmlParser parser = XmlParser.hire();\n Document dom = p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SequenceAction__Group__1" $ANTLR start "rule__SequenceAction__Group__1__Impl" InternalDsl.g:11056:1: rule__SequenceAction__Group__1__Impl : ( ( rule__SequenceAction__ActionAssignment_1 ) ) ;
public final void rule__SequenceAction__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:11060:1: ( ( ( rule__SequenceAction__ActionAssignment_1 )* ) ) // InternalDsl.g:11061:1: ( ( rule__SequenceAction__ActionAss...
[ "public final void rule__SequenceAction__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:11034:1: ( ( ( rule__SequenceAction__ActionAssignment_0 ) ) )\n // InternalDsl.g:11035:1: ( ( rule__SequenceActi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a Geo from another Geo.
public Geo(Geo geo) { this(geo.x, geo.y, geo.z); }
[ "public GeoElement copyInternal(Construction cons);", "public Geo(double lat, double lon) {\n\t initialize(lat, lon);\n\t }", "@NotNull public static GeoShape.Builder geoShape() { return new GeoShape.Builder(new HashMap<String,Object>()); }", "GeoElement toGeoElement();", "Geq createGeq();", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
codigo que genera el certificado a partir del archivo y regresa un string con el certificado
private String getCertificado(X509Certificate cert) { try { String certificado = ""; byte[] buf = cert.getEncoded(); certificado = Base64.getEncoder().encodeToString(buf).replaceAll("\n", ""); return certificado; } catch (CertificateEncodingException ex) {...
[ "public abstract void putCertificado(int codigo, String nombre, String valido) throws PersistenceException;", "java.lang.String getCertificateData();", "java.lang.String getCertData();", "java.lang.String getCertifier();", "String getCertificateLocation();", "java.lang.String getCertificateId();", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get current page source
public String getCurrentPageSource() { return driver.getPageSource(); }
[ "String getPageSource();", "public String getPageSource(){\n\t\t\tString s1=\tDriver.driver.getPageSource();\n\t\t\t\treturn s1;\n\t\t\t}", "public String getPageSource() {\n \t\treturn getWebDriver().getPageSource();\n \t}", "@RobotKeyword\n public String getSource() {\n return driverManager.getCur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Expire given zookeeper client's session.
public static void expireSession(ZooKeeperClient zkc, String zkServers, int timeout) throws Exception { final CountDownLatch expireLatch = new CountDownLatch(1); final CountDownLatch latch = new CountDownLatch(1); ZooKeeper oldZk = zkc.get(); oldZk.exists("/", new Watcher() {...
[ "void expire(Session session);", "void sessionExpired();", "void sessionInactivityTimerExpired(DefaultSession session, long now);", "private void onExpire() {\n if (isOpen()) {\n LOGGER.debug(\"Expired session: {}\", id);\n this.id = 0;\n this.state = State.EXPIRED;\n closeListeners.for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when a SYN_REPLY frame is received. The Name/Value Header Block is not included. See readHeaderBlock().
void readSynReplyFrame(int streamId, boolean last);
[ "public void onRecvPacketBytes(Origin origin, int pktType, byte[] payload);", "public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);", "protected void inboundDataReceived(ReadableBuffer frame) {\n Preconditions.checkNotNull(frame, \"frame\");\n boolean needToCloseF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the organization data.
public void resetData() { this.setName(""); this.setType(""); this.setContact(""); this.setAffiliatedResearchers(""); this.setCountry(""); this.setResearchKeywords(""); this.setResearchDescription(""); this.setHomePage(""); }
[ "public void unsetOrganization()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ORGANIZATION$2, 0);\n }\n }", "void unsetOrganization();", "public void clearOrganisms();", "public void reset(){\n\t\tdataAggregate = null;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decrypt ciphertext into plaintext buffer using the given nonce.
void decrypt(ByteBuffer plaintext, ByteBuffer ciphertext, byte[] nonce) throws GeneralSecurityException;
[ "void decrypt(ByteBuffer plaintext, ByteBuffer ciphertext, ByteBuffer aad, byte[] nonce)\n throws GeneralSecurityException;", "public byte[] decrypt(byte[] in, byte[] nonce) {\r\n assert nonce != null && nonce.length == NONCE_SIZE_BYTES;\r\n // throw new RuntimeException(\"Unimplemented.\");\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recupera o valor de numMinCotasInteg.
@Column(name="NumMinCotasInteg") public Integer getNumMinCotasInteg() { return numMinCotasInteg; }
[ "public void setNumMinCotasInteg(Integer numMinCotasInteg) {\n\t\tthis.numMinCotasInteg = numMinCotasInteg;\n\t}", "Integer getCardinalidadeMinima();", "private String handleIntMin() {\n return NEGATIVE + transformUnsigned(INT_MIN_HELPER) + SPACE + FIRST_NINETEEN[8];\n }", "public int getMinuti() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Comprueba si un domicilio es valido. El atributo domicilio debe ser alfanumerico, distinto de null y de vacio.
static public boolean domicilioEsValido(String domicilio) { Pattern p = Pattern.compile("[^a-zA-Z0-9 ]"); if (domicilio != null && !domicilio.equals("")) { return !p.matcher(domicilio).find(); } return false; }
[ "public boolean validarNulos(){\n \n if (this.getTipo().equalsIgnoreCase(\"\")||this.getMonto().equalsIgnoreCase(\"\")) {\n return false;\n }\n \n return true;\n }", "public boolean validarDirecciones() {\r\n boolean respuesta;\r\n if (this.getId_Prov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
My final solution for Day1 Part2 What is the first 'resulting' frequency your device reaches twice? (Note that your device might need to repeat its list of frequency changes many times before a duplicate frequency is found, and that duplicates might be found while in the middle of processing the list.)
static void solution1Day1Part2() { Scanner file = null; Set<Integer> resultingFrequencies = new HashSet<>(); int resultingFrequency = 0; int change = 0; boolean duplicateFound = false; try { while (!duplicateFound) { file = new Scanner(new F...
[ "double getFrequency();", "int getFrequency();", "public void increaseFreq() { this.frequency++; }", "public double getCooccurenceFrequency();", "public static void main(String[] args) {\n Integer []arr = {1,12,45,78,1,4,12};\n\n int frq = Collections.frequency(Arrays.asList(arr),1); // 2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the newOrientation property.
public void setNewOrientation(int value) { this.newOrientation = value; }
[ "public void setOrientation(int newOrientation) {\n if (orientation != newOrientation) {\n switch (newOrientation) {\n case VERTICAL:\n case HORIZONTAL:\n int oldOrientation = orientation;\n orientation = newOrientation;\n fireProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Encrypts the values of the superseding access token and the refresh token, using a key derived from the superseded refresh token. The tokens are concatenated to a string separated with `|` before encryption so that we only perform one encryption operation and that we only need to store one field
String encryptSupersedingTokens(String supersedingAccessToken, String supersedingRefreshToken, String refreshToken, byte[] iv, byte[] salt) throws GeneralSecurityException { Cipher cipher = getEncryptionCipher(iv, refreshToken, salt); final String supersedingTokens = ...
[ "AccessToken exchangeRefreshToken(final String refreshToken);", "void refreshUserLoginToken(String token, String refreshedToken, String refreshTime);", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by makin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column comment_merchant.is_anonymous
public Boolean getIsAnonymous() { return isAnonymous; }
[ "public String getIsanonymous() {\n return isanonymous;\n }", "public boolean isAnonymous()\n {\n return identifier.isAnonymous();\n }", "public void setIsanonymous(String isanonymous) {\n this.isanonymous = isanonymous == null ? null : isanonymous.trim();\n }", "protected Boo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the license key, if any.
String getLicenseKey() { return null; }
[ "public String getLicense() throws IOException, NoSuchAlgorithmException, KeyManagementException\r\n {\r\n\r\n String fullUrl = BASE_URL +\r\n apiKey +\r\n PATH_SEPAR +\r\n Action.LICENSE;\r\n\r\n\r\n return doRequest(Method.GET, fullUrl, null, null);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests removing from an empty list
public void testRemoveFromEmpty() { list.add("dance"); list.add(0, "safety"); list.clear(); assertFalse(list.remove("safety")); Exception exception; exception = null; try { list.remove(0); } catch (IndexOutOfBoundsException e...
[ "@Test\n public void remove() {\n testList.add(42);\n testList.remove(42);\n assertEquals(0, testList.count());\n }", "@Test\n public void testRemoveAll_Not_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Increases the number of Chairs at a given Table by the given number. This is an overload of the above method, but is used to add Chairs to a specific table.
void increaseTableSeatMax(int numberOfAddedSeats, Table table);
[ "public int increaseTableNumber() {\n\t\treturn nextFreeTableNumber.getAndIncrement();\n\t}", "public void set_OfficeChairs(int x, int y, int number){\t\n\t\t\tofficeChairs[x][y] += number;\n\t\t}", "public void increase(int number) {\r\n this.count += number;\r\n }", "public void increase(int numbe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column IMCO_DYN_FILE_STRUCTURE.MODIFIED_DATE
public void setMODIFIED_DATE(Date MODIFIED_DATE) { this.MODIFIED_DATE = MODIFIED_DATE; }
[ "public void setDATE_MODIFIED(Date DATE_MODIFIED)\r\n {\r\n\tthis.DATE_MODIFIED = DATE_MODIFIED;\r\n }", "public void setDATE_MODIFIED(Date DATE_MODIFIED) {\r\n this.DATE_MODIFIED = DATE_MODIFIED;\r\n }", "void setLastModifiedDate(D lastModifiedDate);", "public void setModifiedDate(Date modifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method validates if the a given activity exists in the database.
public boolean existActivity(int activityID);
[ "boolean isActivityExist(long activityId);", "public void testActivityExists() {\n PlannerDashActivity activity = getActivity();\n assertNotNull(activity);\n }", "boolean isActivityNotValid(ExoSocialActivity activity, ExoSocialActivity comment) throws Exception;", "@Override\n public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests parsing individual lines.
@Test public void testParseLine () throws IOException { // test normal case final String [] normal = { "a", "b", "c" }; String output = _invokeWriter (normal); assertEquals ("'a','b','c'\n", output); // test quoted commas final String [] quoted = { "a", "b,b,b", "c" }; output = _invokeW...
[ "@Test\n public void testParseLine() {\n String line = null;\n HackerDetector instance = new HackerDetectorImpl();\n String expResult = null;\n String result = instance.parseLine(line);\n assertEquals(expResult, result);\n }", "@Test\n public void testGetLine()\n {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sortiert das Feld mit dem SelectionSortAlgorithmus
public static <T> void sortSelect(Feld<T> feld, java.util.Comparator<? super T> comp){ for(int i = 0; i < feld.size() - 1; ++i){ int p = i; for(int j = i + 1; j < feld.size(); ++j){ if(comp.compare(feld.get(p), feld.get(j)) > 0){ p = j; } } feld.swap(i, p); } }
[ "public void selectionSort()\n\t{\n\t\t\n\t\tfor(int i = 0; i < currentLength; i++)\n\t\t{\n\t\t\tint currentMax = i;\n\t\t\tfor(int j = i+1; j < currentLength; j++)\n\t\t\t{\n\t\t\t\tif(array[j].compareTo(array[currentMax]) == 1)\n\t\t\t\t\tcurrentMax = j;\n\t\t\t}\n\t\t\tif(i != currentMax)\n\t\t\t\tswap(i, curre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a message from the wizard channel (i.e., where wizards write to and miners read from).
public Message getMessageWizardChannel() { Message msg1=null; try{ msg1=chann1.take(); } catch (InterruptedException e) { e.printStackTrace(); } return msg1; }
[ "public Message getMessageWizardChannel() {\n\t\tMessage temp = null;\n\t\t\n\t\ttry {\n\t\t\t//se ia mesajul din buffer\n\t\t\ttemp = bufferWizardChannel.take();\t\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t\t\n\t}", "private String getMessage(MessageChannel c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new CleverRandomPlayer.
public CleverRandomPlayer(Random random) { this("CleverRandomPlayer", random); }
[ "public void createPlayer() {\n\t\tplayer = this.factory.getPlayer(rand.nextInt(Game.WIDTH));\n\t}", "public CleverRandomPlayer() { this(\"CleverRandomPlayer\", new Random()); }", "Player createPlayer();", "void createPlayer(Player player);", "private CSCreatePlayer() {}", "public void createPlayer(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the loading of hybrid parent(s) and children
@Test public void testHybridLoading(){ //get the hybrid parents of a hybrid taxon TaxonModel taxon = taxonDAO.loadTaxon(2663, false); List<TaxonModel> hybridParents = taxon.getHybridparents(); assertFalse(hybridParents.isEmpty()); assertEquals(new Integer(2658), hybridParents.get(0).getId()); //get the ...
[ "public abstract void loadChildren();", "protected void loadChildren() {\n\t\t// I don't use this...subclasses might\n\t}", "boolean isParentInitialized();", "protected void beforeParentInit() {\n // by default do nothing\n }", "private void checkParentReady(JavaClass child) {\n \t\t//if we're set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a LukeEmptyCommandException object that indicates no command details.
public LukeEmptyCommandException(String command) { super(String.format("Sorry, '%s' command should not be empty. Please add details about the command.", command)); }
[ "public CommandNotFoundException() {\n\t\tsuper();\n\t}", "public WrongCommandException() {\n super(\"Sorry, I did not understand that. Please use the correct command words.\");\n }", "public NoCommand() {\n\t\n\t}", "public InvalidCommand() {\n this.errorMessage = EMPTY_STRING;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
First 2 bytes are size of server name list (only expecting one) Next byte is type (0 for hostname)
private static String readSniExtension(ByteBuffer bb) { skipBytes(bb, 3); // Next 2 bytes are length of host name char serverNameSize = bb.getChar(); byte[] serverNameBytes = new byte[serverNameSize]; bb.get(serverNameBytes); return new String(serverNameBytes, StandardCha...
[ "private static void createNameServerList() {\n nameServerList = new ArrayList<>();\n nameServerList.add(\"198.41.0.4\");\n nameServerList.add(\"199.9.14.201\");\n nameServerList.add(\"192.33.4.12\");\n nameServerList.add(\"199.7.91.13\");\n nameServerList.add(\"192.203.230...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
M\u00e9todo para asignar (set) el ID de movimiento COTI
public void setIdMovimientoCOTI(Integer idMovimientoCOTI) { this.idMovimientoCOTI = idMovimientoCOTI; }
[ "public void setIdMotivo(int value) {\n this.idMotivo = value;\n }", "public void setId_movimiento(Integer id_movimiento) {\r\n this.id_movimiento = id_movimiento;\r\n }", "public void setIdComentario(int id) {\n this.id = id;\n }", "public void setId(int idNuevo)\n { \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the rdd containing for every triplet the number of tweets that used it
public static final JavaPairRDD<Triplet, Long> topTripletHashtag(JavaRDD<Tweet> tweetRDD) { JavaPairRDD<Triplet, Long> top = tweetRDD .filter(tweet -> tweet.getEntities().getHashtags().size() == 3) .mapToPair(tweet -> { Triplet triplet = new Triplet(); ...
[ "public static final JavaPairRDD<String, Long> getNbHashtagByDay(JavaRDD<Tweet> tweetRDD) {\n JavaPairRDD<String, Long> tuple = tweetRDD.mapToPair(tweet -> {\n return new Tuple2(tweet.getCreated_at(), new Long(tweet.getEntities().getHashtags().size()));\n });\n return tuple.reduceByK...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allow an application to set a document event handler. Applications may register a new or different handler in the middle of a parse, and the CSS parser must begin using the new handler immediately.
void setDocumentHandler(CSSHandler handler);
[ "public void addHandler(EventHandler handler);", "public void setLexicalHandler(LexicalHandler handler) { }", "public void setDefaultEventHandler(String eventHandler) {\n this.defaultEventHandler = eventHandler;\n }", "public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column orders.ORDER_STATE
public Integer getOrderState() { return orderState; }
[ "public Integer getOrderState() {\n\treturn orderState;\n }", "public OrderState getState() {\n if ( state == null || idState != state.getId() ) {\n OrderStateDAO osd = new OrderStateDAO();\n state = osd.getState( idState );\n }\n return state;\n }", "public io.d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /personalbankaccounts : get all the personalBankAccounts.
@GetMapping("/personal-bank-accounts") @Timed public List<PersonalBankAccountDTO> getAllPersonalBankAccounts() { log.debug("REST request to get all PersonalBankAccounts"); return personalBankAccountService.findAll(); }
[ "@GetMapping(\"/bank-accounts\")\n @Timed\n public List<BankAccount> getAllBankAccounts() {\n log.debug(\"REST request to get all BankAccounts\");\n return bankAccountRepository.findAll();\n }", "public List<Accounts> getAllAccounts() throws BusinessException;", "public List<BankAccount> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Feature 3 : doHitPaddleOrWall()
private void doHitPaddleOrWall(){ BouncePoint bp = this.getBounce(); double newX, newY, newDirX, newDirY; double incomingDistanceX = bp.getX() - this.getCurrentBallX(); double incomingDistanceY = bp.getY() - this.getCurrentBallY(); double outgoingDistanceX = this.getBallDirectionX() - incomingDistanc...
[ "private boolean hitWall(){\n\n\n\t BouncePoint bp = calculateBouncePointWall();\n\t if(bp!= null) {\n\t\t setBounce(bp);\n\t\t return true;\n\t }else {\n\t\t return false;\n\t }\n }", "private boolean hitPaddle(){\n\t BouncePoint bp = calculateBouncePointPaddle();\n\t if(bp!= null) {\n\t\t setBounce(b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }