query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Resets all timestamps for last time we sent a packet to neighbors. This method is to be used when Android SDK is higher or equal than 11.
@TargetApi(Build.VERSION_CODES.HONEYCOMB) private boolean resetRawNeighborTimeLastPacket_postSDK11() { final SQLiteDatabase db = mDbHelper.getWritableDatabase(); final SQLiteStatement updateStmt = db.compileStatement( "update " + Neighbors.TABLE_NAME + " set " ...
[ "private boolean resetRawNeighborTimeLastPacket_preSDK11() {\n final SQLiteDatabase db = mDbHelper.getWritableDatabase();\n\n String updateQueryString = \"update \" + Neighbors.TABLE_NAME + \" set \" +\n Neighbors.COLUMN_TIME_LASTPACKET + \" = \" + 0;\n\n db.execSQL(updateQuerySt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
With twoargument constructor, validate and store userName and score
public Rating(String userName, int score) { setUserName(userName); setScore(score); }
[ "public ScoreMatchingCards(int userScore, String userName) {\n super(userScore, userName);\n }", "public Leaderboard(){\n this.name =\"\";\n this.score = 100;\n }", "public UserScore(Name alias) {\n this(alias, USER_SCORE);\n }", "public TA(String firstName, String lastNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface whose task is to make each Bacteria perform an Action.
public interface ActionPerformer { /** * Perform the action MOVE. * @param position the Position of the Bacteria of which perform the action * @param bacterium the Bacteria of which perform the action * @param direction the direction in which the bacteria should move * @param distance the m...
[ "abstract void actOnUnitTargets();", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "protected void forEach(Consumer<Command> action) {\n commands.forEach(action);\n }", "abstract protected T performAction();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Description: The getReccomendedCISs method is used when a user wants to get tips about new CISs based on user interests. Parameters: Returns: An Array List of possible CISs. Notes: This API is triggered MANUALLY and not automatically.
public ArrayList<Object> getRecommendedCISs ();
[ "public ArrayList<Object> getMyCISs ();", "public ArrayList<Clinic> getAllClinics() {\n return getClinics(\"\");\n }", "public FSArray getCuiConcepts() {\n if (Negation_Type.featOkTst && ((Negation_Type)jcasType).casFeat_cuiConcepts == null)\n jcasType.jcas.throwFeatMissing(\"cuiConcepts\", \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method converts a string list to GeneIdentifierDE list type based on ListSubType
public static List<GeneIdentifierDE> convertToGeneIdentifierDE(List<String> list,ListSubType listSubType){ List<GeneIdentifierDE> geneIdentifierList = new ArrayList<GeneIdentifierDE>(); switch (listSubType){ case GENESYMBOL: for(String listItem: list){ geneIdentifierList.add(new GeneIdentifierDE.GeneSymbol(list...
[ "public static List<SNPIdentifierDE> convertToSNPIdentifierDE(List<String> list,ListSubType listSubType){\n\t\tList<SNPIdentifierDE> snpIdentifierDE = new ArrayList<SNPIdentifierDE>();\n\t\tswitch (listSubType){\n\t\tcase DBSNP:\n\t\t\tfor(String listItem: list){\n\t\t\t\tsnpIdentifierDE.add(new SNPIdentifierDE.DBS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if a wall exists between two given spaces.
public boolean wallIsHere(Space a, Space b) { if (!(adjacentSpaces(a, b))) { return false; } // swap them if out of order (a should always be above B /left of B) if ((b.col() < a.col()) || (b.row() < a.row())) { Space temp = a; a = b; b = temp; } LinkedList<Wall> toConsider = new LinkedList<Wall...
[ "public void hasWall() {\n if (neighbor[left] == wall || neighbor[right] == wall || neighbor[back] == wall || neighbor[front] == wall) {\n hasWall = true;\n } else {\n hasWall = false; \n }\n }", "public boolean hasWall(Cell c1, Cell c2) {\n if (c1.getR() == c2.getR()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Limits are specified by the realm boost level.
Limits limits();
[ "void getWalletLimits();", "public void setMiterLimit(float limit);", "public double getLimit() {return limit;}", "@Override\r\n public int getMaxEnchantability(int level) {\n return getMinEnchantability(level) + 10;\r\n }", "public final OECatalogLimits get_limits () {\n\t\treturn new OECatalo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.build_event_stream.TestResult.ExecutionInfo.TimingBreakdown timing_breakdown = 4;
com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.TestResult.ExecutionInfo.TimingBreakdown getTimingBreakdown();
[ "com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.TestResult.ExecutionInfo.TimingBreakdownOrBuilder getTimingBreakdownOrBuilder();", "public com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.TestResult.ExecutionInfo.TimingBreakdownOrBuilder getTimingBreakdownOrBuilder() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the rights the user has on this pad
Set<Right> getRightsFor(User user, Pad pad);
[ "public int getRights();", "Privileges getPrivileges();", "public NSArray privileges() {\n\t\treturn SWAccessPrivilegeUtilities.privilegesForObject( record );\n\t}", "public int getRights() {\n \t\treturn rights;\n \t}", "public int getAccessRights() {\n return accessRights;\n }", "String getRights();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find the first empty bank spot so we can return a poor bumped marble there.
public Spot findFirstEmptyBankSpot(MarbleColor color) { Spot resultSpot = null; int firstIndex = getFirstStartingIndex(color); for (int i=0; i<4; i++) { resultSpot = allSpots[firstIndex + i]; if (!resultSpot.hasMarble()) { break; } } return res...
[ "private Cell findFirstEmptyCell() {\n\t\t// find first unfilled cell\n\t\tCell firstEmptyCell = null;\n\t\tfor (Cell cell : board) {\n\t\t\tif (cell.getVal() == 0) {\n\t\t\t\tfirstEmptyCell = cell;\n\t\t\t}\n\t\t}\n\t\t// if board filled and no errors, should be good\n\t\tif (firstEmptyCell == null) {\n\t\t\tboard...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the coordinates of the best possible move that minimises or maximises the players score depending on the provided icon
private Outcome minMax(PossibleBoard posBoard, Icon icon, int depth) { Outcome outcome = new Outcome(); Result result = posBoard.determineOutcome(); boolean maximiseWin = icon == getIcon(); // BASE CASE if (result.gameComplete()) { outcome.score = result.getBonus(); ...
[ "private int minimax (GameMatrix matrix, int depth, Symbol player) {\n if (matrix.isWinner(opponentSymbol)) {\n return -10;\n }\n else if (matrix.isWinner(this.symbol)) {\n return 10;\n }\n ArrayList<Point> availMoves = matrix.getAvailableMoves();\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies the accuracy of DirectProjectMetadataKey entity mapping by doing persist, find, merge, and refresh on the entity.
@Test public void testDirectProjectMetadataKey_Update() throws Exception { et.begin(); // Create and persist DirectProjectMetadataKey defined = getDirectProjectMetadataKey(); em.persist(defined); // flush the change to DB em.flush(); et.commit(); et...
[ "@Test\n public void testDirectProjectMetadata_Update() throws Exception {\n et.begin();\n\n DirectProjectMetadata defined = getDirectProjectMetadata();\n\n // Create and persist\n DirectProjectMetadataKey mKey = defined.getProjectMetadataKey();\n em.persist(mKey);\n em....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Releases the client for the specified user name and space id by removing it from the clients cache.
public void releaseClient(String userName, String spaceGuid) { clients.remove(getKey(spaceGuid, userName)); }
[ "public void unregisterClient(String id);", "public abstract void unregisterClient(ClientSession client, String ID);", "public void unregisterClient(String clientId) throws RemoteException;", "public void release() { \r\n\t remoteControlClient = null;\r\n\t }", "synchronized public void removeVirtualCl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
testing method next() of class IteratorSimple.
@Test public void whenListThenIteratorSimpleNext() { ArrayList<Integer> list = new ArrayList<>(); list.add(1); list.add(6); list.add(3); list.add(2); list.add(5); list.add(4); IteratorSimple it = new IteratorSimple(list); assertThat(it.next()...
[ "@Test\n public void nextTest() {\n this.it.next();\n this.it.next();\n assertThat(\"work3\", is(this.it.next()));\n }", "@Test\n\tpublic void testNext() {\n\t\tIntArrayIterator instance = createIterator();\n\t\tboolean[] expResults = new boolean[] { true, true, true, true, true, true, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the CameraManager singleton instance.
public static CameraManager get() { return cameraManager; }
[ "public static Camera getInstance() {\r\n return instance;\r\n }", "public static Camera getCameraInstance(){\n Camera c = null;\n try {\n c = Camera.open();\n } catch (Exception e){\n }\n return c;\n }", "public static Camera getCameraInstance() {\n\tC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column module.shortname
public void setShortname(String shortname) { this.shortname = shortname; }
[ "void setShortName(String shortName);", "public void setNameShort(String nameShort)\n\t{\n\t\tthis.nameShort = nameShort;\n\t\tdata.set(1, nameShort);\n\t}", "public void setShortName(String shortName) {\n this.shortName = shortName;\n }", "public void setShortName(String shortName) {\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches the next 16bit opcode
public short nextOpcode() { byte[] byteArray = memory.getByte(PC, (short) 2); return (short) (((byteArray[0]<<8)&0xFF00) | (byteArray[1]&0xFF)); }
[ "protected final int nextU16 ()\n {\n\tint retval = getU16 (offset);\n\toffset += 2;\n\treturn retval;\n }", "private int pull16 ()\r\n {\r\n int result;\r\n SP++;\r\n result = mem.MemRead(SP);\r\n SP++;\r\n result = (result << 8) + mem.MemRead(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the publishing job ID from request parameter if specified.
@SuppressWarnings("cast") private long getJobIdFromRequest() { PSRequest req = (PSRequest) PSRequestInfo .getRequestInfo(PSRequestInfo.KEY_PSREQUEST); HttpServletRequest request = (HttpServletRequest) req .getServletRequest(); String jobIdString = request .get...
[ "long getJobPostId();", "protected abstract String getJobSubmitId();", "public Long getJobId()\n {\n long jobId = getJobIdFromRequest();\n if (jobId != -1L)\n return jobId;\n\n return m_jobid;\n }", "long getJobIDTarget();", "long getJobIDSource();", "public JobId job() { return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'previousJob' field.
public com.epam.eco.commons.avro.data.TestJob.Builder setPreviousJob(com.epam.eco.commons.avro.data.TestJob value) { validate(fields()[2], value); this.previousJobBuilder = null; this.previousJob = value; fieldSetFlags()[2] = true; return this; }
[ "public void setPreviousJob(com.epam.eco.commons.avro.data.TestJob value) {\n this.previousJob = value;\n }", "public com.epam.eco.commons.avro.data.TestJob getPreviousJob() {\n return previousJob;\n }", "public com.epam.eco.commons.avro.data.TestJob getPreviousJob() {\n return previousJob;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if Map data is serialized or just the content optimized.
public boolean isSerializeData() { return serializeData; }
[ "public boolean isSetDataMap() {\n return this.dataMap != null;\n }", "public boolean isSetMapData() {\n return this.mapData != null;\n }", "public abstract boolean isMapLoaded();", "boolean isLiveDataAndMapsOnly();", "public boolean isMapLoaded()\r\n {\r\n return loadedMap;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to get the expiry date for the points based on the TransferPointSetting object
public Date getExpiryDateForPoints(TransferPointSetting transferPointSetting ) { // Get the number of days validity int numDays = transferPointSetting.getTpsTransferredPointValidity(); // Return the date return new Date(generalUtils.addDaysToToday(numDays).getTime()); }
[ "String getSpecifiedExpiry();", "long getExpirationDate();", "int getDecredExpiry();", "String getExpiry();", "java.lang.String getExpirationDate();", "public ZonedDateTime getExpiry() {\n return expiry;\n }", "public ObjectName getExpiryDestination();", "public Date getExpiryDate() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays photo at given path Do not call within a realm transaction
private void displayPhotoFromEntry() { String photoPath = mEntry.getPhotoPath(); if (photoPath == null) { Timber.d("No photo path saved"); return; } // We can't use the dimensions of the actual imageview since it's invisible now ViewUtils.getD...
[ "public void viewPhoto(ActionEvent e, Photo photo) throws IOException, ClassNotFoundException {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/PhotoDisplay.fxml\"));\n\t Parent parent = (Parent) loader.load();\n\t PhotoDisplayController ctrl = loader.<PhotoDisplayController>g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recalculates the (x,y) point used to indicate the selected color.
private void regeneratePoint() { int size = Math.min(MAX_SIZE, Math.min(getWidth() - imagePadding.left - imagePadding.right, getHeight() - imagePadding.top - imagePadding.bottom)); if (mode == JColorPicker.HUE || mode == JColorPicker.SAT || mode == JColorPicker.BRI) { if (mode == JColorPicker.HUE) { ...
[ "private void findSelection(MouseEvent e) {\n\t\tint mouseX = e.getX();\n\t\tint mouseY = e.getY();\n\t\tint temp = 0;\n\t\tif(mouseX > 9 && mouseX < 41) {\n\t\t\t//within x\n\t\t\tfor(int checkYPosition: colorPositions) {\n\t\t\t\ttemp++;\n\t\t\t\tif(mouseY >= checkYPosition && mouseY <= (checkYPosition + 30)) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used by external classes to get the HBox built by a Bar object. Assumes the Bar's makeDisplay method has been called, otherwise will return null for the myBar value.
public HBox getBar(){ return myBar; }
[ "private HBox barContent() {\n bar_content.setId(\"barContent\");\n bar_content.setPrefHeight(36D);\n AnchorPane.setTopAnchor(bar_content, 0D);\n AnchorPane.setRightAnchor(bar_content, 0D);\n AnchorPane.setLeftAnchor(bar_content, 0D);\n return bar_content;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the original URI template used to prepare the request, if any.
@Nullable public String getUriTemplate() { return this.uriTemplate; }
[ "String urlTemplate();", "java.lang.String getProxyRequestPathTemplate();", "public java.lang.String getProxyRequestPathTemplate() {\n java.lang.Object ref = proxyRequestPathTemplate_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.go...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
we can return the paths in various ways. As a single path object, as a path array, however we need to get it. return a fileset with the ptolemy paths
public FileSet getFileset() { FileSet fs = new FileSet(); fs.setProject(ProjectLocator.getAntProject()); fs.setDir(ProjectLocator.getAntProject().getBaseDir()); //System.out.println("fs dir is " + ProjectLocator.getAntProject().getBaseDir()); //add the paths fs.setInc...
[ "Set<Path> getFiles();", "List<Path> getPaths();", "public Set<Path> getPaths() {\n\n\t\tfinish();\n\t\tlock.acquireReadLock();\n\t\tlogger.debug(\"Getting paths.\");\n\t\tSet<Path> unmodfilePaths = Collections.unmodifiableSet(paths);\n\t\tlock.releaseReadLock();\n\t\treturn unmodfilePaths;\n\n\t}", "public P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_cms_channel_sub.EXTEND1
public String getExtend1() { return extend1; }
[ "public String getExtend1() {\r\n return extend1;\r\n }", "public String getExtend2() {\r\n return extend2;\r\n }", "public String getExtend2() {\n return extend2;\n }", "public String getExtend6() {\n return extend6;\n }", "public String getExt1() {\n return e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "onerrorupdate"
@DISPID(-2147412074) @PropGet java.lang.Object onerrorupdate();
[ "@DISPID(-2147412074)\n @PropPut\n void onerrorupdate(\n java.lang.Object rhs);", "Object getFailonerror();", "public boolean getFailonerror() {\n return failOnError;\n }", "InstallationError getError();", "public UpdateUserExErrorType getUpdateUserExErrorType() {\r\n\t\treturn updateUserEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checking if type of order is pickup
public boolean isPickup() { return type.equals("pickup") ? true: false; }
[ "boolean isOrderExchange();", "public boolean isDelivery(){\r\n return delivery;\r\n }", "boolean isDeliveryAddressNotRequired();", "public boolean isDelivery() {\n\t\treturn type.equals(\"delivery\") ? true: false;\n\t}", "boolean hasBillingAddressType();", "public abstract boolean isDelivered(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for main menu model
public MainMenuModel getMainMenuModel() { return this.mainMenuModel; }
[ "public static MainMenu getMenu() {\r\n\t\treturn menu;\r\n\t}", "Menu getMenu();", "public static Menu getMenu() {return menu;}", "public org.primefaces.model.menu.MenuModel getMenuModel()\n {\n return menuModel;\n }", "IMenu getMainMenu();", "public ItemMenu getMenu() {\n return menu;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Methode pour Sortir un article du stock (supprimer de la table Commande) et et de le remettre au client (inserer dans la table Article_Stock) La methode prend comme parametre dentree un bean de type Article recupere ses membre et les insere dans la base
public void rentrer_article(Article a) { /*recuperation des membres du bean Article deja rempli*/ int id_article = a.getId_Article(); String nom_article = a.getNom_Article(); String categorie = a.getCategorie(); int quantite = a.getQuantite(); try { /*creation...
[ "public void updateStockArticleCommande(Article article){\n Commande commande = getCommandeArticle(article);\n int stockAjoute = commande.getQuantite();\n article.setQuantite(article.getQuantite() + stockAjoute);\n \n ArticleControlleur.getInstance().editer(article);\n Syst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a fixed list containing two elements.
public static <E> FixedList<E> of(E first, E second) { return pairList(first, second); }
[ "private static <E> FixedList<E> pairList(E first, E second) {\n return new PairFixedList<E>(first, second);\n }", "private static <T> List<T> pairList(T a, T b) {\n ArrayList<T> res = new ArrayList<T>();\n res.add(a);\n res.add(b);\n return res;\n }", "private DoubleLin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Suffix for the right table, based on the join type
public abstract String getRightTableSuffix( int joinType);
[ "public abstract String getLeftTableSuffix(\n int joinType);", "public abstract String getLeftColumnSuffix(\n int joinType);", "public abstract String getRightColumnPrefix(\n int joinType);", "public abstract String getLeftTablePrefix(\n int joinType);", "public abstract void addRightTab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to switch to table view
public void switchtoTableView(String subjectarea) { try{ WebElement e1 = driver.findElement(By.xpath("(//span[text()='"+subjectarea+"']//..//..//..//following-sibling::td//input)[2]")); String view=e1.getAttribute("title"); if (view.equalsIgnoreCase("Switch to Table View")) { e1.click(...
[ "private void changeToSearchTable() {\n\t\ttableView.setItems(presentationSearchData);\n\n\t\tif(fileType == FileType.UNASSIGNED) {\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t} // End if s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save a confirmed tx to account ledger. save if the tx is relative to local accounts, or do nothing.
Result<Integer> saveConfirmedTransaction(Transaction tx);
[ "void saveWithdrawl(Account accountToSave);", "void saveDeposit(Account accountToSave);", "public boolean save()\n {\n Connection conn = DBManager.getConnection();\n\n String query = \"insert into transaction_transfer\" +\n \"(transaction_id, from_account_id, to_acc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The customer leaves the queue it is in.
public void leaveQueue(Context custContext) { int restaurantID = -1; // the ID of restaurant to be notified mCustomerMapMutex.lock(); try { Integer restaurantIDInteger = mCustomerMap.remove(custContext); if (restaurantIDInteger != null) { // The request is valid. restaurantID = restaurantIDInteger; ...
[ "private void notifyLeaveQueue(int restaurantID, Context custContext, boolean fromCall) {\n\t\tRestaurant restaurant = getRestaurant(restaurantID);\n\t\tif (restaurant != null) {\n\t\t\tint partyID = restaurant.removeFromQueue(custContext, fromCall);\n\t\t\tif (partyID < 0) {\n\t\t\t\t// Customer was not in queue.\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to move the elevator in the current direction until it stops at a floor. If the elevator is at the top floor going up or at the bottom floor going down, it will switch direction.
public void move () { if (currentDirection) // true => up { while (currentFloor < FLOORS - 1) { currentFloor++; if (currentFloor == FLOORS - 1) currentDirection = DOWN; if (elevPassengers[currentFloor].size() > 0 || upCalls[currentFloor]) { stop(); break; } } } else ...
[ "public void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator through each floor. \n\t\t\tif (getTotalPas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves application parameter values definition for an entity instance.
void saveParamValuesDef(SweepingCommitPolicy sweepingCommitPolicy, String category, String ownerEntityName, Long ownerInstId, ParamValuesDef paramValuesDef) throws UnifyException;
[ "private void persistParameterValuesOfExperiment(PeriodSetting initialSetting, Integer expId) {\n\n\t\tfinal ArrayList<GeneralParameterValue> parametersToSave = initialSetting.getParameterValues();\n\t\tfinal int expToSave = expId;\n\n\t\tDataLoadService.persistAll(\"r_experiment_v_parameter_type\", 3,\n\t\t\t\t\"e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use CalRequest.newBuilder() to construct.
private CalRequest( com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private CalRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "public ServiceRequest() {\n super();\n this.addNamespaceToRequest = true;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sortCardsBy rank sorts the cards by rank
public void sortCardsByRank(){ Collections.sort(theHand, new SortCardsByRank()); }
[ "public void sortByRank()\n\t{\n\t\tCollections.sort(hand, Card.RANK_SUIT);\n\t}", "public void sortCardsBySuit(){\n Collections.sort(theHand, new SortCardsBySuit());\n }", "private void sortRanking() {\n this.rankingMap = sortHashMapByValues(this.rankingMap);\n }", "public void sortRankin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
I2C plugins to be activated on this node. repeated .com.s13g.winston.proto.NodeConfig.I2cPlugin i2c_plugin = 4;
java.util.List<com.s13g.winston.proto.Node.NodeConfig.I2cPlugin> getI2CPluginList();
[ "com.s13g.winston.proto.Node.NodeConfig.I2cPlugin getI2CPlugin(int index);", "com.s13g.winston.proto.Node.NodeConfig.I2cPluginOrBuilder getI2CPluginOrBuilder(\n int index);", "public java.util.List<? extends com.s13g.winston.proto.Node.NodeConfig.I2cPluginOrBuilder> \n getI2CPluginOrBuilderList() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches change set that this dataset is the old dataset of.
@Override public String getChangeSetOld(){ return this.changeSetOld; }
[ "@Override\n\tpublic void setChangeSetOld(String cs){\n\t\t\n\t\tthis.changeSetOld = cs;\n\t\t\n\t}", "public Set<Value> diff (BaseStrings old)\n {\n\n Set<Value> ret = new LinkedHashSet<> ();\n\n Set<Value> allVals = this.getAllValues ();\n\n for (Value v : allVals)\n {\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encode data from the InputStream to the OutputStream in Base64. Line breaks are inserted every 76 characters in the output.
public static void encode(InputStream in, OutputStream out) throws IOException { encode(in, out, true); }
[ "public void encode(InputStream inStream, OutputStream outStream)\n throws IOException {\n int j;\n int numBytes;\n byte tmpbuffer[] = new byte[bytesPerLine()];\n\n encodeBufferPrefix(outStream);\n\n while (true) {\n numBytes = readFully(inStream, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Basic interface that defines several methods to create proxies.
public interface ProxyCreator { /** * Creates proxy of the target object. * * @param target the target object * @return the proxy for the target object * @throws ProxyCreationException in a case of any errors */ <T> T create(T target, String proxyId, InvocationRecord invocationRec...
[ "ISidedProxy getProxy();", "Object getProxy();", "public interface IProxyFactory {\n\t\n\tpublic IProxy newProxyInstance(IClassLoaderWithClassPath loader, Class toHide, Object[] initArgs) throws Exception;\n\t\n\tpublic IProxy newProxyInstance(ClassLoader loader, Object toHide) throws Exception;\n\t\n\tpublic I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Current trace in this channel
String getCurrentTrace(Channel channel);
[ "@Override\n\tpublic ITrace getCurrentTrace() {\n\t\treturn tracePerThread.get();\n\t}", "@Override\n\tpublic AbstractTrace getTrace() {\n\t\treturn globalContainer.getTrace();\n\t}", "public JniTrace getCurrentJniTrace() {\n return currentJniTrace;\n }", "public Boolean getTrace() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method(s) Convert decimal value to binary
public String asBinary() { String binaryString = ""; for (; this.decimalValue > 0; decimalValue /= 2) { if (this.decimalValue % 2 == 0) { binaryString += "0"; } else { binaryString += "1"; } } return new StringBuilder(...
[ "public void convertToBin() { \n int Binary = 0;\n intPreFinal = 0;\n bin = \"\"; \n int intStringLength = hex_num.length();\n int exp = intStringLength;\n\n for (int i = 0; i < intStringLength; i++) {\n hex = Integer.parseInt(\"\"+hex_num.charAt(i),16);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Terminate the ModemReader thread.
public void terminate () { synchronized (runningLock) { if (running == false) return; running = false; } try { inputStream.close (); } catch (IOException e) { System.out.println ("ModemWorker.teminate(): IOException on close()."); } }
[ "public void killThread() {\n\t\treadData.isAlive = false;\n\t}", "public synchronized void stop() {\n if (!started) {\n return;\n }\n\n started = false;\n forkThreads(-threadPoolSize);\n readController.startDestroy();\n writeController.startDestroy();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Convenience method for getLoggerFixedPrefix.
public static Logger getLoggerFixedPrefix(Class<?> cl, String prefix) { return getLoggerFixedPrefix(cl, prefix, null); }
[ "public static Logger getLoggerFixedPrefix(Class<?> cl,\n String prefix,\n EnvironmentImpl envImpl) {\n\n /*\n * By convention, loggers that use redirect handlers are named with the\n * class name. Name ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create sfc service function list
private List<SfcServiceFunction> createSfcServiceFunctionList() { List<SfcServiceFunction> sfcServiceFunctionList = new ArrayList<>(); // first entry // XXX Note SFC YANG model says that this Service Function Name IS NOT // the name of a Service // Function, so // not s...
[ "ServiceFunctionChainService sfc();", "private void startFunctionService() {\n stack.push(new FunctionServiceCreation());\n }", "Fog_Services createFog_Services();", "public interface SfcGeniusServiceManager {\n\n /**\n * Interface becomes available at a node.\n *\n * @param interfaceName\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the Blinker GameObject. Receives it's position and the sprite it will use to draw.
public Blinker(int x, int y, Sprite[] s) { super(x, y, s); _alpha = 1.0f; // Set initial alpha value _inv = true; // _inv indicates if the image is appearing or disappearing. _paRect = new Rect(x + _sprite[0].get_rect().getWidth(), x, y, y + _sprite[0].get_rect().getHeight()); ...
[ "public GameObject(Sprite sprite){\n _transform = new Rect(0,0,sprite.getRect()._w, sprite.getRect()._h);\n _sprite = sprite;\n }", "public LibgdxSprite() {\n\t\tsuper();\n\t\tsprite = new com.badlogic.gdx.graphics.g2d.Sprite();\n\t\tcolor = new LibgdxColor(sprite.getColor());\n\t\tsetBoundingRec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'transferId' field
public Builder clearTransferId() { fieldSetFlags()[0] = false; return this; }
[ "public void setTransferId(Long value) {\n this.transferId = value;\n }", "public void setTransferId(String transferId) {\n this.transferId = transferId == null ? null : transferId.trim();\n }", "public void unsetTransferNumber()\n {\n synchronized (monitor())\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a map from pairs of event classes to integers, such that if a pair (x,y) of two event classes x and y are in the map, and the integer value attached to this pair is greater than 0, then a direct follows dependency from x to y exists. The integer value indicates how often the first event is directly followed by ...
Map<Pair<XEventClass, XEventClass>, Integer> getDirectFollowsDependencies();
[ "Map<Pair<XEventClass, XEventClass>, Integer> getLengthTwoLoops();", "Map<Pair<XEventClass, XEventClass>, Double> getCausalDependencies();", "public abstract java.util.Map<java.lang.String, java.lang.Integer> idiosyncraticEventIncidenceCountMap();", "Map<Pair<XEventClass, XEventClass>, Double> getParallelRela...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends the patch init packet to the secure bootloader. The init packet contains information regarding the encryption of the firmware image and which application binaries are being sent. Typically, only the application binary is sent. The patch init packet also contains a 128bit key to identify it as a patch.
private void sendPatchInitPacket() { RigLog.i("__RigFirmwareUpdateManager.sendPatchInitPacket__"); byte[] patchInitPacket = new byte[PatchInitPacketSize]; System.arraycopy(mImage, PatchInitPacketIndex, patchInitPacket, 0, PatchInitPacketSize); final RigDfuError error = ...
[ "private void sendInitPacket() {\n \tRigLog.d(\"__RigFirmwareUpdateManager.sendInitPacket__\");\n \tbyte [] initPacketOne = new byte[ImageInitPacketSize/2];\n \tbyte [] initPacketTwo = new byte[ImageInitPacketSize/2];\n\n \tSystem.arraycopy(mImage, ImageInitPacketIndex, initPacketOne, 0, ImageInitPacket...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
overridable to create a default value for list properties
protected Object getDefaultListItemValue() throws Exception { // default returns null return ""; }
[ "@Override\n protected String getDefaultValue(Property prop) {\n return prop.getDefaultValue();\n }", "private void initializeDefaultList() {\n mPersonList.add(new Person(\"Neptune\", \"Australia\"));\n mPersonList.add(new Person(\"NepGear\", \"Asia\"));\n mPersonList.add(new Per...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the "ticket" parameter if asked for it otherwise, defer to the provided HttpServletRequest
public String getParameter(String name) { if (name.equals(PARAM_TICKET)) { return authTicket; } else { return req.getParameter(name); } }
[ "de.uniba.rz.io.rpc.TicketRequest getTicket();", "private static String getHTTPRequestParameter(PortletRequest request,\n String name) {\n String value = request.getParameter(name);\n if (value == null) {\n String portalInfo = request.getPortalContext().getPortalInfo()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mutates the strategy parameters (ie varaiances and alphas) see Evolution Strategy Notes for how it does this.
private void mutateStratParams(){ double[] n=new double[7]; //array {N_0, N_1,N_2,N_11,N_12,N_21,N_22} //find random numbers for Ns for (int i=0; i<n.length;i++) n[i]=rnd.nextGaussian(); //mutate variances for (int j=0; j<vars.length; j++){ vars[j]*=Math.exp(cntrl.getTauP()*n[0]+cntrl.ge...
[ "public void updateParameters(){\n\t\tp = RunEnvironment.getInstance().getParameters();\n\t\tmaxFlowerNectar = (double)p.getValue(\"maxFlowerNectar\");\n\t\tlowMetabolicRate = (double)p.getValue(\"lowMetabolicRate\");\n\t\thighMetabolicRate = (double)p.getValue(\"highMetabolicRate\");\n\t\tcolonySize = (int)p.getVa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apply scroll offset and scaling to convert touchspace coordinates to the corresponding point on the full frame.
MotionEvent changeTouchCoordinatesToFullFrame(MotionEvent e) { //Log.v(TAG, String.format("tap at %f,%f", e.getX(), e.getY())); float scale = getScale(); int a = getResources().getDisplayMetrics().heightPixels; int b = getMeasuredHeight(); int top = a - b; // Adjust coord...
[ "public final void moveAndScaleViewportOnMouseInteraction() {\n int rotation = inputEvent.mouseWheelRotation();\n \n if (rotation < 0) {\n drawScaleFactor *= VIEWPORT_MOUSE_SCALE_SPEED;\n } else if (rotation > 0) {\n drawScaleFactor /= VIEWPORT_MOUSE_SCALE_SPEED;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "items" attribute with a collection of Ruta entities that are retrieved from Municipio and returns the navigation outcome.
public String navigateRutaCollection() { Municipio selected = this.getSelected(); if (selected != null) { MunicipioFacade ejbFacade = (MunicipioFacade) this.getFacade(); Collection<Ruta> selectedRutaCollection = ejbFacade.findRutaCollection(selected); FacesContext.get...
[ "public String navigateMovimientosCollection() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Movimientos_items\", this.getSelected().getMovimientosCollection());\n }\n return this.mobilePageController.getMobilePag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private Dynamic dynamic; this constructor is obsolete REQUIRES: start is a time value within the measure EFFECTS: constructs a Note given a start time (tick), value, and pitch.
public Note(int start, int value, int pitch) { this.globalStart = start; this.value = value; this.pitch = pitch; updateNameShift(); }
[ "public Note(Measure measure, int start, int value, int pitch, MidiSynth midiSynth) {\n this.globalStart = start;\n this.value = value;\n this.pitch = pitch;\n selected = false;\n this.midiSynth = midiSynth;\n this.measure = measure;\n measure.addNote(this);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Persist metrics from last processed date
void persistMetrics(Metrics metrics);
[ "public void trackRetention() {\n track(\"_retention\");\n }", "@WorkerThread\n @Override\n public void onSuccessfulFill(Context appContext) {\n if (lastTimestampProcessed != null) {\n PreferenceManager.getDefaultSharedPreferences(appContext)\n .edit()\n .putLong(PREF_LAST_TI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the total_payload value for this AirlineInsightStruct.
public int getTotal_payload() { return total_payload; }
[ "public int getTotalPayload() {\n return totalPayload;\n }", "public void setTotal_payload(int total_payload) {\n this.total_payload = total_payload;\n }", "public void setTotalPayload(int value) {\n this.totalPayload = value;\n }", "public int getPayload() {\n return payl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Eligible Shipping Services Gets a list of eligible shipping services for the shipment information specified. The ShippingServiceId or ShippingServiceOfferingId can be used in CreateShipment to specify the shipping service or the specific offer respectively. A list of carriers that are temporarily unavailable is als...
public Future<GetEligibleShippingServicesResponse> getEligibleShippingServicesAsync(GetEligibleShippingServicesRequest request) { return newFuture(getEligibleShippingServices(request)); }
[ "public GetEligibleShippingServicesResponse getEligibleShippingServices(GetEligibleShippingServicesRequest request) \n throws MWSMerchantFulfillmentServiceException {\n return newResponse(GetEligibleShippingServicesResponse.class);\n }", "public List<ReturnShippingCarrier> getAvailableShippin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parameters: String id (an ID by which this stat can be identified) int increase (the amount that the value will increase per tick) int decrease (the amount that the value will decrease per tick) int max (the number that represents the limit of growth in value) int min (the number that represents the limit of decline in...
public Stat(String ID, double increase, double decrease, double max, double min, double start) { this.ID = ID; this.increase = increase; this.decrease = decrease; this.max = max; this.min = min; this.value = start; }
[ "public void editBar(int id, double amountUsed){\n for (int i=0; i<bars.size(); i++){\n if (bars.get(i).getId()==id){\n if (bars.get(i).getLength()>=amountUsed){\n bars.get(i).setLength(bars.get(i).getLength()-amountUsed);\n break;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update DB table customer_contact_way. The sql statement for this operation is update customer_contact_way set way=?, type=?, way_type_id=?, way_type_name=?, user_id=?, remark=? where (id = ?)
public int update(CustomerContactWayDO customerContactWay) throws DataAccessException { if (customerContactWay == null) { throw new IllegalArgumentException("Can't update by a null data object."); } return getSqlMapClientTemplate().update("MS-CUSTOMER-CONTACT-WAY-UPDATE", customerContactWay); ...
[ "public String updateContactStatement() {\n\t\treturn \"UPDATE CONTACTS SET (name, surname, title, address, city, \"\n\t\t\t\t+ \"province, postal_Code, region, country , company_Name, \"\n\t\t\t\t+ \"workstation, work_Phone, work_Extension, mobile_Phone, \"\n\t\t\t\t+ \"fax_Number, email, contact_type...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field381' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField381() { field381 = null; fieldSetFlags()[381] = false; return this; }
[ "private void clear(TextField inputField) {\n\n inputField.clear(); // clear keyboard nextLine for enter key\n }", "private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
recursive function to find all the anagrams for charInventory characters starting with the word at dictionaryIndex in dictionary keyList
private Set<Set<String>> findAnagrams(int dictionaryIndex, char[] charInventory, List<String> keyList){ if(dictionaryIndex >= keyList.size() || charInventory.length < this.solverArgs.getMinWordLength()) { return null; } String searchWord = keyList.get(dictionaryIndex); char...
[ "private static Map<String, List<String>>findAnagrams (List<String> words){\r\n\t\t\t Map<String, List<String>> anagrams= null; // created a HashMap string as a key and list as string \r\n\t\t\t \r\n\t\t\t if(words == null || words.size() ==0){ //here it is check the list of words of is empty and return as null\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test get Direction For Character. Input: some Character Output: if letter or + change direction else keep it.
@Test public void getDirection() { // on letter keep direction first Direction[] directions = Direction.getDirectionsForChar(Direction.LEFT, 'A'); Direction[] expectedDirections = new Direction[]{Direction.LEFT, Direction.RIGHT, Direction.TOP, Direction.BOTTOM}; Asser...
[ "public char getDirectionChar(int currDirection) {\n\t\t\n\t \tswitch (currDirection) {\n \tcase NORTH:\n \t\treturn '^';\n \tcase EAST:\n \t\treturn '>';\n \tcase SOUTH:\n \t\treturn 'v';\n \tcase WEST:\n \t\treturn '<';\n \tdefault:\n \t\treturn ' ';\n \t}\n\t\t\n\t}", "static...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the communications timeout value in seconds
public int getTimeout(){ return communicationsTimeout; }
[ "public int getTimeoutMS()\n {\n boolean delegate = true; // delegate ok\n return StringTools.parseInt(this._getString(KEY_SERVER_TIMEOUT_MS,delegate),30000);\n }", "public java.lang.String getTimeoutInSeconds();", "int getIncomingTimeout();", "long getTimeout();", "com.google.protobuf.D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__JvmWildcardTypeReference__Group_2_1__0__Impl" $ANTLR start "rule__JvmWildcardTypeReference__Group_2_1__1" InternalDroneScript.g:16410:1: rule__JvmWildcardTypeReference__Group_2_1__1 : rule__JvmWildcardTypeReference__Group_2_1__1__Impl ;
public final void rule__JvmWildcardTypeReference__Group_2_1__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:16414:1: ( rule__JvmWildcardTypeReference__Group_2_1__1__Impl ) // InternalDroneScript.g:16415:2: rule...
[ "public final void rule__JvmWildcardTypeReference__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:14486:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Dynamics'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseDynamics(Dynamics object) { return null; }
[ "public Object caseDomainModel(DomainModel object)\n {\n return null;\n }", "public T caseDomain(Domain object) {\n\t\treturn null;\n\t}", "public T caseDomainModel(DomainModel object)\n {\n return null;\n }", "public T caseDomainDefinition(DomainDefinition object) {\n\t\treturn null;\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the CFNANumber value for this SubscriberMainBase.
public void setCFNANumber(java.lang.String CFNANumber) { this.CFNANumber = CFNANumber; }
[ "public void setCFUNumber(java.lang.String CFUNumber)\n\t{\n\t\tthis.CFUNumber = CFUNumber;\n\t}", "public void setCfdaNumber(String cfdaNumber) {\n this.cfdaNumber = cfdaNumber;\n }", "public void setChallanNo(Number value) {\n setAttributeInternal(CHALLANNO, value);\n }", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Agrega una pelicula al pais.
public void agregarPelicula(Pelicula nueva) { peliculas.addLast(nueva); }
[ "private void agregaPalabras(){\n Iterator<String> iteLlaves = this.diccionario.iteradorLlaves();\n while(iteLlaves.hasNext()){\n String llave = iteLlaves.next();\n int valorLlave = this.diccionario.get(llave);\n float porcentaje = (float) valorLlave/this.contadorPalab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
need to parser from schemaString
private void parseSchema(String schemaString) { schemaMap.put("t", new Argument<Boolean>(false)); schemaMap.put("p", new Argument<Integer>(80)); schemaMap.put("s", new Argument<String>("teststring")); ArrayList<Integer> intArray = new ArrayList<Integer>(); intArray.add(0); ...
[ "Schema parseSchema(String text);", "List<Schema> parseSchemaSequence(String text);", "<T> T parseValue(String text, Schema schema);", "public synchronized List<SchemaElement> parse( String schemaObject ) throws IOException, ParseException\n {\n if ( ( schemaObject == null ) || ( schemaObject.trim()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use SCEnvironmentResult.newBuilder() to construct.
private SCEnvironmentResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private GetTestEnvironmentCatalogRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "Environment createEnvironment();", "private SCCommandResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for property bankNo.
public String getBankNo() { return bankNo; }
[ "public String getBankno() {\n return bankno;\n }", "java.lang.String getBankNo();", "public String getBankOrderNo() {\n return bankOrderNo;\n }", "public java.lang.String getBankNumber() {\n return bankNumber;\n }", "public int getBankAccountNumber() {\n return bankAcco...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field547' field.
public void setField547(java.lang.CharSequence value) { this.field547 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField547(java.lang.CharSequence value) {\n validate(fields()[547], value);\n this.field547 = value;\n fieldSetFlags()[547] = true;\n return this; \n }", "public void setField549(java.lang.CharSequence value) {\n this.field549 ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for axis2xml
public String getAxis2xml() { return axis2xml; }
[ "protected abstract String getResponseInstanceXmlElementName();", "public java.lang.String getXml() {\n return xml;\n }", "protected XmlOptions getXmlOptions() {\n return this.xmlOptions.get();\n }", "public org.apache.xmlbeans.XmlString xgetAxis()\r\n {\r\n synch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ResourcesHistory records all changes to the state of a Resource.
public ResourcesHistory resourcesHistory() { return this.resourcesHistory; }
[ "public AccountResourcesHistory accountResourcesHistory() {\n return this.accountResourcesHistory;\n }", "public RoleResourcesHistory roleResourcesHistory() {\n return this.roleResourcesHistory;\n }", "public List<MessageResourceHistory> listMessageResourceHistory(Long messageResource) throws Exception;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ il metodo hashCode restiusce l'hashCode dell'attributo dimensione
public int hashCode() { return dimensione.hashCode(); }
[ "@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\t\tif (attribute != null)\r\n\t\t{\r\n\t\t\thash = hash * Constants.HASH_PRIME + attribute.hashCode();\r\n\t\t}\r\n\t\tif (relationalOperator != null)\r\n\t\t{\r\n\t\t\thash = hash * Constants.HASH_PRIME + relationalOperator.hashCode();\r\n\t\t}\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the IProjectType that is the superclass of this projecttype, or null if the attribute was not specified.
public IProjectType getSuperClass();
[ "public TLAttributeType getParentType() {\n return parentType;\n }", "public RubyClass superclass() {\n RubyClass superClass = getSuperClass();\n while (superClass != null && superClass.isIncluded()) {\n superClass = superClass.getSuperClass();\n }\n \n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MGR 1044 Se encarga de buscar la cuenta que le viene desde Nexus y hace la replicacion a SFA si corresponde
private void cargarCuentaVantive(){ Boolean vieneDeNexus = Boolean.valueOf(HistoryUtils.getParam("vieneDeNexus")); if(vieneDeNexus){ ClienteNexusDto clienteNexus = new ClienteNexusDto(); String customerCode = HistoryUtils.getParam("customerCode"); String customerNexusId = HistoryUtils.getParam("customerId"...
[ "public void doBuscarDocentePorDni() {\n\n System.out.println(\"ingresó\");\n if (!\"\".equals(num_dni)) {\n if (gestorUsuarioDocenteService.existeDocente(num_dni)) {\n System.out.println(\"correcto\");\n\n drtPersonanatural = gestorUsuarioDocenteService.recupe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Hides all but the last 4 characters of the string representation of the given object.
protected static String showSensitive(Object o) { final int charsToShow = 4; if (o == null) return "null"; final String s = o.toString(); final int len = s.length(); if (len <= charsToShow) return s; return (s.substring(0, len -...
[ "public static String hide(String string) {\n\t\treturn hide(string, Math.min(LAST_4_DIGITS, string != null ? string.length() : 0), '*');\n\t}", "public static String maskSensitive4(String str) {\r\n\t\tif (StringUtil.isEmpty(str)) {\r\n\t\t\treturn str;\r\n\t\t}\r\n\t\treturn \"***************\" + str.substring...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column user_company.ministry
public void setMinistry(String ministry) { this.ministry = ministry; }
[ "public String getMinistry() {\r\n return ministry;\r\n }", "public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);", "public void setOccupation(String occupation);", "public void setPersonalCity(String personalCity);", "public M cscsiSrvuserMin(Object min){this.put(\"cscsiSrvu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hover over an element and click
public void hoverClick(WebElement webElement) { final Actions action = new Actions(webDriver); action.moveToElement(webElement).click().perform(); }
[ "public void hoverAndClickOnElement(WebElement element) {\n\t\tactions.moveToElement(element).click().build().perform();\n\t}", "public void hoverElement(WebDriver driver, By element) {\n\t\tWebElement Element = driver.findElement(element);\n Actions builder = new Actions(driver);\n builder.moveToEl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Google specific: the ID allows any line that crawlers might need, such as sitemaps, which Google supports. See
@Test public void ID_NonStandardLineExample_Sitemap() { String sitemap_loc = "http://foo.bar/sitemap.xml"; String robotstxt = "User-Agent: foo\n" // + "Allow: /some/path\n" // + "User-Agent: bar\n\n\n"; /* * robots_test.cc line 946 ...
[ "static void recordAllIDs() {\r\n\r\n\t\ttry {\r\n\t\t\tString line = \"\";\r\n\t\t\tString id = \"\";\r\n\r\n\t\t\tFileReader fr = new FileReader(\"pdfTextWeb.txt\");\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (line.length() < 2) {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete the accountDetails by id.
public void delete(Long id) { log.debug("Request to delete AccountDetails : {}", id); accountDetailsRepository.deleteById(id); }
[ "public void delete(Long id) {\n log.debug(\"Request to delete Taxpayer_account : {}\", id);\n taxpayer_accountRepository.delete(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete AccountM : {}\", id);\n accountMRepository.deleteById(id);\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Method Name : clickPresselGermany Purpose : PresselGermany link should be clicked Parameter : None Date Created: Created By : Modified By : Modified Date:
public void clickPresselGermany(){ class Local {}; Reporter.log("TestStepComponent"+Local.class.getEnclosingMethod().getName()); Reporter.log("TestStepInput:-"+"NA"); Reporter.log("TestStepOutput:-"+"NA"); Reporter.log("TestStepExpectedResult:- PresselGermany link should be clicked"); try{ click...
[ "HtmlPage clickDateLink();", "public void ClickPlansOfferedPage() {\r\n\t\tplansoffered.click();\r\n\t\t\tLog(\"Clicked the \\\"Plans Offered\\\" button on the Birthdays page\");\r\n\t}", "public void clickOnDealerTitle()\n\t{\n\t\tdealerPageTitleLink.click();\n\t}", "public void clickOnSummerDresses(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
register a consul service
void registerService(ConsulService service, String token);
[ "void registerService() {\n NsdServiceInfo serviceInfo = allocateServiceInfo();\n int protocolType = NsdManager.PROTOCOL_DNS_SD;\n nsdManager.registerService(serviceInfo, protocolType, registrationListener);\n }", "ServiceReference registerService(String name, Object service);", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the insuredRelX12 field is properly parsed and copied when a message object is passed through the transformer.
@Test public void testBeneZPayerInsuredRelX12() { new BeneZPayerFieldTester() .verifyEnumFieldStringValueExtractedCorrectly( FissBeneZPayer.Builder::setInsuredRelX12Enum, RdaFissPayer::getInsuredRelX12, FissPatientRelationshipCode.PATIENT_RELATIONSHIP_CODE_DEFAULT, ...
[ "@Test\n public void testInsuredPayerInsuredRelX12() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setInsuredRelX12Enum,\n RdaFissPayer::getInsuredRelX12,\n FissPatientRelationshipCode.PATIENT_RELATIONSHIP_C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a topic name or other value into a value suitable for use as a file name. This method replaces spaces with underscores, and then URL encodes the value.
public static String encodeForFilename(String name) { // replace spaces with underscores String result = StringUtils.replace(name, " ", "_"); // URL encode the rest of the name try { result = URLEncoder.encode(result, "UTF-8"); } catch (Exception e) { logger.warning("Failure while encoding " + na...
[ "String urlPathEncode(String value);", "private static String encodeValue(String value) {\n try {\n return URLEncoder.encode(value, StandardCharsets.UTF_8.toString());\n } catch (UnsupportedEncodingException ex) {\n throw new RuntimeException(ex.getCause());\n }\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__TypeSwitchStmt__Group__1" $ANTLR start "rule__TypeSwitchStmt__Group__1__Impl" InternalGo.g:10597:1: rule__TypeSwitchStmt__Group__1__Impl : ( ( rule__TypeSwitchStmt__Group_1__0 )? ) ;
public final void rule__TypeSwitchStmt__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:10601:1: ( ( ( rule__TypeSwitchStmt__Group_1__0 )? ) ) // InternalGo.g:10602:1: ( ( rule__TypeSwitchStmt__Group_1__0 )?...
[ "public final void rule__TypeSwitchStmt__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10751:1: ( rule__TypeSwitchStmt__Group_1__1__Impl )\r\n // InternalGo.g:10752:2: rule__TypeSwitchStmt__Grou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Property for parsing abstract base classes (polymorphism) in auto generated Swagger code.
@ApiModelProperty(required = true, value = "Property for parsing abstract base classes (polymorphism) in auto generated Swagger code.") @JsonProperty(JSON_PROPERTY_DISCRIMINATOR_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getDiscriminatorType() { return discriminatorType; }
[ "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Property for parsing abstract base classes (polymorphism) in auto generated Swagger code.\")\n @JsonProperty(JSON_PROPERTY_DISCRIMINATOR_TYPE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getDiscriminatorType() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Os Branch Query By Predicate'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseOsBranchQueryByPredicate(OsBranchQueryByPredicate object) { return null; }
[ "public T caseOsBranchQuery(OsBranchQuery object) {\n return null;\n }", "public T caseOsBranchQueryStatement(OsBranchQueryStatement object) {\n return null;\n }", "public T caseOsTxQueryByPredicate(OsTxQueryByPredicate object) {\n return null;\n }", "public T caseOsBranchQueryAll(OsBranc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make player lose health
public void loseHealth(int l){ health -= l; }
[ "public void loseHealthPerTurn(){\r\n this.setHealth(this.getHealth() - 1);\r\n }", "private void loseCondition() {\n if (player.getHealth() <= 0) {\n lose();\n }\n }", "public void decreaseHealth() {\n setHealth(getHealth()-1);\n }", "private void subtractPlayerHealt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
o metodo a baixo calcula o peso muscular
public void calculapesomusc() { String pmusc; CalculoComposicaoCorporal pm = new CalculoComposicaoCorporal(); pm.pmgordura = Double.parseDouble(lblPerGordura.getText().replaceAll(",", ".")); pm.pmpct = peso; pm.pmosso = Double.parseDouble(lblPesoOsseo.getText().replaceAll(",", "....
[ "public double obetener_peso (){ return peso; }", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Os Tx Timestamp Range Clause'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseOsTxTimestampRangeClause(OsTxTimestampRangeClause object) { return null; }
[ "public T caseOsTxTimestampClause(OsTxTimestampClause object) {\n return null;\n }", "public T caseOsTxTimestampOpClause(OsTxTimestampOpClause object) {\n return null;\n }", "public T caseOsTxIdRangeClause(OsTxIdRangeClause object) {\n return null;\n }", "public T caseOsTxTimestampCriteri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new filter.
public Filter() { }
[ "public Filter () {\n\t\tsuper();\n\t}", "public Filter (Filter filter) {\n this.name = filter.name;\n this.type = filter.type;\n this.pred = new FilterPred(filter.pred);\n this.enabled = filter.enabled;\n }", "public FilterDescriptor() {\n // create a empty instance.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Constructor Creates a method parameter information object from the given element, containing type and type information.
protected MethodParameterInformation(@Nonnull Element element, @Nonnull DeclaredType containingType, @Nonnull TypeInformation typeInformation) { super(element, element.asType(), containingType); Require.that(element.getKind() == ElementKind.PARAMETER).orThrow("The element $ has to be a paramete...
[ "private Element createParamElement(YVariable param, Namespace defNS) {\n Element element = new Element(\"element\", defNS);\n element.setAttribute(\"name\", param.getName());\n\n // simple types are defined by attribute, user-defined types are defined by\n // sub elements\n Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method that returns the medium state.
public State getMediumState() { return mediumState; }
[ "int getState();", "public LightState getState() { return state; }", "public Light.State getState() { return this.state; }", "public short getInternalState();", "private State getState() {\n if (isSelected() && !isArmed()) {\n // normal black tick\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ saveRegionList: writes all fields of the RegionList into the Regions.txt file
public void saveRegionList(String fileName) { try { BufferedWriter out = new BufferedWriter(new FileWriter(fileName)); out.write(maxRegions+"\r\n"); out.write(numRegions+"\r\n"); for (int i = 0; i < numRegions; i++) { out.write(regionList[i].toFile()); } ou...
[ "@Override\n \tpublic boolean save(){\n \t\tASUtils.wipeFolder(Region.REGION_CONFIGURATIONS, null);\n \t\tASUtils.wipeFolder(Region.REGION_INFORMATION, null);\n \t\tfor(String world : regions.keySet()){\n \t\t\tSet<Region> regions = this.regions.get(world);\n \t\t\tfor(Region region : regions){\n \t\t\t\tregion.sav...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }