query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Get the fileEntityIds property: The File entity ids of this mail message's attachments.
public List<String> fileEntityIds() { return this.innerProperties() == null ? null : this.innerProperties().fileEntityIds(); }
[ "public List<File> getAttachments() {\r\n\t\treturn attachments;\r\n\t}", "List<File> getAttachments();", "public Set<String> getFileIds() {\n return entries.keySet();\n }", "@ApiModelProperty(value = \"The set of file handle ID of attached files to this request.\")\n\n\n public List<String> getAtt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the key at the specified index. The key should be immutable. If it is not then it must not be changed.
public String getKey(int index) { return keys[index]; }
[ "public int getKey(int index) {\n return key[index];\n }", "String getKey(int index);", "protected final int getKey(int index) {\n return getKeys().get(index);\n }", "public K getKey(final int index) {\n return keys[index];\n }", "org.chromium.components.sync.protocol.NigoriKey...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs an inner join, i.e. the result table contains all examples from the source example sets whose key attributes match.
private ExampleSetBuilder performInnerJoin(ExampleSet leftExampleSet, ExampleSet rightExampleSet, List<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList, Pair<Attribute[], Attribute[]> keyAttributes) throws ProcessStoppedException { ExampleSetBuilder builder = ExampleSets.from(unionA...
[ "private ExampleSetBuilder performRightJoin(ExampleSet leftExampleSet, ExampleSet rightExampleSet,\n\t\t\tList<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tPair<Attribute[], Attribute[]> keyAttributes) throws ProcessStoppedException {\n\t\tExampleSetBuilder builder = Example...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the star level.
@JsonIgnore public StarEnergyLevel getStarLevel(MajorStar majorStar) { return majorStarEnergy.get(majorStar); }
[ "public int getStar() {\n return star_;\n }", "public Integer getStar() {\n return star;\n }", "public Long getStar() {\n return star;\n }", "double getLevel();", "int getStar();", "public Integer getStarCount() {\n return starCount;\n }", "public Integer getSta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use BackoutSchoolFeedBackRequest.newBuilder() to construct.
private BackoutSchoolFeedBackRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private BackoutSchoolFeedBackResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetSchoolFeedBackListRequst(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private BackoutSchoolFeedBackReplyRequest(com.goo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is the CONVERT function between SQL types supported?
public boolean supportsConvert() throws SQLException { return true; }
[ "public boolean supportsConvert(\n int fromType,\n int toType)\n throws SQLException\n {\n // The SimpleText driver does not support the CONVERT function\n\n return false;\n }", "public boolean supportsConvert(int fromType, int toType)\n throws SQLException\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method accepts a String as a question, and then finds the index of that question in the questionArray. Since the answer choices are stored in parallel to their corresponding questions, the method then uses that index to return the answer choices of the question. If the question does not exist in the array, the met...
public String getAnswerChoice(String q) { int index = getIndex(q); if (index != -1) return answerChoicesArrayList.get(index); return "That is not a valid question!"; }
[ "public String getAnswer(String q) {\n\t\t\n\t\tint index = getIndex(q);\n\t\tif (index != -1)\n\t\t\treturn answersArrayList.get(index);\n\t\t\n\t\treturn \"That is not a valid question!\";\n\t}", "public static Answer ask(String question) {\n Log.l(\"Asking question : \",question);\n for(QuestionT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all tasks where the given User is the task requester.
public abstract List<Task> findTasksByRequester(User requester) throws IOException;
[ "public abstract List<Task> findTasksByRequester(User requester, TaskStatus... statuses) throws IOException;", "public List<Task> getAllTasksForUser(long userId);", "public List<TaskInstance> getListTasksUser(final long userId);", "@Override\n\tpublic List<Task> findByUserId(long userId) {\n\t\treturn findByU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a dynamic table for the expert view, in which all filter options are available, and a userfriendly view in which only the important or necessary filter options are available.
protected void appendDynamicTable(final String id, boolean showProgramSelector, boolean showFilterSelector) { final List<TablePojo> EXPERT_LIST = getTableElements(id, showProgramSelector, showFilterSelector, true); final List<TablePojo> USERFRIENDLY_LIST = getTableElements(id, showProgramSelector, showFilterSelect...
[ "private void createTableViewer() {\r\n\t\t\r\n\t\ttableViewer = new TableViewer(table);\r\n\t\ttableViewer.setUseHashlookup(true);\r\n\t\t\r\n\t\ttableViewer.setColumnProperties(columnNames);\r\n\t\t\r\n\t\t// Set the default sorter for the viewer \r\n\t\ttableViewer.setSorter(new TraceabilityMatrixSorter(Traceabi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The day and mechanic which were PREVIOUSLY on this work order get passed to this function. Here we load ALL the work order entries for this day and this mechanic into an array. This is done because if THIS entry has changed mechanic or day, then there will be a missing job order sequence on the day/mechanic from which ...
private void updateJobSequencesByDayAndMechanic( String sPreviousMechanicID, String sPreviousDayAsMdYYYY, Connection conn, String sUserFullName, String sUserID, SMLogEntry log, int iSavingFromWhichScreen, ServletContext context) throws Exception{ String SQL = "SEL...
[ "void upgrade(IRmJob j, int oldOrder, int newOrder) {\n \tMap<IRmJob, IRmJob> ojobs;\n \tojobs = jobsByOrder.get(oldOrder);\n \tojobs.remove(j);\n \t\n ojobs = jobsByOrder.get(newOrder);\n if (ojobs == null) {\n ojobs = new HashMap<IRmJob, IRmJob>();\n jobsByOrder.put...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'SPT_PGM_CODE' field.
public java.lang.CharSequence getSPTPGMCODE() { return SPT_PGM_CODE; }
[ "public java.lang.CharSequence getSPTPGMCODE() {\n return SPT_PGM_CODE;\n }", "public void setSPTPGMCODE(java.lang.CharSequence value) {\n this.SPT_PGM_CODE = value;\n }", "public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCDC_NCS_TCS_SHOWS.Builder setSPTPGMCODE(java.lang.CharSequence value) {\n valid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Installs a library from a repo
public void install(String groupId, String artifactId, String version, Repository repo) { MavenLibrary mavenLibrary = new MavenLibrary(this, groupId, artifactId, version, repo.getUrl()); mavenLibrary.install(); libraries.add(mavenLibrary); }
[ "void installBundle(String artifactUrl, String connection)\n throws Exception;", "public void install(String groupId, String artifactId, String version, String url) {\n MavenLibrary mavenLibrary = new MavenLibrary(this, groupId, artifactId, version, url);\n mavenLibrary.install(url);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a formatted timestamp of the time at which this authentication expires
public String expiresAt() { return LfsDateTime.format(issued.plusSeconds(expiresIn)); }
[ "public Long expirationTimestamp() {\n return expiresAt.timestamp();\n }", "String getTimeLastLogin();", "String getAccountExpirationTime();", "public final long getAuthenticationExpireTime()\n {\n return m_authExpiresAt;\n }", "java.lang.String getLoginTime();", "java.lang.String getManu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show the fortify info in the panel
private void displayFortify() { fortifyPanel.setVisible(true); attackPanel.setVisible(false); ArrayList<Territory> fromTerritories; lblFortPlayer.setText(currentPlayer.getName()); fromTerritories = currentPlayer.getOwnedTerritories(); String[] fromTerrNames = new String[fromTerritories.size()]; ...
[ "private void showInsertInfo() {\n Image image = new Image(getClass().getResourceAsStream(Path.INFO_ICON));\n ImageView imageView = new ImageView();\n imageView.setImage(image);\n imageView.setFitHeight(30);\n imageView.setFitWidth(30);\n imageView.setPreserveRatio(true);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Login to the specified server using username, password, and workgroup. Handles error representation as well as logging. Should _not_ be called from the Event Dispatcher Thread.
private void login() { Log.debug("Start login"); if (localPref.isDebuggerEnabled()) { SmackConfiguration.DEBUG = true; } // The Event Dispatcher Thread should only be used for fast tasks. Network IO is not one of those. if (SmackConfiguration.DEBUG && EventQueue.isD...
[ "public void serverLogin() {\n\n\t\tString projectName = null;\n\n\t\tdo{\n\t\t\tString path = CIGetResourceSaveLocationDialog.showDialog(this, this,\"\",\"pmlj\"); //URI\n\t\t\tpath = \"http://rio.cs.utep.edu/ciserver/ciprojects/pmlj/\";\n\n\t\t\tint CIServerID = CIKnownServerTable.getInstance().ciGetServerEntryFr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the _BIC_ZZB05 value for this _BIC_AZMDYX0000.
public java.math.BigDecimal get_BIC_ZZB05() { return _BIC_ZZB05; }
[ "public void set_BIC_ZZB05(java.math.BigDecimal _BIC_ZZB05) {\r\n this._BIC_ZZB05 = _BIC_ZZB05;\r\n }", "public java.math.BigDecimal get_BIC_ZZB04() {\r\n return _BIC_ZZB04;\r\n }", "public java.lang.String get_BIC_ZBMBM() {\r\n return _BIC_ZBMBM;\r\n }", "public java.math.BigDec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of isValidDecimal method, of class FieldVerifier.
@Test public void testIsValidDecimal() { FieldVerifier service = new FieldVerifier(); boolean result = service.isValidDecimal(1); assertEquals(true, result); }
[ "@Test\n public void testIsNotValidDecimal2() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidDecimal(0);\n assertEquals(false, result);\n }", "@Test\n public void testIsNotValidDecimal() {\n FieldVerifier service = new FieldVerifier();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
9020DB2CHECK (TRANSACCIONAL) VARIANTE PARA PROGRAMAS COM COMMAREAS ESPECIFICAS
public void m9020Db2check() { bhtw0007().indicadoresErro().cTipoErroBbn().set(" "); bhtw0007().indicadoresErro().aAplErr().set(" "); bhtw0007().indicadoresErro().cRtnoEvenSwal().set(0); bhtw0005().cSqlcode().set(getPersistenceCode()); if (!getSqlMessage().isEmpty()) { ...
[ "@Test\n public void testCheckTriType() {\n System.out.println(\"checkTriType\");\n double[] a = {1 , 5 , 4 , 100};\n double[] b = {1 , 5 , 3 , 5 };\n double[] c = {1 , 8 , 2 , 6 };\n SVV01 instance = new SVV01();\n String[] expResult = {\"Equilateral Triangle\",\"Isosce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders all the shapes in the given list.
void drawShapes(List<IReadOnlyShapeState> shapes);
[ "void draw(List<IColoredShape> shapes);", "private String drawAllShapes() {\n\n /*\n Have list of list for each shape and the motions of each shape\n Need to iterate through the frames and for each motion in a frame\n add it to the corresponding shape in the list of lists\n */\n StringBuilder s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
read server conf and return as jsonobject
private JsonObject getServerConf(String filename) { Path path = Paths.get(filename); try { String data = new String(Files.readAllBytes(path)); return new JsonObject(data); } catch (Exception e) { logger.error(e); } return null; }
[ "private JsonObject loadConfig() {\n\t\tJsonObject config = loadConfigFromURL();\n\t\tif(config == null){\n\t\t\tString configFile = System.getProperty(VERTX_CONFIG_FILE);\n\t\t\treturn loadConfigFromFile(configFile);\n\t\t} else {\n\t\t\treturn config;\n\t\t}\n\t\t\n\t}", "protected void readConfigFile(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Called via event handling when the game is over. Inhibits further downward movement of the tetrominoe by cancelling and purging queue of associated timer. Redisplays the settings dialog so that gameplay may be restarted.
@Override public void setGameOver() { gameOver = true; moveCurrentPieceDownward.cancel(); //obfuscated //obfuscated settingsDialog.toFront(); }
[ "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tif(!gameOverBool){\n\t\t\ttry{\n\t\t\t\tsoundHandler.getSoundPool().autoPause();\n\t\t\t\tsoundHandler.getSoundPool().release();\n\t\t\t\tgarbagegame.stopGame();\n\t\t\t\tLog.d(\"On Stop\", \"Called cancel timers\");\n\t\t\t} catch(Exception e) {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method calculate Price Order
public void calculatePriceOrder() { log.info("OrdersBean : calculatePriceOrder!"); this.priceOrder = 0; for (ContractsEntity c : contractsBean.getContractsEntities() ) { this.priceOrder += c.getFinalPrice(); } }
[ "public int computeOrderPrice();", "public double discountedPrice(Order order);", "BigDecimal calculateTotalPrice(Order order);", "public double calculatePrice(Order order){\r\n return order.quantity * order.itemPrice -\r\n Math.max(0, order.quantity - 500) * order.itemPrice * 0.05 +\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display the end of the game by writing the name of the winner.
public void displayEndOfGame(Player winnerPlayer) { System.out.println("Félicitations ! Le joueur " + winnerPlayer.getName() + " a gagné la partie !"); }
[ "public void printEndGameMsg()\n\t{\n\t\tString endOfGame=\"\";\n\t\t\n\t\tfor(int i=0; i<game.getNumOfPlayers(); ++i)\n\t\t{\n\t\t\tendOfGame+=game.getPlayerList().get(i).getName()+\": \";\n\t\t\t\n\t\t\tif(game.getPlayerList().get(i).getNumOfCards()!=0)\n\t\t\t{\n\t\t\t\tfor(int j=0; j<game.getPlayerList().get(i)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'var108' field.
public java.lang.CharSequence getVar108() { return var108; }
[ "public java.lang.CharSequence getVar108() {\n return var108;\n }", "public java.lang.Integer getVar109() {\n return var109;\n }", "public java.lang.Integer getVar109() {\n return var109;\n }", "public void setVar108(java.lang.CharSequence value) {\n this.var108 = value;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Without this overridden method, the SpringSecurity standard loginform and error messages will be used! Just enter context root to get to login page (with or without custom login) "antMatchers" ...Configure Spring Security to allow unauthenticated requests (permit all) to the "/css" directory
@Override public void configure(HttpSecurity httpSecurity) throws Exception { httpSecurity.authorizeRequests() .antMatchers("/css/**").permitAll() // for css folder .antMatchers("/").hasRole("EMPLOYEE") .antMatchers("/leaders/**").hasRole("MANAGER") .antMatchers("/systems/**").hasRole("ADMIN"...
[ "@Override\n protected void configure(HttpSecurity httpSecurity) throws Exception { We require that requests to any path require authentication\n // and the authenticated user must have the USER role.\n //\n httpSecurity.authorizeRequests()\n .antMatchers(\"/**\")\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the messages of all the nested exceptions, as one string. If the elideNewlines parameter is true, then the messages are joined so that there are no newlines in the resulting string. Otherwise, (a) any existing newlines in the messages are preserved, and (b) each nested message occupies its own line.
public String getMessages(boolean elideNewlines) { return getMessages(elideNewlines, null); }
[ "public String getMessages(boolean elideNewlines, Locale locale)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n Throwable ex = this;\n StringBuffer buf = null;\n\n if (locale == null)\n locale = Locale.getDefault();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if any of the provided file paths were modified after the given date.
private boolean anyModifiedAfter(ArrayList<String> templatePaths, long lastModified) { for (String tp : templatePaths) { if (new File(tp).lastModified() > lastModified) { return true; } } return false; }
[ "private boolean isOutOfDate(File t, Collection l) {\n Iterator iter = l.iterator();\n while (iter.hasNext()) {\n File f = (File) iter.next();\n if (t.lastModified() < f.lastModified()) {\n return true;\n }\n }\n return false;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines the interface for an Iterator which provides access to data one entry at a time. Multiple implementations are provided by this library. In particular, iterators are provided to access the contents of a DB and Write Batch. Multiple threads can invoke const methods on an RocksIterator without external synchroniza...
public interface RocksIteratorInterface { /** * <p>An iterator is either positioned at an entry, or * not valid. This method returns true if the iterator is valid.</p> * * @return true if iterator is valid. */ boolean isValid(); /** * <p>Position at the first entry in the source. The iterato...
[ "public interface IteratorI {\n /**\n * Returns the boolean value \"true or false\" if the Data-Structure has elements\n * to be iterated or not\n * \n * @return - Boolean value \"true or false\"\n */\n public boolean hasNext();\n\n /**\n * Returns the next element that is iterated\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The CSS inline style of the label.
public String getLabelStyle() { return (String) getStateHelper().eval(PropertyKeys.labelStyle); }
[ "public String getLabelStyle() {\n return labelStyle;\n }", "public int getLabelStyle() {\n return labelStyle;\n }", "public String getLabelStyleClass() {\n\t\treturn (String) getStateHelper().eval(PropertyKeys.labelStyleClass);\n\t}", "final public String getInlineStyle()\n {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method can be used to send data to the Comparer tool.
void sendToComparer(byte[] data);
[ "public void send(Object data) {\n eventLoop.submit(new Event<Object>() {\n @Override\n public Object call() throws Exception {\n Message message=new Message(data);\n boolean isHandleSuccessfully=pipeLine.handleOutputMessage(ClientChannel.this,message);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets anchor part for the redirect target.
public RedirectTarget withAnchor(String anchor) { this.anchor = anchor; return this; }
[ "public void setAnchor(Instance anchor) {\n this.anchor = anchor;\n }", "public void setAnchorToTarget(Boolean anchorToTarget) {\n\t\tthis.anchorToTarget = anchorToTarget;\n\t\tthis.handleConfig(\"anchorToTarget\", anchorToTarget);\n\t}", "public TimelineElement setAnchor(String anchor) {\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set extra with value to indicate it is single player
private void singlePlayer(View v){ intent.putExtra("IS_SINGLE_PLAYER",1); startActivity(intent); }
[ "public void setSingleplayer(boolean singleplayer) {\n this.singleplayer = singleplayer;\n }", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "public void setPlayer(PlayerType player){\n this.player = player;\n }", "private void setFirstPlayer() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by the base class to add external identifiers to the meta data.
protected void addExternalIdentifiersFromEbXML(C metaData, E ebXML) { var patientID = ebXML.getExternalIdentifierValue(patientIdExternalId); metaData.setPatientId(Hl7v2Based.parse(patientID, Identifiable.class)); metaData.setUniqueId(ebXML.getExternalIdentifierValue(uniqueIdExternalId)); ...
[ "protected void addExternalIdentifiers(C metaData, E ebXML, EbXMLObjectLibrary objectLibrary) {\r\n var patientID = Hl7v2Based.render(metaData.getPatientId());\r\n ebXML.addExternalIdentifier(patientID, patientIdExternalId, patientIdLocalizedString); \r\n ebXML.addExternalIdentifier(meta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transforms the given TLParamLocation value.
private ParamLocation transformLocation(TLParamLocation sourceLocation) { ParamLocation location; if (sourceLocation != null) { switch (sourceLocation) { case HEADER: location = ParamLocation.HEADER; break; case PATH: ...
[ "private TextLocation convertLocation(SourceLocation location)\n {\n if (location == null) {\n return null;\n }\n\n return new TextLocation(location.getLine() - 1, location.getColumn() - 1);\n }", "public String locationWithLangCode(String location) {\n if (location ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub Toast.makeText(Map1Activity.this, "Plan: " + arg0.getSelectedItem().toString(), Toast.LENGTH_LONG).show();
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) { String selected = plans[arg2]; final String pid = selected.substring(0,3); if (pid.contains("--")) { displayText.setText(pid); } else { Toast.m...
[ "private String selectedPlan(ViewHolder viewHolder) {\n switch (viewHolder.selectedPlan.getText().toString()) {\n case \"select this plan (£1.99)\":\n return \"bronze\";\n case \"select this plan (£3.99)\":\n return \"silver\";\n case \"select th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Here in the main method fill in the code that outlined to read xml data parsed into 2 separate ArrayList, then store into map. Once map has all data, retrieve those data and out put to console. Do any necessary steps that require for below successful output. ................................................. Student (...
public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException ,NullPointerException{ try { //Path of XML data to be read. String pathSelenium = "C:\\Users\\Zaqc\\CoreNDSExamJuly2016\\src\\xml\\parser\\selenium.xml"; String pathQtp = "C:\\Users\\Zaqc\\CoreNDSExamJuly2016\\src...
[ "private void loadData() throws Exception {\n List<Student> listOfStudents = new ArrayList<>();\n DocumentBuilderFactory documentBuilderFactory =\n DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder =\n documentBuilderFactory.newDocumentBuild...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User storage functions specification.
public interface UserStorage { public void add(User user); public void put(User user); public User get(String username); public void remove(String username); public List<User> list(); public List<User> list(int pageNo, int pageSize); }
[ "public interface Storage {\n\n\t/**\n\t * Gets the name of the storage.\n\t * \n\t * @return the name of this storage\n\t */\n\tString getName();\n\n\t/**\n\t * Gets the total capacity of the storage in MByte.\n\t * \n\t * @return the capacity of the storage in MB\n\t */\n\tdouble getCapacity();\n\n\t/**\n\t * Get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the 1905 AL MAC Address.
public AL withIeeE1905Id(MACAddress ieeE1905Id) { this.ieeE1905Id = ieeE1905Id; return this; }
[ "public void setIeeE1905Id(MACAddress ieeE1905Id) {\n\t\tthis.ieeE1905Id = ieeE1905Id;\n\t}", "Builder setArpTha(MacAddress addr);", "public AtMac() throws EapSimAkaInvalidAttributeException {\n this(new byte[MAC_LENGTH]);\n }", "public abstract void setAlmacen_sap(java.lang.String newAlmac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Program__Group__5" $ANTLR start "rule__Program__Group__5__Impl" InternalReflex.g:2513:1: rule__Program__Group__5__Impl : ( ( rule__Program__Alternatives_5 ) ) ;
public final void rule__Program__Group__5__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalReflex.g:2517:1: ( ( ( rule__Program__Alternatives_5 )* ) ) // InternalReflex.g:2518:1: ( ( rule__Program__Alternatives_5 )* ) ...
[ "public final void rule__S_Definition__Group__5__Impl() throws RecognitionException {\n int rule__S_Definition__Group__5__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 421) ) { r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets done as true.
public void done() { done = true; }
[ "public void setDone(boolean done) {\r\n this.done = done;\r\n }", "public void done() {\n isDone = true;\n }", "public void setDone(boolean value) {\r\n this.done = value;\r\n }", "public void setDone(boolean value) {\n this.done = value;\n }", "public void markAsDon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Consulta que retorna a quantidade de Movimento Roteiro Empresa por FaturamentoGrupo e AnoMesReferencia.
public Integer obterQuantidadeMovimentoRoteiroPorGrupoAnoMes(Integer idFaturamentoGrupo, Integer anoMesReferencia) throws ErroRepositorioException;
[ "public Double getTotalesIngresosEgresos( int noEmpresa, int idBanco, String idChequera, String fecValor, String idTipoMovto) {\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\t\r\n\t\tDouble list = 0.0;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t\r\n\t\t \r\n\t\t sql.append(\"select COALESCE(SUM(M.importe), 0)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new DoubleTable with rows reordered according to the given list.
public DoubleTable orderRowsBy(List newOrder){ DoubleTable newt = new DoubleTable(rows(),cols()); newt.colNames = colNames.clone(); newt.rowNames = new String[rows()]; for(int r =0;r < rows();r++){ int oldr = ((int)newOrder.get(r)); newt.rowNames[r] = rowNames[oldr]; for(int c = 0;c < cols();c++){ ...
[ "public DoubleTable orderColumnsBy(List newOrder){\t\t\t\n\t\tDoubleTable newt = new DoubleTable(rows(),cols());\n\t\tnewt.rowNames = rowNames.clone();\n\t\tnewt.colNames = new String[cols()];\n\t\tfor(int c =0;c < cols();c++){\n\t\t\tint oldc = ((int)newOrder.get(c));\n\t\t\tnewt.colNames[c] = colNames[oldc];\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ModuleAST__Group_1__0" $ANTLR start "rule__ModuleAST__Group_1__0__Impl" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3766:1: rule__ModuleAST__Group_1__0__Impl : ( 'mixin' ) ;
public final void rule__ModuleAST__Group_1__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3770:1: ( ( 'mixin' ) ) ...
[ "public final void rule__Module__Group_0_2__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:4999:1: ( rule__Module__Group_0_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use SaveRegionsRequest.newBuilder() to construct.
private SaveRegionsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private SaveRegionsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "Builder addEligibleRegion(String value);", "public void save() {\n RegionOwn.saveRegionOwner(this);\n }", "Builder addIneligibleRegion(String value);", "@Override\n \tpublic b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the getListOfNodes() method returns the listOfNodes of this Graph.
public LinkedList<Node> getListOfNodes(){ return this.listOfNodes; }
[ "public List nodes()\n\t{\n\t\t// List<GraphNode>\n\t\treturn nodes ;\n\t}", "List<Node> getNodes();", "public List<Node> nodes() {\n return this.nodes;\n }", "@Override\r\n\tpublic List<N> getNodes() {\n\t\tList<N> nodeList = new ArrayList<N>();\r\n\t\tnodeList.addAll(adjacencyMap.keySet());\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Count duplicates by skipping over the entries in the dup set key range.
private int countHandleDups() { final byte[] currentKey = cursorImpl.getCurrentKey(); final DatabaseEntry twoPartKey = DupKeyData.removeData(currentKey); final Cursor c = dup(false /*samePosition*/); try { c.setNonCloning(true); setPrefixConstraint(c, currentKey)...
[ "protected Integer countDupEntries(){\n return this.dupEntries;\n }", "private long countEstimateHandleDups() {\n final byte[] currentKey = cursorImpl.getCurrentKey();\n final DatabaseEntry twoPartKey = DupKeyData.removeData(currentKey);\n\n final Cursor c1 = dup(false /*samePositio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the character's total attack power (considering items and effects).
int getAttackPower();
[ "@Override\r\n\tpublic double getAttackPower() {\r\n\t\tdouble actualAttackPower = mAttackPower;\r\n\t\tif (mSkill.getType() == SkillType.Active && mSkillActive && hasEnoughMana())\r\n\t\t\tactualAttackPower *= 1.6;\r\n\t\treturn actualAttackPower;\r\n\t}", "public int getAttackPower() {\n return attackPow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a system to the scene.
public void addSystem(SceneSystem system) { systems.addSystem(system); }
[ "public void addSystem(ISystem system)\n {\n if (system.start(this))\n {\n systems.add(system);\n }\n }", "@FXML\n private void createSystemClicked() {\n final EcdarSystem newSystem = new EcdarSystem();\n\n UndoRedoStack.pushAndPerform(() -> { // Perform\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a column header name, will return the index position of the column, or null if the column is not present.
protected Integer getColumnIndex(String header){ for (Map.Entry<String, Integer> entry: headerMap.entrySet()){ if (header.toLowerCase().equals(entry.getKey().toLowerCase())) return entry.getValue(); } return -1; }
[ "int getColumnIndex(String name);", "protected Integer getColumnIndex(String header, boolean caseSensitive){\n if (caseSensitive) return headerMap.getOrDefault(header, -1);\n else return getColumnIndex(header);\n }", "public int getIndex(String headerName) throws IOException {\n checkClosed();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a clone of the StringStack that can be modified without affecting original
public StringStack clone() { StringStack clonedStack = new StringStack(); nodePtr = top; while (nodePtr!=null) { clonedStack.push(nodePtr.getData()); nodePtr = nodePtr.getLink(); } return clonedStack; }
[ "public Stack CloneStack() {\n\t\tStack ClonedStack = new ImprovedStackImpl();\n\t\tfor(int i = this.size(); i > 0; i--) {\n\t\t\tClonedStack.push(this.myStack.get(i-1).getReturnValue());\n\t\t}\n\t\treturn ClonedStack;\n\t}", "private static Stack<PrimeNode> clone(Stack<PrimeNode> stack) {\n\t\tStack<PrimeNode> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to merge cell
public static void mergeCells(Sheet sheet, int firstRow, int lastRow, int firstCol, int lastCol) { sheet.addMergedRegion(new CellRangeAddress( firstRow, //first row (0-based) lastRow, //last row (0-based) firstCol, //first column (0-based) lastCol...
[ "public CELLTYPE join(CELLTYPE... cells) {\n assert cells.length > 1 : \"You need to merge at least 2 cells\";\n\n return join(new HashSet<CELLTYPE>(Arrays.asList(cells)));\n }", "void merge();", "public void mergeCells(int intFirstRow, int intLastRow, int intFirstCol, i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method should delete an entity in BooksAuthors Table (Many to Many)
@Override public void deleteBooksAuthors(Booksauthors bookAndAuthors) { Booksauthors booksAuthors = em.find(Booksauthors.class, bookAndAuthors.getId()); if(booksAuthors != null) { em.remove(booksAuthors); } }
[ "void remove(ReferenceHasAuthor entity);", "public boolean deleteAuthorById(int id);", "public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new delete index request for the specified index.
public DeleteIndexRequest(String index) { this.indices = new String[] { index }; }
[ "public DeleteIndexRequest(String... indices) {\n this.indices = indices;\n }", "public void deleteIndex(Index index) {\n Span span = this.tracer.buildSpan(\"Client.DeleteIndex\").start();\n try {\n String path = String.format(\"/index/%s\", index.getName());\n client...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the integer is 32bit.
private static boolean isInt32(final long value) { return (Integer.MIN_VALUE <= value && value <= Integer.MAX_VALUE); }
[ "public boolean is32bit() {\n\t\treturn true;\n\t}", "boolean hasInt32Value();", "boolean hasSint32Value();", "boolean hasSfixed32Value();", "boolean hasFixed32Value();", "public boolean is32bitPrecision() {\n return is32bitPrecision;\n }", "boolean isLittleEndian();", "public boolean hasVar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests ctor DbProjectManagerDAODbProjectManagerDAO(String,DBConnectionFactory, String,AuditManager) for failure. It tests the case that when connName is empty and expects IllegalArgumentException.
public void testCtor_EmptyConnName() throws Exception { try { new DbProjectManagerDAO(" ", dbFactory, TestHelper.SEARCH_NAMESPACE, "ProjectManagerSearchBundle", auditManager); fail("IllegalArgumentException expected."); } catch (IllegalArgumentException iae)...
[ "public void testCtor_NullConnName() throws Exception {\r\n assertNotNull(\"Failed to create a new DbProjectManagerDAO instance.\", new DbProjectManagerDAO(null, dbFactory,\r\n TestHelper.SEARCH_NAMESPACE, \"ProjectManagerSearchBundle\", auditManager));\r\n }", "public void testCtor_NullConnF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tells given PixelStream to copy a selection, tells ImageController to store the selection as a PixelStream, and tells GuiController to add it to the Layers.
public void copySelection(PixelStream pixelStream){ String message = "Duplicate selection: " + pixelStream.getSelectionS() + " to " + pixelStream.getSelectionE() + " from " + pixelStream.getTitle(); saveActionUndo(message, Action.CHANGE_STREAM, pixelStream); PixelStream copy = imageController.copySelectionToNe...
[ "public void cutSelection(PixelStream pixelStream){\n\t\tString message = \"Extracting selection: \" + pixelStream.getSelectionS() + \" to \" + pixelStream.getSelectionE() + \" from \" + pixelStream.getTitle();\n\t\tsaveActionUndo(message, Action.CHANGE_STREAM, pixelStream);\n\t\t\n\t\tPixelStream copy = imageContr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of GestionarTipoPersona
public GestionarTipoPersona() { }
[ "public CrearPersona() {\n initComponents();\n this.persona = persona;\n \n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public void crearPersonas() {\r\n\r\n Personas pe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parent access Retrieve the unmanaged rack where the machine is.
public Rack getRack() { RESTLink link = checkNotNull(target.searchLink(ParentLinkName.RACK), ValidationErrors.MISSING_REQUIRED_LINK + " " + ParentLinkName.RACK); ExtendedUtils utils = (ExtendedUtils) context.getUtils(); HttpResponse response = utils.getAbiquoHttpClient().get(link); ...
[ "java.lang.String getRack();", "public RackNode getRackNode() {\n return (RackNode)getParent();\n }", "public Rack getRack(){\n return current.getRack();\n }", "public java.lang.String getRack() {\n java.lang.Object ref = rack_;\n if (!(ref instanceof java.lang.String)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of l m s leave informations where isDraft = &63;.
@Override public int countByDrafts(String isDraft) throws SystemException { FinderPath finderPath = FINDER_PATH_COUNT_BY_DRAFTS; Object[] finderArgs = new Object[] { isDraft }; Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new S...
[ "@Override\n\tpublic List<LMSLeaveInformation> findByDrafts(String isDraft)\n\t\tthrows SystemException {\n\t\treturn findByDrafts(isDraft, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "org.apache.xmlbeans.XmlString xgetDrafts();", "@Override\n\tpublic long getDraftId() {\n\t\treturn model.getDraftId();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Connect this function to the Planner where it was registered
public abstract void register(UtterancePlanner planner);
[ "public void seConnecter();", "private void startAdvertising() {\n client.startAdvertising(codeName,getResources().getString(R.string.service_id), connectionLifecycleCallback, new AdvertisingOptions(STRATEGY));\n }", "public void register() \n{\n\tamsclient.register(this.agentid);\n}", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
called when the player clicks on a card anywhere on the gameboard, shows a zoom pane with a bigger version of the card
public void handleZoom(MouseEvent event){ ImageView imageView = (ImageView) event.getSource(); Image imageToShow = imageView.getImage(); zoomImage.setImage(imageToShow); zoomPane.setVisible(true); }
[ "public void showTopCard(){\n if(this.getComponentCount() == 0)\n return;\n Component[] c = this.getComponents();\n CardTexture card = (CardTexture)c[0];\n card.showCard();\n }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method used to write data to a text file
public void writeToTextFile(String filename){ try{ FileWriter myWriter = new FileWriter(filename); myWriter.write(toString()); myWriter.close(); } catch(IOException e) { System.out.println("An error occurred."); e.printStackTrace();...
[ "public static void writeToFile(String path, Text text) {\n }", "private void writeToFile(){\n //Create file object and reference FileWriter object\n File file = new File(this.hiker_DB);\n FileWriter fw = null;\n //begin try catch\n try{\n //calling file.createNewF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the size, in bytes, of the field 'sourceAddress'
public static int size_sourceAddress() { return (16 / 8); }
[ "public static int sizeBits_sourceAddress() {\n return 16;\n }", "public int getSourceLength() {\n return _sourceLength;\n }", "public int getAddressSize() {\n return targetPlatformAddressByteSize;\n }", "public static int size_source() {\n return (8 / 8);\n }", "public Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a connected graph of all of the provinces
private void createProvinceGraph() throws IOException { String content = Files .readString(Paths.get("src/unsw/gloriaromanus/province_adjacency_matrix_fully_connected.json")); // Read JSON from a file into a Map ObjectMapper provinceMapper = new ObjectMapper(); Map...
[ "@Deprecated\n public static Graph countrysideGraph(long seed, String name) {\n Random rand = new Random(seed);\n\n int minCitySize = 5;\n int maxCitySize = 20;\n\n int minNumOfCities = 10;\n int maxNumOfCities = 30;\n\n int minRoadLengthCity = 1;\n int maxRoadLen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
4 calculate and show time and mileage
private void displayEstimationTimeAndMileage(List<LatLng> listPoints){ double mileage = UtilsGoogleMaps.getMileageRoute(listPoints); if(mileage>0){ String mileageText = UtilsGoogleMaps.getMileageEstimated(listPoints); String timeText = UtilsGoogleMaps.getTimeRoute(mileage); ...
[ "private static void getSummary() {\r\n\t\tsplitOneString = mileOneTimeString;\r\n\t\tsplitTwoString = subtractTimes(mileTwoTimeString, mileOneTimeString);\r\n\t\tsplitThreeString = subtractTimes(fiveKmTimeString, mileTwoTimeString);\r\n\t\ttotalString = fiveKmTimeString;\r\n\t}", "public void calculateMMage() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User clicked the "Delete" button, so delete the plant.
public void onClick(DialogInterface dialog, int id) { deletePlant(); }
[ "private void deletePlant() {\n // Only perform the delete if this is an existing plant.\n if (mCurrentPlantUri != null) {\n // Call the ContentResolver to delete the plant at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPlantU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deserializes the provided serialized DistributedJobParameter
private DistributedJobParameter[] deserializeJobParameters(String runnableID, byte[] rawdata) { // // mClassLoader.set(mTaskContextMap.get(mCurrentRunnableID).classLoader); ClassLoader cloader = mTaskCache.get(runnableID).classLoader; Log.i(TAG, "ClassLoaderWrapper now is: " + cloader.toString()); ...
[ "public abstract T deserialize(String serial);", "void fromDeserialized(Serializable serializable);", "Object deserialize(String string);", "static public TurnState deserializeTurnState(String serialized) {\n String[] elements = serialized.split(\",\");\n long packedScore = deserializeLong(eleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method which does a hard copy of the Grading Instructions
private List<GradingInstruction> copyGradingInstruction(GradingCriterion originalGradingCriterion, GradingCriterion newGradingCriterion) { log.debug("Copying the grading instructions for the following criterion {}", originalGradingCriterion); List<GradingInstruction> newGradingInstructions = new ArrayLi...
[ "private void mutate() {\n\t\n\t\t// copy mutations\n\t\tfor (int i = 0; i < this.exe_size; i++) {\n\t\t\tif (RAND.nextDouble() < MUT_PROB_COPY) {\n\t\t\t\t// mutate to random instruction\n\t\t\t\tthis.genome[i] = RAND.nextInt(Instruction.INST_SET_SIZE);\n\t\t\t}\n\t\t}\n\t\tfor (int i = EXE_SIZE_MAX; i < GENOME_SI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the video bitrate in bits per second. If not set, the video bitrate will be unrestricted.
T setVideoBitrate(Optional<Integer> val);
[ "T setVideoBitrate(int val);", "public void setBitrate(int bitrate) {\n this.bitrate = bitrate;\n }", "public void setVideoBitRate(int arg){\n this.args.put(\"-b:v\", Integer.toString(arg)+\"k\");\n }", "T setAudioBitrate(int val);", "public org.openrtb.common.api.Video.Builder setMaxbit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates progress (0100) for the current batch job.
protected void updateProgress(Integer progress) { // Note to self: We don't bother updating the local "job" batch data batchService.updateBatchJobProgress(jobContext.getInstanceId(), progress); }
[ "public void incrementProgress(int increment);", "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Install a SurfaceHolder.Callback so we get notified when the underlying surface is created and destroyed
private void init() { SurfaceHolder holder = getHolder(); holder.addCallback(this); }
[ "public void surfaceCreated(SurfaceHolder holder) {\n mSurface = holder.getSurface();\n startARX();\n }", "@Override\n public void surfaceCreated(final SurfaceHolder surfaceHolder) {\n }", "public void attachTo(@NonNull SurfaceHolder holder) {\n if (attach(holder)) {\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility function that deletes RubyProjectElement from AWE Project This functionality copied from uDIG plugins.
private static void deleteElement(RubyProjectElement element) { RubyProject projectInternal = element.getRubyProjectInternal(); projectInternal.getRubyElementsInternal().remove(element); deleteResource(element); }
[ "private static void deleteElement(ProjectElement element) {\r\n \t\tProject projectInternal = element.getProjectInternal();\r\n projectInternal.getElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \r\n projectInternal.eResource().setMod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////////////////////// / setLineThickness Helper method ////////////////////////////////////
public static void setLineThickness(Graphics page, int thickness) { if (thickness < 0) thickness = 0; ((Graphics2D)page).setStroke(new BasicStroke(thickness)); }
[ "void setLineThickness(int thickness);", "public void setLineThickness(double lineThickness) {\n\t\tthis.lineThickness = lineThickness;\n\t}", "public abstract void setLineThickness(double thickness);", "public int getLineThickness()\r\n\t{\r\n\t\treturn _lineWidth;\r\n\t}", "final void setLinesThicknessMod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the widget names as a list. This is an example of a safe get method. Instead of returning the reference to our private mutable data directly, it is first made unmodifiable. While code in this class will still be able to mutate the data, code outside of this class will not.
public static List<String> getNames() { return Collections.unmodifiableList(widgetNames); }
[ "java.util.List<com.google.monitoring.dashboard.v1.Widget> getWidgetsList();", "public List<Widget> getWidgets() {\n return widgets;\n }", "public WidgetPanel getWidgets() {\n return _widgetPanel;\n }", "public SortedSet getJustNameOfWidgetCallbacks(){\r\n TreeSet v = new TreeSet();\r\n It...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A title for this command line value, as there may be multiple. For example, a single invocation may wish to report both the literal and canonical command lines, and this label would be used to differentiate between both versions. string command_line_label = 1;
public Builder setCommandLineLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } commandLineLabel_ = value; onChanged(); return this; }
[ "java.lang.String getCommandLineLabel();", "public java.lang.String getCommandLineLabel() {\n java.lang.Object ref = commandLineLabel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form EditarAluno
public EditarAluno() { initComponents(); }
[ "private void editar(){\n EmpleadoLogica cl = new EmpleadoLogica();\n cl.setIdempleado(this.jFTFCodigo.getText());\n cl.setNombre(this.jTFNombre.getText());\n cl.setApellido(this.jTFApellido.getText());\n cl.setTelefono(this.jFTFTelefono.getText());\n cl.setDireccion(this.j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method aims to parse an input with a custom delimiter
private static String[] parseWithCustomDelimiter(String input) { Pattern pattern = Pattern.compile(CUSTOM_DELIMITER); Matcher matcher = pattern.matcher(input); if (!matcher.matches()) { throw new InvalidCustomDelimiterException(); } String delimiter = matcher.group(1)...
[ "private static String[] parseInputWithBasicDelimiter(String input) {\n Pattern pattern = Pattern.compile(BASIC_INPUT_PATTERN);\n Matcher matcher = pattern.matcher(input);\n if (!matcher.matches()) {\n throw new InvalidInputException();\n }\n return input.split(BASIC_DE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Bruce 27 May 2014 Write instanceVector to database Precondition: instance vector has been created Input 1: featureInstanceVectorListMap contains all instance vectors Input 2: featureAttributeNameListMap contains all feature names (encoded) Input 3: filteredFeatureSelectionMap: has been created from feature selection ...
private void createInstanceVectorTable() { String table, sql, attributeName; List<InstanceVector> instanceVectorList; List<String> featureAttributeNameList; boolean hasFeatures=true; int[] numericVector; String msg; ConnectionManager.initParametersFromFile(); for (Feature featur...
[ "private void createInstanceVector(){\n\t\tif(featureInstanceVectorListMap == null){\n\t\t\tfeatureInstanceVectorListMap = new HashMap<Feature, List<InstanceVector>>();\n\t\t}else{\n\t\t\tfeatureInstanceVectorListMap.clear();\n\t\t}\n\t\t\n\t\tif(featureAttributeNameListMap == null){\n\t\t\tfeatureAttributeNameList...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the colonna corrente.
public void setColonnaCorrente(int colonnaCorrente) { this.colonnaCorrente = colonnaCorrente; }
[ "public expedidoEn.emisor.comprobante.Builder setColonia(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.colonia = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public int getColonnaCorrente() {\r\n\t\treturn colonnaCorrente;\r\n\t}", "public void setCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Smartupdates a property with a deferred value. A deferred value is used to encapsulate a value that shall be retrieved only in the rendering phase.
public void smartUpdateDeferred(String attr, DeferredValue value) { if (_page != null) getThisUiEngine().addSmartUpdate(this, attr, value); }
[ "public IProperty recontextualizeProperty(IProperty value);", "public IPropertyValue recontextualizePropertyValue(IPropertyValue value);", "public V updateAndGet(final Supplier<V> supplier) {\n\t\tsynchronized (this.monitor) {\n\t\t\tthis.value = supplier.get();\n\t\t\treturn this.value;\n\t\t}\n\t}", "Object...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
plays from the beginning and advances song
public String playFromBeginning() { currentIndex = 1; return "Playing song 1:" + songs.get(currentIndex-1); }
[ "@Override\n public String playFromBeginning() {\n return \"Playing first song: \" + songs.get(0);\n }", "private void playNext(){\n musicSrv.playNext();\n updateTrackInfo();\n if(playbackPaused){ //if music is paused and user hits next button, next song is played\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Insert a new question as a copy of another question (copyPoolQuestions transaction code).
protected abstract String copyQuestionTx(String userId, String qid, Pool destination);
[ "protected abstract void insertQuestionTx(QuestionImpl question);", "protected void insertQuestion(final QuestionImpl question)\n\t{\n\t\tthis.sqlService.transact(new Runnable()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tinsertQuestionTx(question);\n\t\t\t}\n\t\t}, \"insertQuestion: \" + question.getId());...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to retrun all the shipping method details displayed on checkout page
public HashMap<String, HashMap> getShippingMethods() { String pageName = signedIn() ? "responsive_checkout_signed_in" : "responsive_checkout"; HashMap<String, HashMap> shippingMethods = new HashMap<>(); List<WebElement> shippingMethodElements = Elements.findElements(pageName + "." + (signedIn() ...
[ "@GetMapping(\"/shipping-methods\")\n @Timed\n public List<ShippingMethodDTO> getAllShippingMethods() {\n log.debug(\"REST request to get all ShippingMethods\");\n List<ShippingMethod> shippingMethods = shippingMethodRepository.findAll();\n return shippingMethodMapper.shippingMethodsToShi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Requests to delete multiple PI entities identified by the given handles.
WriteRequest delete(Iterable<? extends PiHandle> handles);
[ "public void deleteProcessos(final List<Processo> entities);", "public static void remove(VkObject ...handles){\n if(handles == null) return;\n for (VkObject vkHandle : handles) {\n if(vkHandle != null)\n vkHandle.free();\n }\n }", "Future<OperationResponse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
List trusted certificates. Returns all certificates the entity should trust based on the applied trust configuration.
X509CertificateListApiModel listTrustedCertificates(String entityId);
[ "public List<X509Certificate> getTrustedCertificates() {\n return this.trustedCertificates;\n }", "Observable<X509CertificateListApiModel> listTrustedCertificatesAsync(String entityId);", "X509CertificateListApiModel listTrustedCertificates(String entityId, String nextPageLink, Integer pageSize);", "Obser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a filter that targets a particular frequnce at a particular sample rate. The number of saples used to compute the average will be the mathmatical floor of the number of samples in 180 of the frequency. This means that at a particular time, all samples of the wave form will be positive or negative and yeild th...
public MovingAverageFilter(final double hz, final int sampleRate) { this.samples = new short[(int)(Math.floor(sampleRate / hz / 2))]; }
[ "@Test\n public void testHighPassFilter() {\n int freq1;\n int freq2;\n for (int i = 1; i < 10; i += 2) {\n freq1 = i * 100;\n freq2 = i * 200;\n SoundWave wave1 = new SoundWave(freq1, 0, 0.4, 0.1);\n SoundWave wave2 = new SoundWave(freq2, 2, 0.3, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the victoryModifications property.
public int getVictoryModifications() { return victoryModifications; }
[ "public void setVictoryModifications(int value) {\n this.victoryModifications = value;\n }", "public Vector getVariableModifications() {\n return iVariableModifications;\n }", "public Vector getFixedModifications() {\n return iFixedModifications;\n }", "public Modificatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests to see if the buy method works properly and will not buy more stock if the player is out of cash
public void testBuy() { testPlayer1.buy(testStock); assertEquals(testPlayer1.worth(),200); testPlayer1.buy(testStock); testPlayer1.buy(testStock); testPlayer1.buy(testStock); testPlayer1.buy(testStock); testPlayer1.buy(testStock); assertEquals(testPlayer1....
[ "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns true if there is a page fit. Namely pageOffset is 0. It's hard to make a float to be 0.0f. So convert it to int, and compare it with 0.
private boolean isPageFit() { return (int) pageOffset == 0; }
[ "public boolean hasPageSize() {\n return fieldSetFlags()[7];\n }", "public native @Cast(\"bool\") boolean IsAtBeginningOf(@Cast(\"tesseract::PageIteratorLevel\") int level);", "public boolean is_page()\n {\n return (flags & TYPE_MASK) == PAGE;\n }", "public boolean isSetPageSize() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes the index file out to jos. oldEntries gives the names of the files that were removed, movedMap maps from the new name to the old name.
private static void createIndex( JarOutputStream jos, List oldEntries, Map movedMap ) throws IOException { StringWriter writer = new StringWriter(); writer.write( VERSION_HEADER ); writer.write( "\r\n" ); // Write out entries that have been removed for ( Object ...
[ "private void writeIndexFile() throws IOException {\n File file = new File(dataDir, INDEX_FILE);\n DataOutputStream dos =\n new DataOutputStream(new FileOutputStream(file));\n dos.writeInt(entries.size());\n for (FileEntry entry : entries.values()) {\n dos.write...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Ask user to enter their country and capture it. Once values are captured print which language user speaks.
public static void main(String[] args) { Scanner scan=new Scanner(System.in); String country, language; System.out.println("Please enter country name"); country=scan.nextLine(); language=null; switch(country) { case "USA": language="English"; break; case "India": language="Indian"; break;...
[ "void sayHelloDifferentLanguage(String country) {//USA,Russia,Turkey e tek tek bakiyor\n\t\n \n switch(country.toLowerCase()) {//buraya yukaridaki ulke isimleri gelip switc icinde varsa cikiyor\n case \"USA\":\n \tSystem.out.println(\"Hello\");\n \tbreak;\n case\"Russia\":\n \tSystem.out.println...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
turns the card inGame value = true
public void setInGame() { this.inGame = true; }
[ "public void setInGame(boolean inGame)\n\t{\n\t\tthis.inGame = inGame;\n\t}", "public void yourTurn() { inTurn = true; }", "public void setInGame(boolean isInGame) \n\t{\n\t\tthis.isInGame = isInGame;\n\t}", "public void setCardInv() {\n cardInv = true;\n }", "public boolean gameActive(){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /vehicletasks : get all the vehicleTasks.
@GetMapping("/vehicle-tasks") @Timed @Secured(AuthoritiesConstants.ADMIN) public ResponseEntity<List<VehicleTask>> getAllVehicleTasks(Pageable pageable) { log.debug("REST request to get a page of VehicleTasks"); Page<VehicleTask> page = vehicleTaskService.findAll(pageable); HttpHeade...
[ "List<Task> getAllTasks();", "List<Task> getTasks();", "Set<Task> getAllTasks();", "List<TaskDescription> listTasks();", "public ArrayList<TaskDTO> loadTasks(Context context){\n\n taskList = new TaskRegistry(context).getTasks();\n return taskList;\n }", "List<Task> listAllTasksForFacility...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move the slot selection down.
public void selectionDown() { selectedSlotPosY = (selectedSlotPosY == 0) ? C.MENU_INVENTORY_ITEM_SLOT_HEIGHT - 1 : selectedSlotPosY-1; }
[ "public void selectionUp() {\n\t\tselectedSlotPosY = (selectedSlotPosY == (C.MENU_INVENTORY_ITEM_SLOT_HEIGHT - 1)) ? 0 : selectedSlotPosY+1;\n\t}", "public void moveSelectionDown(){\n if(mACPanel.isShowing()) {\n mACPanel.moveDown();\n return;\n }\n Cursor c = getCursor(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values.
public static String bind(String id, String[] bindings) { if (id == null) return "No message available"; String message = null; try { message = bundle.getString(id); } catch (MissingResourceException e) { // If we got an exception looking for the message, fail gracefully by just returning //...
[ "String resolveMessage(String messageKey, Object... substitutions)\n throws MessageResolutionFailedException;", "String interpolate(String messageTemplate, Context context);", "protected StringBuffer translatedReplacements (String key, StringBuffer buf)\n {\n MessageBundle bundle = _msgmgr.getB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate Nashorn JavaScript Engine
public static void main(String[] args) { ScriptEngine nashEngine = new ScriptEngineManager().getEngineByName("Nashorn"); try { nashEngine.eval( "print('Hello World, directly from JavaScript code within the .java file with help of \"Nashorn Engine\"');"); } catch ...
[ "public abstract Navajo createNavaScript();", "Executescript createExecutescript();", "public static Invocable buildScript(String script,String... arguments){\n\t\tScriptEngine engine;\n\t\ttry{\n\t\t\tengine = new NashornScriptEngineFactory().getScriptEngine(new String[] { \"--no-java\" });\n\t\t\tengine.eval(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given a list of bits (and the root of the huffman tree) create a list of symbols Assuming that the bit stream was constructed properly, this method does the proper byte operations that can "decode" the compressed file. This method is called after the header has been read. DECOMPRESSION Pseudocode For each bit in the bi...
static List<String> convert_bitstream_to_original_symbols(ByteBuffer bit_stream, Node root) { if (VERBOSE_PRINT_SYMBOL_BITS) { System.out.println("------------- Converting bit sequences back into symbols -------------------"); } List<String> stringCodes = new ArrayList<String>(); String code = "";...
[ "private static BitSequence[] extractHuffmanCode(HuffNode[] leafNodes) {\n BitSequence[] huffmanCode = new BitSequence[Utils.POSSIBLE_BYTE_VALUES_COUNT];\n for (HuffNode leaf : leafNodes) {\n huffmanCode[Byte.toUnsignedInt(leaf.getSymbol())] = leaf.getCodeword();\n }\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Should be set as a result of GetPaymentInformationAction. optional .autofill_assistant.PaymentDetails payment_details = 15;
org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails getPaymentDetails();
[ "void setPaymentInformation(String information);", "public void setPayment(double payment) {\n this.payment = payment;\n }", "PaymentDetails createPaymentDetails();", "FixedAmortizationCalculator setExtraPayment(ExtraPmt extraPmts);", "public void paymentDetails()\r\n {\r\n System.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new support and Resistence graph.
public SupportAndResistenceGraph(GraphSource source) { super(source); support = new Graphable(); resistence = new Graphable(); createSupportAndResistence(source.getGraphable(), support, resistence); }
[ "public SupportAndResistenceGraph(GraphSource source) {\n\tsuper(source);\t\t\n\tsupport = new Graphable();\n\tresistence = new Graphable();\n\tsetSettings(new HashMap());\n }", "public SupportAndResistenceGraph(GraphSource source, HashMap settings) {\n\tsuper(source);\t\t\n\tsupport = new Graphable();\n\tresi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Park's Inspirational Quote Source
public void setInspirationalQuoteSource(String inspirationalQuoteSource) { this.inspirationalQuoteSource = inspirationalQuoteSource; }
[ "public String getInspirationalQuoteSource() {\n\t\treturn inspirationalQuoteSource;\n\t}", "public void setQuote(String quote) {\n this.quote = quote;\n }", "public void setQuoteState(final QuoteState quoteState);", "public void setInspirationalQuote(String inspirationalQuote) {\n\t\tthis.inspirati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }