query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Gets the mail Nickname.
public String getMailNickname() { return this.mailNickname; }
[ "public String mailNickname() {\n return this.mailNickname;\n }", "java.lang.String getNickname();", "java.lang.String getNickName();", "public String getUserNickname()\n {\n if (nickName == null)\n nickName =\n provider.getInfoRetreiver().getNickName(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stores all nodes in the tree whose IDs are in the range between ID1 and ID2.
public ArrayList<Node> rangeSearch(Node rootNode, int ID1, int ID2, ArrayList<Node> nodesInRange) { if(rootNode != null) { if(rootNode.ID > ID1) { nodesInRange = rangeSearch(leftChildOf(rootNode), ID1, ID2, nodesInRange); ...
[ "public static IdSet range(int from, int to) {\n IdSet idSet = new IdSet();\n return idSet.addRange(from, to);\n }", "public IdSet addRange(int from, int to) {\n if (to >= from) {\n for (int id = from; id <= to; id++) {\n this.ids.add(id);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This API is used to save record in correspondence base table.
public abstract CorrespondenceBase saveCorrespondenceBase(CorrespondenceBase correspondenceBase);
[ "public Record saveRecord(Record record);", "public function save()\n {\n global $Database;\n \n $query = new QueryBuilder();\n $columns = [];\n \n foreach($this->_columns as $key => $val) {\n if((!is_object($key) && !is_array($key)) &&\n !Fu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This class has the methods to manage users, organizations and reviewer properties. The implementations of these methods are in the server side
@RemoteServiceRelativePath("reviewerAdminService") public interface ReviewerAdminService extends RemoteService { public Organization saveOrganization(Organization organization) throws Exception; public Collection<Organization> getOrganizations(String organizationName) throws Exception; public Organization getOr...
[ "private void getOrganizations(){\n\t\t\n\t\treviewerAdminService.getOrganizations(null,new AsyncCallback<Collection<Organization>>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tWindow.alert(\"Failed get organizations: \" + caught.getMessage());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve el valor de ideFormato.
public java.lang.Integer getIdeFormato() { return ideFormato; }
[ "public void setIdeFormato(java.lang.Integer ideFormato) {\n\t\tthis.ideFormato = ideFormato;\n\t}", "public int getTipoFormato() {\n\t\treturn tipoFormato;\n\t}", "public String getToolFormatParameter();", "public Param getFormat() {\r\n return format;\r\n }", "Format getFormat();", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the textual representation of a usersRegister.
@Override public String toString() { StringBuilder s = new StringBuilder(); s.append("UsersRegister{"); for (User user : this.usersList) { s.append(String.format("%s%n", user)); } s.append("}"); return s.toString(); }
[ "public static String registerToString(){\n\n String s = \"\";\n s += \"Registers: \";\n s += \" acc: \";\n s += String.format(\"%08d\", accumulator);\n s += \" ip: \";\n s += String.format(\"%08d\", iPointer);\n s += \" flags: \";\n s += String.format(\"%08d\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that the samhsa checker is invoked and returns true when a mcs claim with no data is passed, as the matches should have nothing to match as a positive samhsa result.
@Test public void testHasNoSamhsaDataWhenMcsClaimResponseWithNoDataExpectTrue() { RdaMcsClaim mcsClaim = mock(RdaMcsClaim.class); boolean hasNoSamhsa = samhsaMatcher.hasNoSamhsaData(mcsClaim); assertTrue(hasNoSamhsa); }
[ "@Test\n public void testHasNoSamhsaDataWhenFissClaimResponseWithNoDataExpectTrue() {\n\n RdaFissClaim fissClaim = mock(RdaFissClaim.class);\n\n boolean hasNoSamhsa = samhsaMatcher.hasNoSamhsaData(fissClaim);\n\n assertTrue(hasNoSamhsa);\n }", "public void checkNoMoreClaims(){\r\n if(claimAmount...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Una vez dentro del juego, nos deja volber al menu
public void volvreAlMenu() { // Muestra el menu y no permiye que se cambie el tamaņo Menu.frame.setVisible(true); Menu.frame.setResizable(false); // Oculta la ventana del flappyBird jframe.setVisible(false); }
[ "private void anyadeMenu() {\n \n\t\t\tJMenuBar menuBar = new JMenuBar(); //barra donde irá el mené\n\t\t\tJMenu menu = new JMenu(\"Opciones\");\t\n\t\t\t\n\t\t\t//creamos un escuchador para el menú\n\t\t\tMenuListener ml = new MenuListener();\n\t\t\t\n\t\t\t//las diferentes opciones del menú\n\t\t\tJMen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to check EditText filled or not
public boolean isEditTextFilled(EditText editText){ String value = editText.getText().toString().trim(); if(value.isEmpty()){ hideKeyboardFrom(editText); return false; } return true; }
[ "private boolean isEmptyField (EditText editText){\n boolean result = editText.getText().toString().length() <= 0;\n if (result)\n Toast.makeText(UserSignUp.this, \"Fill all fields!\", Toast.LENGTH_SHORT).show();\n return result;\n }", "boolean isEmpty(EditText text){\n C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRSSETLMT_CALC_VALUES_TEMP.KEY_ID
public void setKEY_ID(String KEY_ID) { this.KEY_ID = KEY_ID == null ? null : KEY_ID.trim(); }
[ "public void setGeneratedKey(Object idValue) {\r\n\t\tif (idValue != null) {\r\n\r\n\t\t\t// set back to the bean so that we can use the same bean later\r\n\t\t\t// for update [refer ebeanIntercept.setLoaded(true)].\r\n\t\t\tidValue = beanDescriptor.convertSetId(idValue, bean);\r\n\r\n\t\t\t// remember it for loggi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends a fragment as a child of this code. All new code lines will be appended after this fragment. Variable identifiers of the father will not be viable in this child fragment.
public void appendFragment(CodeFragment code){ children.put(codeList.size() - 1, code); codeList.add(""); }
[ "void addChild(SqlFragment frag) {\n super.addChild(frag);\n\n if (frag.isDynamicFragment()) {\n _cacheableStatement = false;\n }\n }", "public void addFragment(ParentIon fragment){\n\t\tfragments.add(fragment);\n\t}", "public CodeFragment(){\n\t\tthis.id = count;\n\t\tcount++...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test scenario: XAResources: 2 TX timeout: 10s TX resolution: committed XAResource 1 resolution: successful XAResource 2 resolution: successful
public void testTwoPCSuccess() throws Exception { tm.begin(); tm.setTransactionTimeout(10); // TX must not timeout Connection connection1 = poolingDataSource1.getConnection(); connection1.createStatement(); Connection connection2 = poolingDataSource2.getConnection(); Po...
[ "@Test\n public void testExpectNoHeuristic() throws Exception {\n tm.begin();\n tm.setTransactionTimeout(10); // TX must not timeout\n\n Connection connection1 = poolingDataSource1.getConnection();\n PooledConnectionProxy handle = (PooledConnectionProxy) connection1;\n XAConnec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleLiteral" $ANTLR start "entryRuleStringLiteral" ../de.jevopi.mitra2/srcgen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4624:1: entryRuleStringLiteral returns [EObject current=null] : iv_ruleStringLiteral= ruleStringLiteral EOF ;
public final EObject entryRuleStringLiteral() throws RecognitionException { EObject current = null; int entryRuleStringLiteral_StartIndex = input.index(); EObject iv_ruleStringLiteral = null; try { if ( state.backtracking>0 && alreadyParsedRule(input, 107) ) { return curren...
[ "public final EObject entryRuleStringLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleStringLiteral = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4693:2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Picks item from the location and adds to a collection
public void pickItem(String itemName) { Item item = currentLocation.getItem(itemName);//Gets names of items present in current location if(item != null) { collectedItems.put(itemName, item);//Adds to collected items collection currentLocation.removeItem(itemName);//Removes corresponding item from the...
[ "public void pickUpItem(CollectableItem item){\r\n\t\titems.add(item);\r\n\t}", "public void pickUp(Item item){\r\n\t\tinventory.add(item);\t\t\r\n\t}", "public void putItem(String itemName)\r\n\t{\r\n\t\tif(collectedItems.containsKey(itemName)) {\r\n\t\t Item item = collectedItems.get(itemName);\r\n\t\t if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the dataStatus has been initialized. It is useful to determine if a field is null on purpose or just because it has not been initialized.
public boolean isDataStatusInitialized() { return dataStatus_is_initialized; }
[ "public boolean isMTBDataStatusKeyInitialized() {\n return MTBDataStatusKey_is_initialized; \n }", "public boolean isStatusdateInitialized() {\n return statusdate_is_initialized; \n }", "public boolean isData(){\r\n return data_init;\r\n }", "public static boolean isInitialized()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the SMTP BCC property
public void setBccEmail(String V) { this.smtpProps.removeProperties(KEY_BCC_EMAIL); if (!StringTools.isBlank(V) && (V.indexOf("@") > 0)) { this.smtpProps.setString(KEY_BCC_EMAIL[0], StringTools.trim(V)); } }
[ "public void setBcc(Object bcc) throws ApplicationException\t{\n \t\tif(StringUtil.isEmpty(bcc)) return;\n \t\ttry {\n \t\t\tsmtp.addBCC(bcc);\n \t\t} catch (Exception e) {\n \t\t\tthrow new ApplicationException(\"attribute [bcc] of the tag [mail] is invalid\",e.getMessage());\n \t\t}\n \t}", "@Override\n publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the listner to the views
private void setListnerToViews() { if (socialAppIconsGridView != null && socilaGridViewAdapter != null) socialAppIconsGridView.setOnItemClickListener(socilaGridViewAdapter); }
[ "private void setListner() {\n mForgotPassword.setOnClickListener(this);\n mRelativeRegister.setOnClickListener(this);\n }", "private void setViewListeners() {\n\n // Set a listener to the \"Accept Invite\" button\n pViewDisposable.add(RxView.clicks(mAcceptInviteButton).subscribe(ev...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Note that March 13, 2016, is the weekend that clocks spring ahead for daylight saving times. What is the output of the following? Me 4 (2,1,3) Correct 2 (1,1,3) ChronoUnit.HOURS.between Dont use the time with offset
public static void main(String[] args) { Locale.setDefault(Locale.US); LocalDate date = LocalDate.of(2016, Month.MARCH, 13); LocalTime time = LocalTime.of(1, 30); ZoneId zone = ZoneId.of("US/Eastern"); ZonedDateTime dateTime1 = ZonedDateTime.of(date, time, zone); ZonedDateTime dateTime2 = dateTime...
[ "@Test\n\tpublic void testDate(){\n\t\tLocalDate now = LocalDate.now();\n\t\tLocalDate plus1 = now.plusDays(1);\n\t\tLocalDate plus2 = now.plusDays(2);\n\t\tLocalDate plus3 = now.plusDays(3);\n\n\t\t// 00:00\n\t\tLocalTime min = LocalTime.MIN;\n\t\t// 23:59:59\n\t\tLocalTime max = LocalTime.MAX;\n\t\tLocalDateTime ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a SampleSet by rowId within the definition container.
ExpSampleSet getSampleSet(@NotNull Container definitionContainer, int rowId);
[ "ExpSampleSet getSampleSet(@NotNull Container scope, @NotNull User user, int rowId);", "ExpSampleSet getSampleSet(@NotNull Container definitionContainer, @NotNull String sampleSetName);", "ExpSampleSet getSampleSetByType(@NotNull String lsid, Container hint);", "ExpSampleSet getSampleSet(@NotNull Container sc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the wiki entry.
public synchronized void addWikiEntry(String wikiTitle, String wikiText) { wikiList.put(wikiTitle, wikiText); }
[ "public void addWikiPage(WikiPage wikipage);", "public void addWikiNode(WikiNode wikinode);", "public void addEntry(Entry entry) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_TITLE, entry.getTitle()); //Jornal title\n\t\tvalues.put(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column EP_MAIL.ML_SDEF20
public String getMlSdef20() { return mlSdef20; }
[ "public String getMlSdef5() {\n return mlSdef5;\n }", "public String getMlSdef18() {\n return mlSdef18;\n }", "public String getMlSdef11() {\n return mlSdef11;\n }", "public String getMlSdef19() {\n return mlSdef19;\n }", "public String getMlSdef17() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method finds the combination with the lowest price and returns the price
public int findPriceAndCombo(){ int cost = 100; int bulbIndex = 0; int baseIndex = 0; for (int i =0; i< hasBulb.size();i++){ for (int j=0; j<hasBase.size();j++){ if(hasBulb.get(i).get(0).equals(hasBase.get(j).get(0))){ //if the ID matches in the 2 has Arrays ...
[ "public List<Option> minimumPrice() {\n List<Option> minimumList = new ArrayList<>();\n Option minimumOption = new Option();\n List<String> carTypes = Arrays.asList(\"STANDARD\", \"EXECUTIVE\", \"LUXURY\", \"PEOPLE_CARRIER\",\n \"LUXURY_PEOPLE_CARRIER\", \"MINIBUS\");\n\n for(String carType : carTy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To compute base^exp mod( modulus) using the precomputed exponentiated base terms. The base was given to the constructor.
public BigInteger modPow(final BigInteger exp, final BigInteger modulus) { BigInteger capA = BigInteger.ONE; BigInteger capB = BigInteger.ONE; if (this.base.equals(BigInteger.ZERO)) { return BigInteger.ZERO; } else if (this.base.equals(BigInteger.ONE)) { return B...
[ "public static long mod_exp(long base, long exp, long mod){\n long result = base%mod;\n for (long i=1;i<exp;i++){\n result = (result*base)%mod;\n }\n return result;\n }", "public static double exponentialModulus(double base, int pow, int mod) {\n\t\tif (pow == 1) { return base % mod; }\n\t\telse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column GWK.LS_CONSUMEINFO.ODSBTIME
public String getOdsbtime() { return odsbtime; }
[ "public String getProTime() {\r\n return proTime;\r\n }", "com.google.protobuf.Timestamp getConsultTime();", "java.lang.String getPlayTime();", "@Generated(value = \"org.mybatis.generator.api.MyBatisGenerator\", date = \"2020-04-12T12:59:05.835+09:00\", comments = \"Source field: USER.updatedTime\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Types the chars indicated into the test object
public static void typeChars(String s, TestObject to) { new WTextField(to).typeChars(s); }
[ "@Test\n public void _charTest() {\n // TODO: test _char\n }", "protected void inputChars(String s)\r\n\t{\r\n\t\tRationalTestScript.getScreen().inputChars(s);\r\n\t\t\r\n \t \t//TopLevelTestObject app = (TopLevelTestObject) this.getTopParent();\r\n \t \t//app.inputChars(s);\r\n \t \r\n\t\t////Clea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field loanId is set (has been assigned a value) and false otherwise
public boolean isSetLoanId() { return EncodingUtils.testBit(__isset_bitfield, __LOANID_ISSET_ID); }
[ "public boolean isSetLoanId() {\n return EncodingUtils.testBit(__isset_bitfield, __LOANID_ISSET_ID);\n }", "public boolean isSetLoanNo() {\n return this.loanNo != null;\n }", "public boolean isSetLoan() {\n return this.loan != null;\n }", "public boolean isSetLoanPlanId() {\n return Encodin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for displaySequence The order this record is being returned in the response
public Integer getDisplaySequence() { return this.displaySequence; }
[ "public Number getRsoDisplaySeq() {\r\n return (Number) getAttributeInternal(RSODISPLAYSEQ);\r\n }", "public Integer getDisplayOrder() {\n return displayOrder;\n }", "public Number getRtypDisplaySeq() {\r\n return (Number)getAttributeInternal(RTYPDISPLAYSEQ);\r\n }", "public java...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing empty string as file path.
@Test(description = "Test incorrect path to file: empty string.") public void testValidatePathOnEmptyString() { String path = ""; boolean actual = fileValidator.validatePath(path); assertFalse(actual); }
[ "@Test(description = \"Test incorrect path to file: null.\")\n public void testValidatePathOnNull() {\n boolean actual = fileValidator.validatePath(null);\n assertFalse(actual);\n }", "public static boolean isEmptyOrSlash(String string) {\n return (string == null) || (string.length() =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test handling of response messages. Verify that they post events locally.
@Test public void testResponseMessages() throws IOException { //Get Observation GetObservationResponseData message = GetObservationResponseData.newBuilder() .addObservationNative(TerraHarvestMessageHelper.getProtoObs()).build(); ObservationStoreNamespace namespace = Observati...
[ "@Test\n public void testSaveEventLogic() {\n rakam.trackSessionEvents(true);\n ShadowLooper looper = Shadows.shadowOf(rakam.logThread.getLooper());\n looper.runToEndOfTasks();\n looper.runToEndOfTasks();\n assertEquals(getUnsentEventCount(), 0);\n\n for (int i = 0; i < ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "issued" element
org.hl7.fhir.Instant addNewIssued();
[ "public org.purl.dc.elements.x11.SimpleLiteral addNewIssued()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.purl.dc.elements.x11.SimpleLiteral target = null;\r\n target = (org.purl.dc.elements.x11.SimpleLiteral)get_store().add_element_user(I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Select each widget in rectangle.
public void selectRect(Rectangle r) { Widget first = null; Rectangle s = new Rectangle(u.fromWinX(r.x), u.fromWinY(r.y), r.width, r.height); for (Widget w : widgets) { if (s.contains(w.getLocation())) { if (first == null) first = w; selectWidget(w); } else { unSe...
[ "public void selectAllWidgets()\n {\n selection.deselectAll();\n\n // Iterate through the list and select each item individually.\n Iterator<GraphicalWidget<?>> widgetFigures =\n frameUI.getFigureListIterator();\n\n while (widgetFigures.hasNext()) {\n GraphicalWi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "articleId" element
void unsetArticleId();
[ "void unsetId();", "public void clearArticle(){\n this.authors = \"\";\n this.journal = \"\";\n this.title = \"\";\n this.year = \"\";\n this.volume = \"\";\n this.number = \"\";\n this.pages = \"\";\n this.doi = \"\";\n this.month = \"\";\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unmaps x from range [min, max] to int value [0, 2^n 1]
private int unmapToInt(double x, double max, double min, int n) { return (int) ( (x - max) * ( Math.pow(2, n) - 1 ) / (max - min) ); }
[ "public int map(int x, int in_min, int in_max, int out_min, int out_max) {\n return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;\r\n }", "public int[] toIntArray() {\n\t\tint lb = (int) Math.floor(min);\n\t\tint ub = (int) Math.ceil(max);\n\t\tint size = ub-lb;\n\t\tint[] arr = new int[si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a bank account with given account number, customer, and balance
public BankAccount(int accountNum, String customerName, double balance){ this.accountNum = accountNum; this.customerName = customerName; this.balance = balance; }
[ "public BankAccount(Customer customer, double balance) {\r\n this.customer = customer;\r\n this.balance = balance;\r\n this.accountNumber = counter + 1;\r\n }", "void createAccount(String accountRef, Money amount);", "String createAccount(int initialBalance);", "@Override\r\n public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
====================================================================== // Encapsulamento // ====================================================================== // Vetor[]
public Comparable[] getVetor() { return vetor; }
[ "public void getVentasdeUNVendedor(int v) {\r\n double vVendedor[] = new double[nm];\r\n int j;\r\n for (j = 0; j < nm; j++) {\r\n vVendedor[j] = ventas[v][j];\r\n }\r\n getMostrarVec(vVendedor);\r\n }", "public Gestor_Etiquetas() {\n lista_etiquetas=new Vec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new TeleopDrive.
public TeleopDrive(final Drive drive) { this.drive = drive; addRequirements(drive); chooser.addOption("Tank Drive", TANK); chooser.addOption("Arcade Drive", ARCADE_DUAL); chooser.addOption("Arcade (Single Stick)", ARCADE_SOLO); if (!RobotContainer.useFlightSticks) { ...
[ "public static Drivetrain Create() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new Drivetrain();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public DriveHandle createDrive( String name )\n throws CdbException , InterruptedException {\n return _pvr.createDrive( name ) ;\n }", "private vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all price lists.
@Override public List<PriceListDTO> getAllPriceList() { List<PriceListDTO> priceListDTOs = new ArrayList<>(); for (PriceListEntity list : priceListDAO.getAll()) { priceListDTOs.add(convertToDto(list)); } return priceListDTOs; }
[ "PriceListType getPriceList();", "org.spin.grpc.util.Decimal getPriceList();", "List<ParcelPrice> getListParcelPrices();", "List<SpotPrice> getAll();", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "public PriceList getPriceList() {\n\t\treturn priceList;\n\t}", "public BigD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Built custom request configuration from package manager properties.
public static RequestConfig buildRequestConfig(PackageManagerProperties props) { return RequestConfig.custom() .setConnectTimeout(props.getHttpConnectTimeoutSec() * (int)DateUtils.MILLIS_PER_SECOND) .setSocketTimeout(props.getHttpSocketTimeoutSec() * (int)DateUtils.MILLIS_PER_SECOND) .build(...
[ "AsyncRequestConfig createAsyncRequestConfig();", "private void buildLocationSettingsRequest() {\n LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();\n builder.addLocationRequest(mLocationRequest);\n mLocationSettingsRequest = builder.build();\n }", "protect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
called if PatchSession instantiates this class
protected PatchBase callContruct(boolean eventlyCreated, PatchSession session, PatchBundle bundle, Object... instanceObjects) throws Exception { this.patchSession = session; init(eventlyCreated, session.getContext(), bundle, instanceObjects); return this; }
[ "protected Patch createNewPatch() { // overridden by subclass\n return null;\n }", "public PatchException() {\n super();\n }", "public UserSessionManagerFixImpl() {\n\t\torderEntry.setFixSession(sessionImpl);\n\t\torderQuery.setFixSession(sessionImpl);\n\t\tadministrator.setFixSession(sess...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets integer value with volatile semantic.
public static int getIntVolatile(Object obj, long off) { return UNSAFE.getIntVolatile(obj, off); }
[ "public Boolean getVolatile() {\r\n\t\treturn volatile_;\r\n\t}", "public int getAtomicIntegerAtomically(){\r\n return atomicIntegerToIncrement.incrementAndGet();\r\n }", "public boolean isVolatile()\n {\n return (m_nFlags & ACC_VOLATILE) != 0;\n }", "public final void mVOLATILE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the proxy used for a particular protocol.
public void setProxy( String protocol, String host, int port, String username, String password, String nonProxyHosts ) { ProxyInfo proxyInfo = new ProxyInfo(); proxyInfo.setHost( host ); proxyInfo.setType( protocol ); proxyInfo.setPort( port ); ...
[ "public void setProxy(Object proxy) {\n\t\tthis.proxy = proxy;\n\t\tthis.handleConfig(\"proxy\", proxy);\n\t}", "public void setProxy(Proxy proxy) {\n this.proxy = proxy;\n }", "public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}", "public void setHttpProxyPort(int port);", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets zone details with Zone name.
@RequestLine("GET /zones/{zoneName}") Zone getZoneByName(@Param("zoneName") final String zoneName);
[ "public String getName(){\r\n\t\treturn zoneName;\r\n\t}", "java.lang.String getZone();", "com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameData.ZoneInformation getZoneInformation();", "public String getZone() {\r\n\t\treturn zone;\r\n\t}", "public static Zone getZone() {\n return zones[curr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string couponIconUrl = 11;
java.lang.String getCouponIconUrl();
[ "public java.lang.String getCouponIconUrl() {\n java.lang.Object ref = couponIconUrl_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponIco...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of not found redirect objects related to the given owner.
@Override public List<CallnoModification> getNotFoundRedirects(String owner) { return this.ownerIndexService.getNotFoundRedirects(owner); }
[ "@Override\n public List<CallnoModification> getPreprocessingRedirects(String owner) {\n return this.ownerIndexService.getPreprocessingRedirects(owner);\n }", "@Transactional(readOnly = true) \n public List<IdentityProofDTO> findAllWhereOwnerIsNull() {\n log.debug(\"Request to get all ident...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a user to the group. An exception thrown if the user is already a part of the group.
public void addUser(User user) throws IllegalArgumentException { UserList oldUsers = new UserList(); oldUsers.addAll(groupMembers); this.groupMembers.add(user); firePropertyChange("groupMembers", oldUsers, groupMembers); }
[ "void addUserToGroup(final String userId, final String groupId);", "private void addUserToGroupInternal(User user, String group) {\n log.debug(\"Add user \" + user.getLogin() + \" to group \" + group);\n if (!user.getGroups().contains(group)) {\n user.getGroups().add(group);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__S_Action__Group__5__Impl" $ANTLR start "rule__S_Action__Group__6" InternalGaml.g:7959:1: rule__S_Action__Group__6 : rule__S_Action__Group__6__Impl ;
public final void rule__S_Action__Group__6() throws RecognitionException { int rule__S_Action__Group__6_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 440) ) { return ; } // Internal...
[ "public final void rule__AstAction__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:12520:1: ( ( ( rule__AstAction__Gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method assumes only recovery records from the same tenant will be compared. This assumption is guaranteed by including the tenant id in the hash itself. See Comparator documentation for details about being consistent with equals.
@Override public int compare(JobRecovery rec1, JobRecovery rec2) { // Recovery objects are considered equal if that have the same // tester hash and exist in the same tenant. The standard // JobRecovery constructor takes a message parameter and // guar...
[ "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof BlastingtypeRelationsAud)) {\n return false;\n }\n BlastingtypeRelationsAud that = (BlastingtypeRelationsAud) other;\n Object myBtrAudUid = this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the Comment feature.
protected void addCommentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_term_comment_feature"), getString("_UI_PropertyDescriptor_description"...
[ "@PropertySetter(role = COMMENT)\n\t<E extends CtElement> E addComment(CtComment comment);", "protected void addCommentPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors\n\t\t\t\t.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),\n\t\t\t\t\t\tgetR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if has "CustomsDetails" element
boolean isSetCustomsDetails();
[ "public boolean isCustomDetail(){\n if(getDetailCode()==null || getDetailCode().isEmpty()){\n return true;\n }\n return false;\n }", "public boolean isSetCustom() {\r\n return this.custom != null;\r\n }", "public boolean isSetDetails() {\n return this.details != nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the State of the Tweet by checking the InputStream. For a sample Bing Maps API response, please check the snippet at the end of this file.
@SuppressWarnings("unchecked") private final static Optional<String> getStateFromJSONResponse(InputStream inputStream) { final ObjectMapper mapper = new ObjectMapper(); try { //final Map<String,Object> bingResponse = (Map<String, Object>) mapper.readValue(new File("C:/BingMaps_JSON_Response.json"), Map.class); ...
[ "@Override\n\tpublic Stream<Tweet> getTweetStream() {\n\t\t/* try-with-resources */\n\t\ttry (Reader reader = new InputStreamReader(getClass().getResourceAsStream(TRUMP_TWEETS_JSON_PATH))){\n\t\t\t/* create new Stream of deserialized array of Tweets */\n\t\t\treturn Arrays.stream(gson.fromJson(reader, Tweet[].class...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Uniform__Group_0__1" $ANTLR start "rule__Uniform__Group_0__1__Impl" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7121:1: rule__Uniform__Group_0__1__Impl : ( ( rule__Uniform__ExpressionAssignment_0_1 ) ) ;
public final void rule__Uniform__Group_0__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7125:1: ( ( ( rule__Uniform__ExpressionAssignment_0_1 ) ) ...
[ "public final void rule__Uniform__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7114:1: ( rule__Uniform__Group_0__1__Impl )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locate and return the verification point CC_Status_AB object in the SUT.
protected IFtVerificationPoint CC_Status_ABVP() { return vp("CC_Status_AB"); }
[ "protected IFtVerificationPoint CC_Status_LA_ABVP() \n\t{\n\t\treturn vp(\"CC_Status_LA_AB\");\n\t}", "java.lang.String getAStatus();", "@Override\n\tpublic Status getEstimateStatus() {\n\t\tStatus status = null;\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tQuery query = em.createQuery(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return true if the helix is intercepting the given disk
public static boolean isInterceptingZDisk(HelicalTrackFit helix,double rmin,double rmax, double z ){ double s = PathToZPlane(helix,z); Hep3Vector point = PointOnHelix(helix,s); double x = point.x(); double y = point.y(); double r = Math.sqrt(x*x+y*y); if(r < rmax && r > rmin ){return true;} return false;...
[ "boolean isDiskImageMounted() {\n return (getMountedDiskImageFileUri() != null);\n }", "boolean isMountedDiskImageReadOnly() {\n return (isDiskImageMounted() && isMountedDiskImageReadOnly);\n }", "boolean supportsDiskCaching();", "boolean isDriveable();", "public boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Look up a QuickPeriodicJob in the collection
public static QuickPeriodicJob getJob(int jobId) { for(QuickPeriodicJob job : jobs) { if(job.getJobId() == jobId) { return job; } } return null; }
[ "Job getByName(String name);", "public static List<QuickPeriodicJob> getJobs() {\n return jobs;\n }", "JobRunSchedule getById(Integer jobrunscheduleId);", "MJob findJob(long id);", "boolean getAllPendingJobs(long timeInMS, Collection<JobContentData> target,\r\n boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a numeral quality to letter grade for a meal
public String computeGrade(double quality) { String grade = ""; if (quality < -3) grade = "C-"; else if (quality < -2) grade = "C+"; else if (quality < -1) grade = "C+"; else if (quality < -1) grade = "B-"; else if (quality < 0) grade = "B"; else if (quality < 1) grade = "B+"; els...
[ "private String convertNumericToLetter (float grade) {\r\n\r\n // letter grades are indexed by grade point\r\n // the letter grade is added (+1) to the gradeCount array\r\n if(grade >= 93 && grade <= 100) { gradeCount[13] += 1; return grades[13]; } // [13] is A+\r\n if(grade >= 86 && gra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds Asset Class by Name
public AssetClass findAssetClassByName(String name_);
[ "IArenaClass getClass(final String name);", "private static Class getClass(String name)\r\n {\r\n try \r\n {\r\n return Class.forName(name);\r\n }\r\n catch (Exception e)\r\n {\r\n try\r\n {\r\n return Class.forName(\"net.minecr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clear lists of audio and video for the next test.
public void listAudioVideoZero(){ this.listAudioTest.clear(); this.listVideoTest.clear(); }
[ "public void clearAll() {\n // stop playback and clear all\n stop();\n playQueue.clear();\n }", "public void clearAll() {\n\t Track current;\n\t for (int i=0;i<channels.length;i++) {\n\t\tcurrent=channels[i].track;\n\t\tseq.deleteTrack(current);\n\t\tchannels[i].track=null;\n\t }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para guardar la preInscripcion en la base de datos
public int guardarPreInscripcion( preInscripcion p ){ String sql_guardar; int numFilas=0; sql_guardar="INSERT INTO pre_inscripcion VALUES ('" + p.getNombreEvento() + "', '" + p.getNombreParticipante() + "', '" + p.getCedula() + "', '" + p.getfecha() + "')"; ...
[ "@PrePersist\n\t void beforeInsert() {\n\t System.out.println(\"SETTING DEFAULT VALUES FOR VIREMENT\");\n\t status = TransferStatus.UNCONFIRMED;\n\t codeVerification = new Random().nextInt(90000000) + 10000000;\n\t }", "public void insertConcursoRequisitoPremiacion(ConcursoRequisitoPrem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a value to property Reviewof from an instance of org.ontoware.rdfreactor.schema.rdfs.Resource [Generated from RDFReactor template rule add4dynamic]
public void addbiboReviewof(org.ontoware.rdfreactor.schema.rdfs.Resource value) { Base.add(this.model, this.getResource(), REVIEWOF, value); }
[ "public void setbiboReviewof(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\n\t\tBase.set(this.model, this.getResource(), REVIEWOF, value);\n\t}", "public void addbiboReviewof( org.ontoware.rdf2go.model.node.Node value) {\n\t\tBase.add(this.model, this.getResource(), REVIEWOF, value);\n\t}", "public stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if String contains STRING, if yes replace with VARCHAR string.
private static String replaceString(String string) { if(string.equals("STRING")) return "VARCHAR"; return string; }
[ "private void checkString() {\r\n if (this.string.isEmpty() || this.string.equals(\"NULL\")) {\r\n this.string = \"NULL\";\r\n } else {\r\n this.string = this.string.replaceAll(\"[_'\\\\(\\\\)-]\", \"\");\r\n this.string = String.format(\"'%s'\", this.string);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PieChart__Group__5__Impl" $ANTLR start "rule__PieChart__Group__6" InternalMyDsl.g:8699:1: rule__PieChart__Group__6 : rule__PieChart__Group__6__Impl rule__PieChart__Group__7 ;
public final void rule__PieChart__Group__6() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:8703:1: ( rule__PieChart__Group__6__Impl rule__PieChart__Group__7 ) // InternalMyDsl.g:8704:2: rule__PieChart__Group__6__Impl rule__Pi...
[ "public final void rule__PieChart__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:8715:1: ( ( ( rule__PieChart__Group_6__0 )? ) )\n // InternalMyDsl.g:8716:1: ( ( rule__PieChart__Group_6__0 )? )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the goals that are reachable in each point in the map. Forbidden states are those where the number of reachable goals is zero.
private Set<Point>[][] findReachableGoals() { @SuppressWarnings("unchecked") Set<Point>[][] goalSets = new Set[getNumRows()][getNumCols()]; Queue<Point> queue = new LinkedList<Point>(); Set<Point> visited = new HashSet<Point>(); for (int y = 0; y < getNumRows(); y++) ...
[ "private Set<State> reachableStates() {\n\n\t\tList<Character> symbols = new ArrayList<Character>();\n\n\t\tsymbols.add(Alphabet.EPSILON);\n\n\t\tfor (Character c : alphabet) {\n\t\t\tsymbols.add(c);\n\t\t}\n\n\t\tAlphabet alphabetWithEpsilon = new Alphabet(symbols);\n\n\t\tSet<State> reachable = new HashSet<State>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Splits the case base in two sets: queries and case base
private void splitCaseBase(Collection<CBRCase> holeCaseBase, List<CBRCase> querySet, List<CBRCase> casebaseSet, int testPercent) { querySet.clear(); casebaseSet.clear(); int querySetSize = (holeCaseBase.size() * testPercent) / 100; casebaseSet.addAll(holeCaseBase); for(...
[ "protected void splitCaseBase(Collection<CBRCase> wholeCaseBase,\r\n\t\t\tList<CBRCase> querySet, List<CBRCase> casebaseSet, int testPercent) {\r\n\t\tquerySet.clear();\r\n\t\tcasebaseSet.clear();\r\n\r\n\t\tint querySetSize = (wholeCaseBase.size() * testPercent) / 100;\r\n\t\tcasebaseSet.addAll(wholeCaseBase);\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleNET_ASSIGNMENT" $ANTLR start "entryRuleNET_LVALUE" ../com.ironglass.hdlforge.ui/srcgen/com/ironglass/hdlforge/ui/contentassist/antlr/internal/InternalSystemVerilog.g:341:1: entryRuleNET_LVALUE : ruleNET_LVALUE EOF ;
public final void entryRuleNET_LVALUE() throws RecognitionException { try { // ../com.ironglass.hdlforge.ui/src-gen/com/ironglass/hdlforge/ui/contentassist/antlr/internal/InternalSystemVerilog.g:342:1: ( ruleNET_LVALUE EOF ) // ../com.ironglass.hdlforge.ui/src-gen/com/ironglass/hdlfor...
[ "public final void rule__NET_ASSIGNMENT__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.ironglass.hdlforge.ui/src-gen/com/ironglass/hdlforge/ui/contentassist/antlr/internal/InternalSystemVerilog.g:2207:1: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this assigns additional points to members on shifts where there are relatively few members that can take the shift Note: This method DOES take into account the ifNeedBe members for each shift, so if theres 2 yesses and 1 ifNeedBe, the person with the ifNeedBe will still get some bonus points this is the new way im doin...
public static void prioritizeShiftsWithFewMembers(){ for(int j = 0; j < Shift.allMembers.get(0).availability.size(); j++){ double numWithPoints = 0.0; for(int i = 0; i < Shift.allMembers.size(); i++){ if( Shift.allMembers.get(i).availability.get(j).equals("1") ){ ...
[ "public static void prioritizeMembersWithFewShifts(){\n \n for(int i = 0; i < Shift.allMembers.size(); i++){\n \n double numShifts = 0;\n for(int j = 0; j < Shift.allMembers.get(i).availability.size(); j++){\n if( Shift.allMembers.get(i).availability.get(j).equals(\"1\") ){\n nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getting the square above of an given square.
public Square getSquareUp(Square square) { int x = square.getCoordinateX(); int y = square.getCoordinateY(); Square squareNotVisible; if (!board.inRange(x, y, board) || y == 0) { squareNotVisible = new Square(-1, -1, board); return squareNotVisible; } else...
[ "public Square getSquareBelow(Square square) {\n int x = square.getCoordinateX();\n int y = square.getCoordinateY();\n Square squareNotVisible;\n final int nine = 9;\n if (!board.inRange(x, y, board) || y == nine) {\n squareNotVisible = new Square(-1, -1, board);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a specific patient info
void updatePatientInfo(PatientInfo patientInfo);
[ "private void updatePatientDetails(){\n this.updating = true;\n Patient toUpdate;\n \n System.out.println(\"Please type the patient PID\");\n try{\n toUpdate = this.patientList.getPatient(this.validate.checkForInt(in));\n System.out.println(\"Patient to updat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DomainSpecificEvent__Alternatives" $ANTLR start "rule__DomainSpecificEventReferenceOrPattern__Alternatives" ../org.gemoc.gel.xtext.ui/srcgen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:1837:1: rule__DomainSpecificEventReferenceOrPattern__Alternatives : ( ( ruleDomainSpecificEventRefere...
public final void rule__DomainSpecificEventReferenceOrPattern__Alternatives() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:1841:1: ( ( ruleDomainSpecificEv...
[ "public final void ruleDomainSpecificEventReferenceOrPattern() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:494:2: ( ( ( rule__DomainSpecificEve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the rule construct list.
void setRuleConstruct(final ArrayList<RuleConstruct> ruleConstruct) { this.ruleConstruct = ruleConstruct; }
[ "public void init() {\n \t\tfor (RuleList rl : rules.values()) {\n \t\t\tRuleList ruleList = new RuleList();\n \t\t\tfor (RuleHolder rh : rl) {\n \t\t\t\tif (rh.getChangeableTags() != null)\n \t\t\t\t\tinitExtraRules(rh, ruleList);\n \t\t\t}\n \n \t\t\trl.add(ruleList);\n \t\t}\n \n \t\tinitRun = true;\n \t}", "@...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets an arbitrary object that will be passed to the bean factory. Its meaning is not further specified. The purpose of this additional parameter is to support a further configuration of the bean factory that can be placed directly at the bean declaration.
Object getBeanFactoryParameter();
[ "FactoryBean getFactoryBean();", "@Bean public SimpleObjectFactoryBean factoryBean() {\r\n\t\treturn new SimpleObjectFactoryBean();\r\n\t}", "public static Object getBean(String ref) {\n if (beanstore.containsKey(ref)) return beanstore.get(ref);\n else if (beanDefs.containsKey(ref)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Newly added method to fetch root area by name
public RootArea getAssessmentDataByRootArea(String name) { RootArea rootAreas = assessmentDao.getRootAreaByName(name); return updateWithCategories(rootAreas); }
[ "public static Object lookupRoot(String name) {\n return getManager().lookupRoot(name);\n }", "public synchronized ResourceReference loadRoot(String name) {\n ResourceReference newroot = null;\n String editRootName = props.getString(EDIT_ROOT_P, null);\n Hashtable defs = new Hashtable(11)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is to update the index value after deleting specific edge or vertex. It follows how the index changes in arrays to modify(here means minus one) the index stored in maps.
public Map<String, Integer> updateIndex(int indexOfDeleted, Map<String, Integer> map) { for (String key : map.keySet()) { int s = map.get(key); if (s >= indexOfDeleted) { map.put(key, s - 1); } } return map; }
[ "public abstract void deselectAllIndexes();", "void deleteIndex() throws IOException;", "void updateIndexes();", "void indexReset();", "public abstract void updateIndex();", "public void onIndexReset();", "public void delete (int index) {\n\t\t\n\t\t// First, increase the key to the maximum value\n\t\ti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether or not the value of the attribute identified by the given attribute locator matches the given text pattern.
public boolean hasAttribute(final String attributeLocator, final String textPattern);
[ "public boolean hasAttribute(final String elementLocator, final String attributeName, final String textPattern);", "public void assertAttribute(final String attributeLocator, final String textPattern);", "public void assertAttribute(final String elementLocator, final String attributeName, final String textPatte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Weather by weather ID method
public Weather getWeather(int w_id) { SQLiteDatabase w_db = this.getReadableDatabase(); Cursor w_cursor = w_db.query(TABLE_WEATHER, new String[] {KEY_W_ID, KEY_W_WIND_SPEED, KEY_W_HUMIDITY, KEY_W_RAINFALL, KEY_W_TEMPERATURE, KEY_W_DATE}, KEY_W_ID + "=?", new String[]{String.valueOf(w_id...
[ "Weather getById(Long id);", "public int getWeatherId() {\n return weatherId;\n }", "Weather getWeather(String locationName, DayOfWeek dayOfWeek);", "public String getWeatherID() {\n\t\treturn weatherID;\n\t}", "Object getWeatherInfo(final String city);", "public interface Weather {\n int get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .greco.NonTerminalTuple non_terminal_tuple = 2;
java.util.List<greco.NonTerminalTupleOuterClass.NonTerminalTuple> getNonTerminalTupleList();
[ "greco.NonTerminalTupleOuterClass.NonTerminalTuple getNonTerminalTuple(int index);", "int getNonTerminalTupleCount();", "greco.NonTerminalTupleOuterClass.NonTerminalTupleOrBuilder getNonTerminalTupleOrBuilder(\n int index);", "Astro tuple(AstroArg args);", "@java.lang.Override\n public int getNonT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Translates names of (parts of) template elements into names as they should appear in templates.
public interface ElementNameTranslator { /** * Translates an action name. * * @param name the action name to translate * @return the action name as it should be used in the template */ String translateActionName(String name); /** * Translates an action parameter name. * * @param name the action para...
[ "java.lang.String getTransformNames(int index);", "String toElementName(final String elementName);", "String convertToQualified (String umlQualifiedTypeName) {\n String qualifiedTypeName = packageQualifiedClassName (umlQualifiedTypeName, packageDepth);\n if (qualifiedTypeName.contains(\"<\")) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the isIncluded property.
public void setIsIncluded(boolean value) { this.isIncluded = value; }
[ "public void setIncluded(boolean included);", "void setInclude(String include);", "public boolean isIsIncluded() {\n return isIncluded;\n }", "public boolean isIncluded() {\n return isIncluded;\n }", "public void setIncludeEnabled(int tmp) {\n this.includeEnabled = tmp;\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new update record listener.
public UpdateRecordListener(MainView view) { // TODO Auto-generated constructor stub this.view = view; }
[ "void registerUpdateListener(IUpdateListener listener);", "public void addRecordingUpdateListener(RecordingUpdateListener listener);", "void update(Subscriber record);", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-24 13:40:28.888 -0500\", hash_original_method =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ALTERAR QUANTIDADE DE PORTAS AUTOMOVEL //
public static void alterandoQtdPortasAutomovel() throws NumberFormatException, HeadlessException { String placaPesquisa3 = JOptionPane.showInputDialog("Digite a placa"); for (int i = 0; i < AUTOMOVELS.size(); i++) { if (placaPesquisa3.equals(AUTOMOVELS.get(i).getPlaca())) { ...
[ "public void actualizarTablaGastos5(Integer lice, Integer ano) {\n String str_sql7 = \"update conc_cedula_presupuestaria_fechas\\n\"\r\n + \"set val_inicial = reforma\\n\"\r\n + \"from (select sum(val_inicial) as reforma,con_ide_clasificador,ide_funcion,tipo\\n\"\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//GENEND:|355getter|2| //GENBEGIN:|357getter|0|357preInit Returns an initiliazed instance of tableItem10 component.
public TableItem getTableItem10() { if (tableItem10 == null) {//GEN-END:|357-getter|0|357-preInit // write pre-init user code here tableItem10 = new TableItem(getDisplay(), "");//GEN-BEGIN:|357-getter|1|357-postInit tableItem10.setModel(getTableModel10());//GEN-END:|357-gette...
[ "public TableItem getTableItem18() {\n if (tableItem18 == null) {//GEN-END:|413-getter|0|413-preInit\n // write pre-init user code here\n tableItem18 = new TableItem(getDisplay(), \"\");//GEN-BEGIN:|413-getter|1|413-postInit\n tableItem18.setModel(getTableModel18());//GEN-END...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
METHOD : SetID This sets the value ID needed for the behaviour class, The ID value is a string to repesent the behaviour for identification
public String SetID() { super.SetID(); // Set the java fish ID value ID = "bubble"; return ID; }
[ "public void setId() {\n this.id = id;\r\n }", "public void setPropertyID(int value) {\n this.propertyID = value;\n }", "public void setId(String id) {\n this.id = id + \"_\";\n }", "public void setId(String id)\n {\n _handleId = id;\n }", "public void setValue_id(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if the given path is a hidden file, i.e. the corresponding filename starts with a period.
public static boolean isHidden(String path) { return getFilename(path).startsWith("."); }
[ "public boolean isHidden() {\n\t\treturn isURL ? false : file.getName().startsWith(\".\");\n\t}", "private boolean isHidden(Path file) {\n try {\n return Files.isHidden(file);\n } catch (IOException ioe) {\n return false;\n }\n }", "private boolean hideFile(File f) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if (RapidEvolution.debugmode) System.out.println("getSearchColumnViewIndex(): column_name: " + column_name);
public int getSearchColumnModelIndex(String column_name) { int result = -1; Integer model_index = (Integer)searchmodel_column_index.get(column_name); if (model_index != null) { result = model_index.intValue(); } //if (RapidEvolution.debugmode) System.out.print...
[ "@Test\n void testIndex() {\n try {\n DatabaseMetaData dbmd = dbHelper.getConnection().getMetaData();\n ResultSet rs = dbmd.getIndexInfo(null, null, \"test_gen\", false, false);\n ResultSetMetaData rsmd = rs.getMetaData();\n\n // Display the result set data.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property src.
public void setSrc(String src) { this.src = src; }
[ "public void setSrc(String src) {\n attributes.put(\"src\", src);\n }", "public void setSrc(final String src) {\n setAttribute(ATTRIBUTE_SRC, src);\n }", "public void setSrc(String src) {\r\r\n this.src = src;\r\r\n }", "public void setSrc(java.lang.String src) {\n this.sr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start tracker service and bind with it.
private void startAndBindWithTrackerService() { // Start tracker service final ComponentName componentName = getActivity().startService(trackerServiceIntent); if(componentName != null) { Log.d(TAG, "Tracker service successfully started"); } else { Log.d(T...
[ "private void startTrackerService() {\n // start service so that it keeps running after unbind\n Intent intent = new Intent(this, TrackerService.class);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n // ... start service in foreground to prevent it being killed on Oreo\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "package" element
public org.apache.xmlbeans.XmlString xgetPackage() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PACKAGE$0, 0); return target; ...
[ "String getPackage();", "XPackage getXPackage();", "public Package getPackage();", "public String getPackage() {\n return this._package;\n }", "public String getFullPackage()\r\n {\r\n return fullPackage;\r\n }", "java.lang.String getPackageName();", "String getPackageName();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the camera is closed and stops producing frames.
public void onCameraClosed(CameraStreamer camera);
[ "@Override\n public void close() {\n if (Looper.myLooper() != mHandler.getLooper()) {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n Camera.this.close();\n }\n });\n return;\n }\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the field layout info of a form in an App. Perrmission to view records are needed when obtaining information of live Apps. App Management Permissions are needed when obtaining information of prelive settings. API Tokens cannot be used with this API.
public FormLayout getFormLayout(Integer appId, Boolean isPreview) throws KintoneAPIException { if (appId == null || appId < 0) { throw new KintoneAPIException("Invalid app id value: " + appId); } String apiRequest = ConnectionConstants.APP_LAYOUT; if (isPreview != null && is...
[ "@Override\n\tpublic java.lang.String getFormLayout() {\n\t\treturn _formItem.getFormLayout();\n\t}", "public FormLayout formlayout() {\n FormLayout c = new FormLayout();\n c.setImmediate(true);\n add(c);\n return c;\n }", "Long getLayout();", "FormDef getFormDef(String formName...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the keywordsId of this Imports. The keywordsId field corresponds to the database column innodb.innodb.imports.keywords_id.
Imports setKeywordsId(Short keywordsId);
[ "public void setKeywordId(Long keywordId) {\r\n this.keywordId = keywordId;\r\n }", "public void setKeywords(com.callfire.api.data.NumberOrderItem keywords)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.callfire.api.data.NumberOrd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update DB table f_afterwards_check_collection. The sql statement for this operation is update f_afterwards_check_collection set form_id=?, collect_type=?, collect_item=?, collect_code=?, collected=?, sort_order=? where (collect_id = ?)
public int update(FAfterwardsCheckCollectionDO FAfterwardsCheckCollection) throws DataAccessException { if (FAfterwardsCheckCollection == null) { throw new IllegalArgumentException("Can't update by a null data object."); } return getSqlMapClientTemplate().update("MS-F-AFTERWARDS-CHECK-COLLECTI...
[ "public List<FAfterwardsCheckCollectionDO> findByFormIdAndType(long formId, String collectType) throws DataAccessException {\n Map param = new HashMap();\n\n param.put(\"formId\", new Long(formId));\n param.put(\"collectType\", collectType);\n\n return getSqlMapClientTemplate().queryForL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Aliquot report full handler
@RequestMapping(value = AliquotReportConstants.ALIQUOT_REPORT_URL, method = RequestMethod.GET) public String aliquotReportFullHandler( final ModelMap model, final HttpSession session, final HttpServletRequest request, @RequestParam(value = DatareportsCommonConstants.DISEASE, required = fa...
[ "public void fullreport (){\n System.out.println(\"Full present auras report:\");\n for (int i = 0; i < length; i++){\n auraBook[i].report();\n }\n }", "@RequestMapping(value = AliquotReportConstants.ALIQUOT_REPORT_URL, method = RequestMethod.GET,\r\n params = {\"!\" ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Optional. Map an update on the pallet's payload to a consumer
public EventMapper onPalletUpdate(final Consumer<Pallet> consumer) { initConsumerDelegate(); ((ConsumerDelegate)getDepPlaceholder().getDelegate()).setConsumerUpdatePallet(consumer); return this; }
[ "RequestSender onInform(Consumer<Message> consumer);", "RequestSender onRefuse(Consumer<Message> consumer);", "public EventMapper onPalletRelease(final Consumer<Set<Pallet>> consumer) {\n\t\tinitConsumerDelegate();\n\t\t((ConsumerDelegate)getDepPlaceholder().getDelegate()).putConsumerPallet(consumer, MappingEve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method returns the child node from a specific index
public Node getChild(int index){ if(children.isEmpty()){ return null; } return children.get(index); }
[ "public ChildType getChildAt( int index );", "public Node getChild(int index) {\n return nodes.get(index);\n }", "public Node<T> getChild(int index) {\n\t\treturn this.children.get(index);\n\t}", "public SceneNode getChild(int index)\n\t{\n\t\treturn children.get(index);\n\t}", "public ParseTreeNo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column CIF_KYC_FINANCIAL_INFO.KYC_FINANCIAL_CIF_CATEGORY
public String getKYC_FINANCIAL_CIF_CATEGORY() { return KYC_FINANCIAL_CIF_CATEGORY; }
[ "public void setKYC_FINANCIAL_CIF_CATEGORY(String KYC_FINANCIAL_CIF_CATEGORY) {\r\n this.KYC_FINANCIAL_CIF_CATEGORY = KYC_FINANCIAL_CIF_CATEGORY == null ? null : KYC_FINANCIAL_CIF_CATEGORY.trim();\r\n }", "public String getCIF_CATEGORY() {\r\n return CIF_CATEGORY;\r\n }", "public void setCIF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The win condition Strings for the Safari Quest
public String winCondition() { if (hasOneOfEach()) { return "Congratulations! You've won the Safari Game! You caught one of each type of Pokémon!"; } if (hasFiveOfTwo()) { return "Congratulations! You've won the Safari Game! You caught two each of five types of Pokémon!"; } if (hasTwoOfFive()) { ...
[ "private void winConditionCheck()\r\n {\r\n boolean win;\r\n char mark;\r\n for(int row = 0; row < 3; row++)\r\n {\r\n win = true;\r\n mark = buttons[row][0].getText().charAt(0);\r\n if(mark != ' ')\r\n {\r\n for(int column = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disconnect a player. If there are less than 3 players end the game
public synchronized void disconnectPlayer (ClientController clientController) { Player player = clientController.getLinkedPlayer(); player.setConnected(false); Logger.info("Player " + player.getNickname() + " disconnected."); GameStateMessage.actionsHistoryTemp.add(player.getNickname() +...
[ "private void handleOpponentDisconnect()\n {\n System.out.println(\"One or more players have rage quit. Ending game between \" + \n model.getIdlePlayer().getName() + \" and \" + model.getActivePlayer().getName() + \".\");\n model.getActiveSocketOut().println(\"Your opponent has rage quit. Ga...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor / Constructs weather data class with sunset sunrise weather code and cityname
public WeatherData (Long sunset, Long sunrise, int weatherCode, String cityName, int temperature) { sunsetTime = sunset; sunriseTime = sunrise; weather = weatherCode; city = cityName; temp = temperature; }
[ "private WeatherData() {}", "public CityDailyWeather(String city, int startYear, int endYear, int stationID){\n\t\tthis.city = city;\n\t\tthis.startYear = startYear;\n\t\tthis.endYear = endYear;\n\t\tthis.stationID = stationID;\n\t}", "public City(WeatherForecast forecast) {\n this.maxTempNextFiveDays = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface provides a factory for producing exceptions whenever needed. The purpose of the exception producer is to allow for the place of throwing the exception to be closer to that of the place of error, thus preserving as much of the stack trace as possible.
@FunctionalInterface public interface AssertionExceptionProducer<O> { /** * Produces a new exception based on the result of the assertion. Should return {@code null} * if the assertion doesn't have any {@link AssertionResult#hasErrors() errors}. * @param result the result of the assertion for which ...
[ "Exception createException();", "public E createException() {\n return createException(getDiagnosticListener().getDiagnostics());\n }", "public static <T> Factory<T> exceptionFactory() {\n return ExceptionFactory.<T>exceptionFactory();\n }", "ExceptionDef createExceptionDef();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the '_2300NTE01NoteReferenceCode' field.
public void set2300NTE01NoteReferenceCode$1(java.lang.CharSequence value) { this._2300NTE01NoteReferenceCode = value; }
[ "public net.explorys.samhat.z12.r837.X837Ins_2300_NTE_BillingNote.Builder set2300NTE01NoteReferenceCode$1(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this._2300NTE01NoteReferenceCode = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public java.lang.CharSequ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
onResume() register the accelerometer for listening the events
protected void onResume() { super.onResume(); sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL); }
[ "public void onResume() {\n sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "public void onResume() {\n super.onResume();\n sensorManager.registerListener(accelerometerListener, sensorAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }