query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Get the kill password as a hex string. The first character of the return string is x
public String getKillPwd() { return "x" + new String(Hex.encodeHex(readMemory(0, 0, 32).toByteArray())); }
[ "public String toHexString() {\r\n\t\tStringBuilder passwordString = new StringBuilder();\r\n\t\tfor (Character c : password) {\r\n\t\t\tint item = (int) c;\r\n\t\t\tString hexString = Integer.toHexString(item);\r\n\t\t\tpasswordString.append(String.format(\"%s\\n\", hexString));\r\n\r\n\t\t}\r\n\t\treturn password...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
runs all filters of the filterType sType/ Use this method within filters to run custom filters by type
public Object runFilters(String sType) throws Throwable { // if (RequestContext.getCurrentContext().debugRouting()) { // Debug.addRoutingDebug("Invoking {" + sType + "} type filters"); // } boolean bResult = false; List<EatuulFilter> list = FilterLoader.getInstance().getFil...
[ "public void setFilterByType(FilterTypes filterByType) {\n this.filterByType = filterByType;\n }", "public SubsetFilter getFilter(int type);", "private void makeFilterActions()\n {\n filterNone = new Action()\n {\n @Override\n public void run()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deprecated; instead use: AcDomesticCandidateRouteLegTools.ArrivalLocalTmComparator
public static JwComparator<AcDomesticCandidateRouteLeg> getArrivalLocalTmComparator() { return AcDomesticCandidateRouteLegTools.instance.getArrivalLocalTmComparator(); }
[ "public static JwComparator<AcUspsDomesticRouteStatusFlight> getArrivalLocalTmComparator()\n {\n return AcUspsDomesticRouteStatusFlightTools.instance.getArrivalLocalTmComparator();\n }", "public static JwComparator<AcUspsInternationalCandidateRouteTmpLeg> getArrivalLocalTmComparator()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the ith "Invoice" element
void removeInvoice(int i);
[ "void unsetInvoiceNo();", "void removeFeePlanBVOItem(int i);", "private void clearInvoiceTable() {\n \n DefaultTableModel model = (DefaultTableModel)tableInvoices.getModel(); \n int rows = model.getRowCount(); \n for(int i = rows - 1; i >=0; i--)\n {\n model.removeRo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the Panel controller assosieted to View Controller.
IPanelController getContentPanelController();
[ "private void createViewController() {\n if (outputFile.equals(\"out\")) {\n this.fileWriter = new OutputStreamWriter(System.out);\n } else {\n try {\n this.fileWriter = new FileWriter(outputFile);\n } catch (IOException e) {\n // ruh roh\n System.exit(-1);\n }\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RkLog.i("exists method", "file path>"+key);
@Override public synchronized boolean exists(String key) { return getFile(key).exists(); }
[ "public void fileExists () {\n System.out.println(\"File already exists.\");\n }", "boolean getFileExists(FilePath path);", "@Test\n public void keyFilePathTest() {\n // TODO: test keyFilePath\n }", "public boolean checkIfFileExist(){\n if(f.exists()) {\n return true;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CONSTRUCTOR Create an Agent. Sets leader ID to its own AID, conversion and met follower counters to 0, and finally "is leader" and "election complete" flags to false.
public Agent(int AID) { this.AID = AID; this.leaderAID = AID; conversions = 0; metFollowers = 0; isLeader = false; electionComplete = false; this.color = blueish; size = new Dimension(25, 25); }
[ "public Agent() {\n this(null, false);\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show print preview dialog
public void printPreview() { //get printable from table tableCliper = new TableCliper(table, pageFormat); //build a printPreview dialog to show the paper PrintPreview2 printPreview = new PrintPreview2(tableCliper, 0); JDialog newDialog = new JDialog(); newDialog.setTitle("打印预览"); newDialog.setModal(...
[ "public void handlePrintPreviewCmd() {\n\t\tint i = tabbedPane.getSelectedIndex();\n\t\tCorpus corpus = corpora[i];\n\t\tdoPrintPreview(findPrintableComponent(),\n\t\t\tcorpus + \" \" + getTitle());\n\t}", "public void previewPopup() {\n\t\tif (waitForAndGetElement(ELEMENT_CKEDITOR_BUTTON_PREVIEW,5000,0)!=null) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Puts the given key and value in the hash linkedlist. Return true if successfully added and false if the key already exists. Calls the resize method when the capacity reaches 85 percent or more.
@Override public boolean put(KeyType key, ValueType value) { // TODO Auto-generated method stub int num = Math.abs(key.hashCode()) % hash.length; // calculating the index if (containsKey(key)) { // if key already exists return false; } hash[num].add(new LinkedNode(key, value)); // otherwis...
[ "public boolean add(K key, V value)\r\n\t{\r\n\t\tif (key == null || value == null){ return false; }\r\n\t\tKeyValuePair<K,V> pair = new KeyValuePair<>(key,value);\r\n\t\tint index =hashKeyToIndex(key);\r\n\t\tif(!contains(key)){\r\n\t\t\tstorage.add(pair,index);\r\n\t\t\tsize++;\r\n\t\t\tif(getLoad()>3){\r\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query a collection with JXPath and return value of node
public Object xpathQuery(Collection<?> collection, String query) { JXPathContext pathContext = JXPathContext.newContext(collection); Object result = null; try { result = pathContext.getValue(query); } catch (JXPathNotFoundException e) { logger.log(Level.WARNING, "JXPath exception: {0}", e.ge...
[ "private Collection search(Element rootElement, String xpathExpression)\n throws JaxenException {\n JDOMXPath path = new JDOMXPath(xpathExpression);\n Collection elementCollection = path.selectNodes(rootElement);\n return elementCollection;\n }", "private static Object evaluateExpression(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end method to double length of array Playlist toString
public String toString() { String output = "--------------My Playlist---------------\n"; for (int s = 0; s< countSong; s++) { output+= playlist[s].toString() + "\n"; output+="--------------------------------\n"; } return output; }
[ "public String playlistToString(){\n String out = \"\";\n out =\"********** Playlist **********\\n\"+\n \"** Title: \"+name+\"\\n\"+\n \"** Duration: \"+timeToFormat(updateDuration())+\"\\n\"+\n \"** Genre: \"+changeGendersOfPlaylist(playlistAllGenders())+\"\\n\";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to obtain the number of occurrences of an individual keyword in a response.
int getKeywordCount(String keyword, int responseIndex);
[ "public static int getKeywordCount()\r\n\t{\r\n\t\treturn keywordCount;\r\n\t}", "public int getCount( String word ){\n \n //check if the word is present\n if ( present (word) ){\n \n //if it is, get its current count and return it (the value mapped to the key \"word\")\n return data.get(wor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the BusinessDocument object at the specified index.
public BusinessDocument getBusinessDocument(int index) { return (BusinessDocument)_objBusinessDocument.get(index); }
[ "SingleDocumentModel getDocument(int index);", "public BusinessDocument removeBusinessDocument(int index)\n {\n return (BusinessDocument)_objBusinessDocument.remove(index);\n }", "public Book getBook(int index)\r\n\t{\r\n\t\tBook book = null;\r\n\t\ttry {\r\n\t\t\tbook = items.get(index);\r\n\t\t} catch(In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy constructor for Weigth Biased Leftist Heaps. Time complexity: O(n)
public WBLeftistHeap(WBLeftistHeap<T> h) { root = copy(h.root); }
[ "@SuppressWarnings(\"unchecked\")\n @Override\n public Object clone() {\n try {\n // Create via super.\n BinaryHeap<TKey, TValue> clone = (BinaryHeap<TKey, TValue>) super\n .clone();\n\n // Make a copy of the underlying \"org.teneighty.heap\" structur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepares the class for use by reading the storage settings from Prefs and setting the directories accordingly. Note: This should be called before any IO operations are performed.
public static void initialize() { storage = Prefs.getInt(R.string.pref_storage); setDirectories(); }
[ "private void initializeStorage() throws IOException {\n\t\t// Check for user set directory in settings. If exist use directory.\n\t\tif (existStoragePath()) {\n\t\t\tsetStorageFile(new File(settings.getStoragePath()));\n\t\t\tsetStorageFilePath(settings.getStoragePath());\n\t\t}\n\t\t// Check for storage file if d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Method Name: randomHashOfString This method takes a string s and return a random Hash value generated using it with FNV hash.
public static int randomHashOfString(String s) { BigInteger hash=FNV64INIT; for(int j=0;j<s.length();j++) { hash=hash.xor(BigInteger.valueOf(s.charAt(j))); hash=hash.multiply(FNV64PRIME).mod(TWO.pow(64)); } return hash.intValue(); }
[ "public String computeHash(String s);", "private static String hash(String s) {\r\n\t\treturn Hashing.sha256().hashString(s, StandardCharsets.UTF_8).toString();\r\n\t}", "public static Hash fromString(String s) {\n try {\n return new Hash((byte[]) Hex.decodeHex(s.toCharArray())); // Return the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for CopyrightCip.
public void setCopyrightCip(String value) { setAttributeInternal(COPYRIGHTCIP, value); }
[ "public void setNetworkCopyrightFlag(String value) {\n setAttributeInternal(NETWORKCOPYRIGHTFLAG, value);\n }", "public void setCopyrightFlag(String value) {\n setAttributeInternal(COPYRIGHTFLAG, value);\n }", "public void setCopyrightId(Number value) {\n setAttributeInternal(COPYRIGH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes a Meal of the actual Users MealList
public void deleteMeal(Meal meal, User user) { //First the Meal-List is read File tmpFoodListFile = new File(context.getFilesDir() + "/" + user.getName() + "Meal.xml"); ArrayList<Meal> tmpMealArrayList = getMealList(user); //Then the Meal is searched and removed if(tmpMealArrayLi...
[ "public void delete(Meal meal) {\n mRepository.delete(meal);\n\n }", "@DeleteMapping(\"/meals/{id}\")\n @Timed\n public ResponseEntity<Void> deleteMeal(@PathVariable Long id) {\n log.debug(\"REST request to delete Meal : {}\", id);\n mealRepository.delete(id);\n return Respons...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
as branched_behaviour has the same structure as serviceEffectSpecification so it calls function serviceEffectSpecification to analyze received action
private SystemTreeDemandArray branched_behaviour( Element branched_behaviour_elem, double currprob) { SystemTreeDemandArray res = serviceEffectSpecification( branched_behaviour_elem, currprob); return res; }
[ "protected abstract void applyEffects();", "public interface AssetApplicable {\n\n /**\n * Applys the effect of this object to the given asset.\n * @param asset Asset to affect.\n * @return String message of action/event.\n */\n String useEffect(Asset asset);\n\n}", "@Test\n public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
boolean permissionAccessCoarseLocationApproved = ActivityCompat.checkSelfPermission(this, permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED;
public void requestLocationPermissions() { boolean permissionAccessCoarseLocationApproved1 = ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED; }
[ "private void getLocationPermission() {\n\n String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION};\n\n if(ContextCompat.checkSelfPermission(this.getApplicationContext(),\n FINE_LOCATION) == PackageManager.PERMISSIO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field phone is set (has been assigned a value) and false otherwise
public boolean isSetPhone() { return this.phone != null; }
[ "public boolean isSetPhone() {\n return this.phone != null;\n }", "public boolean isSetPhone() {\n\t\treturn phone != null;\n\t}", "public boolean isSetPhone() {\n\t\treturn this.phone != null;\n\t}", "public boolean isSetTelephone() {\n return this.telephone != null;\n }", "public boolean isSetPhon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required int32 levelUpItemId = 18;
int getLevelUpItemId();
[ "abstract int getItemID(int level);", "public void setItemLevel(int level) { this.level = level; }", "public int getLevelUpItemId() {\n return levelUpItemId_;\n }", "public long getSuburItemId();", "io.dstore.values.IntegerValue getLevelId();", "io.dstore.values.IntegerValueOrBuilder getLevelI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleEEvenFilter" $ANTLR start "ruleEEvenFilter" InternalAADMParser.g:1074:1: ruleEEvenFilter : ( ( rule__EEvenFilter__UnorderedGroup ) ) ;
public final void ruleEEvenFilter() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:1078:2: ( ( ( rule__EEvenFilter__UnorderedGroup ) ) ) // InternalAADMParser.g:1079:2: ( ( rule__EEvenFilter__UnorderedGroup ) ) ...
[ "public final void rule__EEvenFilter__UnorderedGroup__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:21825:1: ( rule__EEvenFilter__UnorderedGroup__Impl ( rule__EEvenFilter__UnorderedGroup__2 )? )\n // Inter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieves recently visited user from shared preferences.
public void getRecentUsers(View view){ SharedPreferences sharedPref = getContext().getSharedPreferences("recentVisited", Context.MODE_PRIVATE); int size = sharedPref.getInt("size", 0); // clears the variables. userName.clear(); uid.clear(); for (int i = size+1; i >0 ; i-...
[ "public HashMap<Integer, User> getCurrentUsers();", "public User getUserFromPref ()\n {\n\n Gson gson = new Gson();\n String json = sharedPreferences.getString(\"userObj\", \"\");\n User obj = gson.fromJson(json, User.class);\n return obj;\n\n }", "public static User getCurrent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Service Layer of application for UserSkillset. Method declaration of business logic.
public interface AppUserSkillsetService { /** * Fetch all userSkillset details. * * @return userSkillsets details in json format. */ List<UserSkillsetMng> fetchDetailsUserSkillsets(); /** * Fetch userSkillset data on add user screen. * * @param user contains the userId of user. * @re...
[ "User fetchDataUserSkillset(User user);", "List<UserSkillsetMng> fetchDetailsUserSkillsets();", "EmployeeSkill createEmployeeSkill();", "Map<String, Object> validateSaveUserSkillset(User user);", "ProductSkill createProductSkill();", "Skill createSkill();", "Skill getSkill();", "public void AddNewSkil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field142' field
public java.lang.CharSequence getField142() { return field142; }
[ "public java.lang.CharSequence getField142() {\n return field142;\n }", "public java.lang.CharSequence getField146() {\n return field146;\n }", "public java.lang.CharSequence getField146() {\n return field146;\n }", "public java.lang.CharSequence getField123() {\n return field123;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Report interface provides creating excel reports
public interface ReportService { /** * Some constants using in reports */ String[] dashboardSheetNames = {"Level And Quantity", "Level And Trainers", "Training And Quantity"}; String[] levelAndQuantityColumns = {"Level", "Course Name", "Group Name"}; String[] levelAndTrainersColumns = {"Traine...
[ "private void createExcelReport() {\n\t\t// logger.entering();\n\n\t\twb = new HSSFWorkbook();\n\t\tStyles.initStyles(wb);\n\t\t\n\t\t//Report Details\n\t\tthis.createReportInfo();\n\n\t\t//Map of sheet names - individual reports and corresponding data\n\t\tthis.createReportMap();\n\t\t\n\t\t//Render reports in th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function checks if view command refers to displaying tasks on a particular date
private boolean isViewCommandDisplayingTasksOnADate(Calendar[] calendar)throws Exception { String dateStr=_userInput.trim(); calendar[0] = isValid(dateStr); if(calendar[0]!=(null)){ return true; } return false; }
[ "private boolean isViewCommandDisplayingTasksInAnInterval(Calendar[] calendar)throws Exception{\r\n\t\tString startDate,endDate;\r\n\t\tif((_userInput.trim()).startsWith(PREFIX_FROM_WITHOUT_SPACE )){\r\n\t\t\t_userInput = (_userInput\r\n\t\t\t\t\t.substring(_userInput.indexOf(PREFIX_FROM_WITHOUT_SPACE ) + (PREFIX_F...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deregisterProvider: deregister with global register. local register is responsible for informing listeners that have already contacted this register. deregister with local register.
public void deregisterProvider(AnubisProvider provider) { requests.put(new UserProviderRequest(UserProviderRequest.Deregister, provider, null, 0)); }
[ "@Override \r\n\t public void deregister() { \r\n\t System.out.println(\"Driver deregistered\"); \r\n\t }", "void deregisterDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);", "private void deRegister() {\n\t\ttry {\n\t\t\tOverlayNodeSendsDeregistration deregister = new OverlayNodeSendsDere...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Variable Exp'.
<C, PM> VariableExp<C, PM> createVariableExp();
[ "VariableExp createVariableExp();", "Variable createVariable();", "public Expression makeVariableExpression(Variable var)\n\t{\n\t\treturn new VariableExpression(var);\n\t}", "DynamicVariable createDynamicVariable();", "public Variable(String name) {\n this.name = name;\n checkRep();\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Complete the post survey form of Get Moving game plan
public void completeGetMovingPostPlanSurvey(int count){ fillPostSurveyForm(1,2); selectAnswerForActivityHavingListOfRadioBtns(count, postPlanSurveyFrame); switchToDefaultContent(); switchToPostPlanSurveyFrame(); // clickActivityCompleteBtn(); switchToDefaultContent(); enterValueInTextareaOfGetMovingPostP...
[ "public void completeEaTwellPostPlanSurvey(){\n\t\t\t\tsubmitGamePlan();\n\t\t\t\tfillPostSurveyForm(2,2);\n\t\t\t}", "public void completeEaTwellPostPlanSurvey(){\n\t\tsubmitGamePlan();\n\t\tfillPostSurveyForm(2,2);\n\t\tswitchToPostPlanSurveyFrame();\n\t\tselectAnswerForActivityHavingListOfRadioBtns(2,postPlanS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SSID != null && title == null Ensures: if there exists a guest such that guest.SSID == SSID guest.title == title otherwise InvalidIDException is thrown
void changeGuestTitle(String SSID, String title) throws InvalidIDException;
[ "String getGuestTitle(String SSID) throws InvalidIDException;", "void addGuest(String SSID, String firstname, String lastname, String title, String email, String phone) throws InvalidIDException;", "void generateGuestAccount(String SSID) throws InvalidIDException;", "String getGuestEmail(String SSID) throws I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A web feed that contains the items.
public interface Feed extends Element { /** * Returns the feed type. */ public FeedType getType(); /** * Convenience method to retrieve the feed title. */ public String getTitle(); /** * Convenience method to retrieve the feed link. */ public String getLi...
[ "static public List<InlineResponse2001> feedsGet()\n {\n ArrayList<InlineResponse2001> l = new ArrayList<>();\n\n for (int i = 0; i < 512; i += (i % 2 == 0) ? 3 : 7)\n {\n InlineResponse2001 f = new InlineResponse2001();\n\n f.setId(i);\n f.setTitle(\"Some ra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save LOCATION, contactName & contactNumber state
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (LOCATION != null) { outState.putParcelable("locatie", LOCATION); } if (contactName != null) { outState.putString("contactName", contactName); } ...
[ "void fetchAndSaveLocationData();", "public void saveAddressDetail(Record inputRecord);", "Contact saveContact(Contact contact) throws Exception;", "public void saveLocation(Location location);", "public void saveAddressAdditionalInfo(Record record);", "public void save(Address address);", "private void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The view is not scrolling. Note navigating the list using the trackball counts as being in the idle state since these transitions are not animated. public static int SCROLL_STATE_IDLE = 0; The user is scrolling using touch, and their finger is still on the screen public static int SCROLL_STATE_TOUCH_SCROLL = 1; The use...
@Override public void onScrollStateChanged(AbsListView view, int scrollState) { SCROLL_STATE_FLING }
[ "@Test\n public void testFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to set Api url
public static void setapi_url(String ap) { //checking for valid url format String check = ap; String str = check.substring(0, 7); // System.out.println(""+str ); String t = "http://"; String s = "https:/"; String st = "https://"; ...
[ "java.lang.String getApiUrl();", "private String getApiURL() {\n\t\treturn getWebsiteURL() + \"/api\";\n\t}", "public static void setApiUrl(String apiUrl) {\n\t\tAPI_URL = apiUrl;\n\t}", "EasyRequest setUrl(String url);", "public void setApiUrl(String apiUrl) {\n this.apiUrl = apiUrl;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fully reads the next up to maxWidth + 1 characters from the reader and returns them as a string. If the extra character is read then the apprevMarker in appended to the result in its place. Closing the stream is the caller's responsibility.
public static String abbreviate(Reader reader, int maxWidth, String abbrevMarker) throws IOException { char[] buffer = new char[maxWidth + 1]; int n = IOUtils.read(reader, buffer); StringBuilder sb = new StringBuilder(); sb.append(buffer, 0, Math.min(n, maxWidth)); if (n > maxWid...
[ "private String readFully(Reader reader) throws IOException {\n char[] arr = new char[8*1024]; // 8K at a time\n StringBuilder buf = new StringBuilder();\n int numChars;\n while ((numChars = reader.read(arr, 0, arr.length)) > 0) {\n buf.append(arr, 0, numChars);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prompt the user to export a context
public void importContext() { JFileChooser chooser = new JFileChooser(Constant.getContextsDir()); File file = null; chooser.setFileFilter( new FileFilter() { @Override public boolean accept(File file) { if (file.isDi...
[ "public void exportContext() {\n ContextExportDialog exportDialog =\n new ContextExportDialog(View.getSingleton().getMainFrame());\n exportDialog.setVisible(true);\n }", "public void directoryPathPrompt() {\n System.out.println(\"Enter a file path to export the PDF of the sc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests discovering a file via refresh local when neither the file nor its parent exists in the workspace.
public void testFileDiscovery() throws Throwable { /* initialize common objects */ IProject project = projects[0]; IFolder folder = project.getFolder("Folder"); IFile file = folder.getFile("File"); IResource[] both = new IResource[] {folder, file}; ensureExistsInFileSystem(both); ensureDoesNotExistInWorkspace...
[ "public void testGetFileForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertTrue(\"1.0\", root.getFileForLocation(root.getLocation()) == null);\n \t}", "public void testFindFilesForLocation() {\n \t\t//should not find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the maxMeasureValue variable to the minimum value that the gauge could display. So on the next move of the pointer/bar the indicator will be set to the pointer/bar position again.
public void resetMaxMeasuredValue() { this.maxMeasuredValue = getMinValue(); repaint(); }
[ "public void resetMinMeasuredValue()\n {\n this.minMeasuredValue = getMaxValue();\n }", "public void resetMaxMeasuredValue(final double VALUE)\n {\n this.maxMeasuredValue = VALUE;\n }", "private void updateMaximumValueIndicator(double maxValue){\n if(graphMetricDropdown.getSelec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Revoke a users share on a file.
public boolean revokeShare(String fileId, String userAddress) { return auth.revokeShare(fileId, userAddress); }
[ "public boolean unshare(String file, String id) throws IOException {\n\t\tLog.i(\"GDRIVE\", \"Unsharing \" + file + \" id \" + id);\n\n\t\tString fileid = getFileIdByName(file, mAppFolder);\n\t\tif (fileid == null)\n\t\t\treturn false;\n\t\t\n\t\tmService.permissions().delete(fileid, id).execute();\n\n\t\treturn tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The curvature of the fit.
public double curvature() { return _rho; }
[ "org.landxml.schema.landXML11.Clockwise xgetCurvature();", "double getMinCurvatureRadius();", "Double getMinCurvatureRadius();", "public double curvature(double t) {\n return parabola.curvature(t);\n }", "org.landxml.schema.landXML11.Clockwise.Enum getCurvature();", "private Vector getCurvatureS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
JDBC 4.0 Sets the designated parameter to the given java.sql.RowId object. The driver converts this to a SQL ROWID value when it sends it to the database
void setRowId(int parameterIndex, RowId x) throws SQLException;
[ "public void setRowId(int value) {\n this.rowId = value;\n }", "@Override\n\tpublic void setRowId(String parameterName, RowId x) throws SQLException {\n\n\t}", "public void setRowId(Integer rowId) {\n this.rowId = rowId;\n }", "@OfMethod({\"setRowId(java.lang.String,java.sql.RowId)\",\"set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
param seq are, in this order, [instName, D, CK, OUT, SS, SR, AS, AR, SP, AP]
public String writeSeqInst(ArrayList<String> paramSeq, int delay){ String seqStateInstance = String.format("%nmap<string,vector<int>> %sDelay;%n",paramSeq.get(0)); for(int k = 1; k<8;k++){ if(paramSeq.get(k) != "nullptr"){ seqStateInstance = String.format("%s%sDelay.insert(pair<string,vector<int>>{%s->get...
[ "@Test\n\tpublic void test_need_adjust_instno_sequence() {\n\t\tDetermineSidAndInstNo ds = new DetermineSidAndInstNo();\n\t\tds.setSysInfos(new String[]{\"MFG_00\", \"NBA_02\", \"ORA_04\"});\n\t\t\n\t\tContextInfo ctx = new ContextInfo();\n\t\tctx.setScenario(Constants.SCENARIO_SYSINFO);\n\t\tctx.setSid(\"AMU\");\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a map of character entity reference names (String) to unicode code points (Integer).
public static Map<String,Integer> getNameToCodePointMap() { return NAME_TO_CODE_POINT_MAP; }
[ "public static void char2occMap(){\n\t\tInteger occurrences;\n\t\tfor (String character : characters.keySet()){\n\t\t\toccurrences = characters.get(character);\n\t\t\taddIntCharToMap(occurrences, character);\n\t\t}\n\t}", "@Test\r\n public void testCharacterEntityReferences() {\r\n TreeMap<String, Entit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert a column to a tuple
protected Tuple columnToTuple(ColumnFamilyRecordReader.Column column, CfDef cfDef, AbstractType comparator) throws IOException { Tuple pair = TupleFactory.getInstance().newTuple(2); // name if(comparator instanceof AbstractCompositeType) StorageHelper.setTupleValue(pair, 0, comp...
[ "public Tuple getTuple();", "public abstract T getTuple(ResultSet result);", "TupleExpr createTupleExpr();", "private static String getNextTuple(Attribute column, String value, boolean firstTuple) {\n\t\tString s = null;\n\t\tif(value.matches(\"NULL\")) {\n\t\t\ts = \"NULL\";\n\t\t} else {\n\t\t\tString surro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first legal field in the ordered set where statusField = &63;.
@Override public LegalField findByFieldStatus_First( boolean statusField, OrderByComparator<LegalField> orderByComparator) throws NoSuchLegalFieldException { LegalField legalField = fetchByFieldStatus_First( statusField, orderByComparator); if (legalField != null) { return legalField; } String...
[ "@Override\n\tpublic LegalField fetchByFieldStatus_First(\n\t\tboolean statusField, OrderByComparator<LegalField> orderByComparator) {\n\n\t\tList<LegalField> list = findByFieldStatus(\n\t\t\tstatusField, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialise an instance of BZip2Exception
public BZip2Exception(String message, RuntimeException exception) { super(message, exception); }
[ "public BZip2Exception()\n\t{\n\t}", "public BZip2Exception(String message)\n\t{\n\t\tsuper(message);\n\t}", "public ByteArrayConversionException() {\n super();\n }", "public LibraryException() { }", "public ArchiveReadException()\n\t{\n\t}", "public InitializationFailedException() {\n super(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if for particular network response status code the call should be retried.
public boolean shouldRetryForStatusCode(int status) { return (status != 400 && status != 401 && status != 403 && status != 404); }
[ "protected abstract boolean isExpectedResponseCode(int httpStatus);", "public boolean isRetry();", "public boolean isRetryOk() {\n return retryTime <= Clock.unixTime() && !isFailed();\n }", "public boolean isRetried ()\r\n {\r\n return hasFailed () && retried_;\r\n }", "boolean hasResponseR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the ccList value for this SendEmailAction.
public void setCcList(java.lang.String ccList) { this.ccList = ccList; }
[ "public void setCc(Address... cc) {\n setAddressList(FieldName.CC, cc);\n }", "public java.lang.String getCcList() {\n\t\treturn ccList;\n\t}", "public void setCc(Collection<Address> cc) {\n setAddressList(FieldName.CC, cc);\n }", "public void setCc(Object cc) throws ApplicationException\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the (first) parameter with the given accession from the passed parameter group or null in case no parameter with the given accession exists.
private CVParam getParamFromGroup(List<CVParam> params, String accession) { for (CVParam p : params) { if (p.getAccession().equals(accession)) return p; } return null; }
[ "private ConfigurationParameter getSameNamedParmInGroup(ConfigurationParameter parm,\n ConfigGroup group) {\n ConfigurationParameter[] cps = group.getConfigParms();\n String parmName = parm.getName();\n for (int i = 0; i < cps.length; i++) {\n if (cps[i].getName().equals(parmName))\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__MainObject__Group_4_1__1" $ANTLR start "rule__MainObject__Group_4_1__1__Impl" InternalJSchema.g:1147:1: rule__MainObject__Group_4_1__1__Impl : ( ( rule__MainObject__PropertiesAssignment_4_1_1 ) ) ;
public final void rule__MainObject__Group_4_1__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalJSchema.g:1151:1: ( ( ( rule__MainObject__PropertiesAssignment_4_1_1 ) ) ) // InternalJSchema.g:1152:1: ( ( rule__MainObject__Prop...
[ "public final void rule__MainObject__Group_4__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalJSchema.g:1071:1: ( ( ( rule__MainObject__PropertiesAssignment_4_0 ) ) )\n // InternalJSchema.g:1072:1: ( ( rule__MainOb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CompoundCondition__Group__3" $ANTLR start "rule__CompoundCondition__Group__3__Impl" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:6611:1: rule__CompoundCondition__Group__3__Impl : ( ')' ) ;
public final void rule__CompoundCondition__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:6615:1: ...
[ "public final void rule__CompoundCondition__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:66...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of moreno
public int getMoreno() { return moreno; }
[ "public int getMOREDATAIN() {\n return moredatain;\n }", "public void setMoreno(int moreno) {\n this.moreno = moreno;\n }", "public int getNo() {\n \treturn textNo;\n }", "public String getNo() {\n return no;\n }", "public Integer getcMore() {\n return cMore;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Web Crawler City data to SQL
private void citySqlSet() { final String url = "http://www.ting.com.tw/tour-info/air-name.htm"; //查詢地區級城市的網址 Log.e(TAG,"Thread is called."); mHandler.post(new Runnable() { @Override public void run() { try { final String html = NetworkC...
[ "private void fillCitiesTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(INIT.GET_CITY.toString())) {\n if (!rs.next()) {\n try (PreparedStatement ps =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Repoe uma carta ao jogador ao fim de cada rodada
public void handRepositor(int j) { if (userHand.size() == 4 && g1.getP1().size() > 0) { //verifica o tamanho da mao e se ainda ha cartas na pilha userHand.add(j, g1.getP1().first());//guarda 1 na mao do jogador g1.getP1().removeFirst(); } else if (userHand.size() == 3...
[ "private void distribuirCartas() {\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tfor (Jogador jogador : jogadores) {\n\t\t\t\tCarta carta = baralho.retirarCarta();\n\t\t\t\tjogador.recebeCarta(carta);\n\t\t\t}\n\t\t}\n\n\t\t// vira ultima carta do baralho\n\t\tvira = baralho.retirarCarta();\n\t\t\n\t\tbroadcastVira()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the calculator ID of this calculator.
@Override public long getCalculatorId() { return model.getCalculatorId(); }
[ "public String getCalculatorName() {\n return this.calculatorName;\n }", "public String getCalcId() {\n return (String) getAttributeInternal(CALCID);\n }", "public static String getOperatorID() {\n\t\treturn operator_id;\n\t}", "@Override\n\tpublic void setCalculatorId(long calculatorId) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method that shows data for one name, or states that name has never been ranked pre: n != null, keyboard != null and is connected to System.in post: print out the data for n or a message that n has never been in the top 1000 for any decade
private static void oneName(Names n, Scanner keyboard) { System.out.println("Please Enter Desired Name: "); String inputName = keyboard.nextLine(); NameRecord output = n.nameSearch(inputName); if(output == null) System.out.println(inputName + " does not appear in any decade."); else { System.out.prin...
[ "private static void search(Names n, Scanner keyboard)\n\t{\n\t\tSystem.out.println(\"Please Enter Desired Name: \");\n\t\tString sub = keyboard.nextLine();\n\t\tArrayList<Object> output = n.substringSearch(sub);\n\t\tSystem.out.println(\"There are: \" + output.size() + \" choices for \" + sub + \".\\n\");\n\t\tSys...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of updateRenter method, of class RenterBusinessLayer.
@Test public void testUpdateRenter_9args() throws ValidationException { System.out.println("updateRenter"); String firstName = ""; String lastName = ""; String phone = ""; int gender = 0; String dateBirth = "2000"; Boolean isStudent = true; Bo...
[ "@Test\r\n public void testUpdateRenter_18args() throws Exception {\r\n System.out.println(\"updateRenter\");\r\n\r\n String updatedEmail = \"newrenter@test.com\";\r\n \r\n Renter renter = new Renter(renterID, \"testing@test.com\", \"whales\",\"Keith\", \"Smith\", \"613-555-6698\", 1,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an entry to a Wad buffer that contains the current date. Symbol is caseinsensitive. The entry is coerced to a valid name.
public Response addDateMarker(String symbol, String name) throws IOException { Wad buffer; if ((buffer = currentWads.get(symbol)) == null) return Response.BAD_SYMBOL; String marker = NameUtils.toValidEntryName(name); buffer.addData(marker, DATE_FORMAT.get().format(new Date()).getBytes(Charset.forN...
[ "public Response addMarker(String symbol, String name) throws IOException\r\n\t{\r\n\t\tWad buffer;\r\n\t\tif ((buffer = currentWads.get(symbol)) == null)\r\n\t\t\treturn Response.BAD_SYMBOL;\r\n\t\t\r\n\t\tString marker = NameUtils.toValidEntryName(name);\r\n\t\tbuffer.addMarker(marker);\r\n\t\tverbosef(\"Added ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "objects" element
public void setObjects(gov.nih.nlm.ncbi.www.UserFieldDocument.UserField.Data.Objects objects) { synchronized (monitor()) { check_orphaned(); gov.nih.nlm.ncbi.www.UserFieldDocument.UserField.Data.Objects target = null; ...
[ "public void setObjects(List<Object> objects);", "public void setObjects(GameObjects objects)\n\t{\n\t\tthis.objects = objects;\n\t}", "public void setCreatedObjects(String[] objects) {\n m_createdObjects = objects;\n }", "private void parseObjects(Level level, Element elementObjects) {\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XListLiteral__Group_3_1__1__Impl" $ANTLR start "rule__XClosure__Group__0" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7693:1: rule__XClosure__Group__0 : rule__XClosure__Group__0__Impl rule__XClosure__Group__1 ;
public final void rule__XClosure__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7697:1: ( rule__XClosure__Group__0...
[ "public final void rule__XClosure__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7709:1: ( ( ( ru...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .llql_proto.Relation rels = 2; repeated .llql_proto.Relation rels = 2;
java.util.List<com.vitessedata.llql.llql_proto.LLQLQuery.Relation> getRelsList();
[ "com.vitessedata.llql.llql_proto.LLQLQuery.Relation getRels(int index);", "RRelation getRRelation();", "amdocs.iam.pd.webservices.productrelations.productlistinput.Relations getRelations();", "@Override\n public Set<Relation> relations()\n {\n return LongStream.of(this.relationIdentifiers).mapToO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
process detail information of a certain task into several ArrayList. The first ArrayList is stored in firstCol The second ArrayList is stored in secondCol.
private void processTaskDetail(Task task) { assert task != null : "a null task cannot be processed"; String name = task.getName(); JDate startDate = task.getStartDate(); JDate endDate = task.getEndDate(); String descrition = task.getDescription(); boolean status = task.getDone(); for (String attr :...
[ "private void processTaskList(ArrayList<Task> lst) {\n\t\tassert lst != null : \"a null tasklit cannot be processed\";\n\t\tassert lst.size() > 0 : \"a empty tasklist cannot be processed\";\n\n\t\tif (info.getHighlight() == Default.HIGHLIGHT_LINE) {\n\t\t\tthis.highlightedLine = info.getHighlightLine();\n\t\t} else...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the synonyms of the word from the Wordnik API if not already in cache.
public Set<String> get(String word) { return synonymsCache.getUnchecked(word); }
[ "public final ArrayList getSynonyms(final String word) {\n System.setProperty(\"wordnet.database.dir\", \"/commons/student/2014-2015/\"\n + \"Thema11/Mkslofstra/WordNet-3.0/dict\");\n ArrayList synonyms = new ArrayList<String>();\n if (word != null) {\n // Concatenate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the toString of this event name which is the event name and starting time to end time.
public String toString() { if(!allDay){ return event + ": " + startTime + " to " + endTime; } else { return event + ": All Day"; } }
[ "public String toString() {\n return \"Start: \" + start_dateTime + \"\\nEnd: \" + end_dateTime;\n }", "public String toString() {\n return(\"Start: \" + startDateTime + \"\\nEnd: \" + endDateTime + \"\\nSitter: \" + sitterName);\n }", "@Override\n public String toString() {\n\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the default rendering (using the identity transform and default render context).
public RenderedImage createDefaultRendering();
[ "public RenderedImage createDefaultRendering() {\n return createScaledRendering(512, 0, null);\n }", "RenderedImage createDefaultRendering(Long id) throws RemoteException;", "@Handler(id = \"createDefaultViewRoot\",\n\toutput = {\n\t @HandlerOutput(name=\"viewRoot\", type=UIViewRoot.class...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes 4 fake Students before every test
@Before public void init() { student1 = new Student(); student1.setId(1); student1.setFirstName("Axel"); student1.setLastName("Zumwalt"); student1.setUserName("axelzum"); student1.setEmail("axelzum@iastate.edu"); student1.setPassword("123"); student2 = new Student(); student2.se...
[ "public void setUp() {\n student = new Student(\"music\", \"northeast\", \"CMDA\", 123);\n }", "@Override\r\n\t@Before\r\n\tpublic void testInit() {\t\r\n\t\tsuper.testInit();\r\n\t\tsessionController.login(testHospitalAdmin, getCampus(0));\r\n\t\tadminController.addDoctor(\"Frank\");\r\n\r\n\t\tsession...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start the RMI Registry
public static void startRMI() { try{ java.rmi.registry.LocateRegistry.createRegistry(1099); System.out.println("RMI Server ready"); } catch(RemoteException e) { e.printStackTrace(); } }
[ "public void startRegistery() throws RemoteException\n {\n try\n {\n Registry reg = LocateRegistry.createRegistry(1099);\n \n }\n catch (java.rmi.server.ExportException e)\n {\n \n }\n\n }", "private static void startRegistry(int RMIPortNum) throws RemoteExc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Diary myBreakUpDiary=new Diary(5); Entry entry= new Entry("My Break up Story"); entry.setEntryBody("It just happened"); myBreakUpDiary.addNewEntry(entry); Entry[]assertionEntry =new Entry[5]; assertionEntry[0]=entry; assertEquals(assertionEntry,myBreakUpDiary.getEntries()); Entry secondEntry= new Entry("My Break up Sto...
@Test void testDiaryEntryCanBeEntered(){ // Entry secondEntry= new Entry("My Break up Story"); // secondEntry.setEntryBody("It just happened again"); // myBreakUpDiary.addNewEntry(secondEntry); // assertionEntry[1]=secondEntry; // assertEquals(assertionEntry,myBreakUpDiary.ge...
[ "@Test\n public void testGetEntries() {\n System.out.println(\"getEntries\");\n \n Date TestDate = new Date();\n Entry E1=new Entry(123,123,123,\"TestTitle\",\"TestContent\",\"TestFlag\",TestDate);\n Entries EntriesTest = new Entries();\n Entries instance = EntriesTest;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method takes the formatted character array, and converts it into an image that will be used to create a new BarcodeImage. It adds the 'spines' to the image as well
private String[] getFormattedImage(String[] str) { // Ascii char values are between 2^0 and 2^8, we add 2 for the 'spines' int maxHeight = 10; int pos = 0; String[] img = new String[maxHeight]; // Populates the img array with the converted text values for (int i = 0; i < ...
[ "public boolean generateImageFromText()\r\n {\r\n String[] convertedChars = getConvertedChars();\r\n String[] formattedImage = getFormattedImage(convertedChars);\r\n this.image = new BarcodeImage(formattedImage);\r\n return true;\r\n }", "public Image createCodeImage(String plainCode) ;", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes a Faces HtmlInputTextarea component for a parameter. The multiple values associated with the parameter (parameter.getMultipleValues()) are used to generate a delimited single value. The super class method (InputTextArea.makeInputComponent) is then invoked to create component. The reverse operation is executed on ...
@Override public UIComponent makeInputComponent(UiContext context, Section section, Parameter parameter) { parameter.getContent().getSingleValue().setValue(makeDelimitedValue(parameter)); return super.makeInputComponent(context,section,para...
[ "public TextAreaParameter(String value, String name, String description,\n\t\t\t\tString section) {\n\t\t\tsuper(value, name, description, section);\n\t\t}", "ComponentInput createComponentInput();", "public void addNewQuestionInputTextArea(final String question) {\n if (isQuestionEditMode || getQuestion...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper class for the extendCases method.
private abstract interface CaseExtender { /** * Fill the values of the new variables in the given new case. * Note that the values of the old variables are already copied to the new case. * @param oldCase The old case. * @param newCase The new case with the new variables. ...
[ "public T caseExtends(Extends object)\n {\n return null;\n }", "public static void extendCases(DataBaseCases dbCases, Node newNode, CaseExtender filler) throws InvalidEditException {\n List<Node> newNodes = new ArrayList<Node>();\n newNodes.add(newNode);\n extendCases(dbCases, newNodes, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ypxx_backup.LSJG
public Float getLsjg() { return lsjg; }
[ "public String getBackupColumnConfig() {\n return getPathBySourceType(new Path(Constants.TMP, Constants.COLUMN_CONFIG_JSON_FILE_NAME), SourceType.LOCAL);\n }", "public String getJkglStxxb()\n\t{\n\t\treturn jkglStxxb;\n\t}", "public String getLsjgcc() {\n return lsjgcc;\n }", "public Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que genera una lista de los porcentajes de las 15 palabras mas comunes
private Lista<Float> listaPorcentaje(){ Lista<Float> porcentajes = new Lista<>(); if(this.palabras.getLongitud() <= 15){ for(Palabra p : this.palabras){ porcentajes.agrega(p.porcentaje); } }else{ for(int i = 0; i < 15; i++){ Pal...
[ "public void cargarhoras() {\n horas = new ArrayList<>();\n for (int i = 0; i < 24; i++) {\n if (i < 10) {\n horas.add(\"0\" + i);\n } else {\n horas.add(\"\" + i);\n }\n }\n }", "private void obtenerListaOrdenada() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the chargeTax3OnPoolHeat property.
public void setChargeTax3OnPoolHeat(boolean value) { this.chargeTax3OnPoolHeat = value; }
[ "public void setChargeTax1OnPoolHeat(boolean value) {\n this.chargeTax1OnPoolHeat = value;\n }", "public boolean isChargeTax3OnPoolHeat() {\n return chargeTax3OnPoolHeat;\n }", "public void setChargeTax2OnPoolHeat(boolean value) {\n this.chargeTax2OnPoolHeat = value;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Claimed chunks is the sum of the settlement sizes
public int getClaimedChunks() { Iterator<Integer> i = settlements.iterator(); int sum = 0; while ( i.hasNext() ) { Integer id = i.next(); LegendsSettlement settlement = SettlementManager.getInstance().getSettlementForId(id.intValue()); sum += settlement.size...
[ "long getTotalChunksInUse();", "int getChunksAmount();", "long getPatchedChunksSize();", "int getChunkSizesCount();", "private int[] countClaimedChunks(ClaimProfile profile) {\n int[] counts = new int[] { 0, 0 };\n\n for (ChunkData claimedChunk : profile.getClaimedChunks()) {\n coun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of MyHours constructor Finds the dates when the pay period starts and stops. Gets this from the PAYPERIOD table.
public void findPayPeriod() { BatSQL bSQL = new BatSQL(); String q = "SELECT * FROM PAYPERIOD"; ResultSet rs = bSQL.query(q); try { rs.next(); ppstart = rs.getString(1); ppstop = rs.getString(2); } catch (SQLException ex) { System.out.println...
[ "WorkingHours getWorkingHours();", "public MyHours(SaoWorker w)\r\n {\r\n findPayPeriod();\r\n setUpDates();\r\n CalcHours(w.getUserID());\r\n\r\n Disp();\r\n }", "CalcTaskHours createCalcTaskHours();", "public Date getPayDay() {\n return payDay;\n }", "public int getHours(){ // begi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the logging interval in seconds. Disabled if the logging interval is <=0. A value higher than 0 means that the log table is updated every 'logInterval' seconds.
public String getLogInterval() { return logInterval; }
[ "public static long getInterval() {\r\n return System.currentTimeMillis() - LogKernel.started;\r\n }", "public long getIntervalSeconds()\n {\n return __m_IntervalSeconds;\n }", "public long getFlushInterval() {\n return get(LOG_FLUSH_INTERVAL, DEFAULT_LOG_FLUSH_INTERVAL);\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.cst14.im.protobuf.FriendList friendLists = 10;
java.util.List<? extends com.cst14.im.protobuf.ProtoClass.FriendListOrBuilder> getFriendListsOrBuilderList();
[ "java.util.List<? extends POGOProtos.Rpc.GetFriendsListOutProto.FriendProtoOrBuilder> \n getFriendOrBuilderList();", "java.util.List<com.cst14.im.protobuf.ProtoClass.FriendList> \n getFriendListsList();", "com.cst14.im.protobuf.ProtoClass.FriendList getFriendLists(int index);", "java.util.List<POG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Compute the maximum tangential speed in a circle defined by two line segments of length "d" forming a V shape, opened by an angle "alpha". The circle is tangent to the end of the two segments as shown below: \\ | \ d / \ __='___a\ d
public static float computeMaxSpeedInWaypoint(float alpha, float accel, float d) { if(alpha == Math.PI) return d; return (float)Math.sqrt(accel * d * Math.abs(Math.tan(alpha / 2f))); }
[ "abstract public VectorDouble getTangent(VectorDouble previous, VectorDouble current, VectorDouble next);", "final static double getMaxVelocity(double distance) {\n final double decelTime = Math.max(1, Math.ceil(\n //sum of 0... decelTime, solving for decelTime\n //using quadr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table interest_product
List<InterestProduct> selectByExample(InterestProductExample example);
[ "ProdInterest selectByPrimaryKey(Long prodId);", "InterestProduct selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(InterestProduct record);", "List<ProdInterest> selectByExample(ProdInterestExample example);", "int updateByPrimaryKeySelective(InterestProduct record);", "@Override\n\t@Cacheable(va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementation of PropertyValues interface
@Override public PropertyValue[] getPropertyValues() { return propertyValueList.toArray(new PropertyValue[propertyValueList.size()]); }
[ "public interface PropertyValue\n{\n /**\n * Retrieves a property value.\n *\n * @return the requested property value; or\n * <p><code>null</code> if the property value couldn't be found\n * @throws PropertyValueException When something went wrong during the\n * ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function removes the worst individual from a pool of the best individuals. The worst individual is chosen after comparison of the oldest individual with the second oldest one. The other individual is marked as the best one. Only these two individuals are compared because they have the longest history.
private void removeInvalidFromPool() { int i; int size_mature_pool; int idx_1st_oldest;//index of the oldest individual int idx_2nd_oldest;//index of the 2nd oldest individual int idx_to_remove;//index of an chromosome which has to be removed int idx_current;//index of currently checked genotype ...
[ "private List<Individual<T>> removeWorst(List<Individual<T>> tournament) {\n Individual<T> worst = selWorstOp.select(tournament);\n tournament.remove(worst);\n return tournament;\n }", "public void removeSecond() {\n Book firstMax = getMaxPrice();\n if(firstMax == null) return;\n in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field903' field has been set
public boolean hasField903() { return fieldSetFlags()[903]; }
[ "public boolean hasField603() {\n return fieldSetFlags()[603];\n }", "public boolean hasField901() {\n return fieldSetFlags()[901];\n }", "public boolean hasField902() {\n return fieldSetFlags()[902];\n }", "public boolean hasField703() {\n return fieldSetFlags()[703];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table pataPerro.tm_grupo_elemento
GrupoElemento selectByPrimaryKey(Integer id);
[ "public void setGrupoElementoId(Integer grupoElementoId) {\r\n this.grupoElementoId = grupoElementoId;\r\n }", "public Integer getGrupoElementoId() {\r\n return grupoElementoId;\r\n }", "public abstract java.lang.Long getTipo_elemento();", "public Integer getIdeGrupoElemento() {\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Setter of the EmailAttachment.businessProcess attribute.
public void setBusinessProcess(final EmailAttachment item, final BusinessProcess value) { setBusinessProcess( getSession().getSessionContext(), item, value ); }
[ "public void setBusinessProcess(final SessionContext ctx, final EmailAttachment item, final BusinessProcess value)\n\t{\n\t\titem.setProperty(ctx, Training279CoreConstants.Attributes.EmailAttachment.BUSINESSPROCESS,value);\n\t}", "public void setBusinessProcessService(BusinessProcessService businessProcessService...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the accountNo value for this GetRechargeDetailsRequestDataHeader.
public void setAccountNo(String accountNo) { this.accountNo = accountNo; }
[ "public void setAccountNo (String AccountNo)\r\n\t{\r\n\t\tsuper.setAccountNo (MPaymentValidate.checkNumeric(AccountNo));\r\n\t}", "public void setAcctNo(String acctNo) {\n\t\tthis.acctNo = acctNo;\n\t}", "public AccountDetailRequest(String customerId, String accountNo) {\n this.customerId = customerId;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieve attachment URL locations for specified SharePoint ListItem id.
public List<URL> getAttachments(int listItemId) throws ServiceUnreachableException { final List<URL> listFileURL = new LinkedList<URL>(); final GetAttachmentCollection getAttachmentCollection = GetAttachmentCollection.Factory.newInstance(); getAttachmentCollection.setListItemID(String.valueOf(listItemId)...
[ "public List getLocationAttachments(final Long locationId);", "String getURL(FsItem f);", "public static Uri buildItemUri(long id){\n return ContentUris.withAppendedId(CONTENT_URI, id);\n }", "public ArrayList<String> getItemUrl()\r\n\t{\r\n\t\treturn currentLocation.getItemUrl();\r\n\t}", "DataHand...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DO NOT change the method signature Implement code to invoke test using TestNG
public void invokeTest() { }
[ "public void executeTest(MultiTestMethod method);", "@Test\n\n public void verifySelectVehchiclelink()\n {\n String name = new Object()\n {}.getClass().getEnclosingMethod().getName();\n TestCaseDetail testcase = TestCaseFactory.createTestCaseDetail(this.getClass(), name);\n try\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ amplification of com.squareup.javapoet.AnnotatedTypeNameTestannotatedWildcardTypeNameWithSuper
@org.junit.Test(timeout = 10000) public void annotatedWildcardTypeNameWithSuper_cf36371() { java.lang.String expected = ("? super @" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + " java.lang.String"; com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.Strin...
[ "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithSuper_cf36379() {\n java.lang.String expected = (\"? super @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(jav...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the statistics as a map from key to value
public Map<String,String> getStatistics();
[ "java.util.Map<java.lang.Long, org.tensorflow.proto.profiler.XStatMetadata>\n getStatMetadataMap();", "public static Map<Channel, ChannelStatistics> getAllStatistics() {\n return statisticsMap;\n }", "public Map<String, Integer> getResultStatistics() {\n\t\t//Create a hash map to store the results\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all messages matching the specified code.
Set<Message> getMessagesByCode(String code);
[ "public List<Message> getAllMessages();", "public List<DAPMessage> findUnreadBySubject(String code) throws org.fermat.fermat_dap_plugin.layer.network.service.asset.transmission.developer.version_2.exceptions.CantReadRecordDataBaseException {\n\n if (code == null) {\n throw new IllegalArgumentExc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove all 'b''s from the string and replace all 'a's with 'dd' with O(1) space return the index of the start of valid characters in the array
public static int removeAndReplace(Character[] input) { int writeIndex = input.length-1; int readIndex = removeChar(input, 'b'); // walk backwards writing into the end of the array while(readIndex >= 0) { Optional<Character> maybeChar = Optional.ofNullable(input[readIndex--]); if(!maybeChar.isPresent(...
[ "public String replaceAndRemove(char[] s) {\n\n //First we remove 'b' and count a\n int countA = 0;\n int len =0;\n for (int i=0; i <= s.length-1 && s[i] != '\\u0000'; i++) {\n if (s[i] == 'a' || s[i] == 'A')\n countA++;\n\n if (s[i] == 'b' || s[i] ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For Controller of buyticket.jsp
@RequestMapping("/buyticket") public String buyTicket() { return "buyticket"; }
[ "public void PurchaseTicket_OnClick(View view){\n\t\tVibrateButton();\n\t\tpurchaseTicket();\n\t}", "@RequestMapping(value = \"/ticketCenter\")\n\tpublic String getTicketCenterPage(){\n\t\treturn \"ticketCenter\";\n\t}", "@GetMapping(\"/ticket\")\n public final String gotoTicketAddPage(Model model) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this field is token name before the proposal ALLOW_SAME_TOKEN_NAME is active, otherwise it is token id and token is should be in string format. bytes asset_name = 1;
public com.google.protobuf.ByteString getAssetName() { return assetName_; }
[ "com.google.protobuf.ByteString getAssetName();", "public com.google.protobuf.ByteString getAssetName() {\n return assetName_;\n }", "public String assetName() {\n return assetName;\n }", "public String getAssetName() {\n return this.assetName;\n }", "String getAssetName();", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handler interface for JWT token generation and validating.
public interface IJWTTokenHandler { /** * Generates JWT token for the supplied userId and password. * * @param user JwtUser object with userId and password. * @return Returns String containing JWT token. */ String generate(JwtUser user); /** * Validates the JWT token string a...
[ "JwtUser validate(String token);", "String generateJWTToken(AuthUser authUser);", "public interface JwtDecoder {\n\n /**\n * Decode a JWT token.\n *\n * @param token an encoded JWT token\n * @return payload claims. Currently looks like it's not the better way to use {@link Object}\n * as ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the cassCountIn property.
public int getCassCountIn() { return cassCountIn; }
[ "public void setCassCountIn(int value) {\r\n this.cassCountIn = value;\r\n }", "public int getCassTransCountIn() {\r\n return cassTransCountIn;\r\n }", "public int getCassCountOut() {\r\n return cassCountOut;\r\n }", "public void setCassTransCountIn(int value) {\r\n this.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether FINER messages are being output.
public boolean isFinerLoggable() { return logger.isLoggable(Level.FINER); }
[ "public boolean finOut() { return (flags & FIN_OUT) != 0; }", "public boolean finAcked() { return (flags & FIN_ACKED) != 0; }", "private boolean isCloseSent() {\n return outputPeer.isCloseSent();\n }", "public boolean isFinished() {\n\t\treturn this.writer.isFinished();\n\t}", "public boolean isEn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("onBreak | " + event.getPlayer() + " | " + event.getBlock().getTypeId());
@EventHandler(event = BlockBreakEvent.class, priority = EventPriority.LOWEST) public void onBlockBreak(BlockBreakEvent event) { Player player = event.getPlayer(); if (player != null && !event.isCancelled()) { boolean itemIsBlocked = false; int item = event.getBlock().getTypeId(); itemIsBlocked = Ant...
[ "@EventHandler(priority=EventPriority.MONITOR, ignoreCancelled=true)\n public void onBlockBreak(BlockBreakEvent event) {\n Block block = event.getBlock();\n \n if (block != null && isQuickBench(block)) {\n // break tagged lapis block as quickbench item\n ItemStack item = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }