__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21954959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rematchFilters() { if (folderTableModel != null) { List allProxies = folderTableModel.getAllProxies(); for (int i = 0; i < allProxies.size(); i++) { ((MessageProxy) allProxies.get(i)).clearMatchedFilters(); } //loaderThread.loadMessages(allProxies); mMessageLoader.loadMessages(allProxies); } } COM: <s> gets all of the message proxies associated with this folder info </s>
funcom_train/23020456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameter(String paramName, String paramValue) throws IllegalArgumentException { LOG.trace("enter PostMethod.addParameter(String, String)"); if ((paramName == null) || (paramValue == null)) { throw new IllegalArgumentException("Arguments to addParameter(String, String) cannot be null"); } super.clearRequestBody(); this.params.add(new NameValuePair(paramName, paramValue)); } COM: <s> adds a new parameter to be used in the post request body </s>
funcom_train/27780083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object replace(Object what, Object by) { Object max = item(0); for (int i = size(); i > 0; ) { i--; if (what == item(i)) { itemto(i, by); down(i); } if (lessThan(max, item(i))) { max = item(i); } } return max; } COM: <s> replace code what code this object must be directly in this </s>
funcom_train/23991739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeObjectRelationship(OWLIndividual ind, OWLIndividual ind2, String relation) { OWLObjectProperty relProperty = this.getObjectPropertyByName(relation); PropertyAxiomCollector col = new PropertyAxiomCollector(); col.registerPropertyExpression(relProperty, (OWLIndividual) ind2); col.collectPropertyAxioms(ind, ontology); col.deleteCollectedPropertyAxioms(manager, ontology); } COM: <s> removes data axiom for specific individuals and property </s>
funcom_train/22278308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Encoder encoder) throws CodingException { super.encode(encoder); encoder.encodeInt(bezelTypeField, bezelType); encoder.encodeObject(baseColorField, baseColor); encoder.encodeObject(lighterColorField, lighterColor); encoder.encodeObject(darkerColorField, darkerColor); } COM: <s> encodes the bezel border instance </s>
funcom_train/25118024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setActionComboLevel(Action action, Level level) { Combo combo = this.combos.get(action); for (int i = 0; i < combo.getItemCount(); i++) { if (level.toString().equals(combo.getItem(i))) { combo.select(i); return; } } } COM: <s> selects the given level in the combo for the given action </s>
funcom_train/36465254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o instanceof VertexPair) { return ((object1.equals(((VertexPair) o).object1)) && (object2.equals(((VertexPair) o).object2))) || ((object1.equals(((VertexPair) o).object2)) && (object2.equals(((VertexPair) o).object1))); } else { return false; } } COM: <s> equals returns true if this vertex pair represents the same unordered </s>
funcom_train/46454121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFunction(String funcStr) throws ParserException { function = funcStr; define(function); parse(); if(error!=NO_ERROR) { String msg = "Error in function string: "+funcStr; msg = msg+'\n'+"Error: "+toErrorString(error); msg = msg+'\n'+"Position: "+getErrorPosition(); throw new ParserException(msg); } } COM: <s> parse the function string using the existing variables </s>
funcom_train/7374420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MapReduceOper startNew(FileSpec fSpec, MapReduceOper old) throws PlanException{ POLoad ld = getLoad(); ld.setLFile(fSpec); MapReduceOper ret = getMROp(); ret.mapPlan.add(ld); MRPlan.add(ret); MRPlan.connect(old, ret); return ret; } COM: <s> starts a new mroper and connects it to the old </s>
funcom_train/27904143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void evalOutputs(Node node) { String value = node.getValue(); if(value.equals("outputs")) { Node output = node.getChild("output"); Node more = node.getChild("moreOutput"); evalOutput(output); evalMoreOutput(more); generateCode(30); // R30? } else { syntaxError(node,"evalOutputs()"); } } COM: <s> evaluates an outputs production </s>
funcom_train/36911798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateHFPageAvailableSpace(PageId hfPageId, int availableSpace) throws ChainException{ int offset = 0; for(offset = 0; offset < _totalEntries - 1; offset++){ // Get page directory entry at this offset. PageDirectoryEntry pageDirectoryEntry = getPageDirectoryEntry(offset); if(pageDirectoryEntry.getPID() == hfPageId.pid){ pageDirectoryEntry.setAvailableSpace(availableSpace); // Write pageDirectoryEntry back. writePageDirectoryEntry(pageDirectoryEntry, offset); return true; } } return false; } COM: <s> updates space for page corresponding to hf page id </s>
funcom_train/49703473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Ignore @Test public void registerUsers() throws Exception { //NOPMD (No JUnit assert) String testPost = "TestRegisterUser@" + server.getServerProperties().get(TEST_DOMAIN_KEY); for (int i = 0; i < 5; i++) { SensorBaseClient.registerUser(getHostName(), testPost); } } COM: <s> tests multiple register users </s>
funcom_train/44497491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSequence constructor(ResultSequence arg) throws DynamicError { ResultSequence rs = ResultSequenceFactory.create_new(); if(arg.empty()) return rs; AnyAtomicType aat = (AnyAtomicType) arg.first(); XSTime t = parse_time(aat.string_value()); if(t == null) throw DynamicError.cant_cast(null); rs.add(t); return rs; } COM: <s> creates a new result sequence consisting of the extractable time from the </s>
funcom_train/32366812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processAllCitations(BufferedReader in, boolean testMode) throws NumberFormatException, IOException { String line; while ( ( line = in.readLine()) != null ) { String[] fields = line.split("\t"); processOneCitation(fields, testMode); } in.close(); } COM: <s> go through the open citation file and transactionally save each successfully processed citation </s>
funcom_train/46433996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OpContent createReportContent(OpBroker broker, byte[] content, String contentType) { String mimeType = OpContentManager.getFileMimeType('.' + contentType); XSizeInputStream stream = new XSizeInputStream(new ByteArrayInputStream(content), content.length); OpContent reportContent = OpContentManager.newContent(stream, mimeType, 0); broker.makePersistent(reportContent); return reportContent; } COM: <s> saves the report into the database </s>
funcom_train/29819653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, EntryType obj) { incVersion(); checkInterval(index, 0, size()); if (root == null) { root = new AVLNode(index, (Persistent) obj, null, null); } else { root = root.insert(index, obj); } size++; } COM: <s> adds a new element to the list </s>
funcom_train/25201828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void switchColors(List<DviCode> dviCode, Color color) { if (!color.equals(textColor)) { textColor = color; String cc = color(textColor); if (cc != null) { dviCode.add(new DviXxx("color " + cc)); } } } COM: <s> insert a color switching special if the current color is not </s>
funcom_train/9237238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSettings() { if (IdentityManager.getGlobalConfig().hasOption(DOMAIN, "sourceOrder")) { order = IdentityManager.getGlobalConfig().getOptionList(DOMAIN, "sourceOrder"); } else { order = new ArrayList<String>(); } } COM: <s> loads the plugins settings </s>
funcom_train/38416349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void CastToSelf(CharData caster) { Spell.Validate(caster); TileMap map = ServerDirector.getDataManager().getWorldManager().getTileMap(caster.getLocation()); SpellOnTheScreen eff = new StaticSpell(-1,"Time Stop"); map.setTimeStop(caster.getPrimaryKey()); map.getMessageRouter().addScreenObject( eff ); } COM: <s> cast the spell to the map its called only by the server </s>
funcom_train/44118580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startPage(int pageWidth, int pageHeight) { String pageName = "PGN" + StringUtils.lpad(String.valueOf(_pageCount++), '0', 5); _currentPageObject = new PageObject(pageName, pageWidth, pageHeight); _currentPageObject.setPortraitRotation(_portraitRotation); _currentPageObject.setLandscapeRotation(_landscapeRotation); } COM: <s> start a new page </s>
funcom_train/34246184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getIsRequiredReviewer() { if (communityMemberAssignment != null) isRequiredReviewer = CacheUtility.getBoolean(WorkTaskAssignmentType.REQUIRED_REVIEWER.getName().equals(communityMemberAssignment.getGovernanceType())); if (isRequiredReviewer == null) isRequiredReviewer = Boolean.FALSE; return isRequiredReviewer; } COM: <s> returns the is required reviewer </s>
funcom_train/19289787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redo() throws CannotRedoException { super.redo(); if (edits.size()==0) return; Enumeration<UndoableEdit> cursor = edits.elements(); // Modified from CompoundEdit: can undo if anything in there can be undone. boolean didOne = false; while (cursor.hasMoreElements()) { UndoableEdit e = cursor.nextElement(); if (!didOne && !e.canRedo()) { // skip it. } else { e.redo(); didOne=true; } } if (!didOne) throw new CannotRedoException(); } COM: <s> sends code redo code to all contained </s>
funcom_train/35925513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRequests(PrintWriter pw, BufferedReader br){ String inputLine = null; try{ while ((inputLine = br.readLine()) != null) { if (inputLine.equalsIgnoreCase(HangmanServerConstants.CLIENT_END)) { break; } processSingleRequest(inputLine, pw); } }catch (SocketTimeoutException e) { System.err.println("Connection with client closed due to timeout"); } catch(IOException e){ System.err.println("Connection with client interrupted"); } } COM: <s> the method is called in the beginning of client communication </s>
funcom_train/19309547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDescender() { if (this.hheaTable.getAscender() == 0 || this.hheaTable.getDescender() == 0) { if (this.os2Table == null) { return this.hheaTable.getDescender(); } return this.os2Table.getTypoDescender(); } return this.hheaTable.getDescender(); } COM: <s> returns the descender value for this font </s>
funcom_train/50242733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doYearText( int year ) throws JspException { JspWriter writer = pageContext.getOut(); try { writer.print("" + year ); } catch (IOException e) { throw new JspException( messages.getMessage("yearselector.io", e.toString()) ); } return; } // doYearText(int) COM: <s> writes a calendar based year 4 digits as user friendly text </s>
funcom_train/25995567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onAscendingSubmit(AjaxRequestTarget target, Form<?> form) { IPageableComponent<E> component = findPageableComponent(); IQuery<E> query = component.getPageableNavigator().getQuery(); IOrder<E> order = Order.asc(this.columnModel.getPropertyPath()); query.clearOrders(); query.addOrder(order); component.getPageableNavigator().reset(); target.addComponent((Component)component); } COM: <s> callback method for ajax buttons </s>
funcom_train/31823772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int internal_WM_GETOBJECT (int wParam, int lParam) { if (objIAccessible == null) return 0; if (lParam == COM.OBJID_CLIENT) { /* LresultFromObject([in] riid, [in] wParam, [in] pAcc) * The argument pAcc is owned by the caller so reference count does not * need to be incremented. */ return COM.LresultFromObject(COM.IIDIAccessible, wParam, objIAccessible.getAddress()); } return 0; } COM: <s> invokes platform specific functionality to handle a window message </s>
funcom_train/5243291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void useEquipment(Equipment equipment, String type) { Attack weaponAttack = null; // Activate weapon for att controler calc. activateEquipment(equipment); // TODO get attack and load with data // gets the attack from the weapon equipment.performAction(); // weaponAttack.addOutput(compileOutputs(type)); deactivateEquipment(equipment); } COM: <s> this performs the equipments action </s>
funcom_train/22395847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void finishLoading() { if(loadingFinished) { return; } if(browserContent != null) { try { browserContent.finishLoading(); loadingFinished = true; } catch (RenderingException e) { EventLogger.logEvent(AppInfo.GUID, ("RenderingException: " + e.toString()).getBytes(), EventLogger.ERROR); AnalyticsDataCollector.getInstance().onApplicationError("RenderingException: " + e.toString()); } } } COM: <s> does final processing of the field to render correctly </s>
funcom_train/44710610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayName() { // The call to get("displayName") avoids a fringe condition // where calling get("diplayName") by ACSObject.beforeSave() // throws an error if the "retrieve" event does not return // any information set("displayName", getName()); return getName(); } COM: <s> gets the display name of the category </s>
funcom_train/44898494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tearDown() throws Exception { super.tearDown(); NamedIntHolderHome home = getNamedIntHolderHome(); for (Iterator holders=home.findAll().iterator(); holders.hasNext(); ) { NamedIntHolderRemote holder = (NamedIntHolderRemote) holders.next(); holder.remove(); } } COM: <s> cleans up all named int holders on the way out </s>
funcom_train/14478755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDirectory(String packagePath) throws Exception { packagePath = ensureValidPackagePath(packagePath); if ((packagePath.length() < 1) || (packagePath.charAt(packagePath.length() - 1) != '/')) { packagePath = packagePath + SLASH; } insert((byte[]) null, packagePath, null); } COM: <s> add a directory to the odf package </s>
funcom_train/37071482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void obsoleteArticles() throws SQLException { String update = "UPDATE pub_article set is_obsolete = 'y', updated_by = ?, date_updated= curdate() " + " WHERE pub_source_id = ? and is_obsolete= 'n' "; PreparedStatement stmt = conn.prepareStatement(update); try { stmt.setString(1, updated_by); stmt.setString(2, pubsource_id); stmt.executeUpdate(); } finally { stmt.close(); } } COM: <s> obsolete all the articles from one pubsource </s>
funcom_train/5774376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInTimeShort() { if (inTimeShort == null) { inTimeShort = new JTextField(); inTimeShort.setBounds(new java.awt.Rectangle(93,16,180,25)); inTimeShort.setEditable(true); } return inTimeShort; } COM: <s> this method initializes in time short </s>
funcom_train/21301449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addParentsFromGoTerm_UsingMap(String goTerm, Set<String> parentSet) { parentSet.add(goTerm); Set<String> parents = goTermParents_Index.get(goTerm); for (String parent : parents) { addParentsFromGoTerm_UsingMap(parent, parentSet); } } COM: <s> for a go term add all its parents to the set parent set </s>
funcom_train/1327560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean continueFilter(HttpServletRequest request, DominoUserProfile dominoUserProfile) { LtpaToken ltpaToken = new LtpaToken(request); if (dominoUserProfile != null) { if (dominoUserProfile.isValid()) { if (passGroupSecurity(dominoUserProfile)) { if (ltpaToken.isValid()) { return true; } } } } return false; } COM: <s> checks all requirements needed for this filter to continue processing the request </s>
funcom_train/18239706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAltitude(int altitude){ GraphicsContext graphicsContext = glyphPanel.getGraphicContext(); graphicsContext.setCurrentAltitude(altitude); glyphPanel.setPreferredSize(graphicsContext.getPreferredSize()); //we must revalidate inorder to //force the scroll bars to resize. glyphPanel.revalidate(); //and we must paint to show the changes. this.repaint(); } COM: <s> sets the altitude of this </s>
funcom_train/17489898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double computeMinDistance(int queryPointIndex, TIntHashSet existingLandmarkPoints) { double minDistance = Infinity.Double.getPositiveInfinity(); for (TIntIterator iterator = existingLandmarkPoints.iterator(); iterator.hasNext(); ) { minDistance = Math.min(minDistance, this.metricSpace.distance(queryPointIndex, iterator.next())); } return minDistance; } COM: <s> this function computes the function f z min d z l 0 </s>
funcom_train/22098324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceBundle getMessages (String string, Locale loc) { ResourceBundle messages = null; try { if (loc != null) messages = ResourceBundle.getBundle(string, loc); else messages = ResourceBundle.getBundle(string); } catch (Exception e){ e.printStackTrace(); } return messages; } COM: <s> load and initialize the resource bundle according to the specified </s>
funcom_train/34339691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand8() { if (okCommand8 == null) {//GEN-END:|45-getter|0|45-preInit // write pre-init user code here okCommand8 = new Command("Enviar", Command.OK, 0);//GEN-LINE:|45-getter|1|45-postInit // write post-init user code here }//GEN-BEGIN:|45-getter|2| return okCommand8; } COM: <s> returns an initiliazed instance of ok command8 component </s>
funcom_train/35658040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMediaContent(ArrayList<Media> media) { textMedia = new ArrayList<TextMedia>(); imageMedia = new ArrayList<ImageMedia>(); movieMedia = new ArrayList<MovieMedia>(); for (Media m : media) { if (m instanceof TextMedia) { textMedia.add((TextMedia) m); } else if (m instanceof ImageMedia) { imageMedia.add((ImageMedia) m); } else if (m instanceof MovieMedia) { movieMedia.add((MovieMedia) m); } } } COM: <s> creating lists of content based on the media on the timeline panel </s>
funcom_train/27843431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Context getContext(View view) throws ConvertException { Controller controller = view.getController(); if (controller == null) { throw new ConvertException(this, NO_CONTROLLER, view); } Context context = controller.getContext(); if (context == null) { throw new ConvertException(this, NO_CONTROLLER_CONTEXT, controller); } return context; } COM: <s> gets the context for the view </s>
funcom_train/7660688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAwaitNanos_Timeout() { final ReentrantLock lock = new ReentrantLock(); final Condition c = lock.newCondition(); try { lock.lock(); long t = c.awaitNanos(100); assertTrue(t <= 0); lock.unlock(); } catch (Exception ex) { unexpectedException(); } } COM: <s> await nanos without a signal times out </s>
funcom_train/13672913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOrderedMap() { Map m = new LinkedHashMap(); for (int i = 0; i < 10; i++) { m.put("key" + i, "value" + i); } Iterator iterator = m.keySet().iterator(); int j = 0; while (iterator.hasNext()) { assertEquals("key" + j, iterator.next()); j++; } } COM: <s> just check ordering of linked hash map </s>
funcom_train/7668197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntBuffer put(IntBuffer src) { if (src == this) { throw new IllegalArgumentException(); } if (src.remaining() > remaining()) { throw new BufferOverflowException(); } int[] contents = new int[src.remaining()]; src.get(contents); put(contents); return this; } COM: <s> writes all the remaining ints of the </s>
funcom_train/42637856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FuzzyNumber calcFuzzyNumber(FuzzyNumber xNumber){ TermNumber yNumber = ((TermNumber)xNumber).newNumber(); if(!yNumber.shouldAddIndependentTerms())//is needed or x throws something in newNumber()? throw new ClassCastException("This TermNumber does not support direct term processing: "+yNumber.getClass()); return (FuzzyNumber)yNumber; } COM: <s> overriden to prepare term procesing instead if real function evaluation </s>
funcom_train/18599339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMetadata(Element ISO19139, String id, String uuid, Dbms dbms, GeonetContext gc) throws MetadataNotifierException { Timer t = new Timer(); t.schedule(new UpdateTask(ISO19139, id, uuid, dbms, gc), 10); } COM: <s> updates inserts a metadata record </s>
funcom_train/18894413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Mp3Model getMp3Model() throws Exception { validate(); if (mp3Model == null) { mp3Model = new Mp3ModelImpl(); //init mp3Model.setResource(mp3ModelResource); mp3Model.setType(mp3ModelType); mp3Model.setSchemaModel(getSchemaModel()); mp3Model.init(getModelContext()); } return mp3Model; } COM: <s> returns the current mp3 model </s>
funcom_train/7510782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelFilters() { if (jPanelFilters == null) { jPanelFilters = new JPanel(); jPanelFilters.setLayout(new BorderLayout()); jPanelFilters.setBorder(BorderFactory.createTitledBorder(Messages .getString("TableViewerTemplate.filtersBorder"))); jPanelFilters.add(getJPanelFiltersButtons(), BorderLayout.SOUTH); } return jPanelFilters; } COM: <s> this method initializes j panel filters </s>
funcom_train/18960020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getNewX(float currentX, float speedX) { // Subtract by a small thread to make sure that it does not cross the bound. if (t > T_EPSILON) { return (float)(currentX + speedX * (t - T_EPSILON)); } else { return currentX; } } COM: <s> return the x position after impact </s>
funcom_train/44799377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { throw new IllegalArgumentException("Not implemented here. Should have been avoided by impl. of getCellRenderer() in org.form4j.form.field.nodedata.Table bug4435"); } COM: <s> consider xpath expressions and pick the associated subrenderer to delegate the work </s>
funcom_train/3083424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTreeTableModel(TreeTableModel treeModel) { treeAndTableCellRenderer.setModel(treeModel); // Adapt tree model to table model before invoking setModel() setModel(new TreeTableModelAdapter(treeModel, treeAndTableCellRenderer)); // Enforce referential integrity; bail on fail if (treeModel != treeAndTableCellRenderer.getModel()) { // do not use // assert here! throw new IllegalArgumentException("Mismatched TreeTableModel"); } } COM: <s> sets the data model for this tree table to the specified </s>
funcom_train/2676753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyItemPause(IPlayItem item, int position) { IStreamAwareScopeHandler handler = getStreamAwareHandler(); if (handler != null) { try { handler.streamPlaylistVODItemPause(this, item, position); } catch (Throwable t) { log.error("error notify streamPlaylistVODItemPause", t); } } } COM: <s> notifies subscribers on pause </s>
funcom_train/24367095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoNumeric InverseNormal(String label, NumberValue a, NumberValue b, NumberValue c) { AlgoInverseNormal algo = new AlgoInverseNormal(cons, label, a, b, c); GeoNumeric num = algo.getResult(); this.processCreateCommand(num); //VMT modification return num; } COM: <s> inverse normal mean variance x </s>
funcom_train/28999684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildBlankLine() throws DocumentException { if (++rowCount < pageLength) { PdfPCell cell; for (int c = 0; c < reportColumns.length; c++) { cell = new PdfPCell(new Paragraph(" ", FontFactory.getFont( FontFactory.HELVETICA, 12, Font.NORMAL))); cell.setBorder(0); cell.setBackgroundColor(totalColor); reportBody.addCell(cell); } } } COM: <s> h2 code build blank line code h2 </s>
funcom_train/51206702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buffer(final Type type, final String value) { if (buffered) { throw new IllegalStateException("Buffer already in use"); } if (type == null) { throw new IllegalArgumentException("Cannot buffer null"); } buffered = true; bufferedTokenType = type; bufferedTokenValue = value; } COM: <s> places token of type value in buffer </s>
funcom_train/199597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addData(String[] data) { if(data.length != 2) return; if(data[0].equals("h_rt")) setWalltime(data[1]); if(data[0].equals("qname")) setName(data[1]); if(data[0].equals("pe_list")) setPe_list(data[1]); if(data[0].equals("slots")) setSlots(data[1]); } COM: <s> add data to queue information </s>
funcom_train/38573761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundDelay(long millisecs) { if(millisecs < 0L){ throw new IllegalArgumentException("Can not set a background delay " + "of less than 0 millseconds."); } super.setProperty(BACKGROUND_DELAY, Long.toString(millisecs)); dispatchChangeEvent(OptionsChangeEvent.BACKGROUND_DELAY_CHANGE, OptionsChangeEvent.NON_PROGRESS_EVENT); } COM: <s> changes the time delay to the specified value for background </s>
funcom_train/25811109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitForStop() { try { synchronized(this) { mContinue = false; mIsPaused = false; notify(); } join(); if (DEBUG) Log.d(mTag, "Stopped"); } catch (InterruptedException e) { Log.e(mTag, "Join failed", e); } } COM: <s> tell the thread it must quit at the next iteration </s>
funcom_train/22024308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stepAccurateSimple(float stepsize){ AccurateSimpleStepper.getInstance().step(this, time,time + stepsize); time += stepsize; for(int i = 0; i < stepListeners.size(); i++){ stepListeners.get(i).notifyStep(this, time); } } COM: <s> steps the world using accurate simple stepper </s>
funcom_train/37655654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLine(String sourceFile, int line) { String code = null; BufferedReader br = null; try { br = new BufferedReader(getReader(sourceFile)); for (int i = 0; line > i; i++) { String txt = br.readLine(); code = txt == null ? "" : txt.trim(); } } catch (IOException ioErr) { ioErr.printStackTrace(); } finally { IOUtil.closeQuietly(br); } return code; } COM: <s> retrieves the requested line from the specified file </s>
funcom_train/9921122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateWarning(String from, int amount) { AIMBuddy aimbud=getBuddy(from); for(int i=0; i < aimListeners.size(); i++) { try { ((AIMListener) aimListeners.get(i)).handleWarning(aimbud, amount); } catch(Exception e) { e.printStackTrace(); } } } COM: <s> send warning event to all listeners </s>
funcom_train/30197041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoUpload() { System.out.println("doUpload"); /* ActionMapping mapping = null; ActionForm form = null; HttpServletRequest request = null; HttpServletResponse response = null; InserisciCVAction instance = new InserisciCVAction(); ActionForward expResult = null; ActionForward result = instance.doUpload(mapping, form, request, response); assertEquals(expResult, result); */ } COM: <s> test of do upload method of class com </s>
funcom_train/11101589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char cbuf[], int off, int len) throws IOException { for (int i = 0; i < len; i++) { int ch = read(); if (ch == -1) { if (i == 0) { return -1; } else { return i; } } cbuf[off + i] = (char)ch; } return len; } COM: <s> reads characters into a portion of an array </s>
funcom_train/20062233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File pathname) { if (!pathname.isFile() || !pathname.canRead()) return false; String name = pathname.getName(); int length = name.length(); /* * Only interested in names of the form name.ext * where name is at least 1 character (hence 5 char minimum) */ if (name.isEmpty() || length < 5) return false; String ext = name.substring(length - 4, length); for (String e : extensions) { if (ext.compareToIgnoreCase(e) == 0) return true; } return false; } COM: <s> accepts music files and directories </s>
funcom_train/243536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HoldemStartingHand getHoleCards() throws BadCardException { HoldemStartingHand hole = null; try { Card[] cards = {(Card) m_cards.get(0), (Card) m_cards.get(1)}; Arrays.sort(cards); hole = new HoldemStartingHand(cards); } catch (Exception e) { throw new BadCardException("Could not retrieve hold cards", e); } return hole; } COM: <s> return the players hole cards as a </s>
funcom_train/44489020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final IOperatorOrder INTEGER_ORDER = new IOperatorOrder() { public Relation compare(final Object o1, final Object o2) { final int i1 = (Integer) o1; final int i2 = (Integer) o2; if (i1 < i2) return Relation.LOOSER; else if (i1 == i2) return Relation.EQUAL; else return Relation.TIGHTER; } }; COM: <s> an operator order that can be used for comparing integers using </s>
funcom_train/43245570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMostRecentDateOfCare() { System.out.println("getMostRecentDateOfCare"); PatientDataDG2Object instance = new PatientDataDG2Object(); Calendar expResult = null; Calendar result = instance.getMostRecentDateOfCare(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get most recent date of care method of class org </s>
funcom_train/49790768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSyncDefault() throws Exception { String value = "Hello, world!"; beginAtSitemapThenPage("Home"); assertLabelTextNotPresent(value); { String target = getLabelIDForText("Field"); assertLabeledFieldEquals(target, ""); // empty setLabeledFormElementField(target, value); } // by default, the condition is enabled (fieldValue.default = true) assertLabelTextPresent(value); } COM: <s> by default we should be able to sync </s>
funcom_train/3168054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrimFloatValue value(double number) { if (myBitCount == 32) { return IEEE32Value.make((float)number); } if (myBitCount == 64) { return IEEE64Value.make(number); } //TODO should this fail instead? return null; /* udanax-top.st:34412:PrimFloatSpec methodsFor: 'making'! {PrimFloatValue} value: number {IEEE64} "A boxed floating point value" myBitCount = 32 ifTrue: [^PrimIEEE32 make: number]. myBitCount = 64 ifTrue: [^PrimIEEE64 make: number]. ^NULL "fodder"! */ } COM: <s> a boxed floating point value </s>
funcom_train/26230576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void jButtonImageDetails_actionPerformed(ActionEvent e) { if(reconImage != null) { JOptionPane.showMessageDialog(parentFrame, "Slices: " + reconImage.numSlices + " | Rows: " + reconImage.rows + " | Columns: " + reconImage.columns + " | Data Type: " + reconImage.dataType); } } COM: <s> gives the details about an image in a joption pane </s>
funcom_train/7248543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserData (Object key, Object value) { try{ peer_listeners_mon.enter(); if (data == null) { data = new LightHashMap(); } if (value == null) { if (data.containsKey(key)) data.remove(key); } else { data.put(key, value); } }finally{ peer_listeners_mon.exit(); } } COM: <s> to store arbitrary objects against a download </s>
funcom_train/3859646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { theLastJavaDoc = null; myCurrentImports = new ArrayList(); myCurrentPackage = null; myCurrentTypes = new Stack(); myCurrentMethod = null; myAnonymousClassCount = 0; myLocalClassCount = 0; myBlockDepth = 0; myMaxBlockDepth = 0; myCatchStack.clear(); } COM: <s> reset util to use it several times </s>
funcom_train/34340213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getPrecio2() { if (precio2 == null) {//GEN-END:|38-getter|0|38-preInit // write pre-init user code here precio2 = new TextField("4.precio", null, 5, TextField.ANY);//GEN-LINE:|38-getter|1|38-postInit // write post-init user code here }//GEN-BEGIN:|38-getter|2| return precio2; } COM: <s> returns an initiliazed instance of precio2 component </s>
funcom_train/4509667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdminJIDs(List<JID> jids) { if (adminList == null) { adminList = new ArrayList<JID>(); } else { adminList.clear(); } List<JID> admins = new ArrayList<JID>(); for (JID jid : jids) { admins.add(new JID(jid.toBareJID())); } adminList.addAll(admins); provider.setAdmins(admins); } COM: <s> sets the list of admin users based off of a list of jids </s>
funcom_train/17849272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeData(final ObjectOutputStream out) throws IOException { out.writeInt(2); if (mAddresses == null) { createDefaultSettings(); } out.writeInt(mAddresses.size()); for (int i = 0; i < mAddresses.size(); i++) { (mAddresses.get(i)).writeData(out); } out.writeBoolean(mShowDetails); } COM: <s> saves the data </s>
funcom_train/1741659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectItemAndLoad(CustomButton button) { checkWidget(); selectItem(button); for (int i = 0; i < mButtonListeners.size(); i++) { IButtonListener inav = (IButtonListener) mButtonListeners.get(i); inav.buttonClicked(getSelection(), null); } } COM: <s> flags a button as selected and pretends it got clicked </s>
funcom_train/22655378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataList(Collection collection) { this.dataList = new ArrayList(collection); if (this.dataList.size() > 0) { super.fireIntervalAdded(this, dataList.size() - 1, dataList.size() - 1); } else { super.fireIntervalAdded(this, 0, 0); } } COM: <s> sets the contents of this model to the elements in the specified collection </s>
funcom_train/33554508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateBeerInfoCallback(String fileName){ // Parse the xml try { this.saxParser = saxFactory.newSAXParser(); this.saxParser.parse(fileName, this.beersmithParser); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } // set status and inform the view this.setBeerPresent(true); this.setChanged(); this.notifyObservers(); } COM: <s> this is a callback method called by bs file monitor when the base </s>
funcom_train/25030642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String openFiles(String[] paths, int offset, boolean initialFiles) { File[] files = new File[paths.length]; // converts paths to files, starting from the offset for (int i = offset; i < paths.length && paths[i] != null; i++) { files[i] = new File(paths[i]); } return openFiles(files, offset, initialFiles); } COM: <s> opens multiple files from the given paths waiting until the final file </s>
funcom_train/1344088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void close() { iterationTimer.shutDown(); serverOptionsManager.unregisterOptionsChangeListener( this ); broadcastMessage( SERVER_CHAT_NAME + "Server is going for a shutdown..." ); broadcastCommand( Client.Commands.SHUTDOWN + GENERAL_SEPARATOR_STRING ); for ( final ClientContact clientContact : clientContacts ) clientContact.connectionStub.close(); } COM: <s> closes the server </s>
funcom_train/21965666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveSettings() throws IOException { // Create a list of settings to store in the config file Properties configProps = new Properties(); String currentLibraryFileName = mLibraryFileNameTextField.getText(); configProps.setProperty(PKCS11_LIBRARY_FILE_NAME_KEY, currentLibraryFileName); // Save the settings in the config file String configFileName = getConfigFileName(); FileOutputStream configFileStream = new FileOutputStream(configFileName); try { configProps.store(configFileStream, ""); } finally { configFileStream.close(); } } COM: <s> saves the dialog settings to the dialog configuration file </s>
funcom_train/8774233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReceiveVideoEnabled(final boolean videoStatus) throws SkypeException { String value = videoStatus ? "START_VIDEO_SEND" : "STOP_VIDEO_SEND"; try { String response = Connector.getInstance().execute("ALTER CALL " + getId() + " " + value); Utils.checkError(response); } catch (ConnectorException e) { Utils.convertToSkypeException(e); } } COM: <s> start or stop receiving video on this call </s>
funcom_train/16614289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getSourceConnection() { return buildConnection(System.getProperty("idmapping.source.host"), System.getProperty("idmapping.source.port"), System .getProperty("idmapping.source.database"), System.getProperty("idmapping.source.user"), System .getProperty("idmapping.source.password")); } COM: <s> return a connection to the source database </s>
funcom_train/42856650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GeneralSignature prune(int min) { GeneralSignature s = new GeneralSignature(_key, _params.similarity); s._count = _count; Set<Integer> ignore = new HashSet<Integer>(); List<Symbol> sequence = new ArrayList<Symbol>(); for (int i = 0; i < _signature.size(); i++) { Symbol obj = _signature.get(i); if (obj.weight() > min) sequence.add(obj.copy()); else { ignore.add(Integer.valueOf(i)); } } s._signature = sequence; return s; } COM: <s> prune the items in this signature and return a new signature </s>
funcom_train/35461229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnionStatement() { parseAndCheck( "dcl 1 * union, 2 b3 bit(32), 2 b4 bit(16);", "(DATA_ITEM (LEVEL 1) (NAME *) UNION" + " (DATA_ITEM (LEVEL 2) (NAME b3) (STRING BIT (LENGTH 32)))" + " (DATA_ITEM (LEVEL 2) (NAME b4) (STRING BIT (LENGTH 16))))" ); } COM: <s> test with a simple union statement </s>
funcom_train/19143328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPVectors (){ P_data = new Vector(); P_var = new Vector(); Double assigned_value = null; for (int i=0; i<index_array.length; i++) { try { assigned_value = new Double(value_array[i]); VectorDetails element = new VectorDetails(index_array[i], assigned_value); P_data.add(element); } catch (NumberFormatException nfe){ P_var.add(new Integer(index_array[i])); } } } COM: <s> code set pvectors code constructs the p data vector containig the original index </s>
funcom_train/31689249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyGroup getPropertyGroup(String sHREF) { AbstractVirtualFileSystem vfs = (AbstractVirtualFileSystem) ServerList.getInstance().getHarmoniseServer().getVFS(); VersionedVirtualFile vfDir = (VersionedVirtualFile) vfs.getVirtualFile(sHREF).getResource(); PropertyGroup group = null; if(vfDir!=null) { List vfChildren = vfDir.getChildren(); group = new PropertyGroup(); group.setChildrenHREFs(vfChildren); } return group; } COM: <s> returns a property group </s>
funcom_train/27898118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertCheckboxNotPresent(String checkboxName) { assertFalse("Found form checkbox with name [" + checkboxName + "] when not expected.", getTestingEngine().hasElementByXPath( "//input[lower-case(@type)='checkbox' and @name='" + checkboxName + "']")); } COM: <s> assert that a form checkbox with a given name is not present </s>
funcom_train/12329408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTypeID() { return this instanceof OperandUnused ? UNUSED : this instanceof OperandRegister ? REGISTER : this instanceof OperandImmediate ? IMMEDIATE : this instanceof OperandRelativeNear ? RELATIVE_NEAR : this instanceof OperandRelativeFar ? RELATIVE_FAR : this instanceof OperandAbsolute ? ABSOLUTE : this instanceof OperandExpression ? EXPRESSION : this instanceof OperandOffset ? 7 : UNKNOWN; } COM: <s> returns the operand type according to code enum x86 op type code </s>
funcom_train/29018949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDay (int day) { checkWidget (); SYSTEMTIME systime = new SYSTEMTIME (); int msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_GETCURSEL : OS.DTM_GETSYSTEMTIME; OS.SendMessage (handle, msg, 0, systime); msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_SETCURSEL : OS.DTM_SETSYSTEMTIME; systime.wDay = (short)day; OS.SendMessage (handle, msg, 0, systime); lastSystemTime = null; } COM: <s> sets the receivers date or day of the month to the specified day </s>
funcom_train/35541618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRename() { CobolDataItem struct = new CobolDataItem(); CobolDataItem cobolItem = new CobolDataItem(); cobolItem.setDataEntryType(DataEntryType.RENAMES); struct.getChildren().add(cobolItem); emitAndCheck( "<complexType name=\"Filler0\">" + "<sequence/>" + "</complexType>", struct); } COM: <s> a cobol renames clause </s>
funcom_train/3372074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessibleRelationSet getAccessibleRelationSet() { // Check where the AccessibleContext's relation // set already contains a LABEL_FOR relation. AccessibleRelationSet relationSet = super.getAccessibleRelationSet(); if (!relationSet.contains(AccessibleRelation.LABEL_FOR)) { Component c = JLabel.this.getLabelFor(); if (c != null) { AccessibleRelation relation = new AccessibleRelation(AccessibleRelation.LABEL_FOR); relation.setTarget(c); relationSet.add(relation); } } return relationSet; } COM: <s> get the accessible relation set associated with this object if one </s>
funcom_train/25648144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveKendo(Kendo kendo, File filename) throws KendoException{ log.debug("Saving model to " + filename); Schema xsd = DAOToolkit.readSchema(new File("resources/KendoSchema.xsd")); DAOToolkit.writeFile(kendo, Kendo.class, xsd, filename); } COM: <s> save kendo system model or application model file </s>
funcom_train/28350279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare( final Object corrector1, final Object corrector2 ) { final double position1 = _sequence.getPosition( (Dipole)corrector1 ); final double position2 = _sequence.getPosition( (Dipole)corrector2 ); return ( position1 == position2 ) ? compareOrientation( (Dipole)corrector1, (Dipole)corrector2 ) : ( ( position1 > position2 ) ? 1 : -1 ); } COM: <s> compare two correctors based upon the position of each corrector within the selected </s>
funcom_train/43813408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float max(float a, float b) { if (a != a) return a; // a is NaN if ((a == 0.0f) && (b == 0.0f) && (Float.floatToIntBits(a) == negativeZeroFloatBits)) { return b; } return (a >= b) ? a : b; } COM: <s> returns the greater of two code float code values </s>
funcom_train/11738774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { modelUpdateDisabled = true; this.textComponent .getDocument() .removeUndoableEditListener(this.undoableListener); try { clear(); textComponent.setText(text); } finally { modelUpdateDisabled = false; this.textComponent.getDocument().addUndoableEditListener( this.undoableListener); } } COM: <s> sets the text of the underlying text field </s>
funcom_train/20376858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPhaseComplete(String jobID, String phase, int minimumTasks) { // query simpleDB to determine if all tasks in the phase have completed int all = getPhaseSize(jobID, phase, null); int running = getPhaseSize(jobID, phase, "running"); logger.debug("Checking " + phase + " phase: " + all + " registered " + running + " running."); boolean phaseExists = all >= minimumTasks; return phaseExists && running == 0; } COM: <s> returns whether or not the phase has completed </s>
funcom_train/18644591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perform(Perform elem) { checkExpression(elem.getInstanceId()); // Check the variable bindings java.util.Iterator iter= elem.getVariableBindings().iterator(); while (isVariableUsed() == false && iter.hasNext()) { VariableBinding vb=(VariableBinding)iter.next(); // Only the parent variable should be checked, // as it is in the scope of the behavioral // description being checked if (vb.getParentVariable() == m_variable) { m_used = true; } } } COM: <s> this method visits the perform activity </s>
funcom_train/30050097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void errorOccured(String jobID,Exception e){ log.info("Job "+ jobID + "Falied"); errors.add(e); jobMap.remove(jobID); e.printStackTrace(); //If at least one Job running, we can wait if(jobMap.size() == 0){ alljobsFalied = true; rendezvous.release(); } } COM: <s> singal a application falied </s>