query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Required. The backup to create. .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder();
[ "com.google.bigtable.admin.v2.Backup getBackup();", "public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>\n createBackup(com.google.cloud.alloydb.v1alpha.CreateBackupRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__BoolOperation__Group__9__Impl" $ANTLR start "rule__BoolOperation__Group__10" InternalBSQL2Java.g:1406:1: rule__BoolOperation__Group__10 : rule__BoolOperation__Group__10__Impl rule__BoolOperation__Group__11 ;
public final void rule__BoolOperation__Group__10() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBSQL2Java.g:1410:1: ( rule__BoolOperation__Group__10__Impl rule__BoolOperation__Group__11 ) // InternalBSQL2Java.g:1411:2: rule__BoolOpe...
[ "public final void rule__BoolOperation__Group__9() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:1383:1: ( rule__BoolOperation__Group__9__Impl rule__BoolOperation__Group__10 )\n // InternalBSQL2Java.g:1384:2: r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do not clear content to allow servers to stop gracefully and catch any issues there.
@AfterMethod(alwaysRun = true) protected void clearContent() throws Throwable { }
[ "protected void handleCleanup() {\r\n\t\t// Implement in subclass\r\n\t}", "private void serverCleaner() {\n rmiClients.clear();\n socketClients.clear();\n synchronized (lock) {\n players.clear();\n }\n controller = null;\n gameStarted = false;\n if (tim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Diagnostic call to unhash an arbitrary value to a game board
public void executeunhash() { Object state = gm.hashToState(new BigInteger(conf.getProperty("gamesman.hash"))); System.out.println(gm.displayState(state)); }
[ "int getBoardHash();", "void unsetHashControl();", "public long hash(Board board) {\n long test = board.hashCode();\n return test;\n }", "public void executehash() {\n \t\tString str = conf.getProperty(\"board\");\n \t\tif (str == null)\n \t\t\tUtil.fatalError(\"Please specify a board to hash...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get remote proxy with given logical webid like _c_.
private void getRemoteProxy() { String[] webIds = StringUtils.splitByWholeSeparator(this.webId, RPXY_WID_MARKER); // Remote proxy webid is same as live String liveWId = webIds[0]; // Webid of section where live is published (section is parent of remote proxy) ...
[ "NetworkProxy getNetworkProxy( String id );", "public Proxy getProxy(String id) {\n\t\treturn findProxy(proxy -> proxy.getId().equals(id), true);\n\t}", "IProxy retrieveProxy(String proxyName);", "protected AbstractProxy getProxy(int id) throws ProxyNotFound\n {\n final Integer _id = new Integer(id)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make List of MapImages from tracked locations' metadata.
public List<MapImage> convertMetdataToMapImages(PreparedQuery trackedMetadata) { List<MapImage> formLocationOptions = new ArrayList<>(); for (Entity entity : trackedMetadata.asIterable()) { String location = (String) entity.getProperty("cityName"); double latitude = (double) enti...
[ "public LiveData<List<PhotoData>> getGeoLocatedImages(){\n locationImages = mRepository.findGeoLocatedImages();\n\n return locationImages;\n }", "public List<Image> getLocalImages() {\n\n if (imageMap == null) {\n imageMap = new HashMap<String, Image>();\n\n // Reques...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if command line option 'option' present in command line args. If present, return true and remove if from the list. Otherwise, return false.
private static boolean hasCommandLineOption(List<String> argsList, String option) { for (int i=0; i<argsList.size(); i++) { if (((String)argsList.get(i)).equals(option)) { argsList.remove(i); return true; } } return false; ...
[ "public static boolean hasCommandLineOption(String option, String args[], String opts[][])\n throws DefaultMuleException\n {\n CommandLine line = parseCommandLine(args, opts);\n return line.hasOption(option);\n }", "boolean containsOption(String cmd) {\n return Pattern.compile(OPTION...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a Cursor on HOURLY_TABLE for the specified time period.
public Cursor getHourlyGaitParams(long start, long end) { String[] cols = {KEY_TIMESTAMP, KEY_STEP_REGULARITY, KEY_STRIDE_REGULARITY, KEY_STRIDE_SYMMETRY}; String filter = KEY_TIMESTAMP + " BETWEEN " + start + " AND " + end; return database.query(HOURLY_TABLE, cols, filter, null, null, null, nul...
[ "public abstract CursorFactory getCursorFactory();", "Cursor getTable(String tableName){\n SQLiteDatabase db1 = this.getWritableDatabase();\n String query = \"SELECT * FROM \" + tableName;\n Cursor data = db1.rawQuery(query, null);\n return data;\n }", "public Cursor getCursor() t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restore the specified consistency group snapshot
@POST @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Path("/{id}/protection/snapshots/{sid}/restore") @CheckPermission(roles = { Role.TENANT_ADMIN }, acls = { ACL.OWN, ACL.ALL }) public TaskResourceRep restoreConsistencyGroupSnapshot( @PathParam("id") final URI consist...
[ "void restoreSnapshot(Snapshot snapshot) throws Exception;", "void restoreGroupSnapshots(StorageSystem storage, URI volume, URI snapshot, TaskCompleter taskCompleter)\n throws DeviceControllerException;", "void restore(Snapshot state);", "void restoreSingleVolumeSnapshot(StorageSystem storage, URI ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for BookIsbnVO1.
public ViewObjectImpl getBookIsbnVO1() { return (ViewObjectImpl)findViewObject("BookIsbnVO1"); }
[ "public ISBN getIsbn() {\n return this.isbn;\n }", "public String getIsbn() {\n return isbn;\n }", "public String getBookISBN ( )\n { return isbnNumber.getISBN ( ) ;\n }", "public java.lang.String getIsbn() {\r\n return isbn;\r\n }", "public Long getBooksisbn() {\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change Listener bound to the select field. Once a selection is done, the value change listener will switch to the field linked to the current select value.
private ValueChangeListener createSelectValueChangeListener() { ValueChangeListener listener; listener = new ValueChangeListener() { @Override public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) { final String valueString = String.valueOf(eve...
[ "@Override\n\tpublic void selectionChanged() {\n\t\tif (listenToSelectionChanges) {\n\t\t\tsendWhenPossible(SendCond.ALWAYS);\n\t\t}\n\t}", "public void valueChanged (TreeSelectionEvent event)\n {\n updateSelection();\n }", "public void onSelect$valores(Event event) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Terminates the current MTSBroker services.
public void terminate() { if(brokerService != null) { try { logger.debug("Stopping broker: " + this.toString()); brokerService.stop(); logger.info("Broker stopped: " + this.toString()); } catch(Exception ...
[ "public void stop() {\r\n\t\ttry {\r\n\t\t\tlog.info(\"[TradeService][stop] Stopping TradeService...\");\r\n\r\n\t\t\t/** Close all sessions for each trade system. **/\r\n\t\t\tfor (TradeSystemThread tradeSystemThread : tradeSystemThreads) {\r\n\t\t\t\ttradeSystemThread.exit();\r\n\t\t\t}\t\t\r\n\t\t} catch (Except...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column T_IM_MANUFACTURERECBILLENTRY.FSALEORDERBILLID
public String getFsaleorderbillid() { return fsaleorderbillid; }
[ "public int getLBR_FiscalGroup_Customer_ID();", "public java.lang.Object getBillToCountryID() {\n return billToCountryID;\n }", "public int getLBR_FiscalGroup_Vendor_ID();", "public String getBill_code() {\n\t\treturn bill_code;\n\t}", "public Long getBillNo() {\n return billNo;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculamos el sueldo neto de un salario que recibimos como parametro.
public double sueldoNeto(double salario) { double salarioN=salario - (isss(salario)+afp(salario)+renta(salario)); return salarioN; }
[ "public String salarioNeto2(BuscarUsuario frmbuscar, String salario){\r\n this.medico= new Medicos();\r\n this.medico.setSalario(Double.parseDouble(salario));\r\n return this.medico.calcularSalarioNeto();\r\n }", "public String salarioNeto(frmUsuarios frmUsuarios){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Padding for the movie title.
private static String padMovieTitle(String title) { if(title.length() >= 32) { title = title.substring(0, 28); title += "..."; } while(title.length() != 31) { title += " "; } return title; }
[ "Border createTitledPaddingBorder(String title, int defaultPadding);", "Pad createPad(String title);", "public String getPaddingLeft();", "private static String padActorName(String name) {\n\t\tif(name.length() >= 29) {\n\t\t\tname = name.substring(0, 25);\n\t\t\tname += \"...\";\n\t\t}\n\t\twhile(name.length...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the method to be used to search session according to cookie
public Session getSessionbyCookie(int cookie);
[ "public Session[] findWherePhpSessionIdEquals(String phpSessionId) throws SessionDaoException;", "private void sessionCheck(RoutingContext rc) {\n Cookie cookie = rc.getCookie(AuthCookie.NAME);\n if (cookie == null) {\n rc.next();\n return;\n }\n\n sessionStore.get(cookie.getValue(), ar -> {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process this security event and detects whether this represents a security breach from the perspective of this rule
SecurityBreach isSecurityBreach(SecurityEvent event);
[ "public interface Rule {\n\n /**\n * Process this security event and detects whether this represents a security breach from the perspective of this rule\n * \n * @param event\n * event to process\n * @return security breach - either a breach or not (could be delayed)\n */\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructeur de copie d'articleTVA
public ArticleTVA(ArticleTVA articletva){ reference = articletva.reference; designation = articletva.designation; prixHorsTaxes = articletva.prixHorsTaxes; }
[ "abstract public Vraag duplicate ();", "Vaisseau_estAbscisseCouverte createVaisseau_estAbscisseCouverte();", "public abstract Sentence copy();", "public ArticleVendu(int noArticle, String nomArticle, String description, Date dateDebutEncheres,\n\t\t\tDate dateFinEncheres, int miseAPrix, int prixVente, int noU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NumberOfLineInputException Constructor Give the message to the attributes.
public NumberOfLineInputException(){ this.message="Error with the IN instruction : the input file has not enough line to complete all the IN instruction"; }
[ "public Line(int numInLine){\n this.numInLine = numInLine;\n }", "public InputException() {\n super(\"An unknown error occured.\");\n }", "public UniProtParserException(int linenumber, String message) {\n super(message);\n this.linenumber = linenumber;\n }", "public Incorr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make this function return the square of a
double square(double a){ }
[ "double getSquareNumber();", "static int calculateSquare(int number){\n return number * number;\n }", "private static int sumOfSquares() {\r\n\t\tint a = 0;\r\n\t\tfor (int i = 3; i <= 9; i++) a = a + i*i;\r\n\t\tSystem.out.println(\"A number equals : \" + a);\r\n\t\treturn a;\r\n\t}", "private stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deprecated; instead use: AcUspsInternationalClaimTools.ConsignmentNumberComparator
public static JwComparator<AcUspsInternationalClaim> getConsignmentNumberComparator() { return AcUspsInternationalClaimTools.instance.getConsignmentNumberComparator(); }
[ "public static JwComparator<AcUspsIntl615ReportRowVo> getConsignmentNumberComparator()\n {\n return AcUspsIntl615ReportRowVoTools.instance.getConsignmentNumberComparator();\n }", "public JwComparator<AcItemMovementVo> getConsignmentNumberComparatorNullsLower()\n {\n return ConsignmentNumber...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Calculate tax from gross
private double calcTax() { // tax = 15% of gross double taxrate = 0.15; return gross * taxrate; }
[ "public double calculateCostWithTax(){\n double rate = 0;\n for(Good g:goods){\n GoodsBaseCost gbc = GoodsBaseCost.valueOf(g.getType().toUpperCase());\n switch(gbc.name()){\n case \"CHEMICAL\" :\n rate = 14;\n break;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the password for this profile to the raw text.
public void setPass(String raw) { try { raw = PASS_HASH_PREFIX + PasswordHash.hash(raw); } catch (Exception e) { Log.debug("Failed to hash password."); e.printStackTrace(); return; } this.pass = raw; }
[ "public void setPassword(String p) {\n p = new String(password);\n }", "public void setPassword(String text) {\n txtPassword().setText(text);\n }", "public void setPasswordOutput(String text) {\n\t\tpasswordOutput.setText(text);\n\t}", "void setPassword(String password);", "public void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Sigma of First N
static BigInteger Sigma(int N) { BigInteger f = new BigInteger("0"); for (int i = 1; i <= N; i++) f = f.add(BigInteger.valueOf(i)); return f; }
[ "static BigInteger SigmaWithOutLoop(int N) { \n BigInteger f = BigInteger.valueOf(N); \n // N*(N+1)/2\n f = f.multiply(f.add( BigInteger.valueOf(1))).divide(new BigInteger(\"2\")); \n return f; \n }", "public static double somar(int n) {\n\t\tdouble s = 1;\r\n\t\t\r\n\t\tfor(int i =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column od_address.sso_user_type
public Integer getSsoUserType() { return ssoUserType; }
[ "public String getUserType() {\n return userType;\n }", "public String getUserType() {\r\n\t\treturn userType;\r\n\t}", "public String getUserType() {\n\t\treturn userType;\n\t}", "UserType userType();", "public UserType getUserType() {\n return userType;\n }", "public UserType getType() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This Api is used to return RequestSummary between start and end
@ApiOperation(value = "Get RequestSummary between start and end") @RequestMapping(path = "/getRS", method = RequestMethod.GET) public ResponseEntity<List<RequestSummary>> getRequestSummary(@RequestParam Date start, @RequestParam Date end) { Optional<List<RequestSummary>> result = rsDao.findByCreateTimeB...
[ "public String requestStatistics() {\n\t\t\n\t\t\tsb.setLength(0); // reset stringbuffer\n\t\t\tmakeStringBuffer(sb);\n\t\t\treturn sb.toString();\n\t\t\n\t}", "private void getBatchStatisticsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Objective: Print out a flood map of and characters that represents which areas of the height map would get flooded, given a certain height for a water level Input: Recieves a 2D array of int values representative of the height map, and an int variable representative of the water level Output: Void function has no out...
private static void PrintFloodMap(int[][] terrainMap, int floodHeight) { char[][] floodMap = new char[terrainMap.length][terrainMap[0].length]; for (int i = 0; i < terrainMap.length; i++) { for (int j = 0; j < terrainMap[0].length; j++) { if (terrainMap[i][j] <= floodHeight...
[ "public void PrintMap() {\r\n //top\r\n System.out.print(MAP_CORNER);\r\n for (i = 0; i <= Room[0].length(); i++){\r\n System.out.print(MAP_TOP_BOTTOM);\r\n }\r\n System.out.print(MAP_CORNER);\r\n\r\n //sides\r\n for(i = 0; i < room[0].length; ){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs the given function inside a trycatch block to capture and assert that given exception is raised
private void checkException(Runnable function, Class<?> expectedEx){ try { function.run(); assert false; }catch (Exception e){ assert e.getClass() == expectedEx; } }
[ "@Test\n\tvoid qutTestForExeception() {\n\t\tassertThrows(MyException.class, () -> { nopt.quot(100, 0);});\n\t}", "public static <T> void assertPotentiallyBlockingCallThrows( Exception expected, final Function0<T> fetcher ) {\n final AtomicReference<T> value = new AtomicReference<>();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getAllCatalogrecordJDBC method, of class CatalogrecordJDBCManager.
@Test public void testGetAllCatalogrecordJDBC() { System.out.println("getAllCatalogrecordJDBC"); CatalogrecordJDBCManager instance = new CatalogrecordJDBCManager(); ResultSet expResult = null; ResultSet result = instance.getAllCatalogrecordJDBC(); assertEquals(expResult, resu...
[ "@Test\n public void testGetCatalogrecordJDBC() {\n System.out.println(\"getCatalogrecordJDBC\");\n int catalogrecordId = 0;\n CatalogrecordJDBCManager instance = new CatalogrecordJDBCManager();\n Catalogrecord expResult = null;\n Catalogrecord result = instance.getCatalogrecor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks to see whether there are existing events in the current day.
public boolean findEvent() { boolean state = false; if (events.isEmpty()) return false; // there are no events in this date Set<GregorianCalendar> keys = events.keySet(); for (GregorianCalendar key : keys) { if (key.get(Calendar.DATE) == currentDate.get(Calendar.DATE)) { if (key.get((Calendar.MO...
[ "public boolean hasEvents()\n\t{\n\t\tif(events.size() != 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean checkRecordExistsForToday() {\n ArrayList<Record> todaysRecords = getRecordsForDate(new Date());\n return (todaysRecords != null && todaysRecords.size() > 0);\n }", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field1' field has been set
public boolean hasField1() { return fieldSetFlags()[1]; }
[ "boolean hasField0();", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case DATA_ID:\n return isSetDataId();\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets whether this peer has cleared the handshake phase.
public void setClearedHandshake(boolean cleared) { if (cleared) s_logger.debug("Handshake with Peer {} successful.", this); m_clearedHandshake = cleared; }
[ "public boolean hasClearedHandshake()\n {\n return m_clearedHandshake;\n }", "private void setHandshakeComplete(boolean handshakeComplete) {\n this.handshakeComplete = handshakeComplete;\n }", "private void setHandshaked(boolean madeHandshake) {\n if(madeHandshake)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "strain" element
void setStrain(java.lang.String strain);
[ "public void setStress(String stress) throws DOMException;", "void xsetStrain(org.apache.xmlbeans.XmlString strain);", "protected abstract void setEssence();", "public void setCrust(){\n this.crust = \"Thin\";\n }", "void setKs(double ks);", "public void setName() {\r\n\t\tapplianceName = \"ElectricSh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SimpleType__Group__3__Impl" $ANTLR start "rule__SimpleType__Group_2__0" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5072:1: rule__SimpleType__Group_2__0 : rule__SimpleType__Group_2__0__Impl rule__SimpleType__Group_2__1 ;
public final void rule__SimpleType__Group_2__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5076:1: ( rule__SimpleType__Group_2__0__...
[ "public final void rule__SimpleType__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5023:1: ( ( ( rule_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method for getting user phone number and check if the input is legal
public boolean getPhone(String p){ //check if the input is a number try{ phone = Long.parseLong(p); }catch(Exception e){ n=new NoticeUI("Please enter a number for phone!"); return false; } return true; }
[ "protected void validateMobileNumber(){\n /*\n Checking For Mobile number\n The Accepted Types Are +00 000000000 ; +00 0000000000 ;+000 0000000000; 0 0000000000 ; 00 0000000000\n */\n Boolean mobileNumber = Pattern.matches(\"^[0]?([+][0-9]{2,3})?[-][6-9]+[0-9]{9}\",getMobileNu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pass id of Bite to BiteEditFragment as argument in Bundle.
@Override public void onClick(View v) { Bundle args = new Bundle(); args.putSerializable(BiteEditFragment.ARG_BITE_ID, mBiteId); mNavController.navigate(R.id.action_biteFragment_to_biteEditFragment, args); }
[ "private void setFragmentParameter(String id) {\n String fragmentParameter;\n if (id == null || id.isEmpty()) {\n fragmentParameter = \"\";\n } else {\n fragmentParameter = id;\n }\n\n UI.getCurrent().navigate(MachinesView.class, fragmentParameter);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column x$statement_analysis.rows_sent_avg
public BigDecimal getRows_sent_avg() { return rows_sent_avg; }
[ "public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }", "public BigDecimal getRows_affected_avg() {\n return rows_affected_avg;\n }", "public void setRows_sent_avg(BigDecimal rows_sent_avg) {\n this.rows_sent_avg = rows_sent_avg;\n }", "com.google.firestore....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Declare a boolean Function to test whether the input is an integer/double. It takes two parameter Textfield and a String.
boolean isInt(TextField input);
[ "public static boolean isDouble(JTextField text) {\n String str = text.getText();\n try {\n Double.parseDouble(str);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "public boolean isDouble();", "public abstract boole...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set worker thread of handler for each chef engine
public void initializeHandlers(List<ChefEngine> chefEngineList) { ExecutorService executor = Executors.newCachedThreadPool(); for(ChefEngine chefEngine : chefEngineList) { Handler handler = new Handler(chefEngine); executor.execute(handler); handlers.put(chefEngine.getId(), handler); System.out.println(...
[ "private NetworkRequestHandlerEngine() {\n\t\tthis.networkEngine = NetworkEngine.getInstance();\n\t\tint size = Integer.parseInt(ConfigMgr.getInstance().get(\"NetworkRequestHandlerEngine.size\"));\n\t\tthis.handlers = new NetworkRequestHandler[size];\n\t\tfor (int i = 0; i < handlers.length; i++) {\n\t\t\thandlers[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Page Methods this method used to check the search summary is displayed
public boolean isSearchSummaryDisplayed() { boolean isSuccess=false; try { WebElement searchSummaryElement=webDriver.findElement(SEARCH_SUMMARY); isSuccess=isElementPresent(searchSummaryElement); }catch (NoSuchElementException e) { e.printStackTrace(); }catch (TimeoutException e) { e.printStack...
[ "@Test\n\tpublic void testSearch() {\n\t\tAssert.assertTrue(\"Check Search Results Page is opened.\", homePage.clickOnAdvancedSearchLink()\n\t\t\t\t.fillSearchForm(\"watch\", \"Price + Shipping: lowest first\").submitForm().isResultPageOpened());\n\t}", "@Test (priority = 0)\n\tpublic void searchTest(){\n\t\tHome...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to chnage current Fragment for ProfileOtherUser
public void goToUserProfile(User user) { Bundle data = new Bundle(); data.putParcelable("User",user); FragmentProfileOtherUser fpou = new FragmentProfileOtherUser(); fpou.setArguments(data); android.support.v4.app.FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.repl...
[ "private void loadProfileFragment(int position){\n FragmentTransaction transaction = getParentFragmentManager().beginTransaction();\n //Open my user profile\n if(users.get(position).getUid().equals(ProfileActivity.currentSignedInUser.getUid())){\n transaction.replace(R.id.fragment_co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the NetworkPolicies relevant for Kafka brokers
public NetworkPolicy generateNetworkPolicy(String operatorNamespace, Labels operatorNamespaceLabels) { // Internal peers => Strimzi components which need access NetworkPolicyPeer clusterOperatorPeer = NetworkPolicyUtils.createPeer(Map.of(Labels.STRIMZI_KIND_LABEL, "cluster-operator"), NetworkPolicyUtils...
[ "PoliciesClient getPolicies();", "public void createLBPolicy2(){\n\n\t\tIterator<ASServer> itm = manager.getASServers().values().iterator();\n\t\t\n\t\twhile(itm.hasNext()){\n\t\t\t\n\t\t\tASServer as = itm.next();\n\t\t\tAppServerPolicy ap = as.currentPolicy;\n\t\t\tIterator<ObjectKey> ik = ap.policyMap.keySet()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ return IM_FONT_CONFIG>FontBuilderFlags; Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.
public native void setFontBuilderFlags(int fontBuilderFlags);
[ "public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}", "public void createFont()\n {\n my_font = new Font(\"Helvetica\", Font.BOLD, (int) (getWidth() * FONT_SIZE));\n }", "public AssetFonts()\r\n {\r\n // Create thr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method adds the specified patient to recipient list
public void addRecipient(Patient patient) throws IllegalArgumentException { if(recipients.size()==MAX_PATIENTS){ throw new IllegalArgumentException("You cannot add anymore Recipient Patients as it reached the max!"); } recipients.add(patient); }
[ "private void addPatient(IPatient patient) {\n arrivalQueue.insert(patient);\n printer.printNewPatient(patient);\n update();\n }", "public void addPatient(Patient patient) {\n patients.add(patient);\n }", "public void addRecipient(){\n //mRATable.insert();\n }", "public void addP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
As the tester needs to make instances of the classes or primitive types for the fields which accessors are being tested, it will make the best guess to instantiate those objects. When instantiation cannot be handled by the tester (and you find exceptions due to this), you might want to provide default objects for the t...
public void testWithDefaultInstances(){ //a map with a default instance associated to the field class //is passed to the tester to use Map<Class,Object> map = new HashMap<Class, Object>(); map.put(SampleBean1.class, bean1); tester.addDefaultInstances(map); //all the fiel...
[ "@Test\n public void testCtor() {\n instance = new User();\n\n assertNull(\"'username' should be correct.\", TestsHelper.getField(instance, \"username\"));\n assertNull(\"'defaultTab' should be correct.\", TestsHelper.getField(instance, \"defaultTab\"));\n assertNull(\"'networkId' sho...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 26 / 2 covered goals: 1 org.jsecurity.util.AntPathMatcher.extractPathWithinPattern(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;: I57 Branch 77 IF_ICMPLT L408 true 2 org.jsecurity.util.AntPathMatcher.extractPathWithinPattern(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;: I50 Branch...
@Test public void test26() throws Throwable { AntPathMatcher antPathMatcher0 = new AntPathMatcher(); String string0 = antPathMatcher0.extractPathWithinPattern("-W4iY?>s&pqo/n<]I", ""); assertNotNull(string0); assertEquals("", string0); }
[ "@Test\n public void test28() throws Throwable {\n AntPathMatcher antPathMatcher0 = new AntPathMatcher();\n String string0 = \"]~l|*yXch7\\\\8xhP?\";\n String string1 = \"\";\n String string2 = antPathMatcher0.extractPathWithinPattern(string1, string0);\n assertEquals(\"]~l|*yXch7\\\\8xh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CM11637 Set the Consignor code (for display).
public void setConsignorCodeDisp(String arg) { wConsignorCodeDisp = arg; }
[ "public void setConsignorCode(String arg)\n\t{\n\t\twConsignorCode = arg;\n\t}", "public void setConsignorCode(String arg)\n\t{\n\t\tsetValue(CONSIGNORCODE, arg);\n\t}", "public String getConsignorCode()\n\t{\n\t\treturn wConsignorCode;\n\t}", "public void setMppfcCtycod(String value) \n {\n String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleModuleElement" $ANTLR start "entryRuleQuery" InternalOCLlite.g:228:1: entryRuleQuery : ruleQuery EOF ;
public final void entryRuleQuery() throws RecognitionException { try { // InternalOCLlite.g:229:1: ( ruleQuery EOF ) // InternalOCLlite.g:230:1: ruleQuery EOF { before(grammarAccess.getQueryRule()); pushFollow(FOLLOW_1); ruleQuery(); ...
[ "public final EObject entryRuleQuery() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleQuery = null;\n\n\n try {\n // InternalDOcl.g:548:46: (iv_ruleQuery= ruleQuery EOF )\n // InternalDOcl.g:549:2: iv_ruleQuery= ruleQuery EOF\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Developed By: Kunal Jain Date: 01/17/2012 Constructor for StoredProcedureArg
public StoredProcedureArg ( String argName, DataType dataType, Object argValue, ArgDirection argDirection ) { m_spArgName = argName; m_argDataType = dataType; m_argValue = argValue; m_argDirection = argDirection; }
[ "public StoredProcedureArg\n (\n String argName, \n Object argValue\n )\n {\n m_spArgName = argName;\n m_argValue = argValue;\n }", "public StoredProcedureArg\n (\n String argName,\n DataType dataType,\n Object argValue\n )\n {\n m_spArgName = a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRSCIFLIMIT.NON_CASH_LIMIT
public void setNON_CASH_LIMIT(BigDecimal NON_CASH_LIMIT) { this.NON_CASH_LIMIT = NON_CASH_LIMIT; }
[ "public void setCASH_LIMIT(BigDecimal CASH_LIMIT)\r\n {\r\n\tthis.CASH_LIMIT = CASH_LIMIT;\r\n }", "public BigDecimal getNON_CASH_LIMIT()\r\n {\r\n\treturn NON_CASH_LIMIT;\r\n }", "public void setLIMIT_SERIAL_NO(BigDecimal LIMIT_SERIAL_NO)\r\n {\r\n\tthis.LIMIT_SERIAL_NO = LIMIT_SERIAL_NO;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Need a retry loop as the tests might still be registering when this test runs...we'd need to make the readyness detection more extensive to avoid this TODO we could probably use a JUnit Rule to retry tests.
@Test public void testWithRetries() { final RetryLoop.Condition c = new RetryLoop.Condition() { public String getDescription() { return "Checking JSON list of server-side tests"; } public boolean isTrue() throws Exception { testJsonListOf...
[ "@Test\n public void testNextWaiting() {\n }", "@Test\n public void testProcessRetries() throws Exception {\n System.out.println(\"processRetries\");\n // has null pointer issues if run standalone without the listen\n instance.listen();\n instance.processRetries();\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test what happens on concurrent write. Concurrent write may corrupt the map, so that keys and values may become null.
private void testConcurrentWrite() throws InterruptedException { final AtomicInteger detected = new AtomicInteger(); final AtomicInteger notDetected = new AtomicInteger(); for (int i = 0; i < 10; i++) { testConcurrentWrite(detected, notDetected); } // in most cases, i...
[ "@Test\n public void writeLockIsolationTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n int threadNum = 50;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the ith "CoordGeom" element
public void removeCoordGeom(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(COORDGEOM$2, i); } }
[ "void removeGeometryMember(int i);", "public void unsetCoordGeomRefs()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(COORDGEOMREFS$34);\r\n }\r\n }", "public void delete() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the property in which the autoconsume flag is stored.
public final BooleanProperty autoConsumeProperty() { return myAutoConsumeProperty; }
[ "public final boolean isAutoConsume()\n {\n return myAutoConsumeProperty.get();\n }", "public AnnotationProperty getAnnotationProperty() {\n return ((AnnotationProperty) ((ArrayList<ResourceProperty>) resource.getData()\n .getProperties().get(AnnotationProperty.qname)).get(0));\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if card is touched, and if the card has energy to attack
private boolean checkIfCardCanUnleashHell(Input.TouchEvent touchEvent, CharacterCard card) { return (checkIsTouched(touchEvent, card) && card.hasEnergyToAttack()); }
[ "private void checkDamage()\n {\n if(isTouching(BulletV1S1.class))\n {\n removeTouching(BulletV1S1.class);\n health = health - 1;\n }\n else if(isTouching(MissleV1S1.class))\n {\n removeTouching(MissleV1S1.class);\n health = health - ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when Access Provider has obtained a token
@Override public void onAccessGranted(final AccessToken token) { System.out.println( "Sweet, we got a token: " + token.getAccessToken() ); useApiWithToken(token); }
[ "@Override\n public void onTokenFetched(String code, String accessToken) {\n String token = code;\n\n // The native client uses the OAuth access token as the shared secret to\n // authenticate itself with the host using spake.\n String sharedSec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the rowmajor ordering of the edges based on their real position on the spine.
public static Iterator<Edge> rowMajorForOrderOnSpine(Embedding embedding) { List<Edge> edges = new ArrayList<>(embedding.getGraph().getM()); for (int i = 0; i < embedding.getGraph().getN(); i++) { Vertex v = embedding.getGraph().getVertexByIndex(embedding.getVertexAtPosition(i)); List<Edge> outgoingEdges = ne...
[ "void orderEdges(Comparator<E> comparator);", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deshabilita los menus de Usuario administrador
private void deshabilitarMenus(){ mConfiguracion.setEnabled(false); mSorteo.setEnabled(false); bLogOut.setEnabled(false); }
[ "public void habilitarOpcionesAdministradorLogueado(){\r\n clControladorPrincipal.getFrmPrincipal().getMnuSalir().setEnabled(true);\r\n clControladorPrincipal.getFrmPrincipal().getMnuAdministracion().setEnabled(true);\r\n clControladorPrincipal.getFrmPrincipal().getMnuIngresar().setEnable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End fetchGrade Generate File RefNo
public String generateFileRefNo()throws Exception { Connection con = null; ResultSet resultSet = null; //DataArrayWrapper dataArrayWrapper = new DataArrayWrapper(); String sql=null; SimpleDateFormat dmyFormat = new SimpleDateFormat("ddMMMyyyy"); DecimalFormat formatter =...
[ "void generateGradeCard(String studentId);", "int getGradeNum();", "public int \r\nomStudent_BuildMajorGPA_Report( View mStudent )\r\n{\r\n zVIEW lDegTrkM = new zVIEW( );\r\n //:VIEW mDegree BASED ON LOD mDegree\r\n zVIEW mDegree = new zVIEW( );\r\n //:VIEW mStudenC BASED ON LOD mStudenC\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the significant bit that has a 1 in a given number
public int getSignificantBit(int num){ int significantBit = 0; while (num != 1) { num = num/2; ++significantBit; if(num==1) { ++significantBit; } } return significantBit; }
[ "static public int signalBit(float theValue) {\r\n\t\treturn floatToBits(theValue) & 0x80000000;\r\n\t}", "int getBitAsInt(int index);", "public static boolean bit1(byte value) { return (value & 0x02) > 0; }", "public static int getBit(int value, int i){\n\t\treturn 1 & (value >> (i));\n\t}", "private int m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ LONG_TEMPLATE_ENTRY_START expression LONG_TEMPLATE_ENTRY_END
public static boolean longTemplateEntry(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "longTemplateEntry")) return false; if (!nextTokenIs(b, LONG_TEMPLATE_ENTRY_START)) return false; boolean r, p; Marker m = enter_section_(b, l, _NONE_, LONG_TEMPLATE_ENTRY, null); r = consumeToken(b, LONG_TEMP...
[ "public static boolean shortTemplateEntry(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"shortTemplateEntry\")) return false;\n if (!nextTokenIs(b, SHORT_TEMPLATE_ENTRY_START)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, SHORT_TEMPLATE_ENTRY, null);\n r = consumeTo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field303' field.
public void setField303(java.lang.CharSequence value) { this.field303 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField303(java.lang.CharSequence value) {\n validate(fields()[303], value);\n this.field303 = value;\n fieldSetFlags()[303] = true;\n return this; \n }", "public java.lang.CharSequence getField303() {\n return field303;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Output only. The pretax subtotal amount of invoice level regulatory costs, in micros. int64 regulatory_costs_subtotal_amount_micros = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];
long getRegulatoryCostsSubtotalAmountMicros();
[ "long getRegulatoryCostsTotalAmountMicros();", "long getRegulatoryCostsTaxAmountMicros();", "long getAdjustmentsSubtotalAmountMicros();", "public float invoiceSubtotal(){\r\n\t\tfloat subtotal = 0.00f;\r\n\t\tfor(Invoice item: Invoices){\r\n\t\t\tsubtotal += item.getSubTotal(item.getId());\r\n\t\t}\r\n\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merges two ColorObject together. The first object represents the primary colors, while the second represents the alpha.
public static ColorObject mergeColors (ColorObject primary, ColorObject alpha) { ColorObject colorObj = primary; colorObj.alpha = alpha.alpha; return colorObj.clone(); }
[ "public ObjectColor union(ObjectColor other) {\n ObjectColor newColor = new ObjectColor();\n newColor.white = white || other.white;\n newColor.blue = blue || other.blue;\n newColor.black = black || other.black;\n newColor.red = red || other.red;\n newColor.green = green || ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor. The first argument of the function is a value of x and the remaining arguments are parameters set by the leastsquares fit. The realvalued function must implement the derivatives with respect to all its arguments except the first. Derivatives with respect to the first argument, however, must be implemented ...
public NonLinear(double[] x, double[] y, RealValuedFunctionVA rf, Config config) { this(x, y, rf, config, null); }
[ "public NonLinear(double[] x, double[] y, RealValuedFunctionVA rf,\n\t\t\t Config config, double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t if (guess != null) {\n\t\tif (guess.length < ourGu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Elimina i cappi che si sono verificati durante la ricerca del percorso
public void eliminaCappi(ArrayList<Coordinate> percorso) { for (int i = 0; i < percorso.size(); i++) { /* * Sono stati scelti al massimo 4 confronti per rendendere il tempo di * esecuzione della funzione lineare e non quadratico; 4 confronti di * conseguenza ad esperimenti fatti */ for (int j = ...
[ "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the information of an Auction that contains the given ID as key
public Auction getAuction(String auctionID) { if (containsKey(auctionID)) return (Auction) get(auctionID); else return null; }
[ "public Auction getAuction(String auctionID){\n return table.get(auctionID);\n }", "java.lang.String getBidid();", "public String getAuctionID() {\n return auctionID;\n }", "private static Auction getAuction(AuctionManager auctionManager, long id) throws HandlerExecutionException {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Test that all buyers were not minors and that, at least, one of the buyers was over 30.
public static void test04() { if(sales.stream().allMatch(sale -> sale.getBuyer().getAge() >= 18)) { System.out.println("All buyers were not minors"); } if(sales.stream().anyMatch(sale -> sale.getSeller().getAge() >= 30)) { System.out.println("At least one of the sellers was over 30"); } if(sales.stream(...
[ "public static void checkBust()\r\n {\n if (PlayerOne.getTotal() <= 21 || PlayerTwo.getTotal() <= 21 || PlayerThree.getTotal() <= 21)\r\n {\r\n dealerPlay();\r\n }\r\n else //if all players have above 21, Dealer does not need to reveal second card \r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set whether or not to impose upper thresholds
public void setUpperThresholds(boolean upperThresholds) { this.upperThresholds = upperThresholds; if (upperThresholds) { slider.setFillColorAt(Color.yellow, 3); slider.setTrackFillColor(Color.red); showThumbAt(2); showThumbAt(3); } ...
[ "public void setUpperThreshold(int setUpperThreshold) {\r\n\t\tthis.upperThreshold = setUpperThreshold;\t\t\r\n\t}", "public void setUpperRange(double upper);", "private void setUpperHardTreshold() {\r\n\t\tString[] data = upperThresholdLimit.getText().split(\"\\\\s+\");\r\n\t\tif (data.length == 2 && !data[0]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets whether listwise deletion should be used for summary statistics
public void setUseListwiseDeletion(boolean useListwiseDeletion) { this.useListwiseDeletion = useListwiseDeletion; }
[ "public Boolean getUseListwiseDeletion() {\n \n // Backwards compatibility\n if (useListwiseDeletion == null) {\n useListwiseDeletion = true;\n }\n return useListwiseDeletion;\n }", "public void removeByTodoBooleanStat(boolean todoBooleanStat);", "public void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Name of the metric; may be empty. string metric_name = 1;
java.lang.String getMetricName();
[ "public String getMetricName() {\n\t\treturn metricName;\n\t}", "public abstract String getMetricName();", "public void setMetric(java.lang.String value) {\n this.metric = value;\n }", "public final String getMetricName() {\n return properties.get(METRIC_NAME_PROPERTY);\n }", "public void setMetricN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleDependency" $ANTLR start "entryRuleOr" ../de.nordakademie.mwi13a.team1.dependency/srcgen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:399:1: entryRuleOr returns [EObject current=null] : iv_ruleOr= ruleOr EOF ;
public final EObject entryRuleOr() throws RecognitionException { EObject current = null; EObject iv_ruleOr = null; try { // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency.g:400:2: (iv_ruleO...
[ "public final void entryRuleOr() throws RecognitionException {\n\n \tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n\n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/ant...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getSearchBoards query The default field counts,created_at,creator,description,id,image,name,privacy,reason,url
Data<List<Boards>> getSearchBoards(String query);
[ "Data<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);", "Data<List<Boards>> getSearchBoardsCursor(String query, String cursor);", "List<Board> boardListPage(Criteria cri) throws Exception;", "Data<List<Boards>> getBoards(String fields);", "Data<List<Boards>> getSuggested(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All start elements get put on a new line except for the first
private void onStartElement() throws XMLStreamException { if (depth > 0) { next.writeCharacters(NEWLINE); } state = State.SEEN_NOTHING; // Every start element is indented according to the depth. doIndent(); // Increment the depth for the next start element. ...
[ "@Override\n public void startLines() {\n iterator.startLines();\n }", "public void writeElementStart( String tag)\n {\n startLine();\n print( \"<\");\n print( tag);\n print( \">\");\n println();\n }", "public void addBlankLine ()\n {\n addNewLineIfNeeded();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the minimum possible distance between the Boundables in this pair. If the members are both items, this will be the exact distance between them. Otherwise, this distance will be a lower bound on the distances between the items in the members.
public double getMinimumDistance() { return minDistance; }
[ "private double getMinDistance() {\n\t\treturn 2.0D - (0.2D * level);\n\t}", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Spread Angle' attribute. If the meaning of the 'Spread Angle' attribute isn't clear, there really should be more of a description here...
double getSpreadAngle();
[ "String getSpreadAngleAsString();", "final public double getRawAngle() {\n\t\treturn rawValue;\n\t}", "float getSteeringAngle();", "public double getStartAngle()\n {\n return getAttributes().getStartAngle();\n }", "public int getOpeningAngle()\n {\n return this.openingAngle;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a dummy redacted event to manage the redaction. some redacted events are not removed from the history but they are pruned.
@Override public void run() { Event redacterEvent = new Event(); redacterEvent.roomId = redactedEvent.roomId; redacterEvent.redacts = redactedEvent.eventId; redacterEvent.setType(Even...
[ "protected void redactEvent(final String eventId) {\n // Do nothing on success, the event will be hidden when the redaction event comes down the event stream\n mMatrixMessagesFragment.redact(eventId, new ApiCallback<Event>() {\n @Override\n public void onSuccess(final Event redac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize adjacency map and data map
public Graph() { this.adjacencyMap = new HashMap<String, HashMap<String,Integer>>(); this.dataMap = new HashMap<String,E>(); }
[ "LinkedHashMap<String, LinkedHashMap<String, Integer>> getAdjacencyMatrixMap();", "@SuppressWarnings(\"unchecked\")\n private void initializeAdjacencyList()\n {\n adjacencyList = new ArrayList[numberOfVertices];\n for(int i = 0; i < numberOfVertices; i++)\n adjacencyList[i] = new Ar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test valid parameter name.
public void testValidParameterName() throws Exception { IComponentSpecification spec = parseComponent("ValidParameterName.jwc"); IParameterSpecification ps = spec.getParameter("valid"); assertNotNull("Parameter specification.", ps); checkLine(ps, 24); }
[ "protected void validateName(String[] param){\n \n }", "protected void validateNames(String[] param){\n \n }", "public void testInvalidParameterName() throws Exception\n {\n try\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form academic
public academic() { initComponents(); }
[ "FORM createFORM();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public void newArticle() {\n ArticleForm af = new ArticleForm(this);\n af.showForm();\n }", "public static AssessmentCreationForm openFillCreationForm(Assessment...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the delayed load condition
public boolean getDelayedLoad() { return this.delayedLoad; }
[ "int getCondition();", "String getCondition();", "Condition getCond();", "RuntimeCondition getRuntimeCondition();", "PreCondition getPreCondition();", "public String getCondition() {\n return condition;\n }", "public int getCondMet() {\r\n return condMet;\r\n }", "Condition getCond...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current list of NonHumanCategories from the resource service.
public List<NonHumanCategory> getNonHumanCategories() throws IOException { if (isConnected()) { try { _nhCategoryCache = _adapter.getNonHumanCategories(_handle); } catch (ResourceGatewayException rge) { if (_nhCategoryCache.isEmpty()) throw new...
[ "@TransactionalReadOnly\n\tpublic List<ReportCategory> findAllWithoutParent() throws ReportCategoryDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(QUERY_SELECT_PART_USERNAMED_BASED + \" AND o.parent_category_id IS NULL ORDER BY o.id\", this, ExtendedPermission.READ.getMask(), SessionManager.getCu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the important function that takes care of sending a media segment to the Livepeer API.
@Override public int sendMediaSegment(MediaSegmentModel mediaSegment) { PacketFragmentList list = mediaSegment.getFragmentList(); LiveStreamPacketizerCupertinoChunk chunkInfo = (LiveStreamPacketizerCupertinoChunk) mediaSegment.getChunkInfoCupertino(); if (list == null || list.size() == 0) { return 0...
[ "public void run() {\n\n\n if (videoFile != null) {\n //\n // Add Image to Photos Gallery\n //\n //final Uri uri = addMediaToGallery(mInscribedVideoFile.getAbsoluteP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the serviceName2 value for this SetAuthFlowParamRequestDetailsType.
public java.lang.String getServiceName2() { return serviceName2; }
[ "public void setServiceName2(java.lang.String serviceName2) {\r\n this.serviceName2 = serviceName2;\r\n }", "public String getAuthValue2() {\n return authValue2;\n }", "public void setAuthValue2(String authValue2) {\n this.authValue2 = authValue2;\n }", "public java.lang.String g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
5.4 Services Access available SystemOfUnitsServices.
@Test(groups = { SPI }, description = DESCRIPTION) @SpecAssertion(section = SECTION_NUM, id = "54-A06") public void testSystemOfUnitsService() { for (ServiceProvider provider : ServiceProvider.available()) { assertNotNull(SECTION_PREFIX + SECTION_NUM + ": ServiceProvider is null", provider); SystemOfUnitsServ...
[ "public static UnitSystems GetUnitSystem(Units unit)\n {\n return MethodsCommon.GetSystemFromUnit(unit, false, true);\n }", "@Test(groups = { SPI }, description = DESCRIPTION)\n\t@SpecAssertion(section = SECTION_NUM, id = \"54-A08\")\n\tpublic void testSystemOfUnitsServiceAvailableSystems() {\n\t\tfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract (keep) JUST the HTML from the String.
public static String extractHTML(String str) { if (str == null) return ""; StringBuffer ret = new StringBuffer(str.length()); int start = 0; int beginTag = str.indexOf("<"); int endTag = 0; if (beginTag == -1) return str; while (beginTag >= st...
[ "private String removeAllHtmlTags(String string) {\n return string.replaceAll(\"<[^>]*>\", \"\");\n }", "public static String cleanHTML(String html) {\n\t\tString text = html;\n\t\ttext = stripElement(\"script\", text);\n\t\ttext = stripElement(\"style\", text);\n\t\ttext = stripTags(text);\n\t\ttext = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of libPath
public void setLibPath() { this.libPath = ""; String decodedPath = ""; try { File jarFile = new File(LibraryPath.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); decodedPath = jarFile.getParentFile().getPath(); LOG.info("Current sy...
[ "private static void setLibraryPath(String path) {\n System.setProperty(\"java.library.path\", path);\n LOG.info(\"java.library.path: {}\", System.getProperty(\"java.library.path\"));\n\n try {\n //set sys_paths to null\n final Field sysPathsField = ClassLoader.class.getDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialization of the "JvmThreading" group. Initialization of the "JvmThreading" group. To disable support of this group, redefine the "createJvmThreadingMetaNode()" factory method, and make it return "null"
protected void initJvmThreading(MBeanServer server) throws Exception { final String oid = getGroupOid("JvmThreading", "1.3.6.1.4.1.42.2.145.3.163.1.1.3"); ObjectName objname = null; if (server != null) { objname = getGroupObjectName("JvmThreading", oid, mibName + ":name=sun.m...
[ "protected JvmThreadingMeta createJvmThreadingMetaNode(String groupName,\n String groupOid, ObjectName groupObjname, MBeanServer server) {\n return new JvmThreadingMeta(this, objectserver);\n }", "protected abstract Object createJvmThreadingMBean(String groupName,\n String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'attachmentName'
@Test public void attachmentNameTest() { // TODO: test attachmentName }
[ "public String getAttachmentName() {\n return attachmentName;\n }", "public void setAttachmentName(java.lang.String attachmentName) {\n this.attachmentName = attachmentName;\n }", "public String getAttachmentName() {\n\t\treturn attachmentName;\n\t}", "public java.lang.String getAttachment...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setSlutZone method, of class Zoneberegner.
public void testSetSlutZone() { System.out.println("setSlutZone"); int destZone = 10; Zoneberegner instance = new Zoneberegner(); instance.setSlutZone(destZone); int zoneResult = instance.getSlutZone(); assertEquals(destZone, zoneResult); }
[ "public void testGetSlutZone() {\n System.out.println(\"getSlutZone\");\n Zoneberegner instance = new Zoneberegner();\n int expResult = 150;\n instance.setSlutZone(expResult);\n int result = instance.getSlutZone();\n assertEquals(expResult, result);\n }", "public void testSetRejseZo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies that the field specified by the name contains some specific text.
@Then("^(?:I should see |)the \"(.*)\" field contains the \"(.*)\" text$") public void verifyFieldText(String fieldName, String text) throws Exception { Control control = verifyElementExists(fieldName); String actualText = control.getValue(); Assert.assertTrue( String.format("The...
[ "void assertAnyElementHaveText(String logicalName, String expectedText);", "boolean hasAFieldName();", "public void assertTextPresent(final String text);", "@Test\n public void verify_The_Username_Field_Enter_Text_Types()\n {\n String name= data.getValueByName(\"Username\");\n sfaLoginPage...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the first table that matches the supplied partial name.
static TableDescription getTableByName(final List<TableDescription> tables, final String partialTableName) { for (TableDescription table : tables) { if (table.getTableName().indexOf(partialTableName) > -1) { return table; } } return null; }
[ "public TapTable findOneTable(String tableName);", "private static Table findTable(List<Table> allTables, String logicalTableName) {\n for (Table table : allTables) {\n if (table.logicalName.equals(logicalTableName)) {\n return table;\n }\n }\n return null;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
loadCountries() Adds Country objects from a correctly formatted file to the countryList.
public static void loadCountries(String filePath){ File inputFile = new File(filePath); // Scans the file if the file path is correctly formatted. // If not, returns an error message. Scanner scanner = null; try { scanner = new Scanner(inputFile); } catch (Fil...
[ "private void importCountries(JTFFile file) {\n for (SimpleData country : file.getCountries()) {\n if (countriesService.exist(country)) {\n country.setId(countriesService.getSimpleData(country.getName()).getId());\n } else {\n countriesService.create(countr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the patternId constraint of 'Channel Group Type'.
public boolean validateChannelGroupType_patternId(ChannelGroupType channelGroupType, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate (org_eclipse_smarthome_schemas_thing_description_v1__0SimplifiedPackage.Literals.CHANNEL_GROUP_TYPE, channelGroupType, diagnostics, con...
[ "public boolean validateChannelType_patternId(ChannelType channelType, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn\n\t\t\tvalidate\n\t\t\t\t(org_eclipse_smarthome_schemas_thing_description_v1__0SimplifiedPackage.Literals.CHANNEL_TYPE,\n\t\t\t\t channelType,\n\t\t\t\t diagnostics,\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the bean class that will be used to build bean's instance.
protected void setBeanClass(final Class<PoolType> beanClass) { this.beanClass = beanClass; }
[ "public Class getBeanClass() {\n return beanClass;\n }", "public Class<T> getBeanClass() {\n return beanClass;\n }", "public Class<?> getBeanClass() {\r\n return beanClass;\r\n }", "public void setBeanClassName(String beanClassName) {\n this.beanClassName = beanClassName;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes sure the focusIndex is valid.
protected void validateFocusIndex() { if (focusIndex >= tabPane.getTabCount()) { setFocusIndex(tabPane.getSelectedIndex(), false); } }
[ "private void checkFocus() {\r\n if (root.getScene().focusOwnerProperty().get() instanceof TextField\r\n && lastFocus == (TextField) root.getScene().focusOwnerProperty().get()) {\r\n\r\n lastFocus.fireEvent(new ActionEvent());\r\n lastFocus = null;\r\n\r\n }\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method drops all or invisible weather entries, if all=false those that are older than "back" days or further than "front".
void dump(boolean all) { // For XML update Node tree = stateDoc.getDocumentElement(); NodeList children = tree.getChildNodes(); long first = 0; long end = 0; if (act != null) { // first & last date to keep first = act.getDate() - back * main.DAY; en...
[ "public void clearForecast() {\n forecast.clear();\n }", "public void unmarkAll() {\n for (Faction faction : FactionManager.INSTANCE.getFactions()) {\n if (faction.getId() == WILDERNESS_ID) continue;\n massiveUnmark(faction.getId());\n }\n }", "void unsetSat();", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the normalizationEnd property.
public void setNormalizationEnd(double value) { this.normalizationEnd = value; }
[ "public double getNormalizationEnd() {\n return normalizationEnd;\n }", "public void setEnd(int end)\n {\n _end = end;\n this.end = end;\n this.endSpecified = true;\n }", "public void setEnd(int end)\n {\n this.end = end;\n this.endSpecified = true;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the year with the highest ranking for that individual.
public void yearOfHighestRank(String name, String gender){ int year = 1880; int highrank = 0; String yearstring = null; int yearOfHighestRank = 0; while (year<=2014){ yearstring = Integer.toString(year); int rank = getRank(yearstring, name, gender...
[ "public void testYearOfHighestRank()\n {\n int year = yearOfHighestRank(\"Mich\",\"M\");\n System.out.println(\"Given name's highest ranking was in \" +year);\n }", "public WeatherStation getLargestAnnualRainfall (int year) \n {\n double dMax = -1;\n WeatherStation sMaxSation = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the pathODEsNoCarg field.
public void setPathODEsNoCarg(java.lang.String pathODEsNoCarg);
[ "public void setPathODEsCarg(java.lang.String pathODEsCarg);", "public void resetPathODEsNoCarg();", "public void resetPathODEsCarg();", "public java.lang.String getPathODEsNoCarg();", "public java.lang.String getPathODEsCarg();", "public void setPathODEs(java.lang.String pathODEs);", "public void reset...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }