query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Logs a line of text.
void log(String line);
[ "private void log(String line) {\n this.textView_log.setText(new Date() + \": \" + line + \"\\n\" + textView_log.getText());\n }", "void log(String source, String line);", "private void writeLine(final CharSequence text) {\n runOnUiThread(new Runnable() {\n @Override\n pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ compareMT(Node A, Node B, Node goal) compares the nodes for order using their misplacedTiles returns 1, 0, or 1 if the first argument is less than, equal to, or greater than the second
public static int compareMT(Node A, Node B, Node goal){ int mtA = misplacedTiles(A, goal); int mtB = misplacedTiles(B, goal); if (mtA<mtB) return -1; if (mtA>mtB) return 1; else return 0; }
[ "public static int compareMO(Node A, Node B, Node goal){\r\n int mtA = myOwn(A, goal);\r\n int mtB = myOwn(B, goal);\r\n if (mtA<mtB)\r\n return -1;\r\n if (mtA>mtB)\r\n return 1;\r\n else\r\n return 0;\r\n }", "public static int misplacedTiles(Node A,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the period is not in the ST, add a new queue
public void addEntry(int period, String state) { if (!st.contains(period)) { st.put(period, new Queue<String>()); } st.get(period).enqueue(state); }
[ "private void addToReadyQueue() {\n\n for (Iterator<SchedulableProcess> iterator = processes.iterator(); iterator.hasNext(); ) {\n\n SchedulableProcess process = iterator.next();\n\n if (process.getArrival() == time) {\n\n readyQueue.add(process);\n iterato...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of method checkimageRegistry validation to check image registry username exist or not
@GET @Path("/checkingUserName/{userName}") @Produces(MediaType.TEXT_PLAIN) public String userValidation(@PathParam("userName") String userName, @Context HttpServletRequest req) throws DataBaseOperationFailedException { LOGGER.debug(" coming to check Image Registry of pass network"); HttpSession session = r...
[ "@GET\n\t@Path(\"/checkimageRegistry/{registryName}\")\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic String imgRegistryValidation(@PathParam(\"registryName\") String registryName,@Context HttpServletRequest req) throws DataBaseOperationFailedException {\n\t\t LOGGER.debug(\" coming to check Image Registry of pass ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for perpAnnualReportItems.
public void setPerpAnnualReportItems(Set<PerpAnnualReportItems> aPerpAnnualReportItems) { perpAnnualReportItems = aPerpAnnualReportItems; }
[ "public Set<PerpAnnualReportItems> getPerpAnnualReportItems() {\n return perpAnnualReportItems;\n }", "public void setPerpdocumentItems(Set<PerpdocumentItems> aPerpdocumentItems) {\n perpdocumentItems = aPerpdocumentItems;\n }", "@Override\n\tpublic void setPerMonth(int perMonth) {\n\t\t_sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the current expense list in address book belongs to the specified group.
public boolean isCurrentExpenseList(Group group) { Optional<Group> current = expenses.getGroup(); boolean isCurrentGroup = current.isPresent() && current.get().equals(group); return isCurrentGroup; }
[ "public boolean check(Group group){\n return false;\n }", "private boolean contains(Collection<Group> groups, Group group) {\n for (Group g : groups) {\n if (group.getName().equals(g.getName()))\n return true;\n }\n return false;\n }", "boolean hasList...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ post: returns the flipped tiles Checks to see if the letters of the word match the guessed word, and if so, flips the tile
public char[][] flipTiles(char[][] displayWord, char[][] unflippedTiles, String guessedLetter, String guessWord) { flippedTiles = unflippedTiles; for (int i = 0; i < 2; i++) { for (int j = 0; j < 6; j++) { if (displayWord[i][j] == '/') { flippedTiles[i][j]...
[ "public abstract boolean getTileYFlip(int column, int row);", "public void flipHorizontal() {\n\t\t\tfor(int row = 0; row < TILE_DIM; row++) {\n\t\t\t\tString tmp = \"\";\n\t\t\t\tfor(int col = TILE_DIM-1; col >= 0; col--) {\n\t\t\t\t\ttmp += this.data[row].charAt(col);\n\t\t\t\t}\n\t\t\t\tthis.data[row] = tmp;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate the adjacent matrix of complete graph of "length" nodes
public static int[][] completeGraph(int length) { int[][] res= new int[length][length]; for(int i=0;i!=length;i++) for(int j=0;j!=length;j++) { if(i!=j) res[i][j]=1; } return res; }
[ "private Double[][] makeAdjacencyMatrix()\n {\n Double[][] matrix = new Double[this.numIntxns][this.numIntxns];\n\n for (int i = 0; i < this.numIntxns; i++)\n {\n for (int j = 0; j < this.numIntxns; j++)\n {\n // if the indices are the same the distance i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sorts the sentence candidates by position
private void sortSentenceCandidatesByPosition(List<TextRankSentenceNode> summary) { summary.sort( (p1, p2) -> -Integer.compare(p1.position, p2.position)); }
[ "public static String sortSentenceByWordEntrance(String sentence, boolean ascendingOrder) {\n // dividing the words by space regardless of its number\n String[] words = sentence.split(\"[ ]\\\\s*\");\n Map<String, Integer> wordsEntrance = new HashMap<String, Integer>();\n for (String wor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches for results that match the specified query.The parameter termValuePairs may contain the following keys: MetaData.TARGETENDUSER MetaData.SCHOOLTYPE MetaData.SCHOOLDISCIPLINE MetaData.DIDACTICFUNCTION MetaData.PRODUCTTYPE MetaData.PROFESSIONALSITUATION MetaData.COMPETENCE The values of these items must match exa...
List<Result<Record>> doSearch(HashMap termValuePairs) throws Exception;
[ "public List<IResult> getResults(List<Integer> relatedDocs, String query) {\r\n\r\n // results\r\n List<IResult> rs = new ArrayList<>();\r\n List<Double> documentVector, queryVector = new ArrayList<>();\r\n\r\n Map<String, Integer> termFreqs = this.preprocessor.processQuery(query);\r\n\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Suspension Rack'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseSuspensionRack(SuspensionRack object) { return null; }
[ "public T caseSuspensionArm(SuspensionArm object) {\r\n\t\treturn null;\r\n\t}", "public T caseSuspension(Suspension object) {\r\n\t\treturn null;\r\n\t}", "public T caseScrewingRack(ScrewingRack object) {\r\n\t\treturn null;\r\n\t}", "public Rack getRack() {\n RESTLink link = checkNotNull(target.searchL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
void setDtDtIncmgPersBirth(org.exolab.castor.types.Date) Sets the value of field 'dtDtIncmgPersDeath'.
public void setDtDtIncmgPersDeath(org.exolab.castor.types.Date dtDtIncmgPersDeath) { this._dtDtIncmgPersDeath = dtDtIncmgPersDeath; }
[ "public void setDtDtIncmgPersBirth(org.exolab.castor.types.Date dtDtIncmgPersBirth)\r\n {\r\n this._dtDtIncmgPersBirth = dtDtIncmgPersBirth;\r\n }", "public org.exolab.castor.types.Date getDtDtIncmgPersDeath()\r\n {\r\n return this._dtDtIncmgPersDeath;\r\n }", "public org.exolab.castor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates proxy of the target object.
<T> T create(T target, String proxyId, InvocationRecord invocationRecord) throws ProxyCreationException;
[ "public Object createProxy(Class<?> targetClass) {\n Enhancer enhancer = new Enhancer();\n enhancer.setSuperclass(targetClass);\n enhancer.setCallback(NoOp.INSTANCE);\n return enhancer.create();\n }", "<T> T newProxy(T target, Class<T> interfaceType);", "public interface ProxyCreat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the current game state.
public void update() { gameStateManager.update(); }
[ "public void update()\r\n\t{\r\n\t\tgameStateManager.updateCurrentState();\r\n\t}", "@Override\n public void updateGameState() {\n }", "public static void updateGameStatus()\n\t{\n\t}", "private void update(){\n\t\tupdateplayer();\n\t\tupdatebunny();\n\n //changes the state of the game\n\t\tif (v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /usercustomatributes/:id : delete the "id" userCustomAtributes.
@DeleteMapping("/user-custom-atributes/{id}") @Timed public ResponseEntity<Void> deleteUserCustomAtributes(@PathVariable Long id) { log.debug("REST request to delete UserCustomAtributes : {}", id); userCustomAtributesRepository.delete(id); return ResponseEntity.ok().headers(HeaderUtil.cr...
[ "String userDeleteAttributes();", "AdditionalAttributes removeAttribute(String name);", "@DeleteMapping(\"/user-additionals/{id}\")\r\n public ResponseEntity<Void> deleteUserAdditional(@PathVariable Long id) {\r\n log.debug(\"REST request to delete UserAdditional : {}\", id);\r\n userAdditional...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the uniqueField attribute of the ActionItemList object
public String getUniqueField() { return uniqueField; }
[ "public String getUniqueAction() {\r\n\treturn sid + \"_\" + action;\r\n }", "@Override\n\tpublic java.lang.String getFormItemAttrId() {\n\t\treturn _formItem.getFormItemAttrId();\n\t}", "public String getItemField() {\n if (itemField == null && oleDiscoveryExportProfile != null) {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property sezione.
public void setSezione(char sezione) { char oldSezione = this.sezione; this.sezione = sezione; propertyChangeSupport.firePropertyChange ("sezione", new Character (oldSezione), new Character (sezione)); }
[ "public void setSezione(char sezione) {\r\n this.sezione = sezione;\r\n }", "public void setProgetto(String progetto);", "public void setCognome (String cognome){\n\tthis.cognome = cognome ;\n}", "public void setProperty(String property) {\n }", "public void setProperty(String property, String val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A component of the identifier for partner 3 of the structure angle. This data item is a pointer to _atom_site.auth_asym_id in the ATOM_SITE category.
public StrColumn getPtnr3AuthAsymId() { return (StrColumn) (isText ? textFields.computeIfAbsent("ptnr3_auth_asym_id", StrColumn::new) : getBinaryColumn("ptnr3_auth_asym_id")); }
[ "public StrColumn getAtomSiteAuthAsymIdH() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"atom_site_auth_asym_id_H\", StrColumn::new) :\n getBinaryColumn(\"atom_site_auth_asym_id_H\"));\n }", "public StrColumn getAtomSiteAuthAsymIdD() {\n return (StrColumn) (isText ?...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column sys_entry.mod_user
public String getModUser() { return modUser; }
[ "public String getUserMod() {\r\n return (String) getAttributeInternal(USERMOD);\r\n }", "public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }", "public Integer getModifyUser() {\n return modifyUser;\n }", "@Override\n\tpublic long getModi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build call for getUnreadMessagesTotal
public com.squareup.okhttp.Call getUnreadMessagesTotalCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String local...
[ "int getAllUnreadMessages();", "public int getUnreadChatMessageCount();", "public int getUnreadChatMessageCountFromActiveLocals();", "public int getTotalUnreadMessages()\n\t{\n\t\tint unreadMessages = 0;\n\t\tCursor c = null;\n\n\t\ttry\n\t\t{\n\t\t\tc = mDb.query(DBConstants.CONVERSATIONS_TABLE, new String[]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the statistics of a table partition.
void alterPartitionStatistics( ObjectPath tablePath, CatalogPartitionSpec partitionSpec, CatalogTableStatistics partitionStatistics, boolean ignoreIfNotExists) throws PartitionNotExistException, CatalogException;
[ "void updatePartitionsToTable(String tableName, List<String> changedPartitions);", "void setPartition( Partition partition );", "public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public void updateTenantStatistics(Integer tenantId);", "void alterPartitionColumnStatistics(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method parses query string, checks for digit to parse 'k' for proximity type queries. otherwise treats each term individually and searches for each term.
public void parseQueryStringAndSearch(String searchString) { char[] chars = searchString.toCharArray(); for (int i = 0; i < chars.length; i++) { Queue<Character> queue; int k; if (Character.isDigit(chars[i])) { k = Integer.parseInt(String.valueOf(chars...
[ "@Override\n\tpublic void parseQuery(String query) {\n\t\t// These are words that are probably not the search term\n\t\tString nonKeywords = \"search\" + \"image\";\n\n\t\t// The query is split into keywords\n\t\tString[] words = query.split(\" \");\n\n\t\t// Gets the search term provided by the user by avoiding al...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load games from undoHistory ArrayList.
public GameManager loadGame() { isUndoSelected = true; if (undoHistory.size() > 1) { //create new GameManager, clear/pop all data from it and load new data from saved file GameManager gameManager = new GameManager(); gameManager.deck.pop(gameManager.deck.getCard(0)); ...
[ "List<HistoryData> loadAllHistoryData();", "private ArrayList<Game> loadGames(){\n ArrayList<Game> allGames = new ArrayList<>();\n\n try {\n Registry registry = LocateRegistry.getRegistry(appServer.getIP(), appServer.getPort());\n AppServerInterface appServer = (AppServerInterf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether user has been anonymized or not.
boolean isUserAnonymized(PerunSession sess, User user);
[ "public boolean isAutonym() {\n return flags != null && flags.contains(NameFlag.AUTONYM);\n }", "private boolean nameIsUsed(String name) {\n return this.getUser(name) != null; //if a user exists, then we already have him\n }", "public boolean isUStaffUtterStranger();", "public boolean has...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for property smsProduct.
public void setSmsProduct(String smsProduct) { this.smsProduct = smsProduct; }
[ "public String getSmsProduct() {\n return smsProduct;\n }", "public void setProduct(Product product) {\n this.product = product;\n }", "public void setProduct(entity.APDProduct value);", "public void setProduct(Long product) {\n this.product = product;\n }", "private void setPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end synpred33_ul Delegated rules
public final boolean synpred33_ul() { state.backtracking++; int start = input.mark(); try { synpred33_ul_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } boolean success = !state.failed; input.rewind(start); state.backtracking--;...
[ "public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column XUYU_CONTENT_CARD_INFO_RECORD.REAL_PROFIT
public void setRealProfit(BigDecimal realProfit) { this.realProfit = realProfit; }
[ "public void setPROFIT(BigDecimal PROFIT) {\r\n this.PROFIT = PROFIT;\r\n }", "public void setREIMBURSED_PROFIT(BigDecimal REIMBURSED_PROFIT) {\r\n this.REIMBURSED_PROFIT = REIMBURSED_PROFIT;\r\n }", "public void setPROFIT_DECLARATION_ACTUAL(BigDecimal PROFIT_DECLARATION_ACTUAL)\r\n {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the baseAdGroupId value for this AdGroupCriterion.
public void setBaseAdGroupId(java.lang.Long baseAdGroupId) { this.baseAdGroupId = baseAdGroupId; }
[ "public java.lang.Long getBaseAdGroupId() {\n return baseAdGroupId;\n }", "public void setBaseCampaignId(java.lang.Long baseCampaignId) {\n this.baseCampaignId = baseCampaignId;\n }", "public Builder setAdmsGroupId(\n java.lang.String value) {\n if (value == null) {\n thro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set accessor for persistent attribute: cod_localidad
public abstract void setCod_localidad(java.lang.String newCod_localidad);
[ "public abstract java.lang.String getCod_localidad();", "public void setLocalidad(String localidad) {\n this.localidad = localidad;\n }", "public void setSistema(int cod) {\n }", "public interface Ciclos_facturacionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a new SubstitutionSet object at the end of the list.
public boolean addSubstitutionSet(SubstitutionSet obj) { if (obj == null) return false; obj.setParent(this); return _objSubstitutionSet.add(obj); }
[ "public sy_soapserver.SetDocument.Set addNewSet()\n {\n synchronized (monitor())\n {\n check_orphaned();\n sy_soapserver.SetDocument.Set target = null;\n target = (sy_soapserver.SetDocument.Set)get_store().add_element_user(SET$0);\n return target;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Method Name : InkandTonersearchbox Purpose : Searches the item in Ink and Toner search box Parameter : Date Created: 08/05/2015 Created By : TCS Modified By : Modified Date:
public void InkandTonersearchbox(String searchitem){ String inktonersearch = getValue(searchitem); class Local {}; Reporter.log("TestStepComponent"+Local.class.getEnclosingMethod().getName()); Reporter.log("TestStepInput:-"+"NA"); Reporter.log("TestStepOutput:-"+"NA"); Reporter.log("TestStepExpectedRe...
[ "public List<Item> searchItem(String location, String keyword, String company);", "public void searchInkAndTonnerItem(String itemnum){\t\r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
construct a client, which, when started, will attempt to connect to the server at the given address and port and then send the images that are found in the given imageFolder
public ImageSendingClient(File imageFolder, String serverAddress, int serverPort) { this.imageFolder = imageFolder; this.serverAddress = serverAddress; this.serverPort = serverPort; }
[ "public void run() {\n\n ServerSocket ss = null;\n try {\n\n ss = new ServerSocket(port); // accept connection from other peers and send out blocks of images to others\n\n } catch (Exception e) {\n\n // e.printStackTrace();\n\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Logic to get the DBInfo from a JDBC Connection, if the connection was not created via Driver.connect, or it has never seen before, the connectionInfo map will return null and will attempt to extract DBInfo from the connection. If the DBInfo can't be extracted, then the connection will be stored with the DEFAULT DBInf...
public static DbInfo computeDbInfo(Connection connection) { try { DatabaseMetaData metaData = connection.getMetaData(); String url = metaData.getURL(); if (url != null) { try { return JdbcConnectionUrlParser.parse(url, connection.getClientInfo()); } catch (Throwable ex) {...
[ "public static DbInfo extractDbInfo(Connection connection) {\n DbInfo dbInfo = JdbcData.connectionInfo.get(connection);\n if (dbInfo == null) {\n dbInfo = computeDbInfo(connection);\n JdbcData.connectionInfo.set(connection, JdbcData.intern(dbInfo));\n }\n return dbInfo;\n }", "public Connec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for likePercentCS
public void setLikePercentCS(double likePercentCS) { this.likePercentCS = likePercentCS; }
[ "public double getLikePercentCS() {\n return likePercentCS;\n }", "public void setPercent(float per){\r\n percent = per;\r\n }", "public void setPercent(float value) {\n this.percent = value;\n }", "public void setScPercent(int value) {\r\n this.scPercent = value;\r\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field numRows is set (has been assigned a value) and false otherwise
public boolean isSetNumRows() { return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); }
[ "public boolean isSetRows() {\n return this.rows != null;\n }", "public boolean isSetRows() {\n return EncodingUtils.testBit(__isset_bitfield, __ROWS_ISSET_ID);\n }", "public boolean valid() {\n return numRows > 0 && sizeInBytes > 0;\n }", "public boolean hasRows() {\n\t\treturn numRows() > 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the changes needed to make a layer selected. If the layer has already been selected, nothing happens.
protected synchronized void selectLayer(Group layer) { if (!(currentOperationArgument instanceof LayersArgument)) { if (selected.contains(layer)) return; selected.add(layer); selectedLayers.add((Layer) layer.getUserData()); } else ...
[ "private void restoreSelectedTargetLayer() {\n\n\t\tif (currentNewLayerName != null) {\n\t\t\tthis.comboTargetLayer.setText(currentNewLayerName);\n\t\t} else if (currentTargetLayer != null) {\n\t\t\tint index = this.comboTargetLayer.indexOf(this.currentTargetLayer.getName());\n\t\t\tif (index != -1) {\n\t\t\t\tthis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read XML configuration mapping category keys to report type integers from localization
public static Map<CategoryKey, Integer> getReportTypeMap( String categoryFileName) throws XMLStreamException, LocalizationException { LocalizationFile file = getLocalizedCategoryFile(categoryFileName); if (file == null) { return null; } Map<CategoryKey...
[ "private static HashMap<String, String> createSubcategoryToCategoryLabelMapping() {\n HashMap<String, String> valueToKeyMap = new HashMap<String, String>();\n try {\n Scanner textFile = new Scanner(new File(LABEL_TEXT));\n while(textFile.hasNextLine()) {\n String[] tokens = textFile.nextLine...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
See the backgroundattachment property definition in CSS2.
public void setBackgroundAttachment(String backgroundAttachment) throws DOMException;
[ "public String getBackgroundAttachment();", "public String getBackgroundPosition();", "Sprite getBackground();", "public CssBackgroundPosition() {\n value = new CssBackgroundPositionValue();\n }", "public CssBackgroundClip() {\r\n\tbgclip = border;\r\n }", "String getBackground();", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the grade color.
public void setGradeColor(int r, int g, int b) { gradeColor = UIUtil.getHexColor(r, g, b); }
[ "public void setColor(int gnum, Color col);", "public void setColor(int color);", "public void setColor(Color c) { color.set(c); }", "public void setColor( GraphColor newVal ) {\n color = newVal;\n }", "public void setColor(Color c) {\n color = c;\n }", "void setColor(int r, int g, int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__NewElement__Group_2__1__Impl" $ANTLR start "rule__NewElement__Group_2_1__0" InternalDsl.g:29027:1: rule__NewElement__Group_2_1__0 : rule__NewElement__Group_2_1__0__Impl rule__NewElement__Group_2_1__1 ;
public final void rule__NewElement__Group_2_1__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:29031:1: ( rule__NewElement__Group_2_1__0__Impl rule__NewElement__Group_2_1__1 ) // InternalDsl.g:29032:2: rule__NewElement__Group...
[ "public final void rule__NewElement__Group_2__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:29015:1: ( ( ( rule__NewElement__Group_2_1__0 )* ) )\n // InternalDsl.g:29016:1: ( ( rule__NewElement__Group_2_1__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Comparison__Group__0" $ANTLR start "rule__Comparison__Group__0__Impl" InternalGaml.g:12130:1: rule__Comparison__Group__0__Impl : ( ruleAddition ) ;
public final void rule__Comparison__Group__0__Impl() throws RecognitionException { int rule__Comparison__Group__0__Impl_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 707) ) { return ; } ...
[ "public final void rule__ComparisonOpExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4569:1: ( ( ruleAdditionOpExp ) )\n // InternalOCLlite.g:4570:1: ( ruleAdditionOpExp )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles experiment results test step entity.
default void visit(ExperimentResultsTestStepEntity experimentResultsTestStepEntity) { throw new UnsupportedOperationException( String.format("Unsupported experiment results step for request [%s]", experimentResultsTestStepEntity.getEvaluationRequestEntity().getRequestId()...
[ "public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}", "protected void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an array of urls to the end of this class loader.
protected void addURLs(URL[] urls) { addURLs(Arrays.asList(urls)); }
[ "protected void addURLs(List urls) {\n LinkedList locationStack = new LinkedList(urls);\n try {\n while (!locationStack.isEmpty()) {\n URL url = (URL) locationStack.removeFirst();\n\n if (!\"file\".equals(url.getProtocol())) {\n // download t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Trigger afterCompletion callbacks on the mapped HandlerInterceptors. Will just invoke afterCompletion for all interceptors whose preHandle invocation has successfully completed and returned true.
protected void triggerAfterCompletion( HandlerExecutionChain mappedHandler, int interceptorIndex, HttpServletRequest request, HttpServletResponse response, Exception ex) throws Exception { if (mappedHandler == null || mappedHandler.getInterceptors() == null) { return; ...
[ "void applyAfterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tHandlerInterceptor[] interceptors = getInterceptors();\r\n\t\tif (!ObjectUtils.isEmpty(interceptors)) {\r\n\t\t\tfor (int i = interceptors.length - 1; i >= 0; i--) {\r\n\t\t\t\tif (interceptors[i] instanceof...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ExStart ExFor:SaveOptions.UpdateLastSavedTimeProperty ExSummary:Shows how to update a document time property when you want to save it
@Test public void updatingLastSavedTimeDocument() throws Exception { Document doc = new Document(getMyDir() + "Document.doc"); //Get last saved time Date documentTimeBeforeSave = doc.getBuiltInDocumentProperties().getLastSavedTime(); OoxmlSaveOptions saveOptions = new OoxmlSave...
[ "@Test (dataProvider = \"lastSavedTimeDataProvider\")\r\n public void lastSavedTime(boolean updateLastSavedTimeProperty) throws Exception\r\n {\n Document doc = new Document(getMyDir() + \"Document.docx\");\r\n\r\n Assert.assertEquals(new DateTime(2021, 5, 11, 6, 32, 0), \r\n doc.getB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Infinite loop that checks if the integer list isn't empty, and then checks whether or not the number that is retrieved in prime or not
public synchronized void run() { while(true){ if(!il.isEmpty()){ int tempPrime = il.get(); checkPrime(tempPrime); } } }
[ "private ArrayList findPrime(){\n System.out.println(\"Enter the number of primes\"); // This is a scanner, used to get input from the user\n Scanner sc = new Scanner(System.in);\n int numOfPrime = sc.nextInt();\n sc.close();\n \n ArrayList<Integer> primes = new ArrayLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the front end.
public TempletSetting getFrontEnd() { return frontEnd; }
[ "public org.apache.ant.AntFrontEnd getFrontEnd() {\n return frontEnd;\n }", "public FrontEnd() {\n this(\"FrontEnd Layout\");\n }", "public FrontEnd getFrontEndForName(String name) throws SessionQueryException\n {\n FrontEnd returnedFrontEnd = null;\n ComponentStruct component = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets filtered set of relationships.
public Set<Relationship> getRelations() { return this.relations; }
[ "public Set<Relationship> getAllRelationships() {\n Set<Relationship> all = new HashSet<>(m_public);\n all.addAll(m_secret);\n return Collections.unmodifiableSet(all);\n }", "public Set<Relation> getRelations();", "@Override\n public Iterable<Relationship> relationships()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a signature into a normal type declaration. "I",null &gt; "int" "Z","foo" &gt; "boolean foo" "[J","foo" &gt; "long[] foo" "Lmypackage/MyClass;",null &gt; "mypackage.MyClass" "()V",null &gt; "void ()" "(S[Ljava/lang/String;)V","foo" &gt; "void foo (short, String[])"
public static String signatureTypeToType(String sig,int ArrayCount) { String arrays = ""; for(int i = 0; i < ArrayCount; i++) { arrays += "[]"; } String result = ""; switch (sig.charAt(0)) { case 'V': result = "void"; sig = sig.substring(1); break; case 'B':...
[ "public static int getTypeSignatureKind(String signature) {\n \tfinal int[] kind = { 0 };\n \tSignatureProcessor.process(signature, false, new SignatureRequestorAdapter() {\n \t\t@Override\n \t\tpublic void acceptPrimitive(TypeBasic type) {\n \t\t\tkind[0] = PRIMITIVE_TYPE_SIGNATURE;\n \t\t}\n \t\t@Override\n \t\tp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get background resource based on view player
protected int getViewPlayerBackground() { if (mPlayerInfo.getViewPlayer() == DataModelConstants.PLAYER_ALICE) { return R.drawable.alice_border; } else { return R.drawable.bob_border; } }
[ "protected int getActivePlayerBackground() {\n if (mPlayerInfo.getActivePlayer() == DataModelConstants.PLAYER_ALICE) {\n return R.drawable.alice_border;\n }\n else {\n return R.drawable.bob_border;\n }\n }", "Sprite getBackground();", "String getBackground();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flings the selector with the given velocityY.
private void fling(int velocityY) { mPreviousScrollerY = 0; if (velocityY > 0) { mFlingScroller .fling(0, 0, 0, velocityY, 0, 0, 0, Integer.MAX_VALUE); } else { mFlingScroller.fling(0, Integer.MAX_VALUE, 0, velocityY, 0, 0, 0, Integer.MAX_VALUE); } invalidate(); }
[ "public void setVelocityY(double y) {\n\t\tvelocity.setY(y);\n\t}", "public void setVelocityY(double velocityY) {\r\n\t\tthis.velocityY = velocityY;\r\n\t}", "public void bounceY()\n\t{\n\t\tyVel = -yVel;\n\t}", "@Raw\r\n\tpublic void setYVelocity(double yVelocity){\r\n\t\tif(canHaveAsVelocity(getVelocity().g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a list of NodeEntry objects based on current entries in the database
public List<NodeEntry> genNodeEntryObjects() throws SQLException{ List<NodeEntry> entries = new ArrayList<>(); String query = "SELECT * FROM AllNodes"; ResultSet rset; Statement stmt = ConnectionHandler.getConnection().createStatement(); rset = stmt.executeQuery(query); ...
[ "List<DHashEntry> getAllEntriesforNode(String id);", "public Stack<Entry> readNodeEntries() {\n FileLocation thisNode = null;\n Stack<Entry> nodeEntries = new Stack<Entry>();\n try {\n int port = FileApp.getMyPort();\n thisNode = new FileLocation(port);\n } catch ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a json object from a metrics record.
StringBuilder recordToJson(MetricsRecord record) { StringBuilder jsonLines = new StringBuilder(); Long timestamp = record.timestamp(); Date currDate = new Date(timestamp); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); String date = dateFormat.format(currDate); SimpleDateForma...
[ "private MetricsRecord toMetricsRecord(TMetricsRecord tmr) {\n MetricsRecord mr = new MetricsRecord(tmr.getTimestamp());\n if (tmr.getLongMetrics() != null) {\n mr.setLongMetrics(tmr.getLongMetrics());\n }\n if (tmr.getDoubleMetrics() != null) {\n mr.setDoubleMetrics(tmr.getDoubleM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invokes IApplicationThread.dumpActivity() on the thread of the specified activity if there is a thread associated with the activity.
private void dumpActivity(String prefix, FileDescriptor fd, PrintWriter pw, final ActivityRecord r, String[] args, boolean dumpAll) { String innerPrefix = prefix + " "; synchronized (this) { pw.print(prefix); pw.print("ACTIVITY "); pw.print(r.shortComponentName); ...
[ "public static void threadDump() {\n\t\tLOG.error(\"All threads are in use. Logging the thread stack trace to threaddump.txt and exiting.\");\n\t\tfinal ThreadMXBean threads = ManagementFactory.getThreadMXBean();\n\t\tlong[] threadIds = threads.getAllThreadIds();\n\t\tPrintWriter printWriter = null;\n\t\ttry {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This recursively duplicates/updates the files from a Hyrax (assuming Hyrax's HTTP server is enabled), including duplicating the file's date.
public static void copyHyraxFiles(String urlDir, String fileNameRegex, String localDir, String logFileName) throws Throwable { if (logFileName != null && logFileName.length() > 0) String2.setupLog(true, false, logFileName, false, true, Integer.MAX_VALUE); String2.log("*** Proj...
[ "public void processAndCopy() {\r\n \r\n int i = 1;\r\n int j = 1;\r\n final File newLocalDir = new File(conf.getLocalTargetDir());\r\n final long tstart = System.currentTimeMillis();\r\n newLocalDir.mkdirs(); \r\n // Delete old files\r\n if (conf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the siac r class attrs.
public void setSiacRClassAttrs(List<SiacRClassAttr> siacRClassAttrs) { this.siacRClassAttrs = siacRClassAttrs; }
[ "public void setClassSpecificAttributesForClass(com.gensym.util.Sequence classSpecificAttributes) throws G2AccessException;", "public static void initializeClassAttributes() {\n\tAboraSupport.findAboraClass(AfterReal.class).setAttributes( new Set().add(\"CONCRETE\").add(\"COPY\").add(\"NOTATYPE\"));\n/*\n\nGenera...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the XML Format request for Creating Templates
@RequestMapping(method=RequestMethod.POST, value="/templatedetail" ,headers = "Accept=application/xml" ) public @ResponseBody String createTemplatedetailXml(@RequestParam(value="isResponseRequired",required=true) Boolean isResponseRequired ,@RequestParam(value="storedProcedureName",required=false) String storedPro...
[ "public Document getXmlRequestFileByRequestType(String serviceReq, String method, String type, String version) throws TransformersException {\n\tFile xmlFile;\n\tString fileName, xmlTemplateFolder;\n\tDocument res = null;\n\tif (!GenericUtilsCommons.assertStringValue(serviceReq) || !GenericUtilsCommons.assertString...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a reader builder for TendererQualification.
@Nonnull public static UBL23ReaderBuilder<TendererQualificationType> tendererQualification(){return UBL23ReaderBuilder.create(TendererQualificationType.class);}
[ "@Nonnull\n public static UBL23WriterBuilder <TendererQualificationType> tendererQualification ()\n {\n return UBL23WriterBuilder.create (TendererQualificationType.class);\n }", "@Nonnull public static UBL23ReaderBuilder<TendererQualificationResponseType> tendererQualificationResponse(){return UBL23ReaderBu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the validateQuestionReferenceRangePatternTemplateId constraint of 'Question Reference Range Pattern'.
public boolean validateQuestionReferenceRangePattern_validateQuestionReferenceRangePatternTemplateId( QuestionReferenceRangePattern questionReferenceRangePattern, DiagnosticChain diagnostics, Map<Object, Object> context) { return questionReferenceRangePattern.validateQuestionReferenceRangePatternTemplateId(diag...
[ "public boolean validateQuestionReferenceRangePattern_validateQuestionReferenceRangePatternTypeCode(\n\t\t\tQuestionReferenceRangePattern questionReferenceRangePattern, DiagnosticChain diagnostics,\n\t\t\tMap<Object, Object> context) {\n\t\treturn questionReferenceRangePattern.validateQuestionReferenceRangePatternT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start NewActivity.class / Intent myIntent = new Intent(MainActivity.this, ResultsActivity.class); inputData = (EditText) findViewById(R.id.DataInput); String inputAddressString = inputData.getText().toString();
public void onClick(View irrelevant) { Intent myIntent = new Intent(MainActivity.this, OptionsActivity.class); inputData = (EditText) findViewById(R.id.DataInput); String inputAddressString = inputData.getText().toString(); // Create a bundle ...
[ "private void launchIntent() {\n\n // Assigns the EditText reference to the address input.\n EditText address_1 = (EditText)findViewById(R.id.address_input_1);\n String location = new String();\n\n // Retrieves the address from the user's input.\n try {\n location = add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store the start index of a token
private void tokenStart() { tokenStartIndex = zzStartRead; }
[ "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "public int startTokenIndex() {\n return this.startTokenIndex;\n }", "public void setToken(int value){token = value;}", "public ParseToken getStartToken() { return _startToken; }", "public final int getStartOffset() {\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'PROPOSAL_ID' field.
public org.LNDCDC_ADS_PRPSL.DEAL_POINT.apache.nifi.LNDCDC_ADS_PRPSL_DEAL_POINT.Builder setPROPOSALID(java.lang.Long value) { validate(fields()[1], value); this.PROPOSAL_ID = value; fieldSetFlags()[1] = true; return this; }
[ "public void setPROPOSALID(java.lang.Long value) {\n this.PROPOSAL_ID = value;\n }", "public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setPROPOSALID(java.lang.Long value) {\n validate(fields()[3], value);\n this.PROPOSAL_ID = value;\n fieldSetFlags()[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
org.gridsphere.portletcontainer.jsr.descriptor.ShortTitle getShortTitle() Returns the value of field 'title'.
public org.gridsphere.portletcontainer.impl.descriptor.Title getTitle() { return this._title; }
[ "public String getShortTitle() {\n\t\tString t = doc.get(\"shorttitle\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public String getShortTitle()\n {\n // return definition short title\n String title = definition.getShortTitle();\n if (title ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Sorting PageRank Job running function. It configures and submits the jobs.
private void runSortPageRank(String inputFolder, String outputFolder) throws Exception { /* Create a new job and set up job parameters. */ JobConf conf = new JobConf(PageRankFuyong.class); conf.setJarByClass(PageRankFuyong.class); conf.setJobName("SortPageRankFuyong"); conf.setOutputKeyClass(Float...
[ "private void applyPageRank() {\n long startTime = System.currentTimeMillis();\n Results.find().forEach(new Block<Document>() {\n @Override\n public void apply(Document document) {\n String Website = document.getString(\"_id\");\n double PageRank = W...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the color to use for the diagonal border
public XSSFColor getDiagonalBorderXSSFColor() { if(_ctDxf.isSetBorder()) { final CTBorder ct = _ctDxf.getBorder(); if (ct.isSetDiagonal()) { final CTBorderPr pr = ct.getDiagonal(); if (pr.isSetColor()) { final CTColor color = pr.getColor(); return new ...
[ "public String getDiagonalColor() {\r\n\t\treturn diagonalColor;\r\n\t}", "public String getBorderRightColor();", "public Color getMarbleOutlineColor();", "public Vector4f getBorderColour()\n\t{ return borderColour; }", "public Color getBorderColor();", "public String getBorderLeftColor();", "public Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////////////////// drawing the wave form /////////////////////////////////////// For drawing the analog wave form, used by drawInterpolatedSamples. returns the interpolated pixel at the double sampleX position.
private double interpolate(double sampleX, float[] samples, int sampleCount) { int quality = 3; if (sampleX == Math.floor(sampleX)) { return (sampleX < 0 || sampleX >= samples.length) ? 0 : samples[(int) sampleX]; } int from = (int) (sampleX) - quality; if (from < 0) from = 0; int to = (int)...
[ "private void drawInterpolatedSamples(Graphics G, int pixelFrom,\r\n\t\t\tint pixelTo, long startSample, float[] samples, int sampleCount) {\r\n\t\tif (samples == null) return;\r\n\t\tpixelFrom--;\r\n\t\tpixelTo++;\r\n\t\tint pixelX = pixelFrom;\r\n\t\tint oldY = toPixelY(interpolate(\r\n\t\t\t\ttoSamplesXF(pixelX)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
((BaseActivity) App.getAppManager().currentActivity()).LiveOpenDetail(reserveBean.getEpgId(), reserveBean.getLid(), reserveBean.getAction());
@Override public void start() { NavigationInfoItemBean infoItemBean = new NavigationInfoItemBean(); infoItemBean.setEpgId(Integer.valueOf(reserveBean.getEpgId())); infoItemBean.setContentId(reserveBean.getLid()); ...
[ "@RequiresApi(api = Build.VERSION_CODES.O)\r\n protected void onDetailNew(){\n Intent intent = new Intent(this, CaseOverviewActivity.class);\r\n //intent.putExtra(\"URI\", \"null\");\r\n\r\n\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View view...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
View driver displays current state on the calculator output
private void DoDisplay() { // Get display parameters SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getActivity().getBaseContext()); boolean bDebugMode = SP.getBoolean(getString(R.string.pref_debugMode), false); String sFracMode = SP.getString(getString(R.string.pr...
[ "public void doDisplayState();", "public synchronized void displayState(String operation) {\n // output operation and number of occupied buffer cells\n System.out.printf(\"%s%s%d)%n%s\", operation, \n \" (buffer cells occupied: \", occupiedCells, \"buffer cells: \");\n\n for (int value : b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether the assembler generated any instructions
public boolean hasInstructions();
[ "public boolean isInstruction() {\r\n return true;\r\n }", "@Override\n public boolean isInstruction() {\n return true;\n }", "boolean hasAsmName();", "boolean isEmpty()\n {\n CodeAttribute code = attributes.code;\n if ( !empty && Jump.codeOptions.optimization > 4 && nativeRef ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Original signature : void OpenMM_AmoebaBondForce_setBondParameters(OpenMM_AmoebaBondForce, int, int, int, double, double)
public static native void OpenMM_AmoebaBondForce_setBondParameters(PointerByReference target, int index, int particle1, int particle2, double length, double quadraticK);
[ "public static native void OpenMM_AmoebaBondForce_getBondParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, DoubleByReference length, DoubleByReference quadraticK);", "public static native void OpenMM_AmoebaBondForce_getBondParameters(PointerByReference target, in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the message's pop receipt.
public String getPopReceipt() { return m_PopReceipt; }
[ "public PoP getPop() {\n return pop_ == null ? PoP.getDefaultInstance() : pop_;\n }", "public SSIT.proto.Unetmgr.MessageInfo getPopInfo() {\n return popInfo_;\n }", "public Receipt getReceipt() {\n return receipt;\n }", "public SSIT.proto.Unetmgr.MessageInfo getPopInfo() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Insurer Reference' containment reference. The Insurer who is target of the request. (choose any one of insurer, but only one)
Reference getInsurerReference();
[ "Identifier getInsurerIdentifier();", "public String getInsureId() {\r\n return insureId;\r\n }", "public org.apache.xmlbeans.XmlObject getIn()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlObject ta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if you want to do something when every activity is created, do it here
@Override public void onActivityCreated(Activity activity, Bundle savedInstanceState) { }
[ "@Override\n public void onActivityStarted(Activity activity) {\n }", "public void activityCreated(Context ctx){\n //set Activity context - in this case there is only MainActivity\n mActivityContext = ctx;\n }", "void onActivityReady();", "protected void activity(){\n \n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a has_action property value.
void removeHas_action(Action oldHas_action);
[ "public void removeAction(TLAction action) {\n \tactionManager.removeChild(action);\n }", "public void removeAction(Action action) {\n menuDirty = true;\n actions.remove(action);\n if (action == selectedAction) {\n if (actions.isEmpty()) {\n selectedAction = nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checkes whether the given mime type is an XML format
public static boolean isXmlMimeType(String mimeType) { return mimeType != null && ( "text/xml".equals(mimeType) || "application/xml".equals(mimeType) || mimeType.endsWith("+xml") ); }
[ "public static boolean isXML(final MediaType mediaType) {\n\t\tif(mediaType != null) { //if a content type is given\n\t\t\tif(mediaType.hasBaseType(XML.MEDIA_TYPE)) { //if this is \"text/xml\"\n\t\t\t\treturn true; //text/xml is an XML content type\n\t\t\t}\n\t\t\tif(MediaType.APPLICATION_PRIMARY_TYPE.equals(mediaT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a reader builder for UnsubscribeFromProcedureRequest.
@Nonnull public static UBL23ReaderBuilder<UnsubscribeFromProcedureRequestType> unsubscribeFromProcedureRequest(){return UBL23ReaderBuilder.create(UnsubscribeFromProcedureRequestType.class);}
[ "@Nonnull public static UBL23ReaderBuilder<UnsubscribeFromProcedureResponseType> unsubscribeFromProcedureResponse(){return UBL23ReaderBuilder.create(UnsubscribeFromProcedureResponseType.class);}", "@Nonnull\n public static UBL23WriterBuilder <UnsubscribeFromProcedureRequestType> unsubscribeFromProcedureRequest (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column student.school
public void setSchool(String school) { this.school = school; }
[ "public void setSchool(String school) {\n put(schoolKey, school);\n }", "public void setSchoolName(String schoolName) {\n this.schoolName = schoolName;\n }", "public void setSchoolID(int schoolID){\n\t\tthis.schoolID = schoolID;\n\t}", "public void setSchool(ArrayList<String> school) {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assumes two roads share a common city. The compare method looks at the two unshared cities and returns the city name asciibetically less than the other.
public int compare(final Road one, final Road two) { /* assumes the two edges share a common vertex */ /* names of unshared cities */ final String oneCityName, twoCityName; /* set name of first unshared city */ if (one.getStart().getName().equals(commonCity)) { oneCityName = one.getEnd().getN...
[ "public int compare(City arg0, City arg1) {\r\n\t\tCity c1 = arg0;\r\n\t\tCity c2 = arg1;\r\n\t\t\r\n\t\treturn (c1.getName().compareTo(c2.getName()));\r\n\t}", "private int compareNames(Hotel hotel1, Hotel hotel2){\n String hotel1Name = hotel1.getPropertyName();\n String hotel2Name = hotel2.getPro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Let the user choose where the file will be downloaded through a dialog. After the path is chosen the information get send to the model.
@FXML private void selectPath() { downloadOptionsModel.selectPath(); lbPath.setText(downloadOptionsModel.getPath()); }
[ "public void download() {\n\t\tDirectoryChooser chooser = new DirectoryChooser();\n\t\tchooser.setTitle(\"Place to Save\");\n\t\tFile defaultDirectory = new File(\".\");\n\t\tchooser.setInitialDirectory(defaultDirectory);\n\t\tRowData file = fileTable.getSelectionModel().getSelectedItem();\n File directoryCh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the current region making all calls no longer resolving to region (if originally set otherwise noop)
T removeRegion();
[ "void removeRegion(Region region);", "public void destruct() {\n\t\t if (isEmpty()) {\n\t\t\t World.getWorld().getRegionManager().removeRegion(this);\n\t\t }\n\t }", "public void removeAll(){\n regionOpList.clear();\n }", "@Inline\n public static void clearNextRegion(Address region) {\n if (VM.VERIFY_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one demandeImportation by id.
@Override @Transactional(readOnly = true) public Optional<DemandeImportation> findOne(Long id) { log.debug("Request to get DemandeImportation : {}", id); return demandeImportationRepository.findById(id); }
[ "@Transactional(readOnly = true)\n public DataImport findOne(Long id) {\n log.debug(\"Request to get DataImport : {}\", id);\n return dataImportRepository.findOne(id);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<ImportanciaDTO> findOne(Long id) {\n log.deb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the secretProperties value.
public SecretProperties secretProperties() { return this.secretProperties; }
[ "public String getSecret() {\n return secret;\n }", "public int getSecret() {\n return secret;\n }", "public int getSecret () {\n\t\treturn secret;\n\t\t\n\t}", "public static String getSecret() {\n checkSecretArg(secret);\n return secret;\n }", "public String secretId() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the text that will be printed on the checkbox. The checkbox width will resize to accommodate the text.
public void setCheckBoxText(String text) { if (text == null) { Log.warning("Attempted to set checkbox text to a null string."); return; } synchronized (this) { checkBoxText = text; textHeight = 0; textWidth = 0; } }
[ "public Check(String text)\r\n\t{\r\n\tthis.text = text;\r\n\tthis.font = MainWindow.defaultFont;\r\n\tchecked = false;\r\n\t}", "public void setCaption(String caption) {\n\t // Note how we use the use composition of the contained widgets to provide\n\t // only the methods that we want to.\n\t chec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the time before collision with the given other Entity, assuming the velocities of both Entities do not change. If in the current state no collision will occur, the time to collision is considered infinite.
public double getTimeToCollision(Entity other) throws IllegalArgumentException{ if(other == null) throw new IllegalArgumentException(); if(this.overlaps(other)) throw new IllegalArgumentException(); if(this.getContainer() != other.getContainer()) return Double.POSITIVE_INFINITY; double sigmaS...
[ "public double collisionTimeWithBoundaries() {\r\n\r\n\t\tif (this.world == null)\r\n\t\t\treturn Double.POSITIVE_INFINITY;\r\n\t\tif ( Util.fuzzyEquals(getVelocity().getNorm(), 0.0) )\r\n\t\t\treturn Double.POSITIVE_INFINITY;\r\n\r\n\t\tdouble timeToY = collisionWithAxis(getLocation().getY(), getVelocity().getY(),...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save subject in DB
public Subject saveSubject(Subject subject){ return daoService.saveSubject(subject); }
[ "Subject save(Subject subject);", "@PostMapping(\"/saveSubject\")\r\n\tpublic String saveSubject(@ModelAttribute(\"subject\") Subject subject) {\n\t\tsubjectService.saveSubject(subject);\r\n\t\t\r\n\t\treturn \"redirect:/subject/list\";\r\n\t}", "List<Subject> saveAll(List<Subject> subjects);", "@PostMapping(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleAtomicProcess" $ANTLR start "entryRulePredicateProcess" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1824:1: entryRulePredicateProcess : rulePredicateProcess EOF ;
public final void entryRulePredicateProcess() throws RecognitionException { HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS"); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/...
[ "public final void entryRulePredicateAtomic() throws RecognitionException {\n\n \tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n\n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use PushMsgTest.newBuilder() to construct.
private PushMsgTest(com.google.protobuf.GeneratedMessageLite.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private p_testMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private PushMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "Message createMessage();", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a random push velocity, to make the game less boring
private int randomPushVelocityChange() { int result = pushVelocityChangeMin + random.nextInt(pushVelocityChangeMax - pushVelocityChangeMin + 1); return result; }
[ "private void velocityOfBall() {\r\n RandomGenerator rgen = RandomGenerator.getInstance();\r\n vy = RECOMMENDED_VELOCITY_FOR_Y;\r\n vx = rgen.nextDouble(VELOCITY_MIN_FOR_X, VELOCITY_MAX_FOR_X);\r\n //with a probability of 50%, changes the sign of the obtained number to minus\r\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column sb_msg_push_fail.community
public void setCommunity(String community) { this.community = community == null ? null : community.trim(); }
[ "public void setCommunityID(int value) {\n this.communityID = value;\n }", "public void setCommunityName(String communityName) {\n this.communityName = communityName == null ? null : communityName.trim();\n }", "public String getCommunity() {\n return this.community;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used by the constructor to load the inventory from the database.
private void loadInventory() { InventoryDatabaseHelper idh = new InventoryDatabaseHelper(context); SQLiteDatabase inventory_db = idh.getReadableDatabase(); String sql = "SELECT item_id, qty, qty_metric FROM Inventory WHERE qty > 0 ORDER BY item_id"; // Query the DB for the inventory info Cursor curso...
[ "public Global_Inventory_Management(){\n // Read in inventory list from file.\n loadInventoryList(); // Proposed inventory file loading method\n }", "public Inventory(Context con) {\r\n\t\tcontext = con;\r\n\t\t\r\n\t\tloadInventory();\r\n\t}", "public Inventory() {\r\n initialize();\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the ImagePool instance
public static final ImagePool getPool() { if (pool == null) { pool = new ImagePool(); } return pool; }
[ "public Pool<PoolType, Long> getPool() {\n return this.pool;\n }", "public ObjectPool getObjectPool();", "protected ClassPool getClassPool() {\r\n return pool;\r\n }", "OMMPool getPool();", "private JedisPool getPool() {\n if (pool == null) {\n JedisPoolConfig config = new JedisP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This sets the two propagationeffect parameters (distanceRupParam and isOnHangingWallParam) based on the current site and eqkRupture. The hangingwall term is rake independent (i.e., it can apply to strikeslip or normal faults as well as reverse and thrust). However, it is turned off if the dip is greater than 70 degrees...
protected void setPropagationEffectParams() { if ( (this.site != null) && (this.eqkRupture != null)) { distanceRupParam.setValue(eqkRupture, site); distRupMinusJB_OverRupParam.setValue(eqkRupture, site); // set the srcSiteAngle parameter (could make a subclass of // PropagationEffectParam...
[ "protected void setPropagationEffectParams() {\n\n\t\tif ( (this.site != null) && (this.eqkRupture != null)) {\n\t\t\tdistanceJBParam.setValue(eqkRupture, site);\n\t\t}\n\t}", "protected void initPropagationEffectParams() {\n\n distanceRupParam = new DistanceRupParameter(0.0);\n distanceRupParam.addParamete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column S_CONTROL.OPTION2_SMART_DEFAULT
public void setOPTION2_SMART_DEFAULT(BigDecimal OPTION2_SMART_DEFAULT) { this.OPTION2_SMART_DEFAULT = OPTION2_SMART_DEFAULT; }
[ "public BigDecimal getOPTION2_SMART_DEFAULT() {\r\n return OPTION2_SMART_DEFAULT;\r\n }", "public void setSMART_OPTION2(BigDecimal SMART_OPTION2) {\r\n this.SMART_OPTION2 = SMART_OPTION2;\r\n }", "public void setOPTION1_SMART_DEFAULT(BigDecimal OPTION1_SMART_DEFAULT) {\r\n this.OPTION...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table uc_country
UcCountry selectByPrimaryKey(Long id);
[ "public interface countryColumns{\n public static final String ID = \"_id\";\n\t\tpublic static final String COUNTRY = \"country\";\n\t\tpublic static final String COUNTRY_EN = \"country_en\";\n\t}", "Country selectByPrimaryKey(String code);", "public void setCountryId(long countryId);", "public void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Activity__Group_5_1__1__Impl" $ANTLR start "rule__Activity__Group_6__0" InternalActivityDiagram.g:1710:1: rule__Activity__Group_6__0 : rule__Activity__Group_6__0__Impl rule__Activity__Group_6__1 ;
public final void rule__Activity__Group_6__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalActivityDiagram.g:1714:1: ( rule__Activity__Group_6__0__Impl rule__Activity__Group_6__1 ) // InternalActivityDiagram.g:1715:2: rule__Acti...
[ "public final void rule__Activity__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:1306:1: ( ( ( rule__Activity__Group_6__0 )? ) )\n // InternalActivityDiagram.g:1307:1: ( ( rule__Activit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
binary array to string
public static String binaryToString(int[] binary) { String toReturn = ""; int[][] chunks = getChunks(binary, 8); for (int[] t : chunks) toReturn += (char) (binaryArrayToInt(t)); return toReturn; }
[ "public static String byteArrayToBinaryString(byte[] array) {\n\t\tStringBuilder str = new StringBuilder();\n\t\tfor(byte b : array) {\n\t\t\tstr.append((\"00000000\"+Integer.toBinaryString(b)).substring(Integer.toBinaryString(b).length()));\n\t\t\tstr.append(\" \");\n\t\t}\n\t\treturn str.toString();\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
It targets a ComLine and Heliostat to set a focus new coordinates.
public String newFocus(int heliostatId, int focus, int x, int y, int z) { try { if (!serialController.isOpen()) openSerialController(); Heliostat heliostat = comLine.getHeliostats().get(heliostatId); serialController.send(setNewFocusFrame(heliostatId, focus, x...
[ "public void setOrderLine (MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tMOrgPOS orgpos = MOrgPOS.getOrgPos(getCtx(), oLine.getParent().getAD_Org_ID(), get_Trx());\n\t\tif(M_Locator_ID > 0 && (oLine.getParent().getC_DocTypeTarget_ID() == orgpos.getDocType_Ticket_ID()))\n\t\t\tM_Locator_ID = oLine.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
helper function to parse the type of sensor in config
private void handle_sensor_type(String text) { switch(text.toLowerCase()) { case "video": this.sensor_type = SensorType.VIDEO; break; case "audio": this.sensor_type = SensorType.AUDIO; break; case "light": this.sensor_type = SensorType.LIGHT; break; default: break; } }
[ "SensorType getType();", "private static SensorNode parseSensor(Scanner s) {\n String token = s.next(); //Skip the non-terminal\n switch (token) {\n case \"fuelLeft\":\n return new SensorNode(SensorNode.Sensor.FUEL_LEFT);\n case \"oppLR\":\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rotates the specified TreeNode to the right. Preconditions: TreeNode Postconditions: New BST based off of rotation properties.
protected TreeNode rotateRight(TreeNode tNode) { TreeNode left = tNode.getLeft(); TreeNode leftright = left.getRight(); tNode.setLeft(leftright); left.setRight(tNode); return left; }
[ "private void rightRotation() {\n\t\tE elem = getData();\n\t\tBalancedBinarySearchTree<E> t = getLeft();\n\t\tsetData(t.getData());\n\t\tsetLeft(t.getLeft());\n\t\tt.setData(elem);\n\t\tt.setLeft(t.getRight());\n\t\tt.setRight(getRight());\n\t\tsetRight(t);\n\t\tt.computeHeight();\n\t\tcomputeHeight();\n\t}", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the number of spatial classes of super channels and put it in a list of spatial super channels, which depends of the number of dimensions, the signalBw, channelSpacing, bandGuard, slotBw and the modulationFormat that were set up.
public void createSpaceClasses(){ //add the number of classe demand in a list of superchannel spaceSC_List = new ArrayList<OpticalSuperChannel>(); for ( int i = 1 ; i < this.spatialDimension+1 ; i++ ) { spaceSC_List.add(new OpticalSuperChannel( i , this.signalBw, this.channelSpacing, this.bandGuard, this.s...
[ "static void groveChannels() {\n\n\t\tswitch (myParent) {\n\t\tcase 1:\n\n\t\t\tCHANNEL_GARDENER_COUNT = Channels.GARDENER1_COUNT;\n\t\t\tCHANNEL_GROVE_COUNT = Channels.GROVE1_COUNT;\n\n\t\t\tCHANNEL_GROVE_LOCATIONS = Channels.GROVE1_LOCATIONS;\n\t\t\tCHANNEL_GROVE_ASSIGNED = Channels.GROVE1_ASSIGNED;\n\t\t\tCHANNE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }