__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27728884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set_use_sun(boolean b){ this.use_sun = b; if(b){ if(jpl_ephem == null){ String fs = FileUtil.file_separator(); String dir_in = FileUtil.getClassFilePath("jat.eph","DE405")+fs+"DE405data"+fs; jpl_ephem = new DE405(dir_in); } } } COM: <s> set the flag whether to calculate the suns position </s>
funcom_train/42180636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorDialogTitle(String colorDialogTitle) { if (colorDialogTitle != this.colorDialogTitle || (colorDialogTitle != null && !colorDialogTitle.equals(this.colorDialogTitle))) { String oldColorDialogTitle = this.colorDialogTitle; this.colorDialogTitle = colorDialogTitle; firePropertyChange("colorDialogTitle", oldColorDialogTitle, colorDialogTitle); repaint(); } } COM: <s> sets the title of color dialog displayed when this button is pressed </s>
funcom_train/18781267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AlternateFlowExtendsBuilder getExtendsBuilder() { // Return the created builder return new AlternateFlowExtendsBuilder() { /** * Adds the extends. */ public void addExtensionPoint(String name) throws ParseException { // Output the extends write("<extends name='", thirdLevelIndent); writeText(name, NO_INDENT); writeln("'/>", NO_INDENT); } }; } COM: <s> create the extends builder </s>
funcom_train/10299310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Presentation getPresentation(HelpSet hs, String name) { MainWindow mwp = new MainWindow(hs); if (hs != null) { HelpSet.Presentation presentation = null; // get a named presentation if one exists if (name != null) { presentation = hs.getPresentation(name); } // get the default presentation if one exits if (presentation == null) { presentation = hs.getDefaultPresentation(); } // set the presentation // a null is ok here as it will just return. mwp.setHelpSetPresentation(presentation); } return mwp; } COM: <s> creates a new main window for a given help set and </s>
funcom_train/49237964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clean() { author = null; tester = null; programmer = null; created = null; created2 = null; createdAsDate = null; created2AsDate = null; project = null; fixVersion = null; fixVersion2 = null; foundVersion = null; foundVersion2 = null; // status = null; // status2 = null; // statusMany = null; statusDate = null; statusDate2 = null; statusDateAsDate = null; statusDate2AsDate = null; toCheck = null; // ? opers? - not used ? } COM: <s> invalidation for dashboard </s>
funcom_train/46981673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewObjectFrame(NewDataSetFrame newObjectFrame) { dataSetsPanel.setNewObjectFrame(newObjectFrame); AssignDataset assignDataset = new AssignDataset(this); dataSetsPanel.addNewFrameAssignButtonListener(assignDataset); dataSetsPanel.getNewObjectFrame().initListeners(); } COM: <s> sets the new data set frame in object panel and adds listeners </s>
funcom_train/43213236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setGroup(String group) { if (group == null) { group = ""; } group = group.trim(); if (group.length() > LENGTH_MAX_GROUP) { group = group.substring(0, LENGTH_MAX_GROUP); } if (this.group == null || !this.group.equals(group)) { this.group = group; return true; } return false; } COM: <s> p sets the group name </s>
funcom_train/33336196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectData encodeForUpdate(final NakedObject object) { final ResolveState resolveState = object.getResolveState(); if (resolveState.isSerializing() || resolveState.isGhost()) { throw new NakedObjectsRemoteException("Illegal resolve state: " + object); } return encode(object, serverSideTouchedObjectGraphDepth); } COM: <s> encodes a minimal set of data for the specified object </s>
funcom_train/10866328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMasculineNouns() throws IOException { check("लडका", "लडक"); check("लडके", "लडक"); check("लडकों", "लडक"); check("गुरु", "गुर"); check("गुरुओं", "गुर"); check("दोस्त", "दोस्त"); check("दोस्तों", "दोस्त"); } COM: <s> test masc noun inflections </s>
funcom_train/1051077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getExactDimensions(int nrOfCells){ if (nrOfCells > 0) { int collumns=1; Point coords = getCoordinates(nrOfCells-1); int rows = coords.y+1; int n = Math.min(coords.y, cycle.length); for (int i=0;i < n; i++){ collumns = Math.max(collumns, cycle[i%cycle.length]); } collumns = Math.max(collumns, coords.x+1); return new Dimension(collumns, rows); } else { return new Dimension(0,0); } } COM: <s> checks out all cell coordinates and returns the maximum x as width </s>
funcom_train/21951718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildVOFactoryPropertyVariables(PrintWriter writer) { Iterator fieldIt = parseData.getFieldList().iterator(); FieldData field = null; //while (fieldIt.hasNext()) { // field = (FieldData) fieldIt.next(); // writer.println(getTab(1) + "public " + getJavaType(field.getType()) + " " // + field.getName() + ";"); // } } COM: <s> builds the vo property variables code </s>
funcom_train/18110853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getReplaceControlsPanel() { if (replaceControlsPanel == null) { replaceControlsPanel = new JPanel(); replaceControlsPanel.setLayout(new BoxLayout(replaceControlsPanel, BoxLayout.Y_AXIS)); replaceControlsPanel.add(getReplacePlainTextPanel(), null); replaceControlsPanel.add(getReplaceEntityPanel(), null); } return replaceControlsPanel; } COM: <s> this method initializes replace controls panel </s>
funcom_train/14371502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initCells(JProgressBar progressBar) { int longestSoFar = 0; Iterator iter = sequences.iterator(); while (iter.hasNext()) { Sequence s = (Sequence) iter.next(); longestSoFar = (s.getNumOfNodes() > longestSoFar) ? s.getNumOfNodes() : longestSoFar; } initSplitLines(false, false, longestSoFar - 1, sequences.size() - 1); // no reset, not static lines } COM: <s> initializes level 0 grid cells based on tree tree assign tree nodes to </s>
funcom_train/22573108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadPreferences() { IPreferenceStore store = TenCompetencePlugin.getDefault().getPreferenceStore(); fRestoreLastUrl = store.getBoolean(IPCMPreferenceConstants.PREFS_BROWSER_VIEW_RESTORE_URL); fStoredUrl = store.getString(IPCMPreferenceConstants.PREFS_BROWSER_VIEW_URL); } COM: <s> load local view preferences </s>
funcom_train/7616123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int canDisplayUpTo(char[] text, int start, int limit) { int st = start; int result; while ((st < limit) && canDisplay(text[st])) { st++; } if (st == limit) { result = -1; } else { result = st; } return result; } COM: <s> returns true if the font can display the characters of the the specified </s>
funcom_train/39174816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findPendingConfigurationOptionsByActorId(String actorId) { List result = null; try { Query query = session.getNamedQuery("TaskMgmtSession.findPendingConfigurationOptionsByActorId"); query.setString("actorId", actorId); result = query.list(); } catch (Exception e) { e.printStackTrace(); //jbpmSession.handleException(); throw new JbpmException("couldn't get pending Configuration Options in process instances", e); } return result; } COM: <s> get configuration options list with specified actor </s>
funcom_train/37079070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleLinkNameSelection(Link link) { String[] geneNameArray = new String[] { link.getName1(), link.getName2() }; // source:this, null original event source fireNamedFeatureSelectionEvent(this, null, geneNameArray); } COM: <s> if the user clicks on a polygon representing a link between two features </s>
funcom_train/18223513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { pool.clear(); if (randomMelodiesAmount > 0) { addMelodies(RandomSetMelodiesProvider.provide(randomMelodiesAmount)); } if (fractalMelodiesAmount > 0) { addMelodies(FractalSetMelodiesProvider.provide(fractalMelodiesAmount)); } if (loadMelodiesFromDatabase = true) { addMelodies(DatabaseSetMelodiesProvider.provide()); } if (loadMelodiesFromFiles = true) { addMelodies(FileSetMelodiesProvider.provide()); } } COM: <s> initialize melody pool with melodies </s>
funcom_train/12641785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(Object key) { Object k = maskNull(key); int hash = hash(k); int i = indexFor(hash, table.length); Entry e = table[i]; while (e != null) { if (e.hash == hash && eq(k, e.key)) return true; e = e.next; } return false; } COM: <s> returns tt true tt if this map contains a mapping for the </s>
funcom_train/44898259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillHeaders(Response response) { Map map = getHeaders(); for (Iterator it = map.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); response.setHeader((String) entry.getKey(), entry.getValue()); } } COM: <s> fills in the responses headers from this threads header map </s>
funcom_train/31432525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Partition findJoinIrred (Partition a, Partition b) { if (b.leq(a)) return null; Iterator<Partition> it = joinIrreducibles().iterator(); while (it.hasNext()) { Partition ji = it.next(); if (ji.leq(b) && !ji.leq(a)) b = ji; } return b; } COM: <s> this finds a join irreducible congruence which is minimal with </s>
funcom_train/44851918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createSQLPreparedWhere(String inSqlPart, KeyObject inKey, GeneralDomainObjectHome inDomainObjectHome) { // Pre: inKey not null if (inKey == null) return ""; if (inKey.getItems2().size() == 0) return ""; StringBuffer outSQL = new StringBuffer(inSqlPart); inKey.setGetValueStrategy(new PreparedValueStrategy()); outSQL.append(inKey.render(inDomainObjectHome)); return new String(outSQL); } COM: <s> creates the where or having part of a prepared sql select string </s>
funcom_train/4079489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertTestData(File flatXMLFile) throws FileNotFoundException, IOException, DatabaseUnitException, SQLException { try { IDataSet testDataSet = new FlatXmlDataSet(new FileInputStream(flatXMLFile)); DatabaseOperation.REFRESH.execute(getDatabaseConnection(),testDataSet); testDataSets.add(testDataSet); }catch(AmbiguousTableNameException e) { throw new DatabaseUnitException("出现AmbiguousTableNameException异常,使用命令:purge recyclebin清空一下oracle回收站,并为dbunit指定jdbcSchema",e); } } COM: <s> dbunit flat xmlfile </s>
funcom_train/14310314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitForPort(int port) { boolean notConnected = true; while (notConnected) { try { Socket rmiPort = new Socket("127.0.0.1", port); notConnected = false; } catch (Exception e) { //waits for 10 secs try { Thread.sleep(10000); } catch (Exception e2) { //do nothing } } } } COM: <s> waits for a given port to be opened </s>
funcom_train/8053246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ownBoatUpdated() { if (this.poiFactory.updateNearestPoi(this.boatFactory.getOwnBoat() .getPosition())) { // If it is a question, only put to quizcontroller if (this.poiFactory.getNearestPoi().getType() == Poi.QUESTION) this.quizController.nearestPoiUpdated(this.poiFactory .getNearestPoi()); } this.mapController.ownBoatUpdated(); } COM: <s> notify that the own boat is updated updating the nearest poi is delegated </s>
funcom_train/10950134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal getTotalShipping() { BigDecimal tempShipping = BigDecimal.ZERO; Iterator<CartShipInfo> shipIter = this.shipInfo.iterator(); while (shipIter.hasNext()) { CartShipInfo csi = shipIter.next(); tempShipping = tempShipping.add(csi.shipEstimate); } return tempShipping; } COM: <s> returns the shipping amount from the cart object </s>
funcom_train/20110367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTerms_EmptyResultSetMapsToEmptyCollection() { MockSakaiSiteService siteDelegate = (MockSakaiSiteService) getSiteDelegateFixture(userContext1); siteDelegate.setSeedTerms(null); Collection terms = service.getTerms(userContext1); assertNotNull(terms); assertTrue(terms.isEmpty()); } COM: <s> verifies that if the delegate sakai site service returns no </s>
funcom_train/3543830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTree(Map<Integer, TreeSecurityItem> modelData) { String textColumn = Main.getString("fina2.security.reports"); Icon branchIcon = Main.getIcon("folder.gif"); Icon leafIcon = Main.getIcon("amend.gif"); /* Data model for tree */ TreeViewModel model = new TreeViewModel(modelData, textColumn, false); super.initTree(model, branchIcon, leafIcon); } COM: <s> inits the view tree </s>
funcom_train/1929491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void step(Ant a) { Cell newPos = a.getPosition().getNeighbour(a.getDirection()); if (newPos.getRocky() || newPos.hasAnt()) { a.setState(cannotMove); return; } a.setPosition(newPos); a.setState(doMove); } COM: <s> move forward if possible </s>
funcom_train/21225499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(final String key) { final String s = settings.getProperty(key); if (s == null) { handleException(new MissingResourceException( "Could not retrieve property", this.getClass().getName(), key)); return key; } return s; } COM: <s> method for retrieving settings system </s>
funcom_train/51341435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IIndex getIndex(String name, long timestamp) { if (timestamp == ITx.UNISOLATED) throw new UnsupportedOperationException(); if(timestamp == AbstractTask.this.timestamp) { // to the AbstractTask try { return AbstractTask.this.getIndex(name); } catch(NoSuchIndexException ex) { // api conformance. return null; } } // to the backing journal. return delegate.getIndex(name, timestamp); } COM: <s> note does not allow access to </s>
funcom_train/17675477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetForPooling() { if (Debug.DEBUG) { if (transactionActive) { throw BindingSupportImpl.getInstance().fatal( "The tx must be inactive"); } } managed = false; cache.clear(); sm.reset(); sm.setUserObject(userObject = null); synchronizationInstance = null; resetEpcFields(); reset(); } COM: <s> this will reset the pm to be returned to the pool </s>
funcom_train/4146443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldValue createFieldValue(String originalValue) { if (originalValue == null || originalValue.trim().length() < 1) { return new NullFieldValue(this); } else if (isValidValue(originalValue)) { return new BasicValidFieldValue(this, originalValue); } else { return new InvalidFieldValue(this, originalValue); } } COM: <s> converts the specified original value text a code string code to an </s>
funcom_train/3032872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GdbiMiniIndi getMiniIndi(GdbiXref xref) { GdbiMiniIndi mindi = cacheMini.getMiniIndi(xref); if ((mindi == null) && (! GdbiXref.isnull(xref))) mindi = cacheMini.putMiniIndi(gedcom, xref); udebug.vprintln("getMiniIndi(" + xref +") -> " + mindi); return mindi; } COM: <s> return the gdbi mini indi for this gdbi xref </s>
funcom_train/44496200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropDatabaseMySQL(String database) throws SQLException { String expression1 = "DROP DATABASE " + database; Statement stmt = conn.createStatement(); if (stmt.executeUpdate(expression1) == -1) { throw new SQLException("db error : " + expression1); } conn.commit(); stmt.close(); } COM: <s> drops the mysql database that is specified by the given code database code </s>
funcom_train/48122671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermBuffer(char[] buffer, int offset, int length) { char[] newCharBuffer = growTermBuffer(length); if (newCharBuffer != null) { termBuffer = newCharBuffer; } System.arraycopy(buffer, offset, termBuffer, 0, length); termLength = length; } COM: <s> copies the contents of buffer starting at offset for </s>
funcom_train/48959521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DefaultVersion loadVersion(String uuid) { DefaultVersion version = dao.find(DefaultVersion.class, new UUID(decipherer.decrypt(uuid))); return CollectionUtils.isEmpty(collections) ? version : dao.initialize(version, collections.toArray(new String[collections.size()])); } COM: <s> retrieves a version from database </s>
funcom_train/43256654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAlertBox(ComponentContext ctx, String message, String style, int offsetx, int offsety) { setInMap(ctx, getId(ctx),ATTRIBUTE_ALERTBOX, new ShowAlertBoxAction(message, style, offsetx, offsety)); } COM: <s> shows an alertbox on the clientside </s>
funcom_train/18847214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInvalidProcessGatewayTypeException(String tscToken, String connectableNodeID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80082"; propertyMap.addPropertyValuePair("connectableNodeID", connectableNodeID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> create invalid process gateway type exception </s>
funcom_train/16914177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void postSerializationInit() { super.postSerializationInit(); initTreeMap(); Iterator<Double> i = imageMap.keySet().iterator(); while (i.hasNext()) { Double key = i.next(); imageMap.get(key).initializeImages(); } } COM: <s> initialize map animations using image location information </s>
funcom_train/46111055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String longestCommonDir (boolean ignoreCase, String... directories) { if (directories == null) return ""; if (directories.length == 1) return directories[0]; // Can be null String res = directories[0]; for (int i = 1; i < directories.length; i++) { res = longestCommonDir(res, directories[i], ignoreCase); } return res; } COM: <s> gets the longest common path between directories on a given list </s>
funcom_train/2325609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ifft3(boolean scale) { if (content instanceof DenseLargeFloatMatrix3D) { if (this.isNoView == true) { ((DenseLargeFloatMatrix3D) content).ifft3(scale); } else { DenseLargeFloatMatrix3D copy = (DenseLargeFloatMatrix3D) copy(); copy.ifft3(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } } COM: <s> computes the 3 d inverse of the discrete fourier transform idft of this </s>
funcom_train/5381268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void valueChanged() { setPresentsDefaultValue(false); int newValue = scale.getSelection(); if (newValue != oldValue) { fireStateChanged(IS_VALID, false, true); fireValueChanged(VALUE, new Integer(oldValue), new Integer(newValue)); oldValue = newValue; } } COM: <s> informs this field editors listener if it has one about a change to </s>
funcom_train/5669190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _print() { PrinterJob job = PrinterJob.getPrinterJob(); if(this instanceof Pageable) { job.setPageable((Pageable)this); } else if(this instanceof Printable) { PageFormat format = job.pageDialog(job.defaultPage()); job.setPrintable((Printable)this, format); } else { // can't print it. return; } if (job.printDialog()) { try { job.print(); } catch (Exception ex) { MessageHandler.error("Printing Failed", ex); } } } COM: <s> print the contents </s>
funcom_train/13598666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token getToken(long tokenId) { try { Token token = (Token) session.get(Token.class, new Long(tokenId)); return token; } catch (Exception e) { e.printStackTrace(); log.error(e); jbpmSession.handleException(); throw new JbpmException("couldn't get token '" + tokenId + "'", e); } } COM: <s> gets a token from the database by the identifier </s>
funcom_train/3412399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getInitialComponent(Window window) { if ( window == null ){ throw new IllegalArgumentException("window cannot be equal to null."); } Component def = getDefaultComponent(window); if (def == null && window.isFocusableWindow()) { def = window; } return def; } COM: <s> returns the component that should receive the focus when a window is </s>
funcom_train/45547207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lock() { synchronized (runtimeLock) { try { lockImpl(); } catch (RuntimeException rx) { release(); throw rx; } catch (IOException iox) { release(); Validator.STATE.fail( "failed to acquire lock file: " + lockFile, iox); } } } COM: <s> locks the instance by acquiring an exclusive lock on the </s>
funcom_train/8527257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Config getConfigUncached(final String configname) { FileNode theFileNode = (FileNode) getConfigRoot().getNode(configname); if (theFileNode == null) { throw new IllegalArgumentException(configname + " is an unknown config"); } return readConfig(theFileNode.getURLPath(), false); } COM: <s> the same as </s>
funcom_train/45692418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMemUsedInSecondsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_memUsedInSeconds_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_memUsedInSeconds_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__MEM_USED_IN_SECONDS, false, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the mem used in seconds feature </s>
funcom_train/42033209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initRInterface() { // init the list opList = new ArrayList<RequestInterface>(operations.length); for (int i = 0; i < operations.length; i++) { opList.add(i, null); } try { service = new EUtilsServiceStub(); } catch (AxisFault e) { defaultLogger.debug(e); } options = service._getServiceClient().getOptions(); // client doesn't accept chunked streams options.setProperty(HTTPConstants.CHUNKED, Constants.VALUE_FALSE); } COM: <s> initiates service options and sets chunked false for the service options </s>
funcom_train/50053549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void diamondStep(int i, int j, int step, float dispH) { float sum = getHeight(i, j) + getHeight(i + step, j) + getHeight(i + step, j + step) + getHeight(i, j + step); setHeight(i + step / 2, j + step / 2, sum / 4); addHeight(i + step / 2, j + step / 2, randomDisp(dispH)); } COM: <s> computes the average height of the four corners plus a random displacement </s>
funcom_train/18755818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() { XMLFile file = _file; XMLEditorDoc doc = _file.getXMLEditorDoc(); if (doc == null) { MerlotDebug.msg("Can't validate " + getNodeName() + ". XMLEditorDoc is null."); return; } ValidationThread validationThread = doc.getValidationThread(); validationThread.addElementToValidationQueue(this); } COM: <s> adds element to queue in validation thread </s>
funcom_train/48184068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean filterOut(List<Word> words) { for (int i = 0; i < words.size()-1; i++) { Word w1 = words.get(i); Word w2 = words.get(i+1); if (filterOut(w1, w2)) return true; } return false; } COM: <s> returns whether to filter out the given word sequence </s>
funcom_train/2884967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String escape(String text, boolean doublequotes) { if (text == null) { return null; } StringBuilder buf = new StringBuilder(text.length()); for (int i = 0; i < text.length(); i++) { buf.append(escapeChar(text.charAt(i), doublequotes)); } return buf.toString(); } COM: <s> escape a string </s>
funcom_train/17885893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(SingleIndexConfig iconfig) throws Exception { if (iconfig==null) throw new IllegalArgumentException("Missing index configuration"); this.iconfig=iconfig; harvestMessageStep=Integer.parseInt(iconfig.harvesterProperties.getProperty("harvestMessageStep","100")); if (harvestMessageStep<=0) throw new IllegalArgumentException("Invalid value for harvestMessageStep: "+harvestMessageStep); index = new IndexBuilder(false,iconfig); fromDateReference=index.getLastHarvestedFromDisk(); } COM: <s> opens harvester for harvesting documents into the index described by the given </s>
funcom_train/21104352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getPromedioEscucharNum() { double total = 0; Enumeration enumer = periodo.getAlumno().getVectorPeriodos().elements(); while (enumer.hasMoreElements()) { Periodo itemPeriodo = (Periodo) enumer.nextElement(); total = total + itemPeriodo.getEscuchar(); } double promedio = total / periodo.getAlumno().getVectorPeriodos().size(); return promedio; } COM: <s> get promedio escuchar num </s>
funcom_train/25884782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEffectBox(){ if(incr > SndConstants.NUM_EFFECT) { //Shuffle effect shuffleEffect(); incr = 0; } else { effType = EffectType.values()[shuffle[incr++]]; } //effectBox.add(new EffectBox(new P5Points2D(mouseX, mouseY), new P5Size2D(mouseX-xPos, mouseY-yPos), effType, this)); } COM: <s> adds effect box upon receiving message from server </s>
funcom_train/9700154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsGPSValid() { System.out.println("isGPSValid"); try { goodInstance.isGPSValid(); fail("UnsupportedOperationException excepted."); } catch (Exception e) { if (!(e instanceof UnsupportedOperationException)) fail("Unknown exception " + e + ", expected UnsupportedOperationException"); } } COM: <s> test of is gpsvalid method of class gpggaframe </s>
funcom_train/10584958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field createField(String fieldname, String value) throws IndexException { FieldDefinition f = structure.getFieldDef(fieldname); if (f == null) { throw new IndexException("Field with the name: " + fieldname + " doesn't exist"); } return f.createLField(value); } COM: <s> create a lucene field </s>
funcom_train/32215773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateUsernameByUsername(String username_old, String username) throws UsersException, SQLException { setUsername(username); if (MySQL.connection.createStatement().executeUpdate("UPDATE users SET username = '" + username + "' WHERE username = '" + username_old + "'") == 1) { needsUpdateExecution = false; return true; } else { needsUpdateExecution = true; return false; } } COM: <s> updates a username specified by the old username </s>
funcom_train/15518367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultTableModel addContentTable(String cmd, String desc, boolean setTop){ DefaultTableModel data = new DefaultTableModel(); JButton butn = new JButton(cmd); botBar.add(butn); butn.addActionListener(cc); cc.addCard(cmd, desc); if (setTop){ cardMngr.show(content, desc); } JTable table = new JTable(data); components.put(cmd, table); JScrollPane jsp = new JScrollPane(table); table.setFillsViewportHeight(true); table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS); content.add(desc, jsp); return data; } COM: <s> adds a table pane to this display window </s>
funcom_train/35668877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean connect() { try { Socket socket = new Socket(serverAddress, serverPort); dataReader = new DataInputStream(socket.getInputStream()); systemInReader = new BufferedReader (new InputStreamReader(System.in)); writer = new PrintWriter(socket.getOutputStream(), true); return true; } catch (IOException ioe) { ioe.printStackTrace(); return false; } } COM: <s> connects this client to the server </s>
funcom_train/47806102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adapt(Params p,boolean overwrite){ if(p!=null && p.getCommand()!=null && overwrite) cmd=new String(p.getCommand()); for(Entry<String,String> e : p.getParams().entrySet()) if(!params.containsKey(e.getKey()) || overwrite) params.put(new String(e.getKey()),new String(e.getValue())); } COM: <s> add all key value pairs from given params to this instance </s>
funcom_train/43501775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clean() { long now = System.currentTimeMillis(); ArrayList<MetaTicket> garbage = new ArrayList<MetaTicket>(); for (MetaTicket metaTicket : tickets) { if (now > metaTicket.getExpiry()) { garbage.add(metaTicket); } } for (MetaTicket expired : garbage) { tickets.remove(expired); } } COM: <s> cleans out expired tickets </s>
funcom_train/5412051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZActionResult tagItem(String ids, String tagId, boolean tag, String targetConstraints) throws ServiceException { return doAction(itemAction(tag ? "tag" : "!tag", ids, targetConstraints).addAttribute(MailConstants.A_TAG, tagId)); } COM: <s> tag untag items </s>
funcom_train/2938714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEnabled() { if ((commands == null) || (items == null)) return; for (int i = 0; i < commands.size(); i++) { Cmd c = (Cmd) commands.get(i); ((ToolItem) items.get(i)).setEnabled(c.isEnabled()); } } COM: <s> iterates over all tool items and enables them if the their </s>
funcom_train/2692216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateColumnWidth() { // Refresh the view this.memberViewer.refresh(); // Repack the columns for (int i = 0, n = this.memberViewer.getTable().getColumnCount(); i < n; i++) { TableColumn column = this.memberViewer.getTable().getColumn(i); column.pack(); column.setWidth( column.getWidth() + 15 ); } } COM: <s> refreshes the view </s>
funcom_train/11723818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean appliesToNodeState(NodeState nodeState) { if (nodeState.getStatus() == Status.NEW) { return lockInfo.isDeep(); } else { if (lockHoldingState == nodeState) { return true; } else { return lockInfo != null && lockInfo.isDeep(); } } } COM: <s> returns true if the given node state is the lockholding state of </s>
funcom_train/26229648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void jButtonBfFileBrowse_actionPerformed(ActionEvent e) { // Bright field file browse if(showOpenFileChooser("CT", "Bright Field CT Images", jTextFieldBfFilename)) workingDir = getParentFileFromPathname(jTextFieldBfFilename.getText()); } COM: <s> shows a jfile chooser to browse for a bright field ct image </s>
funcom_train/48418405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String tag(boolean closeTag) { StringBuilder sb = new StringBuilder(highlightTag.length() + 3); sb.append("<"); if (closeTag) { sb.append("/"); } sb.append(highlightTag).append(">"); return(sb.toString()); } COM: <s> format the current code highlight tag code by adding lt and </s>
funcom_train/14050950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { File f = new File(cacheDirectory,name + ".cache"); if (f.exists()) { try { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); selectors = (java.util.Hashtable) ois.readObject(); ois.close(); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> load the saved hashtable </s>
funcom_train/51477924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttribute(Node node, String name) { String attrValue = null; if (node.getNodeType() == Node.ELEMENT_NODE) { Node attrNode = node.getAttributes().getNamedItem(name); if (attrNode != null) { attrValue = attrNode.getTextContent(); } } return attrValue; } COM: <s> a convenience method for parsing xml </s>
funcom_train/4190020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveNext() { if (streams.size() == 0) { return; } Stream s = (Stream) streams.get(0); if (s.getStatus() == Stream.UNSTARTED) { File dest = new File(DEST_FOLDER + s.getSourceBaseName() + ".mp3"); s.addListener(this); s.save(dest, this); } } COM: <s> start the top stream of the list position 0 saving </s>
funcom_train/48226038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getLastKnownLocation() { Location lastValidLocation = null; try { lastValidLocation = LocationProvider.getLastKnownLocation(); } catch (SecurityException se) { System.out.println("SecurityException: " + se.toString()); } if (lastValidLocation != null && lastValidLocation.isValid()) { System.out.println("latestLocation = lastValidLocation"); latestLocation = lastValidLocation; } statusDescription = "last known"; } COM: <s> so that we have something to start with as a default </s>
funcom_train/18581584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populateCETable(String partialName, char state, int functionIndex, int adjacentSet) { restoreSearchSidePanel(); ( (SearchSideFunction) searchSidePanels[0]).listCE(documentManager.getCEList(partialName, functionIndex, adjacentSet), state, functionIndex); } COM: <s> populates the side search panel with maximal 30 ces from the database </s>
funcom_train/45714571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayResults(EllipticFD efd) { ResultsTable rt = new ResultsTable(); rt.reset(); int row = 0; for (int i = 0; i < efd.nFD; i++) { rt.incrementCounter(); rt.addValue("ax", efd.ax[i]); rt.addValue("ay", efd.ay[i]); rt.addValue("bx", efd.bx[i]); rt.addValue("by", efd.by[i]); rt.addValue("efd", efd.efd[i]); } rt.show("Results-EFD-" + imp.getShortTitle()); } COM: <s> creates a results table with the descriptors shown </s>
funcom_train/17845825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPopup(MouseEvent e) { if (e.isPopupTrigger()) { final ChannelJList channelJList = (ChannelJList) e.getSource(); new ChannelContextMenu(e, (Channel) channelJList.getModel().getElementAt( channelJList.locationToIndex(e.getPoint())), this); } } COM: <s> show the context menu for the channel list </s>
funcom_train/1151120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPhoneHome() { user.setPhoneHome("0587654321"); assertEquals("0587654321", user.getPhoneHome()); user.setPhoneHome("+33187654321"); assertEquals("+33187654321", user.getPhoneHome()); user.setPhoneHome("1232998"); assertEquals("", user.getPhoneHome()); } COM: <s> test of set phone home method of class user </s>
funcom_train/24117411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionListenerToMenuItems(ActionListener l) { itmNew.addActionListener(l); itmOpen.addActionListener(l); itmClose.addActionListener(l); itmSave.addActionListener(l); itmSaveAs.addActionListener(l); itmPrint.addActionListener(l); itmExit.addActionListener(l); itmCut.addActionListener(l); itmCopy.addActionListener(l); itmPaste.addActionListener(l); itmDelete.addActionListener(l); itmAbout.addActionListener(l); } COM: <s> add the same action listener to all menu items </s>
funcom_train/49944308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TabPane openNewTab(WebBrowser m_browser, String url) { if(m_tail == null) { m_tail = new Tab(new TabPane(m_pane.getManager(), url)); m_browser.getContentPane().add(m_tail.getTab()); //m_pane.setVisible(false); return m_tail.getTab(); } else { m_pane.setVisible(false); return m_tail.openNewTab(m_browser); } } COM: <s> opens a new tab with a specific url </s>
funcom_train/36558071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTargetCharacter(imi.character.Character character) { if (targetCharacter != null && targetCharacter.getContext() != null) targetCharacter.getController().removeCharacterMotionListener(this); targetCharacter = character; if (character != null && character.getContext() != null) character.getController().addCharacterMotionListener(this); } COM: <s> sets the character this camera will follow </s>
funcom_train/43098699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNamespace() { Object o = Model.getUmlFactory().buildNode(Model.getMetaTypes().getModel()); assertNotNull("Didn't create object", o); assertTrue("Should be a base", Model.getFacade().isABase(o)); assertTrue("Should be a model", Model.getFacade().isAModel(o)); runTruthTests(o); } COM: <s> test the creation of a namespace </s>
funcom_train/45248137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSearchContexts(IScopeContext[] scopes) { this.searchContexts = scopes; if (scopes == null) { return; } // Assert that the default was not included (we automatically add it to // the end) for (int i = 0; i < scopes.length; i++) { if (scopes[i].equals(defaultContext)) { Assert .isTrue( false, WorkbenchMessages.ScopedPreferenceStore_DefaultAddedError); } } } COM: <s> set the search contexts to scopes </s>
funcom_train/25283498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillDataTable(final String[] names, final String[] values) { if (names != null) for (int i = 0; i < names.length; i++) { final TableItem ti = new TableItem(tbl_data, 0); ti.setText(names[i]); } if (values != null) for (int i = 0; i < values.length; i++) if (values[i] != null) tbl_data.getItem(i).setText(1, values[i]); } COM: <s> fill the info statistics table </s>
funcom_train/38996338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessageReceived(Message m) { UserMessage message = (UserMessage) m; String text = message.getText(); if (text.toLowerCase().startsWith("hello") || text.toLowerCase().startsWith("hi")) { if (text.endsWith(server.getNick())) { message.reply("Hello, " + message.getUser().getNick() + "!", false); } } } COM: <s> called when a message passing all filters is received </s>
funcom_train/3368319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(InputMap map) { if (getParent() == map) { return; } if (map != null && (!(map instanceof ComponentInputMap) || ((ComponentInputMap)map).getComponent() != getComponent())) { throw new IllegalArgumentException("ComponentInputMaps must have a parent ComponentInputMap associated with the same component"); } super.setParent(map); getComponent().componentInputMapChanged(this); } COM: <s> sets the parent which must be a code component input map code </s>
funcom_train/28132192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeProject(String projectName) { if (getProject(projectName) != null) { getProjects().remove(projectName); if (getDefaultProject() != null && StringUtils.equals(getDefaultProject().getName(), projectName)) { setDefaultProject(null); } return true; } return false; } COM: <s> remove the project of a particular name </s>
funcom_train/40853853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getScreenCommand() { if (screenCommand == null) {//GEN-END:|80-getter|0|80-preInit // write pre-init user code here screenCommand = new Command("Screen", Command.ITEM, 0);//GEN-LINE:|80-getter|1|80-postInit // write post-init user code here }//GEN-BEGIN:|80-getter|2| return screenCommand; } COM: <s> returns an initiliazed instance of screen command component </s>
funcom_train/24138005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateBarCode () { String barCode=""; Random randomGenerator = new Random(); for (int i = 0; i < 6; ++i){ int r = randomGenerator.nextInt(256); if(i<3) { barCode += (char)(65 + r % 26 ); } else { barCode += r % 10;} } return barCode; } COM: <s> this function generates a random barcode and returns it </s>
funcom_train/9188487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanHexFractionAndSuffix(boolean seendigit) { this.radix = 16; Assert.check(ch == '.'); putChar(ch); scanChar(); skipIllegalUnderscores(); if (digit(16) >= 0) { seendigit = true; scanDigits(16); } if (!seendigit) lexError("invalid.hex.number"); else scanHexExponentAndSuffix(); } COM: <s> read fractional part and d or f suffix of floating point number </s>
funcom_train/16849017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMenuComponents(JMenu menu, Class c) { List result = new ArrayList(); Component[] items = menu.getMenuComponents(); for (int i = 0; i < items.length; i++) { if (c.isInstance(items[i])) { result.add(items[i]); } } return result; } COM: <s> checks the given menu for the existence </s>
funcom_train/33961604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printText(final String text, final AttributeSet attr) { try { doc.insertString(doc.getLength(), text, attr); logPanel.repaint(); logPanel.setCaretPosition(logPanel.getDocument().getLength()); } catch (BadLocationException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> outputs the text to the panel inserting a line break after each string </s>
funcom_train/15919176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field createFieldRef(Position pos, Expr receiver, Name name) { final Type type = receiver.type(); X10FieldInstance fi = Types.getProperty(type, name); if (null == fi) { fi = (X10FieldInstance) type.toClass().fieldNamed(name); } if (null == fi) return null; return createFieldRef(pos, receiver, fi); } COM: <s> create a reference to a field of an object or struct </s>
funcom_train/123811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void map(CharSequenceImpl prefix, CharSequenceImpl uri) { final int i = (_nspCounts[_depth] + _mapCount++) << 1; if (i + 1 >= _namespaces.length) resize(); _namespaces[i] = prefix; _namespaces[i + 1] = uri; if (prefix == null) { // Maps default namespace. _default = uri; } } COM: <s> adds the specified mapping to the current mapping buffer </s>
funcom_train/49080101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeItemCommands( Item item ) { if (item.commands != null) { Command[] commands = (Command[]) item.commands.toArray( new Command[item.commands.size()] ); for (int i = 0; i < commands.length; i++) { Command command = commands[i]; removeCommand(command); } } this.focusedItem = null; } COM: <s> removes the commands of the given item </s>
funcom_train/43358962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object value) throws UnsupportedOperationException,IllegalArgumentException { if (value == null) { list.add(0); } else if (value instanceof Number) { list.add(((Integer)value).intValue()); } else { throw new UnsupportedOperationException("Data type not supported. [" + value.getClass().getName()); } } COM: <s> appends the specified object value to the end of the list </s>
funcom_train/44222343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uploadData() { /** * @todo How to deal with multiple uploading?? * Currently, we allow single uploading... */ AtlasMapper am = (AtlasMapper) this.get_localImp(); String vt = am.getUploadedViewType(); if (vt == null) { return; } this.set_uploadViewType(vt); super.uploadData(); } COM: <s> p upload the data into the database </s>
funcom_train/50264407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void write(JarEntry entry, IFile contents) throws IOException, CoreException { byte[] readBuffer = new byte[4096]; outputStream.putNextEntry(entry); InputStream contentStream = contents.getContents(); try { int n; while ((n = contentStream.read(readBuffer)) > 0) { outputStream.write(readBuffer, 0, n); } } finally { if (contentStream != null) contentStream.close(); } outputStream.closeEntry(); } COM: <s> write the contents of the file to the tar archive </s>
funcom_train/8250004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser() { //Get info from the request cycle and initialize if(user == null) { initSession(); } else { userId = user.getUserId(); } //Try to get an existing user user = getUser(userId); //If no existing user could be found create one if(user == null) { log.debug("User not found in database: " + userId + " storing now!"); user = createUser(newUser(userId)); } return user; } COM: <s> returns the user and retrieves creates m if necessary </s>
funcom_train/10642417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClosed(final boolean b) throws PropertyVetoException { if (isClosed() || !b) { return; } fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_CLOSING); fireVetoableChange(IS_CLOSED_PROPERTY, Boolean.valueOf(isClosed()), Boolean.valueOf(b)); dispose(); } COM: <s> closes the internal frame if code b code is code true code </s>