query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Test of SamaPuu method, of class AvlPuu.
@Test public void testSamaPuu() { AvlPuu puu = new AvlPuu(); Noodi noodi = new Noodi(0,0); noodi.setMatkaJaljella(10); noodi.setTehtyMatka(0); PuuSolmu solmu = new PuuSolmu(noodi); puu.insert(noodi); Noodi noodi2 = new Noodi(1,0); noodi2.setMa...
[ "@Test\r\n public void testOnkoSama() {\r\n System.out.println(\"onkoSama\");\r\n Pala toinenpala = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.onkoSama(toinenpala);\r\n assertEquals(expResult, result);\r\n // TODO ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Company'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseCompany(Company object) { return null; }
[ "public in.trujobs.proto.CompanyObject getCompany() {\n return company_ == null ? in.trujobs.proto.CompanyObject.getDefaultInstance() : company_;\n }", "Company getCompanyByName(String name);", "public Company getCompanyByName(String companyName);", "in.trujobs.proto.CompanyObject getCompany();", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests checkTextFromAnyTableRow() with a matching example.
@Test public void checkTextFromAnyTableRowMatching() { browseTo("/checkTextFromAnyTableRow-1.html", "checkTextFromAnyTableRow - 1"); assertTrue("Text should be found", driverWrapper.checkTextFromAnyTableRow("AAA", "ccc \nsss")); }
[ "@Test\n public void checkTextFromAnyTableRowNotMatchingRow() {\n browseTo(\"/checkTextFromAnyTableRow-1.html\", \"checkTextFromAnyTableRow - 1\");\n assertFalse(\"Text should not be found\",\n driverWrapper.checkTextFromAnyTableRow(\"CCC\", \"ccc \\nsss\"));\n }", "@Test\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the body of the dataset linebyline for accuracy. This method will not opt out after finding the first discrepancy (it keeps going to identify additional errors (if any)). If the line is in the correct format, return TRUE. Since not all columns are required, check option column flags to see if that column is prese...
private LineProcessingResult checkDatasetLine(String line, LineProcessingResult result) { result.setLineNumber(lineNumber); result.getErrors().clear(); result.getWarnings().clear(); result.getInfo().clear(); if (line.length() == 0 || line.split(DEFAULT_DELIMITER).length == 0) { ...
[ "private boolean checkLine(Player player, CellPosition realPosition, ILineDataProvider lineDataProvider) {\n int count = 0;\n\n List<Cell> cellList = new ArrayList<Cell>();\n cellList.addAll(lineDataProvider.getLine(realPosition));\n if (this.fieldType == GameFieldType.TORUS) cellList.ad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update InstanceConfig of the given resource. The value of field in current config will be replaced with the value of the same field in given config if it presents. If there is new field in given config but not in current config, the field will be added into the current config.. The list fields and map fields will be re...
public void updateInstanceConfig(String clusterName, String instanceName, InstanceConfig instanceConfig) { updateInstanceConfig(clusterName, instanceName, instanceConfig, false); }
[ "@Override\n public UpdateResourceEventConfigurationResult updateResourceEventConfiguration(UpdateResourceEventConfigurationRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateResourceEventConfiguration(request);\n }", "public IntegrationInstance updateInstance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instiaciates a new UserExperienceAnalyticsDeviceScopeTriggerDeviceScopeActionParameterSet
public UserExperienceAnalyticsDeviceScopeTriggerDeviceScopeActionParameterSet() {}
[ "@Nullable\n protected UserExperienceAnalyticsDeviceScopeTriggerDeviceScopeActionParameterSetBuilder(){}", "protected UserExperienceAnalyticsDeviceScopeTriggerDeviceScopeActionParameterSet(@Nonnull final UserExperienceAnalyticsDeviceScopeTriggerDeviceScopeActionParameterSetBuilder builder) {\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
!make all drawers end update /! \param _parent the parent Component that contains this
public void EndUpdate(Component _parent) throws Exception { super.EndUpdate(_parent); for(GameCharacterUpdater i : updaters ) { i.EndUpdate(this); } }
[ "public void EndDraw(Component _parent,Graphics _g) throws Exception {\n\t\tsuper.EndDraw(_parent, _g);\n\t\tfor(GameCharacterDrawer i : drawers) {\n\t\t\ti.EndDraw(this, _g);\n\t\t}\n\t}", "public void BeginDraw(Component _parent,Graphics _g) throws Exception {\n\t\tsuper.BeginDraw(_parent, _g);\n\t\tfor(GameCha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the codigoArea value for this ConsultaProcessosIn.
public java.lang.String getCodigoArea() { return codigoArea; }
[ "public String getComAreaCd() {\r\n return comAreaCd;\r\n }", "public void setCodigoArea(String codigoArea) {\n\t\tthis.codigoArea = codigoArea;\n\t}", "public String getProgAreaCd() {\n\n return progAreaCd;\n }", "public String getProgAreaCd()\n {\n return progAreaCd;\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a payload available throughout successive token stream enumeration
public void setPayload(BytesRef payload) { this.payload = payload; }
[ "public void setPayload(Payload payload) {\n this.payload = payload;\n }", "public void setPayload(final byte[] payload)\n {\n this.payload = payload;\n }", "public void setPayload(String payload);", "void setPayload(final Serializable payload);", "public void setPayload(int data) {\n pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Legt den Wert der goalstartPeriodEigenschaft fest.
public void setGoalstartPeriod(int value) { this.goalstartPeriod = value; }
[ "public int getGoalstartPeriod() {\r\n return goalstartPeriod;\r\n }", "public int getGoalendPeriod() {\r\n return goalendPeriod;\r\n }", "public void setGoalendPeriod(int value) {\r\n this.goalendPeriod = value;\r\n }", "public int getStartingPeriod() {\n\t\treturn this.period;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return concatenated text all array elements as new lines.
public static String concatElementsAsLines(Object... elements) { return concatElements(asList(elements), NEW_LINE); }
[ "private String joinLines() {\n StringBuilder S = new StringBuilder();\n for (String L : testLines) {\n S.append(L);\n S.append(NL);\n }\n return S.toString();\n }", "public static String combineTextWithNewline(String... text) {\r\n return Arrays.asList(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
is the tile on X and Y clear (No items or entities or walls blocking it)
public boolean isClearTile(int x, int y) { for (Item e : items) { if (e.getX() >> 4 == x && e.getY() >> 4 == y) return false; } if (!isWalkAbleTile(x, y)) { return false; } return !getTile(x, y).solid(); }
[ "private static void RemoveTile(int x, int y) { city.setTile(EMPTY, x, y); }", "public abstract void clearTile(int row, int column);", "public boolean isTileEmpty(Tile t) {\r\n\t\treturn b.getBoard1()[t.getX()][t.getY()] == 0;}", "boolean tileOnBoard(int x, int y) {\r\n return x < width && x >= 0 && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify video on home page.
public void verifyVideoOnHomePage() { testStepInfo("****************************Top Video***************************************"); try { /*testStepPassed("Before Video plays"); takeAdScreenshot(OR.vidHomePageVideo, "Home Page Video");*/ waitTime(5); waitForElement(OR.vidHomePageVideo); ...
[ "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "public boolean hasVideo();", "@SuppressWarnings(\"unused\")\n public boolean videoAuthorized(){\n return false;\n }", "public void validateHashTagVideo(String h...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To delete Particular Currency Detail
@SkipValidation public String deleteCurrency() { Map session = ActionContext.getContext().getSession(); EmployeesVO oEmp = (EmployeesVO) session.get("EMPLOYEE_OBJECT"); // currency.setUpdatedBy(oEmp); currencyService.deleteCurrency(currency); addActionMessage(getText("Deleted...
[ "private void deleteCurrency(Currency currency) {\n currency.setVisible(false);\n sendVisibilityUpdate(currency);\n }", "Long deleteByRateProvider(CurrencyRateProvider rateProvider);", "void deleteBet(Account account, int id, BigDecimal amount) throws DAOException;", "public void delete(Long ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create artwork field. Not currently supported.
public TagField createField(Artwork artwork) throws FieldDataInvalidException { return getActiveTag().createField(artwork); }
[ "public abstract TagField createArtistField(String content);", "public abstract TagField createAlbumField(String content);", "@Transactional(enabled = false)\n\tpublic Artwork createArtwork(long artworkId);", "public Artwork getArtwork() {\n return artwork;\n }", "public abstract AttachmentPart ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "ioStmt" /home/luca/svnrepos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:372:1: ioStmt : (mth= 'write' '(' expr ')' ';' > ^( BuiltInWrite[$mth, \"BuiltInWrite\"] expr ) |mth= 'writef' '(' expr ')' ';' > ^( BuiltInWriteFloat[$mth, \"BuiltInWriteFloat\"] expr ) |mth= 'writeln' '(' ')' ';' > ^( Bu...
public final JavaliParser.ioStmt_return ioStmt() throws RecognitionException { JavaliParser.ioStmt_return retval = new JavaliParser.ioStmt_return(); retval.start = input.LT(1); Object root_0 = null; Token mth=null; Token char_literal55=null; Token char_literal57=null; Token char_literal58=null; Token ...
[ "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the number of fires that will be started in the current simulated year
int numFires() { return distr.nextInt(); }
[ "public void simulateYear(){\n\t\t\n\t\tpop = pop/2;\n\t\t\n\t}", "public static int generateYearsLeft() {\n\t\t//returning + 1 since we want the range to start at 1\n\t\treturn WeightedProbability.weightedSelect(YEAR_WEIGHTS) + 1;\n\t}", "public int getFullYearsCount() {\r\n int ifreq = m_freq.intValue(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a table and a List of Maps, this method will insert keyvalue pairs into the DB. MAKE SURE THAT THE KEY SET IS THE SAME IN EACH MAP! The key set of the first Map in the list is used to build the SQL INSERT statement's column phrase.
public void insert(String table, List records) throws SQLException { StringBuffer insert = new StringBuffer("INSERT INTO ") .append(table).append(" ("); HashMap hash = (HashMap)records.get(0); boolean first = true; Iterator it = hash.keySet().iterator(); // Get the column names first while (it.h...
[ "public void insertValues(String tablename, ArrayList<Value> valueList) throws SQLException {\n String sql = \"INSERT INTO `\" + tablename + \"` \";\n String keys = \"( `\" + valueList.get(0).getKey() + \"`\";\n String values = \") VALUES ('\" + valueList.get(0).getValue() + \"'\";\n\n for(Valu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Define the instruction text for this message
public abstract void setInstructionText ( String arg );
[ "public abstract String getInstructionText();", "private void instruction() {\n String instructions = \"\\n Watch out every step that you move.\"\n + \"\\nDon't forget to pick the detonate to explore the rock so that you can go through.\"\n + \"\\nThe fatal hazard will kill yo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a SOAP 1.1 id attribute.
public static void writeId(MessageWriter writer, String id) { if (id == null) { throw new NullPointerException("id is null"); } writeAttribute(writer, SOAP_ENCODING_ID_1_1, id); }
[ "public void setID(String id) {\r\n element.setAttributeNS(WSU_NS, WSU_PREFIX + \":Id\", id);\r\n }", "public final String getIdAttribute() {\n return getAttributeValue(\"id\");\n }", "public final String getIdAttribute() {\n return getAttributeValue(\"id\");\n }", "String getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
consume white space (space, carriage return, tab, etc.
protected void consumeWhiteSpace () { while (check ()) { switch (input.charAt (index)) { // tab, space, nbsp case '\t': case ' ': case '\u00a0': ++index; break; // carriage return - the file reader converts all r...
[ "protected void space() {\n consumeAtLeastOne(' ');\n }", "void WS() {\n while (currentCharacter == ' ' || currentCharacter == '\\t') consume();\n }", "protected void consumeWhiteSpace() {\n\n\t\t// Consume characters until `test` returns false.\n\t\tStringBuilder sb = new StringBuilder();\n\t\twh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for subscriptionTypeId If this tax type group requires a subscription, this contains the ID number of the subscription type required to use it.
public Integer getSubscriptionTypeId() { return this.subscriptionTypeId; }
[ "String getSubscriptionTypeId();", "public void setSubscriptionTypeId(Integer value) {\n this.subscriptionTypeId = value;\n }", "public int getAudit_subscription_type_id() {\n return audit_subscription_type_id;\n }", "public __Type getSubscriptionType() {\n return (__Type) get(\"sub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor with capacity. Using this constructor can improve performances if the number of timestamps is known in advance as it minimizes array resizes.
public TimestampDoubleMap(int capacity) { super(capacity); values = new double[capacity]; }
[ "public TemporalQueue (int capacity)\n {\n super (capacity);\n\n }", "public ArrayRingBuffer(int capacity) {\n // TODO: Create new array with capacity elements.\n // first, last, and fillCount should all be set to 0.\n bufferCapacity = capacity;\n rb = (T []) new Obj...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve true si el string es un isograma Consideramos que no puede haber espacios
public boolean isograma(String str) { for (int i = 0; i < str.length() - 1; i++) { for (int j = i + 1; j < str.length(); j++) { if (str.charAt(i) == str.charAt(j)) { return false; } } } return true; }
[ "boolean isIsogram(String phrase) {\n boolean isIsogram = true; \n\n if (phrase != \"\" || phrase == null) {\n phrase = phrase.toUpperCase().replaceAll(\" \", \"\").replaceAll(\"-\", \"\");\n if (phrase.length() != phrase.chars().distinct().count()) {\n isIs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end 39E8FB5A005D autoimport "InteractionInstanceSet" import declarations please fill in/modify the following section beg preserve=no 39E8FB5A005D import "InteractionInstanceSet" end 39E8FB5A005D import "InteractionInstanceSet"
public interface InteractionInstanceSet extends ModelElement , java.io.Serializable { // declare/define something only in the code // please fill in/modify the following section // -beg- preserve=no 39E8FB5A005D detail_begin "InteractionInstanceSet" // -end- 39E8FB5A005D detail_begin "InteractionInstanceSet" ...
[ "public Interaction detachInteraction()\n // -end- 39E8FF7600DB detach_head39E8FB5A005D \"InteractionInstanceSet::detachInteraction\"\n ;", "Set<IRI> supportedInteractionModels();", "public Interaction getInteraction()\n // -end- 39E8FF7600DB get_head39E8FB5A005D \"InteractionInstanceSet::getInteraction\"\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implementing Reynolds' flow field following algorithm
public void follow(FlowField f) { // Look ahead PVector ahead = vel.get(); ahead.normalize(); ahead.mult(32); // Arbitrarily look 32 pixels ahead PVector lookup = PVector.add(loc, ahead); // What is the vector at that spot in the flow field? PVector desired = f.lookup(lookup); // Sc...
[ "public void fordFulkerson() {\r\n\r\n\r\n\t\twhile(true) {\r\n\t\t\tResidualGraph resGraph = new ResidualGraph(net);\r\n\t\t\tLinkedList<Edge> augmentingPath = resGraph.findAugmentingPath();\r\n\t\t\tif(augmentingPath.isEmpty()) {\r\n\t\t\t\tbreak; // found the max flow\r\n\t\t\t} else {\r\n\t\t\t\t// Find the mi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the follow redirect mode
public FollowsRedirectMode getFollowsRedirectMode() { return followsRedirectModeRef.get(); }
[ "boolean isFollowRedirect();", "boolean followRedirects() {\n return parseBoolean(settings.get(FOLLOW_REDIRECTS), true);\n }", "boolean followRedirects() {\n return parseBoolean(get(FOLLOW_REDIRECTS), true);\n }", "public boolean followRedirects() {\n return true;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EXPORT DB TO DOWNLOAD FOLDER
public void exportDbFileToDownloadFoler(final Activity curr_activity){ buttonImportExportDB.setOnClickListener( new View.OnClickListener(){ @Override public void onClick(View view) { try { app_utils.copyA...
[ "private void exportDB(){\n try {\n String pkg=\"groupmanager.samadhan\";\n File sd = Environment.getExternalStorageDirectory();\n File data = Environment.getDataDirectory();\n if (sd.canWrite()) {\n\n /////EXPORT DATA////////////\n St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Parameters: ...that... String Append given string onto this nonempty list of nucleotides/codons
public ILoString append(String that) { return new ConsLoString(this.first, this.rest.append(that)); }
[ "public ILoString append(String that) {\n return new ConsLoString(that, new MtLoString()); \n }", "public MyStringBuilder append(MyStringBuilder b)\n\t{\n if (b == null)\n {\n return append(\"null\");\n }\n for (int i = 0; i < b.length; i++)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the status of all jobs as an JSONArray. The information returned for each job is verbose and is only intended to be used to save state in zookeeper. For a client friendly version without internal state, use getAllJobStatuses()
private JSONArray getVerboseAllJobInfo() { JSONArray statusAll = new JSONArray(); Iterator it = jobsList.entrySet().iterator(); while(it.hasNext()){ Map.Entry pair = (Map.Entry)it.next(); MagellanJob j = (MagellanJob) pair.getValue(); statusAll.put(j.getState...
[ "public JSONArray getSimpleAllJobStatuses() {\n JSONArray statusAll = new JSONArray();\n\n Iterator it = jobsList.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n MagellanJob j = (MagellanJob) pair.getValue();\n statusAll....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Union this multiset with another one. The result is the modified multiset (this). It will contain all elements that are present in at least one of the initial multisets. The multiplicity of each element is equal to the maximum multiplicity of the corresponding elements in both multisets.
void union(Multiset<E> other);
[ "public Set union(Set anotherSet);", "public abstract IntSet union(IntSet another);", "public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unpaired nucleotide Helper method for rule 1
private void ruleOne(char tempSing, int singIdx) { pool = new String[3]; BigInteger currentScore = parmat[single][wc][wob][ham]; // generate a random number of range 1 to score from matrix //Random randi = new Random(); //int prob_Single = randi.nextInt(currentScore) + 1; //long prob_Single = ThreadLoca...
[ "public abstract UnaryDenotation uniqued();", "private void uniqueString(){\n multiplicity = new int[rack.length()];\n for(int i = 0; i < rack.length(); i++){\n multiplicity[i] = ORI_NUM;\n for(int j = i+1; j < rack.length(); j++){\n if(rack.charAt(i) == rack.charAt(j)){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the issueTypeID value for this TicketCategoryFieldDefaults.
public java.lang.Object getIssueTypeID() { return issueTypeID; }
[ "public final Integer getIssueTypeId()\n {\n return issueTypeId;\n }", "public java.lang.Object getTicketTypeID() {\n return ticketTypeID;\n }", "public void setIssueTypeID(java.lang.Object issueTypeID) {\n this.issueTypeID = issueTypeID;\n }", "public String getType() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private methods Gets the algorithmic name for the argument character
private String getAlgName(int ch, int choice) { /* Only the normative character name can be algorithmic. */ if (choice == UCharacterNameChoice.UNICODE_CHAR_NAME || choice == UCharacterNameChoice.EXTENDED_CHAR_NAME ) { // index in terms integer index synchr...
[ "public static String getCharacter(String name) {\n\t}", "public String getNameFromCharacter(char c) {\n\t}", "public String getName() {\r\n\t\treturn \"charAt\";\r\n\t}", "java.lang.String getInputName();", "protected abstract String getAlgorithmName();", "public String algorithmName();", "public Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether this request has a message body.
public boolean hasMessageBody() { return body!=null; }
[ "public Boolean hasBody() {\n return body != null;\n }", "public boolean isSetBody() {\n return this.body != null;\n }", "public boolean isExpectingBody() {\r\n\t\tif (Method.GET.equals(method)) return false;\r\n\t\tLong size = mime.getContentLength();\r\n\t\tif (size != null) {\r\n\t\t\tif (size....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bands used in the operation. If no target bands are specified, it uses all bands available in the input.
public java.util.List<String> getTargetBands() { return targetBands; }
[ "public void setBands(java.util.List<java.lang.CharSequence> value) {\n this.bands = value;\n }", "public void setTargetBands(java.util.Collection<String> targetBands) {\n if (targetBands == null) {\n this.targetBands = null;\n return;\n }\n\n this.targetBands = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
group by city then by time then consecutive natural numbers starting from 1 new name CityPhotoNumber (same length of largest no in group),leading 0s ext Return a string with names of new photos, maintain order Output; Warsaw02.jpg
private static String solution(String S) { String newString = S.replaceAll(",", ""); String[] stringList = newString.split("\\n"); HashMap<String, List<String>> photosByCity = new HashMap<>(); for (int i=0; i<stringList.length; i++) { String str = stringList[i]; S...
[ "java.lang.String getCityImageURLs(int index);", "private static String getUniqueFilename() {\n String prefix = \"cat_\";\n String suffix = \".png\";\n int currentHighest = 0;\n\n File catDirectory = getAlbumStorageDir(CAT_DIRECTORY_NAME);\n String[] allFiles = catDirectory.list...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Criteria for the letter grade that you will be getting according to the average of the exams
public static void findingGrade(double average){ if (average>=90){ System.out.println("Letter Grade: A"); } else if (average<90 && average>=80) { System.out.println("Letter Grade: B"); } else if (average<90 && average>=80) { System.out.println("Letter Grade: C"); } else if (averag...
[ "public double letterAverage(String letterGrade)\n\n{\n String [] scoreGrade = new String[studentScores.length];\n \n boolean ifContains = true;\n for (int i = 0; i < studentScores.length; i++) {\n \n if (studentScores[i] >= 90) { scoreGrade[i] = \"A\"; }\n else if (studentScores[i] >= 80) { ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Abort SIS import Abort a SIS import that has not completed.
@Test public void abortSisImportTest() { String accountId = null; String id = null; // SisImport response = api.abortSisImport(accountId, id); // TODO: test validations }
[ "@Test\n public void abortAllPendingSisImportsTest() {\n String accountId = null;\n // Boolean response = api.abortAllPendingSisImports(accountId);\n\n // TODO: test validations\n }", "public void abort(){\n\t\ttry {\n\t\t\t// We may have to generate multiple abort operations\n\t\t\t// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column tb_shifen_customer.realcompanyname
public void setRealcompanyname(String realcompanyname) { realcompanyname = realcompanyname == null ? null : realcompanyname.trim(); setField("realcompanyname", realcompanyname); }
[ "public void setCompany(java.lang.String company)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMPANY$8, 0);\n if (target...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the decoded path string of the URI.
public String getPath() { if (path == null) { int pathEndPos = uri.indexOf('?'); if (pathEndPos < 0) { path = uri; } else { return path = uri.substring(0, pathEndPos); } } return path; }
[ "public String getEncodedPath() {\n return getEncodedPath(false);\n }", "@Override\r\n public String getPathDecoded() throws FileSystemException {\r\n if (decodedAbsPath == null) {\r\n decodedAbsPath = UriParser.decode(getPath());\r\n }\r\n\r\n return decodedAbsPath;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set and obtain the slave camera enabling parameter.
public boolean IVS_PU_SetSlaveDeviceEnablePara(WinDef.ULONG ulIdentifyID, PU_SLAVE_DEVICE_ENABLE_S pstPara);
[ "public void setSelectedCameraCheckd() {\n\t\tboolean status = configView.getCameraPanel().getSelectedValue();\n\t\tconfigView.getCameraPanel().getSelectedCamera().setEnabled(status);\n\t}", "public void enableVideoCapture(boolean enable);", "public abstract void setVrMode(boolean enabled);", "public void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build classification request based MultipartFormDataInput
public ClassificationRequest buildClassificationRequest(MultipartFormDataInput input) { try { final FormDataFile formDataFile = getFormDataFile(input); return new ClassificationRequest( getClassificationName(input), getClassificationDescription(in...
[ "@POST\n @Path(\"\")\n @Consumes(\"multipart/form-data\")\n public Response uploadFile(MultipartFormDataInput input, @javax.ws.rs.core.Context HttpServletRequest request) {\n\n String fileName = \"unknown\";\n String uri = RestUriMinter.getInstance().mintUri(null); // Create dataset uri\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region FilterConditions Gets the filter conditions (may be empty) as unmodifiable set.
public Set<TValue> getFilterConditions() { return Collections.unmodifiableSet(filterConditions); }
[ "public void setFilterConditions(Set<TValue> filterConditions) {\n this.filterConditions = Objects.requireNonNullElseGet(filterConditions, HashSet::new);\n }", "public List<Condition> getConditions() {\n\t\treturn conditions;\n\t}", "public String getConditions() {\n return conditions;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Genera un listado con todas las organizaciones registradas en el sistema.
public List<Organization> listarOrganizaciones() throws SQLException;
[ "@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic List<Organisation> getOrganisations() {\r\n\t\tList<Organisation> Organisations = new ArrayList<Organisation>();\r\n\t\tOrganisations.addAll(OrganisationDao.getInstance().getModel().values());\r\n\t\tSystem.out.println(\"Hello\");\r\n\t\treturn Organi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleVariables" $ANTLR start "entryRuleUpdates" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:996:1: entryRuleUpdates : ruleUpdates EOF ;
public final void entryRuleUpdates() 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/InternalC...
[ "public final void entryRuleUpdateExpression() 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/contentassis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Detect drift on a stack set. When CloudFormation performs drift detection on a stack set, it performs drift detection on the stack associated with each stack instance in the stack set. For more information, see . DetectStackSetDrift returns the OperationId of the stack set drift detection operation. Use this operation ...
java.util.concurrent.Future<DetectStackSetDriftResult> detectStackSetDriftAsync(DetectStackSetDriftRequest detectStackSetDriftRequest);
[ "java.util.concurrent.Future<DetectStackSetDriftResult> detectStackSetDriftAsync(DetectStackSetDriftRequest detectStackSetDriftRequest,\n com.amazonaws.handlers.AsyncHandler<DetectStackSetDriftRequest, DetectStackSetDriftResult> asyncHandler);", "java.util.concurrent.Future<DetectStackDriftResult> dete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
encode a RUN opcode for "size" copies of the value "b".
void run(int size, byte b);
[ "private void push(int b){\r\n\t\tchar [] word = bitsAsString(b).toCharArray();\r\n\t\tfor(char ch : word){\r\n\t\t\tbinaryExpansion.add(ch);\r\n\t\t}\r\n\t}", "RunLevelI[] runLengthEncode(BlockI quantBlock);", "public RunLengthEncoding(int width, int height, int[] red, int[] green,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of bestBefore
public LocalDate getBestBefore() { return bestBefore; }
[ "Object getBest();", "public LocalDate getBestBefore() {\n return bestBefore;\n }", "public double getBestValue()\r\n {\r\n\tint i;\r\n\tdouble max;\r\n\tfor(i=1, max=pa[0]; i<pa.length; i++){\r\n\t if(max<pa[i])\r\n\t\tmax=pa[i];\r\n\t}\r\n\treturn max;\r\n }", "public double getBestScore(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on button Approve
public void clickbtnApprove() { waitForElementClickable(10,btnApprove); clickByJavaScript(btnApprove); sleep(1); }
[ "public void approveAccess() {\r\n\t\tGraphene.waitModel().until().element(approveAccessButton).is()\r\n\t\t\t\t.enabled();\r\n\t\tapproveAccessButton.click();\r\n\t}", "public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An immutable clientside representation of HostingEnvironmentDiagnostics.
public interface HostingEnvironmentDiagnostics { /** * Gets the name property: Name/identifier of the diagnostics. * * @return the name value. */ String name(); /** * Gets the diagnosticsOutput property: Diagnostics output. * * @return the diagnosticsOutput value. */...
[ "HostingEnvironmentDiagnosticsInner innerModel();", "public List<Diagnostic> getDiagnostics() {\n return new ArrayList<>(this.diagnostics);\n }", "public java.util.List<protocol.Diagnostic> getDiagnosticsList() {\n if (diagnosticsBuilder_ == null) {\n return java.util.Collections.unmodifia...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method/algorithm was written using the tutorial being accessible at the following website: . Depending on the weatherIconID this method receives as a parameter, the weather icon is set. Contrary to the assignNightWeatherIcons, these are, however, icons that are apt for daylight. Please consult the comments on th...
private void assignDayLightWeatherIcons(String weatherIconID) { int weatherID = Integer.valueOf(weatherIconID); int reducedWeatherIconID = (weatherID / WEATHER_DIVISION_CONSTANT); if (weatherID == WEATHER_EXTENDED_ID_SUNNY) { weatherIcon.setImageResource(R.drawable.ic_weather_sun_no_...
[ "private void assignNightWeatherIcons(String weatherIconID) {\n int weatherID = Integer.valueOf(weatherIconID);\n int reducedWeatherIconID = (weatherID / WEATHER_DIVISION_CONSTANT);\n if (weatherID == WEATHER_EXTENDED_ID_SUNNY) {\n weatherIcon.setImageResource(R.drawable.ic_weather_n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public static int totalLinks() This static function returns the total number of link operations made during the runtime of the program. A link operation is the operation which gets as input two trees of the same rank, and generates a tree of rank bigger by one, by hanging the tree which has larger value in its root on ...
public static int totalLinks() { return totalLinks; }
[ "public static int totalLinks()\r\n { \r\n \treturn totalLinks;\r\n }", "int getNumberOfLinks();", "public int getNumberOfLinks() {\r\n List relations;\r\n\r\n if (_inside) {\r\n relations = _port.insideRelationList();\r\n } else {\r\n relations = _po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is Player dwarf or assassin?
public boolean isDwarf(String player, boolean assassins) { if (playerstate.containsKey(player)) { int pstate = playerstate.get(player); if ((pstate >= Game.dwarfMin && pstate <= Game.dwarfMax) || pstate == Game.dragonWarrior) { return true; ...
[ "public boolean isHumanPlayer();", "void playerIsInAir();", "public boolean isHumanPlayer() { return true; }", "boolean eatenByAny(Player p);", "boolean hasTargetPlayerName();", "void playerIsOnPlatform();", "public static boolean isPlayerOnDuty(Player p) {\r\n return false;\r\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of IssuesTracker.
public IssuesTracker() { // Empty }
[ "public TcJiraIssue() {\r\n issue = new RemoteIssue();\r\n }", "public Issue() {\n }", "Issue createIssue();", "public IssuesTrackerRegister() {\n initComponents();\n }", "@Nonnull\n public com.microsoft.graph.requests.ServiceHealthIssueCollectionRequestBuilder issues() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Opens a dialog for the user to enter data for a new Wifi Point. If valid, checks it doesn't match any existing points and adds it to the table, as well as the user's list of custom points.
public void addWifi() { try { FXMLLoader addWifiLoader = new FXMLLoader(getClass().getResource("/fxml/AddWifiDialog.fxml")); Parent root = addWifiLoader.load(); AddWifiDialogController addWifiDialog = addWifiLoader.getController(); Stage stage1 = new Stage(); ...
[ "private void editWifi(WifiPoint selectedWifiPoint) {\n try {\n FXMLLoader addWifiLoader = new FXMLLoader(getClass().getResource(\"/fxml/AddWifiDialog.fxml\"));\n Parent root = addWifiLoader.load();\n AddWifiDialogController addWifiDialog = addWifiLoader.getController();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the arrival time of the flight.
public void schedule(LocalTime arrivalTime) { this.arrivalTime = arrivalTime; }
[ "private void setArrivalTime(PortTime arrivalTime) {\n this.arrivalTime = arrivalTime;\n }", "public void setArrivalTime(String value) {\n setAttributeInternal(ARRIVALTIME, value);\n }", "public void setArrivalTime(long v) {this.arrival = v;}", "public Builder setArrivalTime(\n j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Chapter__Alternatives_3" $ANTLR start "rule__Reference__Alternatives_0" InternalScoping.g:254:1: rule__Reference__Alternatives_0 : ( ( ( rule__Reference__Group_0_0__0 ) ) | ( ( rule__Reference__Group_0_1__0 ) ) | ( ( rule__Reference__Group_0_2__0 ) ) );
public final void rule__Reference__Alternatives_0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalScoping.g:258:1: ( ( ( rule__Reference__Group_0_0__0 ) ) | ( ( rule__Reference__Group_0_1__0 ) ) | ( ( rule__Reference__Group_0_2__0 ) ) ) ...
[ "public final void rule__Reference__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScoping.g:756:1: ( ( ( rule__Reference__Alternatives_0 ) ) )\n // InternalScoping.g:757:1: ( ( rule__Reference__Alternative...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the operID value for this ModifyUserReqt.
public java.lang.String getOperID() { return operID; }
[ "public Long getOperId() {\r\n return operId;\r\n }", "public String getOperid() {\n return operid;\n }", "public Long getOperateUserId() {\n return operateUserId;\n }", "public String getOperaterid() {\n\t\treturn operaterid;\n\t}", "public String getOperaterId() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for next cellState
public CellState getNextState() { return this.nextState; }
[ "public AntCell getNextState() {return nextState;}", "public Cell getNext()\n { return next; }", "public int getState() {\n return cellAt;\n }", "public CellState getCurrentState() {\n return this.currentState;\n }", "private FightCell nextAvailableCell() {\n FightCell cell = map.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines all possible semijoins that can be used by dimension tables to filter fact tables. Constructs SemiJoinRels corresponding to potential dimension table filters and stores them in the member field "possibleSemiJoins".
public void makePossibleSemiJoins( LoptMultiJoin multiJoin ) { possibleSemiJoins = new HashMap<>(); // semijoins can't be used with any type of outer join, including full if ( multiJoin.getMultiJoinRel().isFullOuterJoin() ) { return; } int nJoinFactors = multiJoin.g...
[ "public boolean chooseBestSemiJoin( LoptMultiJoin multiJoin ) {\n // Sort the join factors based on the cost of each factor filtered by semijoins, if semijoins have been chosen.\n int nJoinFactors = multiJoin.getNumJoinFactors();\n List<Integer> sortedFactors = factorCostOrdering.immutableSorte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of paintBarColor Change the Bar Color if outside the Long KAMA Wave
public void paintBarColorOutside(DataContext ctx, int i) { DataSeries series=ctx.getDataSeries(); if (series.getBoolean(i, SlowKamaShade.BULLPERFECTs) == true && series.getClose(i)>series.getDouble(i, SlowBandLines.BB3Us)) //Bull Shading { if(series.getClose(i) > series.getClose(i-1)) ...
[ "public void colorBar() {\r\n if (bar.getValue() < 60) {\r\n bar.setForeground(Color.red);\r\n } else {\r\n bar.setForeground(Color.blue);\r\n }\r\n }", "public void paintBarColor(DataContext ctx, int i) {\n\t\t DataSeries series=ctx.getDataSeries();\n\t\t \n\t\t i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finalizes this class instance. See BLEConnections interface for more information
@Override public void finishBLE() { try { _btGatt.disconnect(); } catch (Exception e) { System.out.println(e.toString()); } _btAdapter = null; }
[ "@Override\n public void onDestroy() {\n if (gatt != null) {\n // For better reliability be careful to disconnect and close the connection.\n gatt.disconnect();\n gatt.close();\n gatt = null;\n tx = null;\n rx = null;\n }\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the preview is started. Override this to start decoding work.
protected void previewStarted() { }
[ "void startPreview();", "public void startDecoding() {\n decoderState = State.OK;\n decoderBufferAmount = 0;\n }", "public void display() {\n startPreview();\n }", "void startDecoder(){\n if(DEBUG) Log.d(TAG, \"Initializing Decoder\");\n String mime = format.getStr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return activity duration calculator instance.
public ActivityDurationCalculator getActivityDurationCalculator() { return activityDurationCalculator; }
[ "public ActivityDurationFactory getActivityDurationFactory() {\n return activityDurationFactory;\n }", "public TimeValue getDurationFor(String activity) {\n\t\tValidate.notNull(activity);\n\t\treturn defaultActivityDuration;\n\t}", "float getDuration();", "public String getActivityDurationAmt()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The number of nodes in the output activation layer. Creates a new trainer for a perceptron, using the userprovided input filename.
public TrainerOld(String inputFile, String activationsFile, String truthsFile, String outputsFile) { this.inputFile = inputFile; this.activationsFile = activationsFile; this.truthsFile = truthsFile; this.outputsFile = outputsFile; readInputFile(); this.currError = Double.MAX_VALUE...
[ "private void trainPerceptrons(){\n double activationValues[] = new double[4];\n for(Image image:asciiReader.getTrainingImages()){\n for (int j = 0 ; j < activationValues.length; j++){\n activationValues[j] = activationFunction\n .apply(sumWeights(j,ima...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Alternative Functionality Implementation to isInorganic()
public boolean isOrganic(Sample sample){ return true; }
[ "boolean hasIsPartOf();", "boolean isInHierarchy(Territory territory){\n boolean isHere = false;\n for(int i=0; i<subordinates.numObjs; i++){\n Territory subordinate = (Territory)subordinates.get(i);\n if (isHere==false){\n if(subordinate.equals(territory)){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
makes a copy of a double array
private double [][] doubleArrayCopy(double [][] array) { double [][] newArray = new double[array.length][]; for(int i = 0; i < array.length; i++) newArray[i] = Arrays.copyOf(array[i], array[i].length); return newArray; }
[ "public double[] doubleCopy(double[] arr, double[] copy){\n\t\tfor (int i = 0; i < arr.length; i++){\n\t\t\tcopy[i] = arr[i];\n\t\t}\n\t\treturn copy;\n\t}", "public double[][] getArrayCopy();", "public static double[] copy(double[] arry) {\n\tif (arry == null) {\n\t return null;\n\t}\n\treturn arry.clone();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if media is already in database
public boolean checkAvailability(Media media) { return false; }
[ "public boolean isAlreadyInDB(String url){\n\n String selection = SavedNewsHeadlinesDBHelper.COL_URL + \" LIKE ? \";\n String[] selectionArgs = {url};\n\n Cursor cursor = savedDB.query(\n SavedNewsHeadlinesDBHelper.TABLE_NAME,\n null,\n selection,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows the given unit to sell the specified quantity of target artifacts. If successful, the value of the target artifact will be added to the players's score. Also, the unit performing the action will have the specified quantity of target artifacts subtracted from its carriedObjects field. In case of an error, the ret...
public PlayerState sellObject(UnitState unit, CraftedObject craftedObject, Integer quantity);
[ "@Override\n protected void performActionResults(Action targetingAction) {\n PhysicalCard finalTarget = action.getPrimaryTargetCard(targetGroupId);\n\n // Perform result(s)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
changes the actionSequence to walking based on current effectiveDirection
public void setSequenceWalking() { setActionStep(0); setcompletingSequence(false); if(this instanceof Arbiter){ switch(getActionSequence()%4) { case 2: setActionSequence(8); break; case 1: setActionSequence(9); break; case 0: setActionSequence(10); break; case 3...
[ "public void nextAction(){\n\t\tif (this.currentAction == this.onAction){\n\t\t\tthis.currentAction = this.offAction;\n\t\t\tthis.currentAction = this.currentAction.next();\n\t\t\tthis.lastOffDelay = this.currentAction.getCurrentLapsTime();\n\t\t}else{\n\t\t\tthis.currentAction = this.onAction;\n\t\t\tthis.currentA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get generator of XML text
protected IXmlGenerator getXmlGenerator(){ return new XmlGenerator(10, // <property_0..9 "property_", // <property_ this.getSequenceGenerator() ); }
[ "@Override\n\tpublic byte[] generateOutput() {\n\t\tthis.plainOut = new PlainOutputConversion();\n\n\t\tString output = \"\";\n\t\ttry {\n\t\t\toutput = constructTextfromXML(this.rootXML, true);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column device_dynamic.fault_unconfirmed_count
public void setFaultUnconfirmedCount(Integer faultUnconfirmedCount) { this.faultUnconfirmedCount = faultUnconfirmedCount; }
[ "public Integer getFaultUnconfirmedCount() {\n return faultUnconfirmedCount;\n }", "public void setFaultConfirmedCount(Integer faultConfirmedCount) {\n this.faultConfirmedCount = faultConfirmedCount;\n }", "public void setAlarmUnconfirmedCount(Integer alarmUnconfirmedCount) {\n this.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maps a specified cell tile type to the image that is used to display it
public abstract String mapTileToImage(Tile tile);
[ "public abstract String mapCharacterToImage(GameCharacter creature, Tile tile);", "public abstract String mapItemToImage(Item item, Tile tile);", "ImageTile getImageTile();", "boolean isImageTileType();", "public TiledMapTileLayer.Cell createItem(Tile.Item type){\n TextureRegion region = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'System Event'.
SystemEvent createSystemEvent();
[ "Event createEvent();", "BasicEvent createBasicEvent();", "EventUse createEventUse();", "BasicEvents createBasicEvents();", "EventLibrary createEventLibrary();", "ProgramEventEvent createProgramEventEvent();", "Events<T> create();", "public ServiceEvent() {\n // eventSenderID and eventSenderCla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ return the time span object. In addition to returning the timespan it checks for the type of timeSpan, which can be timedependent or timeindependent.
public TimeSpan getTimeSpan() { //return this.timeSpan; return timeS; }
[ "public java.lang.String getTimeSpan() {\n return timeSpan;\n }", "private TimeSpan buildTimeSpan(MetaDataProvider mdp)\r\n {\r\n if (!myType.getBasicVisualizationInfo().getSupportedLoadsToTypes().contains(LoadsTo.TIMELINE))\r\n {\r\n return TimeSpan.TIMELESS;\r\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method Will return the greenStreak value.
public int getGreenStreak(String username) { String query = "SELECT greenstreak " + "FROM scores " + "WHERE username = \'" + username + "\'"; try { ResultSet data = dbAdapter.getInstance().query(query); if (data.next()) { ...
[ "public int getGreenScore() {\n return greenScore;\n }", "public int getCurrentWinStreak() {\n\t\treturn this.currentWinStreak; \n\t}", "public int getGreen() {\r\n\t\treturn green;\r\n\t}", "@java.lang.Override\n public int getCurrentStreak() {\n return currentStreak_;\n }", "@java.lang.Over...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches for transfers awaiting authorization
List<Transfer> searchTransfersAwaitingAuthorization(TransfersAwaitingAuthorizationQuery query);
[ "List<Transfer> search(TransferQuery query) throws DaoException;", "private void searchToursForDestination() {\n Singleton.getInstance().setLastPageNumber(-1);\n Singleton.getInstance().getTours().clear();\n Singleton.getInstance().getTourGuides().clear();\n Singleton.getInstance().get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Method: run This method loads the welcome screen, makes it responsive to the mouse, asks user what level they want to play in. Then the grid and pad are loaded, the game is played, then the game results are checked.
public void run() { displayWelcomeScreen(); addMouseListeners(); IODialog dialog = getDialog(); int difficultyLevel = -1; while (difficultyLevel != 1 && difficultyLevel!=2 && difficultyLevel!=3) { difficultyLevel = dialog.readInt("Enter player level: 1 (Beginner) to 3 (Expert)"); } loadGrid(difficultyL...
[ "public void startProgram()\r\n\t{\r\n\t\tview.displayPlayerNames();\r\n\t\tview.loadGameData();\r\n\t\tview.displayGame();\r\n\t}", "private void run() {\n int num = 0; // Current level number\n while (loadLevel(++num))\n if (!playLevel() || !win.question(\"Next level\")) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the messageSort property of message. The messargeSort of asynchronous message is "asynchCall", for other messages, the messageSort is "synchCall".
public void setMessageSort(String messageSort);
[ "void setMessageSort(Object message, Object messageSort);", "public final void setMessagesSortOrder(interfaceconfiguration.proxies.SortOrder messagessortorder)\r\n\t{\r\n\t\tsetMessagesSortOrder(getContext(), messagessortorder);\r\n\t}", "public final void setMessagesSorting(interfaceconfiguration.proxies.Messa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a backed list of methods.
public List getMethods() { resolveIfNecessary(); return methods; }
[ "public List<Method> getAllMethods();", "List<Method> getAllMethods();", "public abstract List<MethodInstance> methods();", "public abstract Method[] getMethods();", "public List<ServiceMethod> getMethodList()\n {\n return Collections.unmodifiableList(methods);\n }", "public List<MethodDef> m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleSchema" $ANTLR start "entryRuleType" InternalMyDsl.g:78:1: entryRuleType : ruleType EOF ;
public final void entryRuleType() throws RecognitionException { try { // InternalMyDsl.g:79:1: ( ruleType EOF ) // InternalMyDsl.g:80:1: ruleType EOF { before(grammarAccess.getTypeRule()); pushFollow(FOLLOW_1); ruleType(); st...
[ "public final void entryRuleType() throws RecognitionException {\r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:118:1: ( ruleType EOF )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clean out old tunnels Caller must synchronize on tc.
private static void cleanTunnelCache(RouterContext ctx, Map<HashPair, TunnelInfo> tc) { for (Iterator<Map.Entry<HashPair, TunnelInfo>> iter = tc.entrySet().iterator(); iter.hasNext(); ) { Map.Entry<HashPair, TunnelInfo> entry = iter.next(); HashPair k = entry.getKey(); Tunnel...
[ "void tunnelCleanServers();", "public void clearUpLanes () {\r\n\t\tupLanes = null;\r\n\t}", "public void cleanup() {\r\n\t\tthis.removeAll();\r\n\t\tthis.chatPanels.clear();\r\n\t\tthis.userListPanel.cleanup();\r\n\t}", "private void unvisitNodes() {\n for (Sock sock : this.socks)\n sock.un...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the Gateway secret to use in the HTTP request header. To avoid users calling REST Service URL directly instead of going through gateway URL, we use GATEWAY_SECRET header, and REST Service will process requests only if secret matches.
String getSecret();
[ "@ApiModelProperty(value = \"Key that will be used to generate HMAC-SHA512 hex digest value in the X-Linkage-Signature header.\")\n \n public String getSecret() {\n return secret;\n }", "public String getSecret() {\n return secret;\n }", "public int getSecret() {\n return secret;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
modifies or creates a ConstraintMatrix (arc in terms of a constraint net) to represent the binary inequality constraint of two items
public void addBinaryNotEquals(char item1, char item2){ for (int i=0; i < arcs.size(); i++){ if (arcs.get(i).item1 == item1 && arcs.get(i).item2 == item2){ ConstraintMatrix cm = new ConstraintMatrix(item1, item2); cm.setBinaryInequality(); arcs.add(cm); return; } else if (arcs.get(i).item...
[ "public void addBinaryEquals(char item1, char item2){\r\n\t\tfor (int i=0; i < arcs.size(); i++){\r\n\t\t\tif (arcs.get(i).item1 == item1 && arcs.get(i).item2 == item2){\r\n\t\t\t\tConstraintMatrix cm = new ConstraintMatrix(item1, item2);\r\n\t\t\t\tcm.setBinaryEquality();\r\n\t\t\t\tarcs.add(cm);\r\n\t\t\t\treturn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the Method writeElementsToXml(...) with all valid Elements
@Test public void testWriteElementsToXml() throws Exception { // Mock up needed Classes OutputStream output = new ByteArrayOutputStream(); EwsServiceXmlWriter testWriter = new EwsServiceXmlWriter(exchangeServiceMock, output); // Adding Test Values to the Object fillDictionar...
[ "@Test\n public void testWriteElements() {\n System.out.println(\"writeElements\");\n DateTime ObjectToWrite = null;\n DateTimeXMLWriter instance = new DateTimeXMLWriter();\n Element expResult = null;\n Element result = instance.writeElements(ObjectToWrite);\n assertEqua...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a StatusArrayService spy that uses a mock ServerFacade to return known responses to requests.
@BeforeEach public void setup() throws IOException, TweeterRemoteException { User currentUser = new User("FirstName", "LastName", null); User resultUser1 = new User("FirstName1", "LastName1", "https://faculty.cs.byu.edu/~jwilkerson/cs340/tweeter/images/donald_duck.png"); Use...
[ "void stubResponses(HttpExecuteResponse... responses);", "private void mockBusinessService() {\n context.checking(new Expectations() {{\n List<ScheduleStatus> scheduleStatuses = new LinkedList<ScheduleStatus>();\n scheduleStatuses.add(new ScheduleStatus());\n Map<String, Ob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The virtual pool type. Valid values: block = Volume file = File System object = Object Store
@XmlElement(name = "vpool_type") @JsonProperty("vpool_type") public String getVirtualPoolType() { return virtualPoolType; }
[ "public String getVirtualizationType() {\n return virtualizationType;\n }", "public native @Cast(\"PolyBlockType\") int BlockType();", "public cto.framework.service.schema.types.PoolClassType getPoolClass() {\r\n return this._poolClass;\r\n }", "public ObjectType getJVMType();", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns amount of registered secondary listeners. For debug/information purposes.
long getSecondaryListenerCount();
[ "long getPrimaryListenerCount();", "long getListenerCount();", "public int getListenerCount();", "public synchronized int getListenerCount() {\n return listenersList.size();\n }", "public int getListenerCount() {\r\n return dataListeners.size();\r\n }", "public long getListenerRegistra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether an inventory is valid. For the check to return true it must: 1) Exist; it cannot be null. 2) Have slots.
public static boolean isValidInventory(final Inventory inventory) { if (inventory == null) { return false; } if (inventory.getSize() < 1) { return false; } return true; }
[ "public static boolean isValidInventory(final ItemStack[] inventory) {\n if (inventory == null) {\n return false;\n }\n if (inventory.length < 1) {\n return false;\n }\n return true;\n }", "boolean isValidForSlot(ItemStack stack, int armorSlot);", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the associated RowIterator using masterdetail link QuestionFormVVRecs
public oracle.jbo.RowIterator getQuestionFormVVRecs() { return (oracle.jbo.RowIterator) getAttributeInternal(QUESTIONFORMVVRECS); }
[ "Iterator<Row> rowIterator();", "public RowIterator getDetailpermisView1() {\n return (RowIterator) getAttributeInternal(DETAILPERMISVIEW1);\n }", "public RowIterator getDetailpermisView() {\n return (RowIterator) getAttributeInternal(DETAILPERMISVIEW);\n }", "public Iterator<Row> getRowIt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the ciphertext and the initialization vector contained in CipherIV object in two seperate SharedPref aliases, encoded in Base64. The SharedPrefs are only accessible by your app.
protected void saveCipherAndIVToSharedPrefBase64(CipherIV data, String spAlias, String cipherIvAlias) { super.saveToSharedPrefBase64(spAlias, cipherIvAlias + CIPHER_PART, data.getCipher()); super.saveToSharedPrefBase64(spAlias, cipherIvAlias + IV_PART, data.getIv()); }
[ "public void encryptToPref(String prefKey, String plaintext) throws IOException, GeneralSecurityException {\n\t\tgetEncryptedPrefs().edit().putString(prefKey, plaintext).commit();\n\t}", "protected CipherIV getCipherAndIVFromSharedPref(String spAlias, String ciphIVAlias) throws DataNotAvailableException {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the sum of the factorials of the digits of n
public static int sumOfFactorialsOfDigits(int n) { int result = 0; while (n > 0) { result += factorials[n % 10]; n /= 10; } return result; }
[ "private long sumOfFactorialsOfDigits(long n) {\n long sum = 0;\n while (n > 0) {\n sum += factorial((int) (n % 10));\n n /= 10;\n }\n return sum;\n }", "private static int factorial(int n) {\n\t\tint result = 1;\n\t\tif(n>0) {\n\t\t\tfor (int i =1; i<=n;i++) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string shi_yun_id = 5;
public java.lang.String getShiYunId() { java.lang.Object ref = shiYunId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8()...
[ "java.lang.String getShiYunId();", "public java.lang.String getShiYunId() {\n java.lang.Object ref = shiYunId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lets the player declare noise or silence, in the sector.
public String declareNoise(int playerID, String sector) { this.playerID = playerID; if (mustDeclare) { Player p = CommonMethods.toPlayer(playerID, playerList); Sector s = CommonMethods.toSector(sector, table); String toReturn = ""; if (CardsConstants.NOISE.equals(dsc.toString().split("_")[1])) {...
[ "public void highscorenoise()\n {\n if(!mute)\n {\n try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Darkmoon Caverns.wav\");\n double c = Math.random();\n if(c<=.25)\n url =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
purpose: this method is used for creating a bean of MessageListenerAdapter
@Bean public MessageListenerAdapter getAdapter(MessageReceiver receiver) { return new MessageListenerAdapter(receiver,"sendMessage"); }
[ "@Bean\n\tpublic SimpleMessageListenerContainer getContainer(ConnectionFactory connectionFactory,MessageListenerAdapter messageListenerAdapter)\n\t{\n\t\tSimpleMessageListenerContainer container = new SimpleMessageListenerContainer();\n\t\tcontainer.setQueueNames(\"userMessageQueue\");\n\t\tcontainer.setConnectionF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a aEPPWhoWasRec to the list of records.
public void addRecord ( EPPWhoWasRecord aEPPWhoWasRec ) { if ( aEPPWhoWasRec == null ) throw new IllegalArgumentException( "Cannot add a null EPPWhoWasRecord" ); if ( this.records == null ) { this.records = new ArrayList(); } this.records.add( aEPPWhoWasRec ); }
[ "public void addRecord(Record record) {\n recordsList.add(record);\n }", "void addRecord(HistoryRec record);", "void addRecord(Record record);", "void addRecords(List<Record> records);", "public void addRecord(MultiUserRecord record) {\n muRecords.add(record);\n }", "@SuppressWarnings(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int32 zip_code = 5;
int getZipCode();
[ "public int getZip()\r\n {\r\n return zip;\r\n }", "public void setZipCode(int value) {\n this.zipCode = value;\n }", "java.lang.String getZipCode();", "public void setZip(int value) {\n this.zip = value;\n }", "public Integer getZip()\n {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO as: avoid this Returns true if federated mode is enabled, i.e. repositoryType = fedx
public boolean isFederation( ) { return getRepositoryType().equalsIgnoreCase("fedx"); }
[ "boolean isFeaturesRepositoryLocal(String repositoryId, String connection) throws Exception;", "public boolean isConnectedToRepository() {\n // NOTE: can dynamically switch between rep and non-rep\n return StringUtils.isNotBlank( getSpoon().getUsername() );\n }", "private static boolean isFederatedUser(A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Translate object Admin to AbstractUserDto
@Transactional public AbstractUserDto translateAdmin(Admin admin){ Objects.requireNonNull(admin); return new AbstractUserDto(admin.getId(),admin.getFirstName(), admin.getLastName(), admin.getEmail(), translateAddress(admin.getAddress()), Role.ADMIN); }
[ "UserDto toDto(UserEntity userEntity);", "private UserDto convertToDto(User u){\n return new UserDto(u.getId(), u.getUsername());\n }", "private AdministratorDTO createDTO(Administrator administrator) {\r\n\t\tAdministratorDTO dto = new AdministratorDTO();\r\n\t\tif(administrator.getAccount() != null)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }