query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Prints all countries that are in the stated continent
public void filterCountriesByContinent(String continent) { System.out.println(" \nCountries in " + continent + ":"); for (int y = 0; y < numCountries; y++) { if (catalogue[y].getContinent().equals(continent)) { System.out.print(catalogue[y].toString()); } } }
[ "private static void printContinent() {\n for (Map.Entry<String, Continent> entry : Main.worldContinentMap.entrySet()) {\n Continent curContinent = entry.getValue();\n String curContinentName = entry.getKey();\n\n System.out.println(\"\\n---[\" + curContinentName + \"]---\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test15: " "Value between correct symbols in "password" field
@Test public void spaceValueBetweenPasswordAnalLoginTest() throws Exception { enterValidUserName(); $(analPasswordField).setValue("p a s s w o r d"); clickLoginButton(); checkInvalidUserNamePassword(); System.out.println("spaceValueBetween (password) Test - PASSED"); }
[ "@Test\n public void specificSymbolValuePasswordAnalLoginTest() throws Exception {\n enterValidUserName();\n $(analPasswordField).setValue(\"\\\"!@'#$%'&?*-+/{}[]\\\"\");\n clickLoginButton();\n checkInvalidUserNamePassword();\n System.out.println(\"specificSymbolValue (passwor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the warp table
public HashMap<String, List<OwnedWarp>> getTable() { return warps; }
[ "java.lang.String getTable();", "public String getShardingTable() {\n if (GeneralUtil.isEmpty(this.tableNames)) {\n return \"\";\n }\n\n final TddlRuleManager rule =\n PlannerContext.getPlannerContext(this).getExecutionContext().getSchemaManager(schemaName)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as attribute value for Renewal_period_before_exp using the alias name Renewalperiodbeforeexp.
public void setRenewalperiodbeforeexp(Integer value) { setAttributeInternal(RENEWALPERIODBEFOREEXP, value); }
[ "public Integer getRenewalperiodbeforeexp() {\n return (Integer) getAttributeInternal(RENEWALPERIODBEFOREEXP);\n }", "public void setPREV_EXP_DATE(Date PREV_EXP_DATE) {\r\n this.PREV_EXP_DATE = PREV_EXP_DATE;\r\n }", "@Override\n\tpublic void setProbation_period_start(java.util.Date probatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SingleValue__Group_0__3" $ANTLR start "rule__SingleValue__Group_0__3__Impl" InternalCommunicationObject.g:2193:1: rule__SingleValue__Group_0__3__Impl : ( ')' ) ;
public final void rule__SingleValue__Group_0__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCommunicationObject.g:2197:1: ( ( ')' ) ) // InternalCommunicationObject.g:2198:1: ( ')' ) { // InternalCom...
[ "public final void rule__SingleValue__Group_0__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCommunicationObject.g:2186:1: ( rule__SingleValue__Group_0__3__Impl )\n // InternalCommunicationObject.g:2187:2: rule__Single...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To verify uploaded room image is deleted while pressing OK button on the pop up.
@Test(priority=13,groups={"P1","RoomTypeTest"},description="To verify uploaded room image is deleted while pressing OK button on the pop up.") public void HMS5930() throws Throwable { try { AdminHome AH=AL.adminlogin("12903","barkha.kapoor52@gmail.com","86bc0493"); RoomTypesLandingPage RTP= AH.fn_Nav...
[ "private void deletePhotoHandle() {\n LayoutInflater layoutInflater = LayoutInflater.from(SlideshowActivity.this);\n View promptView = layoutInflater.inflate(R.layout.photo_deletedialog, null);\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(SlideshowActivity.this);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the maximum number of bytes in a leaf.
@Override public int getMaxLeafByteSize() { return max_leaf_byte_size; }
[ "public int maxsize() {\n return this.nNodes;\n }", "public int getMaxBound(){\r\n int max = 0, maxAux;\r\n \r\n for (Node node : this.nodes) {\r\n maxAux = node.getMaxInMark();\r\n if (maxAux > max) {\r\n max = maxAux;\r\n }\r\n }\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds 'ceil' character of 'pivotA' in string 'str' starting right from character 'pivotA', starting search at position s (start) and ending at position e (end). Ceil of a character is the smallest character greater than it.
private static int findCeilPivot(String str, char pivotA, int s, int e){ int ceil_index = s; for(int i=s+1;i<=e;i++){ if(str.charAt(i) > pivotA && str.charAt(i) < str.charAt(ceil_index)){ ceil_index = i; } } return ceil_index; }
[ "private int helper(String s, int start, int end, int k){\n if(end - start < k)\n return 0;\n int[] count = new int[26];\n for(int i = start; i < end; i++)\n count[s.charAt(i) - 'a']++;\n \n for(int i = 0; i < 26; i++){\n // charAt(i) appears less ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("WARNING PLOTTING FEATURE NOT IMPLEMENTED (getPainters)");
@SuppressWarnings({ "unchecked", "rawtypes" }) public java.util.Enumeration getPainters() { return null; }
[ "public boolean isPaintable(){\r\n return true;\r\n }", "String getPlotterName();", "public void setPaintMode() {\n log.log(POILogger.WARN, \"Not implemented\");\n }", "public Paint getSeriesPaint() {\n return this.seriesPaint;\n}", "public boolean isPaintable() {\n\t\treturn false;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
called during initialization and add, updating, deleting hierarchy item // the access contents will be read from info.json //
public static void manage(final File infoFile, final Op op) { final String content = FileIO.readFromFile(infoFile.getPath()); //--- convert from JSON string to java object, HierarchyItem ---// final HierarchyItem hi = new Gson().fromJson(content, HierarchyItem.class); for (final Access access : hi.getAccess())...
[ "public interface AccessManager {\n\n /**\n * predefined action constants\n */\n public String READ_ACTION = javax.jcr.Session.ACTION_READ;\n public String REMOVE_ACTION = javax.jcr.Session.ACTION_REMOVE;\n public String ADD_NODE_ACTION = javax.jcr.Session.ACTION_ADD_NODE;\n public String SET...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apply the update from the source to the specified destination.
public void to(Object destination) { new TranslationSession(translatorFactory,variables).update(source, destination); }
[ "void update(Destination destination);", "UpdateDestinationResult updateDestination(UpdateDestinationRequest updateDestinationRequest);", "@Override\n public UpdateDestinationResult updateDestination(UpdateDestinationRequest request) {\n request = beforeClientExecution(request);\n return execut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hubert does a valid move based on current velocity
private Location doValidMove() { int newX = getX() + velocity.getHor(); int newY = getY() + velocity.getVert(); if(checkPath(newX, newY)){ return move(newX, newY); }else { return move(5, 13); } }
[ "protected void calcVelocity()\n\t{}", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as attribute value for QTL_NAME using the alias name QtlName
public void setQtlName(String value) { setAttributeInternal(QTLNAME, value); }
[ "public void setName(QName name) {\n\t_name = name;\n\t_variable = Util.escape(name.getLocalPart());\n }", "void setCustomName(String text);", "public void setNameExpr(JExpr anExpr)\n {\n replaceChild(_nameExpr, _nameExpr = anExpr);\n }", "public void setQueryName(java.lang.String queryName)\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A customer reference string for customer look ups
@Schema(example = "MY REF 001", description = "A customer reference string for customer look ups") public String getCustomerReference() { return customerReference; }
[ "@java.lang.Override\n public java.lang.String getCustomerRef() {\n java.lang.Object ref = customerRef_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is to click the ContactUS link
public void click_contactUsLink(){ log.info("clicking on the the ContactUS link"); driver.findElement(contactUs_link).click(); }
[ "public void clickContactUsLink()\n\t{\n \telementUtils.performElementClick(wbContactUsLink);\n\t}", "@Step\n public void clickContactUsPage(){\n contactusPages.clickContactUsPage();\n }", "public ContactsPage click_on_contacts_link()\n\t\t{\n\t\t\tUtilities.switch_to_frame(\"mainpanel\");\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
also create a new ListSQLRequest, otherwise it's a backdoor to change the behaviour of the new TableModelSource
protected SQLTableModelSourceOnline createTableSource() { return new SQLTableModelSourceOnline(this.createListRequest()); }
[ "private void setRequestList()\n {\n try\n {\n requestList = database.loadRequest();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n\n }", "public FilterByListRequest() {\n tableName = \"\";\n viewName = \"\";\n columnValuesMap =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
try to find the pool which is already full and draw it
private int findFullPoolToDraw(int i, int[] rains, Pools pools) { boolean foundFullPool = false; for(int j=i+1; j<rains.length; j++) { if(rains[j] == 0) continue; else if(pools.contains(rains[j])) { foundFullPool = true; return pools.draw(rains[j]); } } if(!foundFullPoo...
[ "void removeDrawDetail(Pool pool);", "public void updateBullpen() {\n\t\t// display the tiles on the container panel and scales them to fit\n\t\t// row/col\n\t\t// includes centering as well\n\t\tfor (int i = 0; i < col; i++) {\n\t\t\tfor (int j = 0; j < row; j++) {\n\t\t\t\t// create a button image with specifie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reset the histo graphics window measurement pointer including table and header
public void resetGraphicsWindowHeaderAndMeasurement() { if (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) { this.histoGraphicsTabItem.clearHeaderAndComment(); this.histoGraphicsTabItem.getGraphicsComposite().setModeState(HistoGraphicsMode.RESET); } else { GDE.display.asy...
[ "public synchronized void setupHistoWindows() {\r\n\t\tif (log.isLoggable(Level.INFO)) log.log(Level.INFO, String.format(\"started\")); //$NON-NLS-1$\r\n\t\tthis.histoSet = HistoSet.getInstance();\r\n\t\tthis.histoSet.initialize();\r\n\r\n\t\tif (this.histoGraphicsTabItem != null) this.resetGraphicsWindowHeaderAndM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new item picker
public ItemPicker(final Context context) { this(context, null); }
[ "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
wishlist_toolbar = (Toolbar) findViewById(R.id.toolbar_mens_clothing);
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public void initToolBar() { mycart_toolbar.setTitle(R.string.toolbar_for_mycart); mycart_toolbar.setTitleTextColor(0xFFFFFFFF); setSupportActionBar(mycart_toolbar); }
[ "private void configureToolBar(){\n this.toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar);\n setSupportActionBar(toolbar);\n }", "void initToolbar();", "public void loadToolbar() {\n Toolbar toolbar = (Toolbar) findViewById(R.id.app_toolbar);\n toolbar.setTitle(\"Pagam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restarting this board has the effect of emptying all grid coordinates, live Tetriminoes, queue Tetriminoes, and the storage piece.
public void restartBoard() { mLiveTetriminoCoordinates = new HashMap<Integer, int[][]>(); mLiveTetriminoes = new ArrayList<Tetrimino>(); mTetriminoQueue = new ArrayBlockingQueue<Tetrimino>(FULL_QUEUE_SIZE); mStoredTetrimino = null; for (int i = 0; i < mGrid.length; i++) ...
[ "public void resetBoard() {\n setSquares();\n setWhitePieces();\n setBlackPieces();\n }", "public void restart()\n {\n boardView.removeAll();\n\n gameBoard = new Board(columns, rows, bombs, this);\n boardView.setLayout(new GridLayout(columns, rows, 0, 0));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
loads the image of the character
public void loadImage() { // creates a new image icon with the characters array and the count as a file path ImageIcon ii = new ImageIcon(game.characters[count]); // load the image image = ii.getImage(); // sets width w = image.getWidth(null); //...
[ "protected abstract Image loadImage();", "public void loadImage(){\n\t\thelpScreen = getImage(getDocumentBase(), \"res/Untitled-1.png\");\n\t\tdeadScreen = getImage(getDocumentBase(), \"res/DeadScreen.png\");\n\t\twonScreen = getImage(getDocumentBase(), \"res/WonScreen.png\");\n\t\t\n\t}", "public static void l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prints "bark!" to the console
public void bark() { System.out.println("bark!"); }
[ "public void beFriendly()\r\n {\r\n System.out.println(\"bark...\");\r\n }", "static void print() {\n System.out.print(\"BlackJack > \");\n }", "public static void bark(){\n System.out.println(\"I am barking\");\n }", "private void printGoodbye() {\n System.out.println(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Data Input UI'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseDataInputUI(DataInputUI object) { return null; }
[ "public T caseDataOutputUI(DataOutputUI object) {\n\t\treturn null;\n\t}", "public T caseInputData(InputData object)\r\n\t{\r\n\t\treturn null;\r\n\t}", "public T caseDataSelectionUI(DataSelectionUI object) {\n\t\treturn null;\n\t}", "public java.lang.String getInputData() {\n return inputData;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the width, in pixels, of the disabled edge region around the canvas which will prevent new touch events from being consumed.
public float getDisabledEdgeWidth() { return disabledEdgeWidth; }
[ "public int getWidth() {\n\t\treturn canvasWidth;\n\t}", "int getCanvasWidth();", "@Override\n public int getWidth() {\n return graphicsEnvironmentImpl.getWidth(canvas);\n }", "public int getCanvasWidth() {\r\n\r\n\t\treturn CANVAS_WIDTH;\r\n\t}", "int getBoundsWidth();", "public int getEdgeW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string reqOrRespID = 2;
public Builder setReqOrRespID( String value) { if (value == null) { throw new NullPointerException(); } reqOrRespID_ = value; onChanged(); return this; }
[ "public String getReqOrRespID() {\n Object ref = reqOrRespID_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test missing block error exception.
@Test public void testMissingBlockException() throws IOException { try { final String ex = "/gnss/clock/missing_block_end_of_header.clk"; final RinexClockParser parser = new RinexClockParser(); final InputStream inEntry = getClass().getResourceAsStream(ex); pa...
[ "public void testAddBlock_NoGame() throws Exception {\n try {\n dao.addBlock(1, 1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }", "public InvalidBlockFileException(int index) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns information about the items in which the intensity annotations did not match.
public Hashtable<String, Vector<CircumplexAnnotation>> getNonMatchingIntensities() { return nonMatchingIntensities; }
[ "public List<Integer> getMissingValueIndex(){\n List<Integer> mvidx = new ArrayList<>();\n for (int i = 0; i < xdata.length; i++){\n if (MIMath.doubleEquals(xdata[i], this.missingValue) || MIMath.doubleEquals(ydata[i], this.missingValue))\n mvidx.add(i);\n }\n \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getEdibleList returns a list of things the animal can eat.
protected abstract ArrayList<Class<? extends Entity>> getEdibleList();
[ "List<Edible> getEdibles();", "public List<Equipment> getEquippedList() {\n List<Equipment> equipped = new ArrayList<>();\n equipped.add(head);\n equipped.add(body);\n equipped.add(legs);\n equipped.add(feet);\n equipped.add(hands);\n equipped.add(belt);\n e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs and initializes an AxisAngle4d from the specified x, y, z, and angle.
public AxisAngle4d(double x, double y, double z, double angle) { set(x, y, z, angle); }
[ "public AxisAngle4f(float x, float y, float z, float angle) {\n\t\n \tthis.set(x, y, z, angle);\n }", "public AxisAngle4f(Vector3f axis, float angle) {\n \n \tthis.x = axis.x;\n this.y = axis.y;\n this.z = axis.z;\n this.angle = angle;\n }", "public AxisAngle4d() {\n\tx =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a prettyprinted string of the headers
String printHeaders();
[ "public String headerToString() {\n String time1 = this.forecastTime.get(Calendar.DAY_OF_MONTH) + \".\"\n + (this.forecastTime.get(Calendar.MONTH) + 1) + \".\"\n + this.forecastTime.get(Calendar.YEAR) + \" \"\n + this.forecastTime.get(Calendar.HOUR_OF_DAY) + \":\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Visitor for operators
String visit(Add operator);
[ "public void visit(Operator operator);", "@Override\n\tpublic void accept(OperatorVisitor operator) {\n\t\toperator.visit(this);\n\t}", "public interface Visitor {\r\n \r\n /**\r\n * Visits an Operand and performs the action given when overriding\r\n * this method.\r\n * @param operand An Operand this V...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets confirm end time.
public String getConfirmEndTime() { return this.confirmEndTime; }
[ "public int getConfirmTime() {\n\t\treturn _tempNoTiceShipMessage.getConfirmTime();\n\t}", "int getEndtime();", "long getContinueEndTime();", "@Override\n\tpublic int getConfirmTime() {\n\t\treturn _tempNoTiceShipMessage.getConfirmTime();\n\t}", "long getFinishTime();", "public int getTimeEnd() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drops the sequences of the entity.
protected abstract void dropSequences(final DbEntity entity) throws DatabaseEngineException;
[ "public void removeSequences(){\n if(internalStore.removeSequences()) {\n sequences = new Sequences();\n }\n }", "private List<String> generateDropStatementsForSequences(String schema) throws SQLException {\n String dropSeqGenQuery = \"select rtrim(NAME) from SYSIBM.SYSSEQUENCES...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verifier si le service Maps du playServices existe dans le telephone
private boolean checkMapServices(){ if(isServicesOK()){ if(isMapsEnabled()){ return true; } } return false; }
[ "private boolean isServiceOk(){\n Log.d(TAG, \"isServiceOk: checking google service version\");\n\n int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(FormularioCurso.this);\n\n if (available == ConnectionResult.SUCCESS){\n //Everything is fine and the ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Releases the recycled view pool.
public static void releaseRecycledViewPool() { sRecycledViewPool.clear(); }
[ "public void release() {\n pool.add(instance);\n leases.remove(this);\n }", "public void closePool() {\n threadPool.destroy();\n }", "public void release()\n {\n conductor.releaseSubscription(this);\n releaseBuffers();\n }", "public void release()\n {\n// View (Fens...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one bo2mCar by id.
@Transactional(readOnly = true) public Optional<Bo2mCar> findOne(Long id) { log.debug("Request to get Bo2mCar : {}", id); return bo2mCarRepository.findById(id); }
[ "public Car findCarByID (Long id) {\r\n TypedQuery<Car> query = entityManager.createNamedQuery(\"findCarById\", Car.class); // NamedQuery a car by id\r\n query.setParameter(\"cId\", id); // set the id\r\n // Max one result\r\n query.setMaxResults(1); // only get one\r\n return que...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Receive the change event from the configuration gui Save the changes if needed
@SubscribeEvent public void onChange(ConfigChangedEvent.OnConfigChangedEvent event){ if(event.modID.equals("natureoverhaul") && config.hasChanged()) { getBasicOptions(); setBiomes(); config.save(); refreshBehaviors(); } }
[ "public void configChanged ()\n {\n// log.info(\"Config changed \" + _tree.getSelectedNode().getConfig(),\n// \"lastValue\", _lastValue);\n ManagedConfig oldLastValue = _lastValue;\n _lastValue = (ManagedConfig)\n ((Ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
run method calls the movement method in the target class
public void run() { target.movement(); }
[ "public void move() {\n\tfly();\n }", "public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}", "public void run() {\n\t\todometer.setXYT(0.0, 0.0, 0.0);\n\t\t\n\t\tleftMotor.setSpeed(FORWARD_SPEED);\n\t\trightMotor.setSpeed(FORWARD_SPEED);\n\n\t\tint i;\n\t\tfor (i = 0; i < 5; i++) {\n\t\t\ttrave...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
see if target appears in nums we think of floorIndex and ceilingIndex as "walls" around the possible positions of our target so by 1 below we mean to start our wall "to the left" of the 0th index (we don't mean "the last index")
public static boolean binarySearch(int target, int[] nums) { int floorIndex = -1; int ceilingIndex = nums.length; // if there isn't at least 1 index between floor and ceiling, // we've run out of guesses and the number must not be present while (floorIndex + 1 < ceilingIndex) { ...
[ "private boolean seeNextFloorX(Position target) {\n if (target.x == position.x) {\n return false;\n }\n if (target.x > position.x) {\n\n return world[position.x + 1][position.y].equals(Tileset.FLOOR);\n }\n if (target.x < position.x) {\n return wor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
trying to move a file into it's parent dir should succeed again: noop
@Test public void testMoveFileUnderParent() throws Throwable { Assume.assumeTrue(renameSupported()); Path filepath = path("testMoveFileUnderParent"); createFile(filepath); // HDFS expects rename src, src -> true rename(filepath, filepath, true, true, true); // verify ...
[ "@Test\n public void testMoveDirUnderParent() throws Throwable {\n Assume.assumeTrue(renameSupported());\n Path testdir = path(\"testMoveDirUnderParent\");\n fs.mkdirs(testdir);\n Path parent = testdir.getParent();\n // the outcome here is ambiguous, so is not checked\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to check if server is in pause mode
public static boolean isPause() { return pause; }
[ "boolean isPause();", "boolean isPaused();", "public boolean isPaused();", "boolean isPersistedPause();", "public boolean isPaused () { return (paused); }", "public void checkPaused()\n {\n paused = true;\n }", "public boolean isPaused()\r\n\t{\r\n\t\treturn currentstate == TIMER_PAUSE;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Business Methods Return all the top menus
public Iterable<Entity> getAllTopMenus() { return new UtilDataSourceAPI().listEntities(KIND_TOPMENU, null, null); }
[ "public List<SysMenu> selectMenuAll();", "private void createTopMenu() {\r\n\t\tArrayList<MenuItem> menu = this.fetchTopMenu();\r\n\t\tif (menu != null) {\r\n\t\t\tIterator<MenuItem> it = menu.iterator();\r\n\t\t\tthis.menuTop = new ArrayList<MenuItem>();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tMenuItem menuIt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para obtener un docente por el numero de dni
@Override public Docente obtenerDocentePorDni(String dni) { List<Docente> listaDocentes = firebaseService.listaDocentes(); for (Docente docente : listaDocentes) { if (dni.equals(docente.getDni())) { // si existe el docente lo retornamos return docente; } } return null; }
[ "public String getDocumentNo();", "public java.lang.String getNum_doc();", "public int getDocid(int n) {\r\n return this.scores.get(n).docid;\r\n }", "java.lang.String getDocumentNumber();", "Documento getDocumento();", "panacea.did.v2.DIDDocument getDocument();", "protected String getDocumentNumber...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'groupId'
@Test public void groupIdTest() { // TODO: test groupId }
[ "boolean isGroupId(String groupId);", "boolean validateGroupId(final String groupId);", "public boolean isNotNullGroupId() {\n return genClient.cacheValueIsNotNull(CacheKey.groupId);\n }", "void setGroupId(int groupId);", "public void setGroupId(String newValue);", "public void setGroupId(int tmp) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ removeAll Removes all Listeners from Speakerphone
public void removeAll() { mListenerSet.clear(); }
[ "public void removeAllMicListeners() {\r\n microphoneListeners.clear();\r\n }", "public void removeAllListener() {\r\n listeners.clear();\r\n }", "public void removeAllTuioListeners()\n\t{\n\t\tlistenerList.clear();\n\t}", "public final void removeAllTapListeners() {\r\n tapListener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the BottomRightLongitude field.
public void setBottomRightLongitude(java.math.BigDecimal value);
[ "public RectangleBuilder bottomRight(double lon, double lat) {\n this.bottomRight = new PointImpl(lon, lat, GeoShapeConstants.SPATIAL_CONTEXT);\n return this;\n }", "public void setBottomRightCornerRadius(float bottomRightCornerRadius) {\n cornerRadius.z = bottomRightCornerRadi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all the lines for this drawing.
public List<Polyline> getAllLines() { return lines; }
[ "public ArrayList<LinePanel> getLines() {\n\t\treturn lines;\n\t}", "public Collection<Line> getLines() {\n return lines;\n }", "protected ArrayList<Line> getLines() {\n return lines;\n }", "@Override\n public Line[] getLines(){\n Line[] arrayOfLines = new Line[]{topLine, rightLine, bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of findByMall method, of class StoreFacade.
@Test public void testFindByMall() throws Exception { System.out.println("findByMall"); Mall mall = new Mall(1L); transaction.begin(); List<Store> result = storeFacade.findByMall(mall); transaction.commit(); assertEquals(3, result.size()); }
[ "@Test\n public void findAll() {\n System.out.println(\"testFindAll\");\n mockResult(list);\n List<T> result = facade().findAll();\n assertNotNull(result);\n assertEquals(list, result);\n }", "@Test\n\tpublic void findAllTest() {\n\t\tif (createPassed == false)\n\t\t\tAsse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the Coverage chart.
@Test public void testCoverageChart() throws Exception { String chartName = "Coverage"; String params = "Percentage,line"; TelemetryChartData chart = telemetryClient.getChart(chartName, user, "Default", "Day", Tstamp.makeTimestamp("2007-08-01"), Tstamp.makeTimestamp("2007-08-04"), params); /...
[ "@Test\n public void testLineCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setLineCoverage(\"91,90,0\")....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the indicated program has been restored because of an Undo/Redo. This method allows this CodeComparisonPanel to take an appropriate action (such as refreshing itself) to respond to the program changing.
public abstract void programRestored(Program program);
[ "public void undo() {\n\t\tGCF.setNewExecution(previouslyExecuted, currentlyExecuted, GC);\n\t}", "public void redo() {\n\t\t// when applicable, undid sets of parameters get returned to the simulation\n\t\tif (!undoStates.isEmpty()) {\n\t\t\tsavedStates.push(undoStates.pop());\n\t\t\tLiquidApplication.getGUI().se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that only one video capture file is present in result even if several drivers are used
@Test(groups={"it"}) public void testReportContainsOneVideoCaptureWithMultipleDrivers() throws Exception { try { System.setProperty(SeleniumTestsContext.VIDEO_CAPTURE, "true"); executeSubTest(1, new String[] {"com.seleniumtests.it.stubclasses.StubTestClassForDriverTest"}, ParallelMode.METHODS, new...
[ "@Test(groups={\"it\"})\r\n\tpublic void testReportContainsNoVideoCapture() throws Exception {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSystem.setProperty(SeleniumTestsContext.VIDEO_CAPTURE, \"false\");\r\n\t\t\t\r\n\t\t\texecuteSubTest(1, new String[] {\"com.seleniumtests.it.stubclasses.StubTestClassForDriverTest\"}, Paralle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to load the Jar file represented by the File file
public synchronized void loadJarfile(File file) throws JarNotFoundException, NotAJarFileException, UnableToReadJarException, JarAlreadyLoadedException, ClassAlreadyLoadedException { log.trace("Trying to load jarfile ("+file.getAbsolutePath()+")"); JarfileClassLoader.getInstance().addFile(file); }
[ "private static void loadJar( File jarFile )\n\t{\n\t\ttry {\n\t\t\tURL url = jarFile.toURI().toURL();\n\n\t\t\tClass<?>[] parameters = new Class[] { URL.class };\n\n\t\t\tURLClassLoader sysLoader = (URLClassLoader)ClassLoader.getSystemClassLoader();\n\t\t\tClass<?> sysClass = URLClassLoader.class;\n\t\t\tMethod me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the visible layers. If a layer index is not in the collection, it will be invisible.
public void setVisibleLayers (Collection<Integer> layersToMakeVisible) { int selected = getSelectedLayer(); _tableModel.setVisibilities(layersToMakeVisible); setSelectedLayer(selected); }
[ "public void setVisibilities (Collection<Integer> visibleLayers)\n {\n for (int ii = 0, nn = _vis.size(); ii < nn; ii++) {\n _vis.set(ii, visibleLayers.contains(ii));\n }\n fireTableDataChanged();\n // update every damn entry\n for (TudeySceneModel.Entry entry : _sce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the existing unmapped Famix Type's parent (or owner) matches the binding's owner. Checks that the candidate has the same name as the JDT bound type, and checks recursively that owners also match.
private boolean matchAndMapTypeOwner(ITypeBinding bnd, TNamedEntity owner, Type candidate) { ContainerEntity candidateOwner = Util.getOwner(candidate); // owner is a Method? (for example in case of an anonymous class) CheckResult res = matchAndMapOwnerAsMethod(((bnd != null) ? bnd.getDeclaringMethod() : null), o...
[ "private <T extends TWithTypes & TNamedEntity> boolean matchAndMapType(ITypeBinding bnd, String name, TNamedEntity owner, TNamedEntity candidate) {\n\t\tif (! (candidate instanceof Type) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check whether bnd and candidate are already bound\n\t\tCheckResult res = checkKeyMatch(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Event fired when a Device is assigned to an Incident. Corresponds to the event key "assigned".
public void incidentAssignedDevice(Incident incident, Device device);
[ "public void assigned() \n {\n this.state = CcdpTaskState.ASSIGNED;\n }", "public void deviceEntered(DevicesEvent e);", "public void incidentUnassignedDevice(Incident incident, Device device);", "IDeviceAssignment createDeviceAssignment(IDeviceAssignmentCreateRequest request) throws SiteWhereException;",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ alternative scenario 1: Existing Task is selected Task has start and end Employee is not project leader for project task is connected to exception is thrown
@Test public void getAvailableEmployeesAlt1() throws WrongInputException { Employee employee=database.employees.get(1); Task task=database.getTask(3); assertNotNull(task); task.start=new CalWeek(2000,1); task.end=new CalWeek(2000,4); assertNotNull(task.start); assertNotNull(task.end);...
[ "@SuppressWarnings(\"unchecked\")\r\n\t@Test\r\n\tpublic void earliestEnd() throws TaskFailedException, EmptyStringException, BusinessRule1Exception, DependencyCycleException, NullPointerException, IllegalStateCallException, BusinessRule3Exception, WrongFieldsForChosenTypeException, WrongUserForTaskTypeException, B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column shopping_order.payment
public void setPayment(BigDecimal payment) { this.payment = payment; }
[ "public void setPayment(BigDecimal payment) {\r\n this.payment = payment;\r\n }", "public void setPayment(double payment) {\n this.payment = payment;\n }", "@Override\n\tpublic void setPayment(java.lang.String payment) {\n\t\t_bookOrder.setPayment(payment);\n\t}", "@Override\n\tpublic void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set params for voice mRecognizer
private void setRecognizerParam(SettingParams params) { if (mRecognizer == null) return; //清空所以参数 mRecognizer.setParameter(SpeechConstant.PARAMS, null); //设置听写引擎 mRecognizer.setParameter(SpeechConstant.ENGINE_TYPE, SpeechConstant.TYPE_CLOUD); //设置返回结果格式 ...
[ "private void setSynthesizerParam(SettingParams params) {\n if (mSynthesizer == null)\n return;\n //清除所有参数\n mSynthesizer.setParameter(SpeechConstant.PARAMS, null);\n //设置合成引擎\n mSynthesizer.setParameter(SpeechConstant.ENGINE_TYPE, SpeechConstant.TYPE_CLOUD);\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a proxy using NoOp callback. The target class must have a default zeroargument constructor.
public Object createProxy(Class<?> targetClass) { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(targetClass); enhancer.setCallback(NoOp.INSTANCE); return enhancer.create(); }
[ "public Proxy() {\n\t\t\tthis(null);\n\t\t}", "public BaseProxy() {}", "<T> T newProxy(T target, Class<T> interfaceType);", "<T> T create(T target, String proxyId, InvocationRecord invocationRecord) throws ProxyCreationException;", "public StubbornDelegatingReflector() {\n\t\tthis(null);\n\t}", "public Pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the Overnight Curve Horizon Metrics For an Array of Closing Dates
public static final java.util.Map<org.drip.analytics.date.JulianDate, org.drip.historical.state.FundingCurveMetrics> HorizonMetrics ( final org.drip.analytics.date.JulianDate[] adtSpot, final java.lang.String[] astrOvernightCurveOISTenor, final double[][] aadblOvernightCurveOISQuote, final java.lang.Strin...
[ "JFreeChart generateHist();", "public static void main(String args[]) {\n List<OHLCDataItem> dataItems = new ArrayList<OHLCDataItem>();\r\n try {\r\n String strUrl = \"http://ichart.yahoo.com/table.csv?s=MSFT&a=3&b=1&c=2013&d=3&e=15&f=2050&g=d\";\r\n URL url = new URL(strUrl);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all stats names and its corresponding id that is inside clinicalguidestats.xml
public HashMap<String, String> getStatsNamesAndIds() { NodeList nl = getStats(); HashMap<String, String> id_name = new LinkedHashMap<String, String>(); int len = nl.getLength(); for (int i = 0; i < len; i++) { String id = ParserHelper.requiredAttributeGetter((Element) nl.item(i), "id"); String name = Pars...
[ "public ArrayList<String> getStatsIds() {\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tNodeList nl = getStats();\n\t\tint len = nl.getLength();\n\t\tString str = \"\";\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString id = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"id\");\n\t\t\tif ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set BioActive as true
public void BioActive(boolean what) { this.bioactive = what; }
[ "public void setActive(boolean value) {\n this.active = value;\n }", "public void setActiveflag(Boolean activeflag) {\n this.activeflag = activeflag;\n }", "public void setActive(int active) {\n\t\tthis.active = active == 1;\n\t}", "public void setActive (boolean flag) {\n\t\tbody.setActiv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the formaCobroComAp value for this SimuladorCuotaCreditoRequest.
public java.lang.String getFormaCobroComAp() { return formaCobroComAp; }
[ "public void setFormaCobroComAp(java.lang.String formaCobroComAp) {\n this.formaCobroComAp = formaCobroComAp;\n }", "public Short getCodCompartilhamentoCadastro() {\n\t\treturn codCompartilhamentoCadastro;\n\t}", "public String getCompAccomFlag() {\n return (String)getAttributeInternal(COMPACCO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MODIFIES: this EFFECTS: returns true if the new date is valid and sets this.date to date. Otherwise return false and do not change this.date.
public boolean setDate(Date date) { if (date.isValidDate()) { this.date = date; return true; } else { return false; } }
[ "public static boolean changeHiring_date() {\r\n boolean checker = false;\r\n date hiringDate = null;\r\n int difage = 0, difage2 = 0;\r\n String inserted_hiringDate = \"\";\r\n\r\n String dateBirthday = ((JTextFieldDateEditor) ChangeAdmin.birthdayField.getDateEditor()).getText();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the denominator with optional simplification.
private void setDenominator(int denominator, boolean trim) { this.denominator = denominator; if (trim) simplify(this); }
[ "public void setDenominator(int b) {this.denominator=b;}", "public void setDenominator(int denominator) {\r\n\t\tthis.denominator = denominator;\r\n\t}", "public void setDenominator(int denominator) {\n setDenominator(denominator, true);\n }", "public int getDenominator() {return denominator;}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sell item to vendor. This method should be used to manage this kind of interaction. It checks if the player have the item, calls the purchase method from Vendor, adding the item's value to player's total gold Finally removes the item from player's inventory.
public static boolean sellItemToVendor(Player player, Vendor vendor, Item item){ if(player.getInventory().contains(item)){//Checks if player actually have the item player.setGold(player.getGold() + vendor.purchase(item));//Sells the item to the vendor, getting the ammount of gold the item w...
[ "private void sellItem(ShopItem item) {\n if (!world.ifHasItem(item.getName())) {\n System.out.println(\"You don't have Item : \" + item.getName());\n return;\n }\n world.removeItem(item.getName());\n int gold = world.getCharacter().getGold().get();\n world.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a robot from a position
void removeRobot(Position pos);
[ "public void removeObstacle(Coord obstacleCoord);", "private void delVehicle(Position position)\n\t{\n\t\tthis.getSquare(position).setVehicle(null);\n\t}", "protected static void removeRobot(Robot robot)\n {\n getRobotList().remove(robot);\n }", "@Override\n\tpublic void move() {\n\t\tVec2 positi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated string systemSharedLibrary = 9;
com.google.protobuf.ByteString getSystemSharedLibraryBytes(int index);
[ "java.lang.String getSystemSharedLibrary(int index);", "int getSystemSharedLibraryCount();", "java.util.List<String> getSystemSharedLibraryList();", "java.util.List<java.lang.String>\n getSystemSharedLibraryList();", "private static native boolean nativeUseSharedRelro(String library,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Override getTitle to return the repeat count.
public String getTitle() { return "Repeat (" + getCount() + "X)" ; }
[ "public String getTitleCounter() {\r\n\t\treturn titleCounter;\r\n\t}", "public String getTitle() {\n return super.getTitle() + \" (\" + getNumberOfItems()\n // + \" of \" + childCount() // does not update...\n + \")\";\n }", "public Integer getTitleAudioRepeatTimes() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/a private method that has NO PARAMETERS, that assigns the appropriate value to checkDigit. To do this, call the method to calculate the check sum based on the Luhn algorithm (see details in the method C. specifications below), then assign the correct value to checkDigit so that the check sum + checkDigit is a multiple...
private int calcCheckDigits() { int sum; sum = checkSum(); if ((sum + checkDigit) % 10 != 0) { checkDigit = sum - (sum % 10); } return checkDigit; }
[ "private int calculateCheckDigit(int checkSum)\n {\n // TODO Project 1\n int checkDigit = 0;\n // IMPLEMENT THIS METHOD\n if(checkSum%10==0){\n checkDigit = 0;\n } else {\n checkDigit = ((int)Math.floor(checkSum/10)+1)*10-checkSum;\n }\n\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deviceMotionAvailable Discussion: Determines whether device motion is available using any available attitude reference frame.
@Generated @Selector("isDeviceMotionAvailable") public native boolean isDeviceMotionAvailable();
[ "@Generated\n @Selector(\"isDeviceMotionActive\")\n public native boolean isDeviceMotionActive();", "@Generated\n @Selector(\"isMagnetometerAvailable\")\n public native boolean isMagnetometerAvailable();", "@Generated\n @Selector(\"isAccelerometerAvailable\")\n public native boolean isAccelero...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a new DccAnnotationCategory with the given Id set the name as well
private DccAnnotationCategory getPretendDccAnnotationCategory(final Long categoryId) { final DccAnnotationCategory result = new DccAnnotationCategory(); result.setCategoryId(categoryId); result.setCategoryName("Category " + categoryId); return result; }
[ "public ServiceCategory getServiceCategory(Integer id);", "DCategory get(Long id);", "public Category getCategoryById(String id);", "public Category getCategory(int id);", "public ProductCategory(int category_id, String categoryName) {\n this.category_id = category_id;\n this.categoryName = ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change a window's "Always On Top" attribute.
public boolean setOnTop(final WinRefEx hWnd, final boolean on) { return (hWnd == null) ? false : setOnTop(TitleBuilder.byHandle(hWnd), on); }
[ "void setAlwaysOnTop(boolean alwaysOnTop);", "public void notOnTop(){\n\t\t\tsetAlwaysOnTop(false);\n\t\t}", "boolean isAlwaysOnTop();", "protected void setGravityTop() {\n getWindow().getAttributes().gravity = Gravity.TOP;\n }", "public Builder setIsTop(boolean value) {\n bitField0_ |= 0x0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempt to become the current owner.
public boolean becomeOwner(String name, String owner) { AcProcessOwner e = getProcessOwner(name); if ( e == null ) return insertOwner(name, owner); return updateOwner(name, owner, e.getUpdateCount()); }
[ "void setNewOwner(User owner);", "public void switchCurrentOwner() {\n if (currentOwner == Token.BLUE) {\n currentOwner = Token.RED;\n } else {\n currentOwner = Token.BLUE;\n }\n }", "public void resetOwner() {\r\n\t\towner = null;\r\n\t}", "public void changeOwne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XSynchronizedExpression__Group_0_0__1__Impl" $ANTLR start "rule__XSynchronizedExpression__Group_0_0__2" InternalDroneScript.g:14844:1: rule__XSynchronizedExpression__Group_0_0__2 : rule__XSynchronizedExpression__Group_0_0__2__Impl ;
public final void rule__XSynchronizedExpression__Group_0_0__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:14848:1: ( rule__XSynchronizedExpression__Group_0_0__2__Impl ) // InternalDroneScript.g:14849:2: rule__...
[ "public final void rule__XSynchronizedExpression__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:14713:1: ( rule__XSynchronizedExpression__Group__2__Impl rule__XSynchronizedExpression__Group__3 )\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lista chamados realizados, concluidos e o total
public List<ChamadosAtendidos> contaChamadosAtendidos(int servico) throws SQLException { List<ChamadosAtendidos> CAList = new ArrayList<>(); PreparedStatement ps = conn.prepareStatement("SELECT * FROM `solicitacoes` WHERE servico_id_servico =? "); ps.setInt(1, servico); ChamadosA...
[ "public List viewTotalInscritosBD();", "public void listTotalAlumnos() {\n cursos.stream()\n .flatMap(s -> s.getInscripciones()\n .stream().map(al -> al.getAlumno()))\n .distinct().forEach(System.out::println);\n }", "public void getListChauffeur()\n\t{\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
metodo utilizzato per iniziare il gioco
public void IniziaGioco(){ //chiedo se cpu vs cpu o cpu vs human //this._thereIsHumanPlayer = this.StubPresenzaGiocatoreUmano(); if(this._thereIsHumanPlayer){ //chiedere nome al giocatore String nomeGiocatoreUmano = this.StubNomeGiocatoreUmano(); //creo il giocatore umano Giocatore giocatoreUmano = ne...
[ "public Gioco() {\n c = new Campo();\n turno = 1; //i turni dispari sono del Bianco, quelli pari del Nero\n c.getBianco().setTurno(true); //inizia il bianco\n vincitore = \"nessuno\";\n Mossa.resetRegistroMosse(); //resetto il registro mosse nel caso in cui ci fosse stata una prec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the new profile creation button is clicked. First disables the button so the user can't click it again and then starts the CreateProfileActivity and closes this activity.
public void newProfile(View view) { newProfile.setClickable(false); Intent intent = new Intent(ProfilesActivity.this, CreateProfileActivity.class); startActivity(intent); finish(); }
[ "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table ec_environment
List<ec_environment> selectByExample(ec_environmentExample example);
[ "public abstract String getEnvironmentTable();", "ec_environment selectByPrimaryKey(Integer id);", "Environment queryByEnvironmentCode(@Param(\"environmentCode\") Long environmentCode);", "List<Environment> queryAllEnvironmentList();", "interface Environment extends org.apache.accumulo.core.data.constraints...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds the LP description of the problem for the underlying LP solver to work on.
@Matlab public void buildLPState() { final FactorGraph model = getModelObject(); int nLPVars = 0; // Create solver variables, if not already created for (VariableBase var : model.getVariables()) { SVariable svar = createVariable(var, true); nLPVars += svar.computeValidAssignments(); ...
[ "LP getLp();", "public String getDescription() {\n StringBuilder sb = getSB();\n sb.append(\"Reinforcement Learning Solver\\n\");\n sb.append(\"Apply basic reinforcement learning to learn a strategy.\\n\");\n sb.append(\"Value function init range: \" + INIT_VALUE_FUNCTIONS_RANGE + \"\\n\");\n sb.ap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column student.stuid
public void setStuid(Integer stuid) { this.stuid = stuid; }
[ "public void setStudentID(String studentID){\r\n this.studentID.set(studentID);\r\n }", "public void setStuId(Integer stuId) {\n this.stuId = stuId;\n }", "@Override\n\tpublic void updateStudent(Student student) {\n\t\tString sql = \"UPDATE STUDENT SET SEMAIL=(select t.semail from (select ? ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
se usa en mensajeria.java para obetener la infor del ususario en firebase este obtiene el nodo de usaruarios y accedemos a al su usuraio hijo con al key adquiere informacion del nodo de l hijo y toma esa info
public void obtenerinformacionDeUsuarioporLLaveUID (final String key, final Servicios_DAO.IDdeviolverServicio iDdeviolverServicio){ databaseReference_servicios.child(key).addListenerForSingleValueEvent(new ValueEventListener() { //vamos al hijo osea los que esta dentro de lso nodods @Override ...
[ "@Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n final Clientes m=dataSnapshot.getValue(Clientes.class); //se crea el valor de tipo Mensaje a enviar y la clase de la que este es\n\n\n\n final Lclientes lclientes=new Lclientes(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the cronop elem desc2.
public void setCronopElemDesc2(String cronopElemDesc2) { this.cronopElemDesc2 = cronopElemDesc2; }
[ "public String getCronopElemDesc2() {\n\t\treturn this.cronopElemDesc2;\n\t}", "public void setCronopElemDesc(String cronopElemDesc) {\n\t\tthis.cronopElemDesc = cronopElemDesc;\n\t}", "public void setCronopElemCode2(String cronopElemCode2) {\n\t\tthis.cronopElemCode2 = cronopElemCode2;\n\t}", "public String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if a user exists in the database by user name
public static Boolean userExists(String userName) { Connection conn = null; PreparedStatement statement = null; ResultSet res = null; String query = "SELECT user_name FROM Users WHERE user_name=?"; try { conn = DriverManager.getConnection(url); ...
[ "public boolean findUserByName(String name) throws UserExistException;", "boolean checkIfUserExistsByUserName(String username);", "boolean existsByUserName(String userName);", "boolean checkUserExist(String userName);", "boolean exists(String userName);", "public boolean queryUsernameIsExist(String userna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .io.lightcone.data.types.Percentage wallet_split = 8;
public io.lightcone.data.types.PercentageOrBuilder getWalletSplitOrBuilder() { return getWalletSplit(); }
[ "public io.lightcone.data.types.Percentage getWalletSplit() {\n return walletSplit_ == null ? io.lightcone.data.types.Percentage.getDefaultInstance() : walletSplit_;\n }", "public io.lightcone.data.types.Percentage getWalletSplit() {\n if (walletSplitBuilder_ == null) {\n return walletSplit_ == nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ForkNode__Group_3__3__Impl" $ANTLR start "rule__ForkNode__Group_4__0" InternalActivityDiagram.g:4001:1: rule__ForkNode__Group_4__0 : rule__ForkNode__Group_4__0__Impl rule__ForkNode__Group_4__1 ;
public final void rule__ForkNode__Group_4__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalActivityDiagram.g:4005:1: ( rule__ForkNode__Group_4__0__Impl rule__ForkNode__Group_4__1 ) // InternalActivityDiagram.g:4006:2: rule__Fork...
[ "public final void rule__ForkNode__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:3838:1: ( rule__ForkNode__Group__4__Impl )\n // InternalActivityDiagram.g:3839:2: rule__ForkNode__Group__4__Im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return a tree of properties that connect this parameter to input parameters and their subparameters by following OutputToInputRelations.
public core.util.Node<Property> getIORelPropertyTree(core.util.Node<Property> parent){ LinkedList<Property> properties; Iterator<Property> propertyIt; LinkedList<core.util.Node<Property>> propertyNodes; Iterator<core.util.Node<Property>> propertyNodeIt; properties = (LinkedList<Property>)listDirectIORe...
[ "@Override\n\tpublic core.util.Node<Pair<Parameter, Property>> asTree(){\n\t\t\n\t\tcore.util.Node<Pair<Parameter, Property>> node =\n\t\t\t\tnew NodeFactory<Pair<Parameter,Property>>().create(\n\t\t\t\t\tnew ImmutablePair<Parameter, Property>(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tthis.fromProperty\n\t\t\t\t\t));\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of scrivanias where userId = &63; and profileFlag = &63;.
public static int countByU_P(long userId, boolean profileFlag) { return getPersistence().countByU_P(userId, profileFlag); }
[ "public static int countByU_H_P(long userId, boolean homeFlag,\n\t\tboolean profileFlag) {\n\t\treturn getPersistence().countByU_H_P(userId, homeFlag, profileFlag);\n\t}", "long countUsersByProfilePhoto(KivbookImage profilePhoto);", "public static List<Scrivania> findByU_P(long userId, boolean profileFlag) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
methods / This method returns the collection of boxes specific to the profile
public ArrayList<Box> getBoxes() { return boxes; }
[ "ArrayList<Model.Box> getListOfBox();", "public List<Box> getBoxes() {\r\n\t\treturn boxes;\r\n\t}", "public ArrayList<Box> getBoxes() {\n Log.d(TAG, \"getBoxes: id: \" + mCurrentDrawingId + \" size: \" + getBoxes(mCurrentDrawingId).size());\n return getBoxes(mCurrentDrawingId);\n }", "ArrayL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests ObjectNodegetIsStereotypesVisible() for accuracy. It verifies ObjectNodegetIsStereotypesVisible() is correct.
public void testGetIsStereotypesVisible() { assertTrue("Failed to get the stereotypes visible correctly.", objectNode.getIsStereotypesVisible()); }
[ "public void testSetIsStereotypesVisible() {\n objectNode.setIsStereotypesVisible(false);\n assertFalse(\"Failed to set the stereotypes visible correctly.\", objectNode.getIsStereotypesVisible());\n }", "final boolean hasStereotypes()\r\n {\r\n return !this.stereotypes.isEmpty();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method for converting an user object to byte array
public byte[] ObjecttoByte(User user) throws IOException { ByteArrayOutputStream out = null; ObjectOutputStream os = null; try{ out = new ByteArrayOutputStream(); os = new ObjectOutputStream(out); Log.e("ObjectOutputStream", os.toString()); os.writ...
[ "public abstract byte[] toByteArray();", "private byte[] toBytes(Object object)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(bos);\r\n\t\t\t\r\n\t\t\toos.writeObject(object);\r\n\t\t\toos.flush();\r\n\t\t\t\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new algorithm instance using passed interface, and sets such instance as the algorithm in the robots of the list identified with passed index. This algorithm will be applied also the newly created robots of such list, since this moment.
public abstract void createAndSetNewAlgorithmInstance(Algorithm<P> algorithm, int index) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException;
[ "public abstract void createAndSetNewAlgorithmInstance(Algorithm<P> algorithm, SycamoreRobot<P> robot) throws IllegalArgumentException, InstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException;", "IRobotAI createAI(RobotController robotController);", "public abstract SycamoreRobot<P> cre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops checking for new tweets by Bob.
public static void stopBobWatch(){ runBobCheck = false; }
[ "public void stopFollowerTracker() {\n\trun = false;\n }", "public static void startBobWatch() {\n Thread bobThread = new Thread() {\n public void run() {\n runBobCheck = true;\n while (runBobCheck) {\n try {\n readTweet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function is used to get the instance of DJIBaseProduct. If no product is connected, it returns null.
public static synchronized DJIBaseProduct getProductInstance() { if (null == mProduct) { mProduct = DJISDKManager.getInstance().getDJIProduct(); } return mProduct; }
[ "IProductExtensions getProduct();", "protected IProduct instantiateProduct() {\n try { return getProductBaseClass().newInstance(); }\n catch(Throwable e) { throw new RuntimeException(e); }\n }", "public Product getProductObject() {\n\t\tProduct meaningProduct = new Product(1, \"Man's search for Meaning\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compute the vertex for fov(for location[x,y])
public MPolygon computeVertex_xyz(FOV f) { MPolygon mpolygon = new MPolygon(); double radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2)); double radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4)); double radian3 = MPolygon.toRadian(450 - (f.getDirection() + ...
[ "void buildCity(VertexLocation vert);", "private CalcVector getNeighborsInfluence(Student student, int x, int y) {\n \t\t// neighbor ( inf(Neighbor) * state(studentLeft) * neighbor + inf(Neighbor) * state(studentRight) * ... )\n \t\t\n \t\t// x x x factor for each relative position to the student\n \t\t// x o x\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Marks the leaf "currentsubscribers" with operation "create".
public void markCurrentSubscribersCreate() throws JNCException { markLeafCreate("currentSubscribers"); }
[ "Subscriber create(Subscriber subscriber);", "public void addCurrentSubscribers() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"current-subscribers\",\n null,\n childrenNames());\n }", "public void markUtilizedCreate() throws JNCException {\n markLeafC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get custom fluid mesh for block, if defined (null if not)
public final RenderPatch[] getCustomFluidMesh() { long key = this.mapiter.getBlockKey(); /* Get key for current block */ return (RenderPatch[])custom_fluid_meshes.get(key); }
[ "public final RenderPatch[] getCustomMesh() {\r\n long key = this.mapiter.getBlockKey(); /* Get key for current block */\r\n return (RenderPatch[])custom_meshes.get(key);\r\n }", "Mesh getMesh();", "Fluid getFluid();", "LocalMaterialData withDefaultBlockData();", "@Override\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor method to create LED
public LED() throws Exception { this.setCenterX(100); this.setCenterY(100); this.setRadius(7); final Effect glow = new Glow(0.2); this.setStroke(Color.BLACK); this.setStrokeWidth(1); this.setEffect(glow); onGradient = new RadialGradient(60, .1, 97, 97, 7, ...
[ "public LED()\n {\n this(defaultPin);\n }", "public LEDMeter() {\r\n\t\t\r\n\t\tthis(13, 100, \"LED Meter\", 50);\r\n\t}", "public Limelight() {\n ledRing = new Solenoid(RobotMap.PDP2ID, RobotMap.LEDRingID);\n }", "public LED(int pin)\n {\n // Pin allocation is handled by a GpioCont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Data Item'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseDataItem(DataItem object) { return null; }
[ "public T caseItem(Item object) {\n\t\treturn null;\n\t}", "protected ItemData getSiebelItem() throws MappingException {\n Object rawObject = mAttributes.get(ImportConstants.SIEBEL_ITEM);\n if (!(rawObject instanceof ItemData)) {\n String[] messageArguments = { \"rawObject is not an ItemData\" };\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }