__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46716120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Service() { // Set the default User-Agent value for requests requestFactory.setHeader("User-Agent", getServiceVersion()); // The default extension profile is configured to accept arbitrary XML // at the feed or entry level. A client never wants to lose any // foreign markup, so capture everything even if not explicitly // understood. new Feed().declareExtensions(extProfile); } COM: <s> constructs a new service instance that is configured to accept arbitrary </s>
funcom_train/6511831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitExpressionStatement(ExpressionStatement e) { if(applyPreHook(e)) { AExpression expr = e.getExpression(); Type type = Conversion.getType(expr.type()); expr.accept(this); if(popValue(expr, type)) il.append(factory.createPop(type.getSize())); } applyPostHook(e); } COM: <s> single statement ended with like y f x </s>
funcom_train/51483605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit() { String viewPath = getParameter(VIEWPATH_PARAMETER); if (viewPath != null) { try { URL url = getURL(viewPath); getAppletContext().showDocument(url, "_self"); } catch (IOException mue) { showStatus("Bad URL for viewpath " + viewPath); } } } COM: <s> replace current app with a different url </s>
funcom_train/40765874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupIndividuals() { for( OWLIndividual ind : individualCache.values() ) { if( ind.getTypes( ontology ).isEmpty() ) { //System.out.println( "Untyped individual " + ind.getURI() ); addAxiom( factory.getOWLClassAssertionAxiom( ind, factory.getOWLThing() ) ); } } } COM: <s> make sure all individuals have a type otherwise protege will ignore </s>
funcom_train/39947182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerObject(Object key, Object o, Class interfaceClass) { ObjectInstance oi = new ObjectInstance(o, interfaceClass); synchronized (objectMap) { objectMap.put(key, oi); } if (log.isLoggable(Level.FINER)) { log.finer("registered object " + o.hashCode() + " of class " + interfaceClass.getName() + " as " + key); } } COM: <s> registers an object to export all instance methods defined by </s>
funcom_train/668062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFolder(Folder folder) { Session sess = null; Transaction tx = null; try { sess = DAOHibernateUtils.getSession(); tx = sess.beginTransaction(); // the "ON DELETE CASCADE" constraint in MySQL will delete all // the FileData parts as well sess.delete(folder); tx.commit(); } catch (HibernateException e) { DAOHibernateUtils.reportException(e); throw new DAOException(); } finally { DAOHibernateUtils.closeSession(sess, tx); } } COM: <s> this method is used to delete a single folder </s>
funcom_train/37837489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChangedRemoved(final RPObject object, final RPObject changes) { /* * Call before children have been notified */ listener.onChangedRemoved(object, changes); userListener.onChangedRemoved(object, changes); /* * Walk each slot */ for (final RPSlot cslot : changes.slots()) { if (cslot.size() != 0) { fireChangedRemoved(object, cslot); } } } COM: <s> notify listeners that an object removed attribute s </s>
funcom_train/51752031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMniAddBox() { if (mniAddBox == null) { mniAddBox = new JMenuItem(); mniAddBox.setText("Add Box"); mniAddBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { NewBoxFrame frame = new NewBoxFrame(); frame.setProject(project); jDesktopPane.add(frame); frame.setVisible(true); } }); } return mniAddBox; } COM: <s> this method initializes mni add box </s>
funcom_train/37075081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateAnnotTempId(StrandedFeatureSetI annots,String prefix) { if (annots == null) { logger.warn("GmodNameAdapter.genAnnTempId: annots is null!?"); return ""; } prefix = prefix + getTempSuffix(); int num = nextAnnotNumber(annots); return prefix + num; } COM: <s> produces next temp id suffix not used used in fly subclass make </s>
funcom_train/49609832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addRow( String item, double price, String owner ) { // chech on already exist item if ( isExistRowWithItem(item) ) return false; // and owner must exist in table people if ( !tablePeople.isExistRowWithName(owner) ) return false; // noup, row witch such item not exist // add row in table Object[] addedRow = new Object[] { item, price, owner }; addRow(addedRow); return true; } COM: <s> add new unique row in table </s>
funcom_train/42643922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String showLaunchActionDialog(String oldLaunchValue) { return (String) JOptionPane.showInputDialog( controller.getViewerFrame(), messageBundle.getString( "viewer.utilityPane.action.dialog.launch.msgs"), messageBundle.getString( "viewer.utilityPane.action.dialog.launch.title"), JOptionPane.PLAIN_MESSAGE, null, null, oldLaunchValue); } COM: <s> utility to show the launch action dialog for add and edits </s>
funcom_train/26024760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bindModel(Element model) { unbindModel(); mEditedModel = model.clone(); mEditedModel.addTreeModelListener(this); mTree.setModel(mEditedModel); DefaultMutableTreeNode root = (DefaultMutableTreeNode) mEditedModel.getRoot(); mTree.setSelectionPath(new TreePath(root.getPath())); mTree.invalidate(); for (int i = 0, count = mTree.getRowCount(); i < count; i++) { mTree.expandRow(i); } } COM: <s> binds the editor to a </s>
funcom_train/38294403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeStringBuffer(StringBuffer s) throws LEAPSerializationException { try { if (s != null) { writeBoolean(true); // Presence flag true serializeStringBuffer(s); } else { writeBoolean(false); // Presence flag false } } catch (IOException ioe) { throw new LEAPSerializationException("Error serializing String"); } } COM: <s> writes a string buffer object to this data output stream </s>
funcom_train/20400938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView displaySysOut(HttpServletRequest request, HttpServletResponse response) throws Exception { long jobRunId = getTaskRunId(request); TaskRun taskRun = taskRunManager.get(jobRunId); String message = taskRun.getSysOut(); return new ModelAndView("display_task_run_message", "message", message); } COM: <s> display a task runs system out output </s>
funcom_train/39999286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewTargetPosition(int targetXCoord, int targetYCoord){ if(!finished && getxVeloc()==0 && getyVeloc()==0 && !justCollided){ //If ball isn't already moving or just collided currentBallSpeed = BALL_SPEED; this.targetXCoord = targetXCoord; this.targetYCoord = targetYCoord; setVelocityAccordingToTarget(); } } COM: <s> sets the balls target position to the values passed in the parameters </s>
funcom_train/38316291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAdditionalSoftware(AdditionalSoftware additionalSoftware) throws PersistenceException { Session session = null; try { session = this.sessionManager.getHibernateSession(); session.update(additionalSoftware); } catch (HibernateException he) { log.error("HibernateException caught updating additional software.", he); throw new PersistenceException(he); } finally { this.sessionManager.flushCommitCloseSession(session); } } COM: <s> update a additional software in the database </s>
funcom_train/25417936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String asJson() throws IOException { PrintWriter pw = null; try { StringWriter sw = new StringWriter(); pw = new PrintWriter(sw); this.toJson(pw,0,true); pw.flush(); return sw.toString(); } finally { try {if (pw != null) pw.close();} catch (Exception ef) {} } } COM: <s> returns a json representation of the property </s>
funcom_train/8606852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPlayerToGroup(Player newComer) { groupMembers.put(newComer.getObjectId(), newComer); newComer.setPlayerGroup(this); PacketSendUtility.sendPacket(newComer, new SM_GROUP_INFO(this)); updateGroupUIToEvent(newComer, GroupEvent.ENTER); } COM: <s> adds player to group </s>
funcom_train/3062853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToQueue(final String path, final String[] pics) { synchronized (thumbQueue) { Iterator iter = thumbQueue.iterator(); while (iter.hasNext()) { Object[] queue = (Object[]) iter.next(); if (queue[0].equals(path)) { //Already have one in the queue return; } } thumbQueue.add(new Object[] {path, pics}); } } COM: <s> add a request to make thumbs for a particular directory </s>
funcom_train/40961549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyBody(Body body) { this.bodies.remove(body.addr); for (int i = 0; i < body.getFixtureList().size(); i++) this.fixtures.remove(body.getFixtureList().get(i).addr); for (int i = 0; i < body.getJointList().size(); i++) this.joints.remove(body.getJointList().get(i).joint.addr); jniDestroyBody(addr, body.addr); } COM: <s> destroy a rigid body given a definition </s>
funcom_train/1864847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasPersistant() { final String persistance = metaData.getProperty("persistant","no"); if (persistance.equalsIgnoreCase("true")) { return true; } else { for (Object keyObject : metaData.keySet()) { if (keyObject.toString().toLowerCase().startsWith("persistant-")) { return true; } } } return false; } COM: <s> does this plugin contain any persistant classes </s>
funcom_train/4888310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDatabase(String dbfile){ try{ Db4o.configure().objectClass(regnumhelper.muleserver.MuleGroup.class).cascadeOnUpdate(true); Db4o.configure().objectClass(regnumhelper.mule.Item.class).cascadeOnUpdate(true); File file = new File(dbfile); db = Db4o.openFile(file.getAbsolutePath()); }catch(Exception e){e.printStackTrace();} } COM: <s> opens up the database file </s>
funcom_train/39467952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean close(@NotNull final DocumentFrame<D> frameToClose) { final Document<D> doc = frameToClose.getDocument(); if (doc.getFrameCount() > 1) { doc.removeDocumentFrame(frameToClose); desktop.remove(frameToClose); desktop.selectFrame(true); return true; } else { close(doc); documents.remove(doc); return false; } } COM: <s> closes the specified frame </s>
funcom_train/17184329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(300, 200); this.setContentPane(getJContentPane()); this.setTitle("JFrame"); this.addWindowListener(this); dialBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { doDial(); } }); hangupBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { doHangup(); } }); } COM: <s> this method initializes this </s>
funcom_train/49626283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getScanningResults() throws IOException { String line = null; /* read as long as there is input or an error message is found */ while (true) { line = this.reader.readLine(); if (line != null) { line = line.trim(); if (line.endsWith("FOUND")) { line = line.substring(0, line.length() - 5).trim(); if (line.startsWith("stream: ")) { line = line.substring(8); } return line; } } else { break; } } return null; } COM: <s> returns the error message or </s>
funcom_train/7803470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void addAccount(String path, int acId, Account account) throws Exception { // Map pac = (Map)accounts.get(path); // if (pac == null) { // pac = new HashMap(); // accounts.put(path, pac); // } // pac.put(new Integer(acId), account); // } COM: <s> add a new proposal account </s>
funcom_train/24185963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKillAgents() throws InterruptedException { LocalAgentReport msg = new LocalAgentReport ("agent", 4454, null); queue.sendMessageToSelf(msg); Message msg2 = new Message(WhitePages.KILL_AGENTS); queue.sendMessageToSelf(msg2); Thread.sleep(500); HashMap<String, QueueOutputPipeInterface> agents = lwp.getAgents(); assertEquals(0, agents.size()); } COM: <s> test the reception of kill agents </s>
funcom_train/9827894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void constructorParametersUpdated() { if ( _constructorParamListeners == null ) return; Object[][] constructorSettings = getConstructor(); for ( Iterator itr = _constructorParamListeners.iterator(); itr.hasNext(); ) { ConstructorParamListener cpl = (ConstructorParamListener)itr.next(); cpl.dtbConstructorParamsUpdated( constructorSettings ); } } // end method constructorParametersUpdated COM: <s> tells all of the constructor param listeners that the parameter </s>
funcom_train/19309147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EntityResolver makeEntityResolver() { final String catalog = this.optionXMLCatalog(); if (catalog == null) { return null; } final String [] catalogs = {catalog}; final XMLCatalogResolver resolver = new XMLCatalogResolver(); resolver.setPreferPublic(true); resolver.setCatalogList(catalogs); return resolver; } COM: <s> creates and returns an entity resolver </s>
funcom_train/32824293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void guessConfiguration(ZipFile zipfile, ArrayList apis) { boolean isCLDC = zipContainsEntry(zipfile, CLDC_10_CLASS); boolean isCLDC11 = zipContainsEntry(zipfile, CLDC_11_CLASS); if (isCLDC) { API api = new API(); apis.add(api); api.setIdentifier("CLDC"); api.setName("Connected Limited UEIDevice Configuration"); api.setType(APIType.CONFIGURATION); Version version = isCLDC11 ? new Version("1.1") : new Version("1.0"); api.setVersion(version); } } COM: <s> attempt to guess if the library has a configuration </s>
funcom_train/33606626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSign(){ System.out.println("sign"); assertEquals(+1,instance1.sign()); assertEquals(-1,instance2.sign()); assertEquals(+1,instance3.sign()); assertEquals(+1,instance4.sign()); } COM: <s> test of sign method </s>
funcom_train/11301273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadMessage() { Category root = Logger.getRootLogger(); Priority info = Level.INFO; String catName = Logger.class.toString(); BadMessage msg = new BadMessage(); LoggingEvent event = new LoggingEvent( catName, root, 0L, info, msg, null); // would result in exception in earlier versions event.getRenderedMessage(); } COM: <s> tests that an runtime exception or error during to string </s>
funcom_train/42775295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(int x, int y){ double distanceFromCenter = Math.pow((double)x - (xPos + size/2), 2.0) + Math.pow((double)y - (yPos + size/2), 2.0); distanceFromCenter = Math.pow(distanceFromCenter, 0.5); if (distanceFromCenter < size / 2) return true; return false; } COM: <s> returns true if the class contains the click position </s>
funcom_train/48909384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtGenerarEsquema() { if (jbtGenerarEsquema == null) { jbtGenerarEsquema = new JButton(); jbtGenerarEsquema.setText("Generar Esquema"); jbtGenerarEsquema.setBounds(new Rectangle(293, 445, 146, 26)); jbtGenerarEsquema.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { guardarEsquema(); } }); } return jbtGenerarEsquema; } COM: <s> this method initializes jbt generar esquema </s>
funcom_train/7850790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean boolArg(final int n) throws ArgumentTypeMismatchException, InsufficientArgsException { final Object a = getArg(n); if (a == null) { throw new ArgumentTypeMismatchException(n, "boolean", "null"); } try { return ((Boolean) a).booleanValue(); } catch (final ClassCastException e) { throw new ArgumentTypeMismatchException(n, "boolean", (a != null ? a.getClass().toString() : "null")); } } COM: <s> helper function for booleans </s>
funcom_train/27823132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCounter(String type,int newValue) throws SQLException { if (m_updateCounter==null) m_updateCounter=m_connection.prepareStatement("UPDATE PKCounter SET counter=? WHERE type=?"); m_updateCounter.setInt(1,newValue); m_updateCounter.setString(2,type); m_updateCounter.executeUpdate(); } COM: <s> sets the new value of the counter </s>
funcom_train/11657712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(final long now, final int numIdle) { final int idle = Math.max(0, numIdle); idleHighWaterMark = Math.max(idle, idleHighWaterMark); final float maxInterval = 15f; final float minutes = maxInterval + ((1f-maxInterval)/idleHighWaterMark) * idle; nextShrink = now + (long)(minutes * 60000f * factor); } COM: <s> updates internal state using the supplied time and num idle </s>
funcom_train/34633269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(final MergeEntry search) { /* dont use equals or content.indexOf !! */ int count = this.content.size(); for(int i = 0; i < count; i++){ if (this.content.get(i) == search) return i; } return -1; } COM: <s> return the index of the searched entry </s>
funcom_train/13408224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BasicGameState getGuideGameState() { if (this.guideGameState == null) { guideGameState = new BasicGameState(GUIDE_STATE); this.guideGameState.setActive(true); this.attachChild(this.guideGameState); guideGameState.getRootNode().attachChild(getGuideLines().getLine()); // Finally we add the controller. guideGameState.getRootNode().addController(controller); } return this.guideGameState; } COM: <s> returns the guide state the guide game state will hold the guide lines </s>
funcom_train/25525122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void CloseConnection() { //close connection once done try { con.close(); } catch (Exception e) { System.out.println(e); System.out.println("Error closing connection to " + URL); System.out.println("Check if Mysql daemon is running.. Restart server"); e.printStackTrace(); } } COM: <s> close the connection to the db </s>
funcom_train/46817638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void poll() { try { pollGroups(); pollUsers(); pollPeopleLinks(); pollTasks(); pollPeopleProcesses(); pollPeopleProcessInstances(); pollTaskInstances(); pollPeopleLinkInstances(); } catch (ErrorMessage ex) { setError(ex.getMessage()); } } COM: <s> we are polling for business objects </s>
funcom_train/1528452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRedefineString(boolean useChangeable, boolean useOutputValueString) { boolean increasePrecision = kernel.ensureTemporaryPrintAccuracy(MIN_EDITING_PRINT_PRECISION); String ret = null; boolean isIndependent = !isPointOnPath() && useChangeable ? isChangeable() : isIndependent(); if (isIndependent) { ret = useOutputValueString ? toOutputValueString() : toValueString(); } else { ret = getCommandDescription(); } if (increasePrecision) kernel.restorePrintAccuracy(); return ret; } COM: <s> returns definition or value string of this object </s>
funcom_train/19748405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContainers(String string) { containersList.clear(); StringTokenizer tokenizer = new StringTokenizer(string, ","); while (tokenizer.hasMoreTokens()) { String name = tokenizer.nextToken().trim(); containersList.add(name); } containersListAssigned = true; } COM: <s> sets string property </s>
funcom_train/46907772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDynamicAmbiguousVarargs() throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, AmbiguosMethodException, InstantiationException { long length = 20; long width = 20; OrdinaryBox box = new OrdinaryBox(); try { long topArea = (Long) Dynamic.call(box, "getTopAreaTwo", long.class, length, long.class, width); } catch (AmbiguosMethodException ame) { assertTrue(true); return; } fail(); } COM: <s> this test is testing a bug in java 5 </s>
funcom_train/51547534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getDate(Date insertDate) { final LocalPreferences pref = SettingsManager.getLocalPreferences(); if (insertDate == null) { insertDate = new Date(); } if (pref.isTimeDisplayedInChat()) { final SimpleDateFormat formatter = new SimpleDateFormat("h:mm"); return formatter.format(insertDate); } lastUpdated = insertDate; return ""; } COM: <s> returns the formatted date </s>
funcom_train/51697464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFile(String fn) throws RSrvException { if (!connected || rt==null) throw new RSrvException(this,"Not connected"); Rpacket rp=rt.request(Rtalk.CMD_removeFile,fn); if (rp!=null && rp.isOk()) return; throw new RSrvException(this,"removeFile failed",rp); } COM: <s> remove a file on the rserve </s>
funcom_train/44585879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(IDOMNode child) throws IllegalArgumentException, DOMException { basicAddChild(child); // if the node is a constructor, it must also be fragmented to update the constructor's name if (child.getNodeType() == IDOMNode.METHOD && ((IDOMMethod)child).isConstructor()) { ((DOMNode)child).fragment(); } else { fragment(); } } COM: <s> adds the given un parented node document fragment as the last child of </s>
funcom_train/44627587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { // Two things are equal if they have the same string, so we'll // use that for the hashCode return uri.normalize().getPath().hashCode(); // FIXME -0 this is not right, since if one is a suffix of the other they are equal and should have the same hashCode } COM: <s> a definition of hash code since we have a definition of equals </s>
funcom_train/44847029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initUI() { setLayout(new BorderLayout()); txtEditor = createTextArea(); JScrollPane jsp = new JScrollPane(txtEditor); toolBar = createToolBar(); add(jsp); add(toolBar, BorderLayout.NORTH); add(createBottomPanel(), BorderLayout.SOUTH); } COM: <s> initializes the ui </s>
funcom_train/46703054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void useBatchUpdate() { Order order = new Order(); // Activate the Change column management: order.writeSession(session); // Set a value(s) to the change: order.setCreated(new Date()); session.update(order, Order.ID.whereGe(1L)); session.commit(); } COM: <s> the batch update of selected columns for required database rows </s>
funcom_train/3619295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEstimatedTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Bug_estimatedTime_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Bug_estimatedTime_feature", "_UI_Bug_type"), EclipsesrsPackage.Literals.BUG__ESTIMATED_TIME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the estimated time feature </s>
funcom_train/2517314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void allocateMissingResource(Map<String, Task> projectTaskMap, Map<String, Resource> projectResources) { Resource defaultResource = resourcePool.defaultResource(); for (Map.Entry<String, Task> entry : projectTaskMap.entrySet()) { Task task = entry.getValue(); if (task instanceof ResourcedTask) { ResourcedTask rt = (ResourcedTask) task; if (rt.getAssignedResource() == null) { rt.assignResource(defaultResource, 1); } } } } COM: <s> if there were no assignments for a task it will have no resource </s>
funcom_train/3832972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ret = getClass().getName() + "\n"; ret = "name = " + name + "\n"; ret += ( "layerFeatureConstraints = " + layerFeatureConstraints + "\n" ); ret += ( "styles = " + styles + "\n" ); return ret; } COM: <s> returns a string representation of the layer </s>
funcom_train/23267802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNomRemitente() { System.out.println("getNomRemitente"); Giros instance = new Giros(); String expResult = ""; String result = instance.getNomRemitente(); 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 nom remitente method of class capa negocios </s>
funcom_train/29990858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { Dimension d = super.getOriginalPS(); d.width += d.width / 8; d.height += d.height / 2; d.width = (int)((Math.floor((d.width / gridsize)-0.01) + 1) * gridsize - 1); d.height = (int)((Math.floor((d.height / gridsize)-0.01) + 1) * gridsize - 1); return d; } COM: <s> return a slightly larger preferred size than for a rectangle </s>
funcom_train/25068885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findNext() { loc++; if (loc >= sortedMatches.length) { loc = 0; } table.changeSelection(((POCommon) sortedMatches[loc]).getIndex(), 0, false, false); table.requestFocus(); table.getColumnModel() .getColumn(0) .getCellRenderer() .getTableCellRendererComponent(table, null, true, true, ((POCommon) sortedMatches[loc]).getIndex(), 0); return; } COM: <s> displays the next closest matched search term resets to beginning if all </s>
funcom_train/11004913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMarginTop(){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, EscherProperties.TEXT__TEXTTOP); int val = prop == null ? EMU_PER_INCH/20 : prop.getPropertyValue(); return (float)val/EMU_PER_POINT; } COM: <s> returns the distance in points between the top of the text frame </s>
funcom_train/14302653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRunCharacterAbility() throws AbilityException { // ability = new MockCharacterAbility(character); // // try { // ability.run(); // fail("MockCharacterAbility did not an expected AbilityException."); // } // catch (AbilityException ex) { // assertEquals("Message used in MockCharacterAbility was not as expected.", ex.getMessage(), MockCharacter.TEST_MESSAGE); // } } COM: <s> test whether an expected error occurs when we try running </s>
funcom_train/46450567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateActualCost() { double actual = this.getActualPersonnelCosts(); actual += this.getActualTravelCosts(); actual += this.getActualMaterialCosts(); actual += this.getActualExternalCosts(); actual += this.getActualMiscellaneousCosts(); return actual; } COM: <s> calculates the actual total costs of this activity </s>
funcom_train/33683476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBox2() { if (jCheckBox2 == null) { jCheckBox2 = new JCheckBox(); jCheckBox2.setBounds(new Rectangle(30, 137, 157, 24)); jCheckBox2.setText("Under threshold"); jCheckBox2.setToolTipText("If checked, biclustering results will be stored in the selected path"); } return jCheckBox2; } COM: <s> this method initializes j check box2 </s>
funcom_train/2586042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDayCount30PSA() { final SerialDate d1 = SerialDate.createInstance(1, MonthConstants.APRIL, 2002); final SerialDate d2 = SerialDate.createInstance(2, MonthConstants.APRIL, 2002); final int count = SerialDateUtilities.dayCount30PSA(d1, d2); assertEquals(1, count); } COM: <s> problem 30 360 psa day count </s>
funcom_train/33609447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustAdjusterSize(){ int adjusterLength=getWidth()-2*padding; int spaceAvailable=getHeight()-2*padding-(elements.size()-1)*spacing; adjusterGirth=spaceAvailable/elements.size(); for(int i=0;i<elements.size();i++){ getElement(i).setSize(adjusterLength,adjusterGirth); } } COM: <s> adjusts the adjuster size to fit within the boundary of this component </s>
funcom_train/45863944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setActive(int active) { setActive(lapsIndex, active == ACTIVE_LAPS); setActive(pickIndex, active == ACTIVE_PICK); setActive(powrIndex, active == ACTIVE_POWR); this.active = active; if (DEBUG) { switch (active) { case ACTIVE_NONE: System.out.println("Showing NONE"); break; case ACTIVE_LAPS: System.out.println("Showing LAPS"); break; case ACTIVE_PICK: System.out.println("Showing PICK"); break; case ACTIVE_POWR: System.out.println("Showing POWR"); break; default: System.out.println("Showing ????"); } } } COM: <s> sets which one of the hud items takes precidence </s>
funcom_train/50485421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doCopy() { Object object = getSelectedObject(); String from = getAdministration().getName(object); String to = JOptionPane.showInputDialog(null, "Copy To:", from); if (to != null && to.trim().length() > 0) doCopy(object, to); } COM: <s> override to handle copy button action </s>
funcom_train/48075275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assign(int x, int y) { if(rsite[x][y] == OCCUPIED) { int down = y - 1; int left = x - 1; if(rsite[x][down] + rsite[left][y] == 0) { ncluster++; // new cluster rsite[x][y] = ncluster; np[ncluster] = ncluster; // proper label } else { neighbor(x, y); } } } COM: <s> assigns cluster numbers to occupied sites </s>
funcom_train/50091045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isHeteroRingSystem(IAtomContainer ac) { if (ac != null) { for (int i = 0; i < ac.getAtomCount(); i++) { if (!(ac.getAtom(i).getSymbol()).equals("H") && !(ac.getAtom(i).getSymbol()).equals("C")) { return true; } } } return false; } COM: <s> returns true if atom is in hetero ring system </s>
funcom_train/50090257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IChemModel readChemModel(IChemModel chemModel) throws CDKException { IReactionSet setOfReactions = chemModel.getReactionSet(); if (setOfReactions == null) { setOfReactions = chemModel.getBuilder().newReactionSet(); } chemModel.setReactionSet(readReactionSet(setOfReactions)); return chemModel; } COM: <s> read a ichem model from a file in mdl rdf format </s>
funcom_train/16941706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("MiddlewareClient".equals(portName)) { setMiddlewareClientEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/22055754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String name = (String)getValue(NAME); KeyStroke accelerator = (KeyStroke)getValue(ACCELERATOR_KEY); Integer mnemonic = (Integer)getValue(MNEMONIC_KEY); String tooltip = (String)getValue(SHORT_DESCRIPTION); StringBuilder sb = new StringBuilder(); sb.append(getClass().getName()); sb.append("["); sb.append(name); if (accelerator != null) { sb.append(" "); sb.append(accelerator); } if (tooltip != null) { sb.append(" \""); sb.append(tooltip); sb.append("\""); } sb.append("]"); return sb.toString(); } COM: <s> returns a string representation of the code command code object </s>
funcom_train/19977633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(File file, String nodename, String nodeid, PropertyStore cookie) { XMLReader reader = new XMLReader(); try { Log.Debug(this, "Reading in " + file); myDocument = reader.newDoc(file); rootElement = myDocument.getRootElement(); } catch (Exception ex) { newDoc(true); } parse(nodename, nodeid, cookie); } COM: <s> appends the property stores data to an existing xml file </s>
funcom_train/10959316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean add(String name, Object value, Method method, boolean hasData) throws JSONException { if (excludeNullProperties && value == null) { return false; } if (hasData) { this.add(','); } this.add('"'); this.add(name); this.add("\":"); this.value(value, method); return true; } COM: <s> add name value pair to buffer </s>
funcom_train/10584160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSystemProperties(Configuration props) { for (Iterator i = props.getKeys(); i.hasNext();) { String propName = (String) i.next(); String systemPropValue = System.getProperty(propName); if (systemPropValue != null) { overwriteProperty(props, propName, systemPropValue); } } } COM: <s> override any properties for which a system property exists </s>
funcom_train/45279301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(OutputStream out, boolean closeStream) { int z = x + y; try { new DataOutputStream(out).writeInt(z); } catch (IOException io) { } finally { if (closeStream) { try { out.close(); } catch (IOException io) { } } } } COM: <s> adds the two integers encapsulated in this command object </s>
funcom_train/14156547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushCurFileAdv(DiscoveryService discoSvc) throws IOException { Enumeration enu = discoSvc.getLocalAdvertisements(DiscoveryService.ADV, CurFileAdvertisement.TAG_FOR_DISCOVERY, null); while (enu.hasMoreElements()) discoSvc.flushAdvertisement((Advertisement)enu.nextElement()); } COM: <s> flush all the cur file advertisement in our local cache </s>
funcom_train/28643711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Competence findByEnglishName(String name) throws DaoException { Competence result = null; try { Map<String, Object> params = new HashMap<String, Object>(); params.put("name", name); result = initializeCompetence((Competence) getSingleResult("CompetenceByEnglishName", params)); } catch (Throwable ex) { throw new DaoException(ex); } return result; } COM: <s> finds an competence by its english name </s>
funcom_train/18888582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compare(BookMarkHuge bm1){ /*for (int i = 0; i < vn1.nestingLevel; i++) { ba[i] = bm1.ba[i]; } if (vn1.getCurrentDepth()>)*/ for (int i = 0; i < vn1.nestingLevel+6; i++) { if(ba[i] != bm1.ba[i]) return false; } return true; } COM: <s> compare the node positions of two book mark huge objects </s>
funcom_train/36756464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDegreesSorted() { DbHelper dbh = new DbHelper(); List <Degree> degrees = dbh.GetDegreesSorted(); assertEquals(8, degrees.size()); for (Degree d : degrees) { System.out.println(d.getName() + " " + d.getConcentration()); } dbh.close(); } COM: <s> test of get degrees sorted method of class csis543 tfinal project </s>
funcom_train/23236501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireRemoved(RPObject object, boolean user) { // TEST CODE: //System.err.println("fireRemoved()"); //dumpObject(object); // NEW CODE: // /* // * Walk each slot // */ // for(RPSlot slot : object.slots()) { // for(RPObject sobject : slot) { // fireRemoved(sobject, user); // } // } gameObjects.onRemoved(object); } COM: <s> notify listeners that an object was removed </s>
funcom_train/25978840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getAttributes() { Properties result = new Properties(); Enumeration enum = this.attributes.elements(); while (enum.hasMoreElements()) { XMLAttribute attr = (XMLAttribute) enum.nextElement(); result.put(attr.getFullName(), attr.getValue()); } return result; } COM: <s> returns all attributes as a properties object </s>
funcom_train/9652270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void siftUp(int k, E x) { while (k > 0) { int parent = (k - 1) >>> 1; Element e = queue[parent]; if (comparator.compare( x, (E) e ) >= 0) break; queue[k] = e; e.index = k; k = parent; } queue[k] = x; x.index = k; } COM: <s> inserts item x at position k maintaining heap invariant by promoting x </s>
funcom_train/44853076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexWriter getContentIndexWriter(boolean inCreate) throws LockObtainFailedException, IOException { if (contentIndexWriter == null) throw new CorruptIndexException(String.format(ERROR_MSG, createPath(CONTENT_INDEX))); if (!inCreate) { return contentIndexWriter; } try { contentIndexWriter.close(); } finally { IndexWriter.unlock(contentDir); } contentIndexWriter = new IndexWriter(contentDir, createConfiguration(inCreate)); return contentIndexWriter; } COM: <s> returns the code index writer code to index the the content </s>
funcom_train/18804315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTableSize(int rowIndexBegin, int columnIndexBegin, int rowIndexEnd, int columnIndexEnd) { return (rowIndexEnd * EHEP.TABLE_NUM_DATA_COLUMNS + columnIndexEnd + 1) - (rowIndexBegin * EHEP.TABLE_NUM_DATA_COLUMNS + columnIndexBegin); } COM: <s> calculates the number of cells occupied by the data in specified region </s>
funcom_train/42095763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object object) { if (! (object instanceof HighScore)) return 2; double otherScore = ( (HighScore) object).getScore(); double thisScore = getScore(); if (thisScore == otherScore) return 0; else if (thisScore < otherScore) return -1; else return 1; } COM: <s> implements the well known compare to </s>
funcom_train/22754393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTable(String tablename, String fields[], String[] types){ try{ String query = db.getCreateTableQuery(tablename, fields, types); Statement st = conn.createStatement(); st.executeUpdate(query); st.close(); }catch(SQLException e){ logger.info("Did not create table " + tablename +". It already exists."); } } COM: <s> creates the table </s>
funcom_train/17175216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String consultAvailableVehicles() { ArrayList<Vehicle> v = vehicles.getListVehicles(); String s = new String(); String newLine = System.getProperty("line.separator"); Collections.sort(v); for (int i = 0; i < v.size(); i++) { if (getVehicleSituation(v.get(i).getPlate()).equals("AVAILABLE")) { s += v.get(i).getPlate() + newLine; } } return s; } COM: <s> consultation for the available vehicles of the system </s>
funcom_train/40396676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object build(final URI scriptURI) { try { if (LOG.isDebugEnabled()) { LOG.debug("To build from {}", scriptURI); } return shell.evaluate(new File(scriptURI)); } catch (final Exception e) { throw new RuntimeException(e); } } COM: <s> to build from script specified by code script uri code </s>
funcom_train/12528011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getReceiveBufferSize() throws SocketException { checkClosedAndCreate(true); if (impl == null) { try { return netSock.get_ReceiveBufferSize(); } catch (Throwable t) { throw new SocketException(t.getMessage()); } } else return ((Integer) impl.getOption(SocketOptions.SO_RCVBUF)).intValue(); } COM: <s> gets the value for the receive buffer size socket option </s>
funcom_train/7267380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeListener(Object strongRef, EventListener<E> listener) { List<EventListener<E>> listeners = listenerMap.get(strongRef); if(listeners != null) { listeners.remove(listener); if(listeners.isEmpty()) listenerMap.remove(strongRef); return true; } return false; } COM: <s> returns true if the listener was removed </s>
funcom_train/14337205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startListening(int minPort, int maxPort) { this.cl = new ConnectionListener(); if (this.cl.connect(minPort, maxPort)) { this.cl.addConListenerInterface(this); return true; } else { System.err.println("Could not create listening socket..."); System.err.flush(); return false; } } COM: <s> create the connection listener to accept incoming connection from peers </s>
funcom_train/17859644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getResource (String key) { String s = getString(key); URL ret = getClass().getResource(s); if (ret == null) { throw new ResourceException("Cannot get resource URL for key '" +key+"', which referenced '"+s+"'"); } return ret; } COM: <s> get a resource as an absolute url </s>
funcom_train/32778443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double sample() { incrementObservations(); // increase the number of randoms given to // the // client double newSample; // aux variable if (isAntithetic()) newSample = -java.lang.Math.log(randomGenerator.nextDouble()) * mean; else newSample = -java.lang.Math.log(1 - randomGenerator.nextDouble()) * mean; if (this.currentlySendTraceNotes()) this.traceLastSample(Double.toString(newSample)); return newSample; } COM: <s> returns the next negative exponential pseudo random number </s>
funcom_train/18787896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerTypes(Class clazz, List<TagDefinition> taggedValueTypes) { assert (clazz != null) && (taggedValueTypes != null); List<TagDefinition> types = tagDefinitions.get(clazz); if (types == null) { tagDefinitions.put(clazz, taggedValueTypes); } else { types.addAll(taggedValueTypes); } } COM: <s> registers the list of tagged value types to the given class </s>
funcom_train/49460334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getOrCreateAsset(BasicAssetInfo a) throws Exception{ Integer existingId = assetCache.get(a.toString()); if(existingId != null) return existingId; AssetId assId = assDb.findAssetId(a); if (assId == null) { assDb.addOrUpdateAsset(a); assId = assDb.findAssetId(a); } assetCache.put(a.toString(), assId.getId()); return assId.getId(); } COM: <s> get or create an asset from the infos provided here </s>
funcom_train/43268901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object object) throws ClassCastException { if (!(object instanceof Usage)) { throw new ClassCastException("Usage.compareTo"); } int c = 0; if (this != object) { Usage that = (Usage) object; String thatString = that.keyRepresentation(); String thisString = this.keyRepresentation(); c = thisString.compareTo(thatString); } return c; } COM: <s> compares two code usage code s for state dependent equality </s>
funcom_train/35620541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLegoDoll(PhysicsSpace physicsSpace) { StaticPhysicsNode legoDoll = physicsSpace.createStaticNode(); legoDoll.setModelBound(new BoundingBox()); legoDoll.setLocalTranslation(new Vector3f(200, getFloorHeight() + 3.9f, 30)); legoDoll.attachChild(ModelUtil.convertMultipleModelToJME( ResourcesPath.MODELS_PATH + "obj/legoDoll.obj")); legoDoll.setMaterial(Material.IRON); legoDoll.setLocalScale(2.5f); legoDoll.generatePhysicsGeometry(); this.attachChild(legoDoll); } COM: <s> creates the lego doll in bend three </s>
funcom_train/30099729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void gotToRoot() { currentTreeNode.setNodeSelected(null); currentHolder = currentObjectDef.getNode(new Integer(0) ); //the object root node is always ID = 0 currentNode = (UIComponent) currentTreeNode; // set panel to be displayed setActivePanel(ROOT_OBJECT_PANEL); } //end of gotToRoot COM: <s> this method is called when coming back to the query def from the </s>
funcom_train/14177937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { getDebugSettings().setAjaxDebugModeEnabled(false); // these are some pages which can be bookmarked in your browser mountBookmarkablePage("/home", Index.class); mountBookmarkablePage("/highscore", Highscorelist.class); mountBookmarkablePage("/register", Registration.class); mountBookmarkablePage("/lobby", Lobby.class); mountBookmarkablePage("/inbox", MailInbox.class); } COM: <s> init method defines some general things needed by this web app </s>
funcom_train/48749184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatabaseMetaData getDBMetaData() throws DBException { String myName = new String(thisClass + "getDBMetaData()"); try { return myConnection.getMetaData(); } catch(SQLException se) { throw new DBException(myName + ":Unable to retrieve meta-data " + " for this connection", se.getMessage()); } } /* getDBMetaData() */ COM: <s> return the database meta data for the connection </s>
funcom_train/12174244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHorizontalPadding(Element element, String attribute) { int leftPadding = getPixelLength(styles.getStyleValue( StylePropertyDetails.PADDING_LEFT)); int rightPadding = getPixelLength(styles.getStyleValue( StylePropertyDetails.PADDING_RIGHT)); int hpad = (leftPadding + rightPadding) / 2; if (hpad != 0) { element.setAttribute(attribute, String.valueOf(hpad)); } } COM: <s> create the hpad attribute from the left and right padding values </s>
funcom_train/3372983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAccessibleColumnHeader(int c) { if (validateIfNecessary()) { TableCellElementInfo cellInfo = getCell(0, c); if (cellInfo.isHeaderCell()) { View v = cellInfo.getView(); if (v != null && model != null) { try { return model.getText(v.getStartOffset(), v.getEndOffset() - v.getStartOffset()); } catch (BadLocationException e) { return null; } } } } return null; } COM: <s> returns the column header at a column in a table </s>