__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38566445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertValidDir(File dir, String expectedName) { assertTrue("should be readable", dir.canRead()); assertTrue("should be a directory", dir.canRead()); assertEquals("Name of root path should match name of directory", expectedName, dir.getName()); } COM: <s> requires that directory be a directory be readable and have the right name </s>
funcom_train/26456767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void persistStore(Object key, Object obj) { if (log.isDebugEnabled()) { log.debug("persistStore called (key=" + key + ")"); } if (persistenceListener != null) { try { persistenceListener.store((String) key, obj); } catch (CachePersistenceException e) { log.error("[oscache] Exception persisting " + key + ": " + e); } } } COM: <s> store an object in the cache using the persistence listener </s>
funcom_train/18961731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(double[][] theY, double[][] theX, double[][] theX2, String[][] annotation) { this.annotation=annotation; // theXMatrix=new Matrix(theX); // theX2Matrix=new Matrix(theX2); setAndFilterXMatrices(theX, theX2, theY); } COM: <s> this sets the data for the analysis </s>
funcom_train/32305953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSigma(int nSigma) { assert 0<=nSigma && nSigma<numSigmas(); src = (Temp[]) Util.shrink(Temp.arrayFactory, src, nSigma); dst = (Temp[][]) Util.shrink(Temp.doubleArrayFactory, dst, nSigma); } COM: <s> removes a given sigma function from the block </s>
funcom_train/37263843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File chooseFile() { JFileChooser chooser = new JFileChooser(); chooser.addChoosableFileFilter(FILTER); int returnVal = chooser.showOpenDialog(this.mainPanel); if (returnVal == JFileChooser.APPROVE_OPTION) { return chooser.getSelectedFile(); } else { return null; } } COM: <s> shows the file chooser and </s>
funcom_train/3596431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToMap(Map index, ObjectModelElement el, NTextElement nte) { if (index==null || el==null || nte==null) { return; } Set displays = (Set) index.get(el.getID()); if (displays==null) { displays=new TreeSet(); } displays.add(nte); index.put(el.getID(), displays); } COM: <s> assuming we have a map containing a mapping between element ids and </s>
funcom_train/41115381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserManager getUserManager() { UserManager userManager = null; try { ServletContext application = getServlet().getServletContext(); synchronized (application) { userManager = (UserManager) application.getAttribute(ATTRIBUTE_USER_MANAGER); if (userManager == null) { userManager = new DatabaseUserManager(); application.setAttribute(ATTRIBUTE_USER_MANAGER, userManager); } } } catch (Exception e) { } return userManager; } COM: <s> this method returns the user manager creating it first </s>
funcom_train/5861808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getResources(String name) throws IOException { name = resolveName(name); ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl != null) { final Enumeration en = cl.getResources(name); if (en.hasMoreElements()) return en; } cl = ClassLocator.class.getClassLoader(); if (cl != null) { final Enumeration en = cl.getResources(name); if (en.hasMoreElements()) return en; } return ClassLoader.getSystemResources(name); } COM: <s> returns an enumeration of resources </s>
funcom_train/42537249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof PkgCons))return false; if(o == this)return true; PkgCons oo = (PkgCons)o; return (((Object)id).equals(oo.id))&&(((Object)rest).equals(oo.rest)); } COM: <s> is the given object equal to this pkg cons </s>
funcom_train/44814763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareChildren(Collection children) { if (children == null) { return; } Iterator itr = children.iterator(); while (itr.hasNext()) { Object element = itr.next(); if (!(element instanceof IEntityBean)) { continue; } IEntityBean child = (IEntityBean) element; BeanUtils.resetId(child); // If element is deleted then remove the element from collection if (child.isDeleted()) { child.destroy(); itr.remove(); } } } COM: <s> prepare children before save </s>
funcom_train/50067150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(String sep) { if (isEmpty()) { return ""; } else { StringBuffer buf = new StringBuffer(); buf.append(((Object) head).toString()); for (List l = tail; l.nonEmpty(); l = l.tail) { buf.append(sep); buf.append(((Object) l.head).toString()); } return buf.toString(); } } COM: <s> form a string listing all elements with given separator character </s>
funcom_train/47518700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mandatoryFieldsCheck() { if (contactNameJTextField.getText().length() > 0 && contactInfoJTextField.getText().length() > 0 && institutionJTextArea.getText().length() > 0) { addJButton.setEnabled(true); } else { addJButton.setEnabled(false); } } COM: <s> checks if all mandatory information is filled in </s>
funcom_train/4853541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleElement (Element elem) throws IOException { if (next == null) { Tag startTag = elem.getStartTag (); Tag endTag = elem.getEndTag (); emit (startTag); transformContents (elem); if (endTag != null) emit (endTag); } else next.handleElement (elem); } COM: <s> handle the transformation of an html element </s>
funcom_train/32303421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set findUniverse(Set blockSet) { Iterator blocks = blockSet.iterator(); HashSet temps = new HashSet(); while(blocks.hasNext()) { BasicBlock bb = (BasicBlock) blocks.next(); for (Object hO : bb.statements()) { HCodeElement h = (HCodeElement) hO; temps.addAll(ud.useC(h)); temps.addAll(ud.defC(h)); } } return temps; } COM: <s> constructs a code set code of all of the code temp code s </s>
funcom_train/51426026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: M__SCD { public boolean isSgroupLine(String line) { return line.startsWith("M SCD"); } protected String[] parse(String line) throws GroupException { String[] results = new String[2]; results[0] = line.substring(7,10).trim(); results[1] = line.substring(11).trim(); return results; }; public void updateSGroups(String line, SuppleAtomContainer atomcontainer, Hashtable<Integer,ISGroup> sgroups) throws GroupException { String[] params = parse(line); throw new GroupException(this.toString()); } }, COM: <s> data sgroup data </s>
funcom_train/3340094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processFocusEvent(FocusEvent fe_) { if (_focusListeners != null) { for (Enumeration<FocusListener> e = _focusListeners.elements(); e.hasMoreElements(); ) { FocusListener fl = (FocusListener) e.nextElement(); if (fe_.getID() == AWTEvent.FOCUS_GAINED) fl.focusGained(fe_); else fl.focusLost(fe_); } } } COM: <s> invoke all the focus listener callbacks that may have been registered </s>
funcom_train/34526390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getColumnProperties(int colIdx) { reload(); if ((colIdx < 0) || (colIdx >= getNumCols())) { String msg = "The column idx (" + colIdx + ") " + "doesn't exist in the table template '" + name + "'."; throw new IllegalArgumentException(msg); } return columnProperties.get(colIdx); } COM: <s> gets the properties of the specified table column </s>
funcom_train/3815031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpAscii(String outputFile) throws IOException { PrintStream ps = new PrintStream(new FileOutputStream(outputFile), true); ps.print(getNumberDataPoints()); ps.print(' '); for (float[] feature : allFeatures) { for (float val : feature) { ps.print(val); ps.print(' '); } } ps.close(); } COM: <s> dumps the feature to the given ascii output file </s>
funcom_train/47561455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attack(Simulation sim,Creature parent) { if (scriptInvocable == null) { return; } try { scriptInvocable.invokeFunction("attack", sim,parent); } catch (ScriptException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } } COM: <s> invoke the script function </s>
funcom_train/25705364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCBidentities() { if( CBidentities == null ) { CBidentities = new JComboBox(); for( final LocalIdentity localIdentity : Core.getIdentities().getLocalIdentities() ) { final LocalIdentity id = localIdentity; CBidentities.addItem(id.getUniqueName()); } } return CBidentities; } COM: <s> this method initializes cbidentities </s>
funcom_train/40940974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlayerActivityRecord (AbstractPlayer player, int gameNum, int phaseNum, int resultState) { this.playerId = player.getId(); this.name = player.getName(); this.hand = player.getHand(); this.pot = player.getPot(); this.bankroll = player.getBankroll(); this.gameNum = gameNum; this.phaseNum = phaseNum; this.resultState = resultState; logger.fine(this.toString()); logToFile(); } COM: <s> constructor used to a record a result win lose tie </s>
funcom_train/23014223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUnparented() { // In a nutshell, we try to find a way to root. If getWayUp() throws // a BrokenGalleryTreeException, there's no way up, meaning the tree // is broken for this node and thus it is unparented. Simple! try { getWayUp(); } catch (BrokenGalleryTreeException e) { return true; } return false; } COM: <s> determines whether or not this node is part of an unparented chain </s>
funcom_train/41313619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateAlbum(long rowId, String title) { if ( !validateAlbumTitle(title) ) return false; ContentValues args = new ContentValues(); args.put(ALBUM_KEY_TITLE, title); return mDb.update(ALBUM_DATABASE_TABLE, args, ALBUM_KEY_ROWID + "=" + rowId, null) > 0; } COM: <s> rename album to given title </s>
funcom_train/51296362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean caIsUsed(int idCa) { ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect( "SELECT * FROM ca_in_supplier_price_list WHERE ca_id=" + idCa); return res.next(); // got external links } catch (Exception e) { e.printStackTrace(); } finally { DBAccessor.getInstance().releaseConnection(res); } return false; } COM: <s> check for links to role present from pricelists </s>
funcom_train/44616949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ICacheEnumeration keysAndValues() { return new ICacheEnumeration() { Enumeration values = LRUCache.this.entryTable.elements(); LRUCacheEntry entry; public boolean hasMoreElements() { return this.values.hasMoreElements(); } public Object nextElement() { this.entry = (LRUCacheEntry) this.values.nextElement(); return this.entry.key; } public Object getValue() { if (this.entry == null) { throw new java.util.NoSuchElementException(); } return this.entry.value; } }; } COM: <s> returns an enumeration that iterates over all the keys and values </s>
funcom_train/42765423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDiffMarkedConstrainedLanguageSentence genSentenceAsMissing(ConstrainedLanguageSentenceDTO missingSentence) { IDiffMarkedConstrainedLanguageSentence diffMarkedSVOSentence = genDiffMarkedSentence(missingSentence); String[] words = sentenceToWords.splitSentenceToWords(missingSentence); if (words != null) { for (String word : words) { diffMarkedSVOSentence.addDiffMarkedWord(genDiffMarkedWord(DiffType.MISSING, word)); } } return diffMarkedSVOSentence; } COM: <s> mark all words from sentence as missing </s>
funcom_train/32947861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertionRate( float rate ) throws PropertyVetoException { if ( rate < 0.0 || rate > 1.0 ) { throw new PropertyVetoException( "value must fulfill: 0.0 <= value <= 1.0", new PropertyChangeEvent( this, "insertionRate", new Float( this.insertionRate ), new Float( rate ) ) ); } else { insertionRate = rate; } } COM: <s> sets the insertion rate </s>
funcom_train/2288041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllAccessibleProjects(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); return (m_securityManager.getAllAccessibleProjects(cms.getRequestContext(), orgUnit, includeSubOus)); } COM: <s> returns all accessible projects of the given organizational unit </s>
funcom_train/8989346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DmsDocumentDetail createDocumentDetail(DmsDocumentDetail documentDetail) throws ApplicationException { DmsDocumentDetailDAObject docDetailDAO = new DmsDocumentDetailDAObject(sessionContainer, conn); DmsDocumentDetail docDetail = (DmsDocumentDetail) docDetailDAO.insertObject(documentDetail); docDetailDAO = null; return docDetail; } COM: <s> creates a dms document detail object of user defined field detail </s>
funcom_train/18748259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void testFixed(boolean value) throws IllegalStateException { if (isFixed() != value) { String message; if (value) { message = "Graph condition should be fixed in this state"; } else { message = "Graph condition should not be fixed in this state"; } throw new IllegalStateException(message); } } COM: <s> tests if the condition is fixed or not </s>
funcom_train/9276959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGrantDatabaseMetaDataMethods() throws Exception{ DatabaseMetaData dm = getConnection().getMetaData(); assertFalse("GrantRevoke: DatabaseMetaData.supportsCatalogsInPrivilegeDefinitionSupport", dm.supportsCatalogsInPrivilegeDefinitions()); assertTrue("GrantRevoke: DatabaseMetaData.supportsSchemasInPrivilegeDefinitions", dm.supportsSchemasInPrivilegeDefinitions()); } COM: <s> test grant revoke related database meta data methods </s>
funcom_train/48521234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CustomerFacade getCustomerFacade(HttpSession session) { ServletContext context = session.getServletContext(); CustomerFacade CustomerFacade = null; if (context.getAttribute(AdventureKeys.CUSTOMER_FACADE) != null) { CustomerFacade = (CustomerFacade) context .getAttribute(AdventureKeys.CUSTOMER_FACADE); } else { CustomerFacade = new CustomerFacade(); context.setAttribute(AdventureKeys.CUSTOMER_FACADE, CustomerFacade); } return CustomerFacade; } COM: <s> keep only one copy of the customer facade around in the context to </s>
funcom_train/23713156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sameState(StateMachine curfsm) { if (curfsm.performExitIsDone) { if (curfsm.getScheduler().isTraceOn()) { curfsm.trace .traceWarning("Method sameState() is not allowed to be called, when performExit() is already called"); } } else { curfsm.sameStateIsDone = true; curfsm.nextState = null; } } COM: <s> remain in the same state of the state machine </s>
funcom_train/21753677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addObjectSpecification(Map objects, String key, ObjectSpecification spec) { if (!objects.containsKey(key)) { // key doesn't exist, create a new ArrayList and add it. objects.put(key, new ArrayList()); } // add the object to the corresponding ArrayList. ((List) objects.get(key)).add(spec); } COM: <s> add code object specification code object to the map </s>
funcom_train/34347505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendSipMessage(String contactURI, String body) { try { URI realURI = findLocalTarget(addressFactory.createAddress( contactURI).getURI()); Address contactAddress = addressFactory.createAddress(realURI); ContactHeader contactHeader = headerFactory .createContactHeader(contactAddress); sendSipMessage(contactHeader, body); } catch (SipSendErrorResponseException e) { logger.error(e); } catch (ParseException e) { logger.error(e); } } COM: <s> public access method for sending message </s>
funcom_train/443266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean requestQuit() { if (!finishQuiz()) { return false; } if (!_model.isDataModified()) { return true; } int result = GUIUtils.showSaveDiscardCancelDialog(_main_frame, "save_changes"); if (result == JOptionPane.YES_OPTION) { if (save()) { return true; } } else if (result == JOptionPane.NO_OPTION) { return true; } return false; } COM: <s> tests whether the application can safely be terminated </s>
funcom_train/7520474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(boolean[] remove) { if (remove.length != view.length) throw new IllegalArgumentException("different sizes"); int i,j,size; size=0; for(i=0 ; i < remove.length ; i++) { if (!remove[i]) size++; } Endpt[] new_view=new Endpt[size]; SocketAddress[] new_addrs=new SocketAddress[size]; j=0; for(i=0 ; i < remove.length ; i++) { if (!remove[i]) { new_view[j]=view[i]; new_addrs[j]=addresses[i]; j++; } } view=new_view; addresses=new_addrs; if (new_view.length > 0) id.coord=new_view[0]; } COM: <s> removes the indicated members from the current view state </s>
funcom_train/19051936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in, Object desc) throws IOException { if (desc instanceof WWEHTMLDocument) { WWEHTMLDocument hdoc = (WWEHTMLDocument) desc; setDocument(hdoc); read(in, hdoc); } else { String charset = (String) getClientProperty("charset"); Reader r = (charset != null) ? new InputStreamReader(in, charset) : new InputStreamReader(in); super.read(r, desc); } } COM: <s> this method initializes from a stream </s>
funcom_train/26598293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setBytes(_DatabaseUser user,long pos, byte[] bytes) throws DException { initialize(); if(pos > lengthOfBlob) throw new DException("DSE939", new Object[]{new Long(pos),new Integer(lengthOfBlob)}); updateBlobClob(user,(int)pos,bytes); return bytes.length; } COM: <s> update bytes from given position </s>
funcom_train/23354398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean propagatesStatus(Reaction workingCopy){ boolean propagatesStatus = false; Reaction backup = backupCopies.get(workingCopy.getId()); switch (workingCopy.getStatus()){ case OK: propagatesStatus = !workingCopy.getStatus().equals(backup.getStatus()) && (workingCopy.getDirection().equals(Direction.UN) || workingCopy.getDirection().equals(Direction.BI)); break; case OB: propagatesStatus = !workingCopy.getStatus().equals(backup.getStatus()) && (workingCopy.getDirection().equals(Direction.LR) || workingCopy.getDirection().equals(Direction.RL)); break; } return propagatesStatus; } COM: <s> is the changing status of a working copy being propagated </s>
funcom_train/43471601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float generateAngle() { switch ( angleType ) { case ANYWAY: return (float)( Math.random() * PI - HALF_PI ); case HORIZONTAL: return 0f; case MOSTLY_HORIZONTAL: if ( Math.random() < 0.75 ) return 0f; else return -HALF_PI; case HALF_AND_HALF: if ( Math.random() < 0.5 ) return 0f; else return -HALF_PI; case MOSTLY_VERTICAL: if ( Math.random() < 0.25 ) return 0f; else return -HALF_PI; case VERTICAL: return -HALF_PI; } return 0f; } COM: <s> generates a word angle depending on the current angle type </s>
funcom_train/12782924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInit7() throws Exception { ClassLoader parent = getClass().getClassLoader(); IRunConfigData config = new RunConfigData(); config.setTargetClasspath("/foo/bar/"); testObj = new InstrumentingClassLoader(parent, config); String expected = "/foo/bar/" + File.pathSeparator + IRunConfigData.DEFAULT_CLASSPATH; assertEquals(createURLs(expected), testObj.getClasspath().getClasspath()); assertEquals(createURLs("/foo/bar/"), testObj.getTargetClasspath()); } COM: <s> classpath not set target classpath set </s>
funcom_train/4135837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVolumePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProceedingsBibTexEntry_volume_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProceedingsBibTexEntry_volume_feature", "_UI_ProceedingsBibTexEntry_type"), BibtexPackage.Literals.PROCEEDINGS_BIB_TEX_ENTRY__VOLUME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the volume feature </s>
funcom_train/23297227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(PrintWriter out, Phylogeny phylo, boolean printLengths, boolean printInternalLabels, boolean nhx) { Element node = phylo.getRootClade(); this.print(out, phylo, node, printLengths, printInternalLabels, nhx); } COM: <s> prints out a </s>
funcom_train/31057350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spoke createStoppedSpoke() { float r = (Global.random.nextFloat() * (Spoke.maxR - Spoke.minR) + Spoke.minR); float theta = (float)((Global.random.nextFloat()) * Math.PI * 2); return createSpoke(r, theta, 0, 0); } COM: <s> create a spoke with random position but no motion </s>
funcom_train/4853444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submit (Link link) { markVisited (link); // FIX: need atomic test-and-set of visited flag sendLinkEvent (link, LinkEvent.QUEUED); synchronized (crawlQueue) { synchronized (fetchQueue) { crawlQueue.put (link); ++numPagesLeft; fetchQueue.put (link); fetchQueue.notifyAll (); // wake up worms } } } COM: <s> puts a link into the crawling queue </s>
funcom_train/37042127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(Order ask, Order bid, double transactionPrice) { assert ask.getQuantity() == bid.getQuantity(); assert transactionPrice >= ask.getPrice(); assert transactionPrice <= bid.getPrice(); lastTransactionPrice = transactionPrice; clear(ask, bid, transactionPrice, transactionPrice, ask.getQuantity()); } COM: <s> match a buy order with a sell order at the specified price </s>
funcom_train/2940208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String capitalizeFirstLetter (String name) { if (name==null || name.length()==0) { return ""; } String result = name.substring(0,1).toUpperCase(); if (name.length()>1) { result += name.substring(1); } return result; } COM: <s> converts the first letter of a string to upper case </s>
funcom_train/46337018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getMember() { final String methodName = "getMember()"; logger.entering(CLASS_NAME, methodName); Object member = memberWrapper.getValue(); logger.logp(Level.FINEST, CLASS_NAME, methodName, "groupName={0}, member={1}", new Object[] {name, member}); if (member == null) { removeAllMembers(); } return member; } COM: <s> returns the member of this group </s>
funcom_train/48497684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchSupportTeam (boolean switchOnOff, int product, int type) { String sql = ""; if (type == 1) sql = switchFirstLineSupportSQL; else if (type == 2) sql = switchSecondLineSupportSQL; new UpdateSupportQuery (super.getDataSource(), sql, type).update(new Object[] { new Boolean(switchOnOff), new Integer (product) }); } COM: <s> switch on off a products support team </s>
funcom_train/43245527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSpEmpCity() { System.out.println("setSpEmpCity"); String spEmpCity = ""; EmploymentDataDG2Object instance = new EmploymentDataDG2Object(); instance.setSpEmpCity(spEmpCity); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set sp emp city method of class org </s>
funcom_train/48463428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyPreferedTheme() { String className = getPreferedLookAndFeel(); if (VistaBlueTheme.class.getName().equals(className)) { switchToVistaBlueTheme(); return; } if (MetalLookAndFeel.class.getName().equals(className)) { switchToClassicMetalTheme(); return; } // Then, uses basic theme switchToBasicTheme(className); } COM: <s> applies prefered theme </s>
funcom_train/49158719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onKick(final String chan, final User u, final String nickPass, String msg) { String message = msg; if (StringUtils.isBlank(message)) { message = u.getNick(); } notifyGUI(chan, "← " + u.getNick() + " kicked " + nickPass + " (" + message + ")"); } COM: <s> announce a user was kicked from the channel </s>
funcom_train/19418511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(final ActionServlet actionServlet, final ModuleConfig moduleConfig) throws ServletException { super.init(actionServlet, moduleConfig); // Wrap the Definition Factory definitionFactory = new DefinitionsFactoryWrapper(definitionFactory); actionServlet.getServletContext().setAttribute(TilesUtilImpl.DEFINITIONS_FACTORY, definitionFactory); } COM: <s> calls code super </s>
funcom_train/40623744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scrollTables(boolean baseHeader) { if (scrollPolicy == ScrollPolicy.DISABLED) { return; } if (lastScrollLeft >= 0) { headerWrapper.setScrollLeft(lastScrollLeft); if (baseHeader) { dataWrapper.setScrollLeft(lastScrollLeft); } if (footerWrapper != null) { footerWrapper.setScrollLeft(lastScrollLeft); } } } COM: <s> sets the scroll property of the header and footers wrappers when scrolling </s>
funcom_train/2023995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String initInsert(String sql, Data d) { sql = addColumn(sql, (new Integer(d.getID())).toString()); // parent? => link to other table if (d.getParent() != null) sql = addColumn(sql, (new Integer(d.getParent().getID())).toString()); return sql; } COM: <s> adds some necessary columns to the insert statement </s>
funcom_train/33233743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSaveExamResultC() { if (saveExamResultC == null) {//GEN-END:|101-getter|0|101-preInit // write pre-init user code here saveExamResultC = new Command("Save", Command.ITEM, 0);//GEN-LINE:|101-getter|1|101-postInit // write post-init user code here }//GEN-BEGIN:|101-getter|2| return saveExamResultC; } COM: <s> returns an initiliazed instance of save exam result c component </s>
funcom_train/6266981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Contact getMyContactHeader() { if (this.isServer()) { SIPServerTransaction st = (SIPServerTransaction) this .getFirstTransaction(); SIPResponse response = st.getLastResponse(); return response != null ? response.getContactHeader() : null; } else { SIPClientTransaction ct = (SIPClientTransaction) this .getFirstTransaction(); SIPRequest sipRequest = ct.getOriginalRequest(); return sipRequest.getContactHeader(); } } COM: <s> get the contact header that the owner of this dialog assigned </s>
funcom_train/20882714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(PrintWriter out, int pad, String title) { String itemName = title + ":" + toString(); getFeatures().dump(out, pad, itemName); if (hasDaughters()) { Item daughter = getDaughter(); while (daughter != null) { daughter.dump(out, pad + 8, "d"); daughter = daughter.next; } } } COM: <s> dumps out this item to the given output stream </s>
funcom_train/16769388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPath(String path) { Resource rootFile = resources.getResource(path); try { rootDir = rootFile.getFile().getAbsolutePath(); log.debug("Root dir: {} path: {}", rootDir, path); this.path = path; } catch (IOException err) { log.error("I/O exception thrown when setting file path to " + path); throw (new RuntimeException(err)); } } COM: <s> setter for file path </s>
funcom_train/3115169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponentBackground(SatinGraphics graphics) { //// Clear the entire area. Clearing the entire area //// and then redrawing is not as expensive an operation //// as it may seem, since what is rendered is automatically sent //// to a double buffer and clipped to the dirty region. graphics.setBackground(getBackground()); graphics.clearRect(0, 0, getWidth(), getHeight()); graphics.setTransparency(1); } COM: <s> paint the background </s>
funcom_train/13812601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isPossiblyReferencedBy(Machine machine) throws MachineException { boolean returnVal = true; // first check if 'machine' param is submachine of LCA machine if (lcaMachineReference != null) { returnVal = lcaMachineReference.code.isSubmachineOf(machine.code); if (returnVal == false) { returnVal = machine.code.isSubmachineOf(lcaMachineReference.code); } } return returnVal; } COM: <s> used in machine </s>
funcom_train/10873885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRange(final int min, final int max, final int shift) { final BytesRef minBytes = new BytesRef(BUF_SIZE_INT), maxBytes = new BytesRef(BUF_SIZE_INT); intToPrefixCoded(min, shift, minBytes); intToPrefixCoded(max, shift, maxBytes); addRange(minBytes, maxBytes); } COM: <s> overwrite this method if you like to receive the raw int range bounds </s>
funcom_train/34451228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_PlacesToIncarnations_key_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_PlacesToIncarnations_key_feature", "_UI_PlacesToIncarnations_type"), RuntimePackage.Literals.PLACES_TO_INCARNATIONS__KEY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the key feature </s>
funcom_train/25500841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteAttribute(Attribute a) { if (!removeAttribute(a)) { return false; // removal failed } // if the attribute was found, remove it from the master list attributeList.remove(a); // delete it from all individuals String name = a.getName(); for (Individual x : individualMap.values()) { x.delete(name); } return true; } COM: <s> removes an attribute from the project </s>
funcom_train/40500159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testModuleWithArguments() { ModuleSnippet<SampleModuleScenario.ModuleWithArguments> module = new ModuleSnippet<SampleModuleScenario.ModuleWithArguments>( SampleModuleScenario.ModuleWithArguments.class.getName()); assertFalse(module.hasDefaultConstructor()); assertTrue(module.getConstructors().size() == 1); } COM: <s> test that creating a representation of a module with no default constructor </s>
funcom_train/12075513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openMenuInCentre() { //menuItems.workoutSize(); // what out what the needed size is //scroll.setPreferredSize(menuItems.getWidth(), menuItems.getHeight()); popup.pack(); popup.setLocationRelativeTo(null); // TODO, make sure it does not go over the edges // should be only 1 place that does this, optionpane already does this openMenuAtLocation(); } COM: <s> there is no method for this in swing swing uses </s>
funcom_train/22234978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeSharedGroup( DataOutput out, SharedGroup sharedGroup, SymbolTableData symbol ) throws IOException { SceneGraphObjectState state = createState( sharedGroup, symbol ); symbolTable.startUnsavedNodeComponentFrame(); writeObject( out, state ); writeNodeComponents( out ); symbolTable.endUnsavedNodeComponentFrame(); } COM: <s> write the shared group and its node components to the io stream </s>
funcom_train/21633101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPlatformString(final int param) { final byte[] buffer = new byte[255]; final long[] len = new long[1]; CL.clGetPlatformInfo(this.platform, param, buffer.length, Pointer .to(buffer), len); final String name = new String(buffer, 0, (int) len[0]); return name; } COM: <s> get a config string from the platform </s>
funcom_train/17130850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConsistency() { String key = "123-0912-09e[ss2"; String in = "0sad8uawplnc;soucgy[q0248yrhq2p4ia'dspichas['08fahysd"; String out = cipherService.encrypt(key, in); Assert.assertTrue(!in.equals(out)); Assert.assertEquals(in, cipherService.decrypt(key, out)); } COM: <s> test that decrypting an encrypted text yields the original </s>
funcom_train/25134325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValuedOfSequence(char esc) { if (esc == StringConstants.BACKCOLOR) { return true; } else if (esc == StringConstants.FONT) { return true; } else if (esc == StringConstants.FORECOLOR) { return true; } else if (esc == StringConstants.REPEAT_B) { return true; } else { return false; } } COM: <s> return true if this escape sequence is valued </s>
funcom_train/11772020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJListAnimals() { if (jListAnimals == null) { // recuperation de la liste des noms jListAnimals = new JList(AnimalImagesRepository.getInstance().getNames()); jListAnimals.setFont(GuiFont.FONT_PLAIN); jListAnimals.setCellRenderer(new ImageCellRenderer()); } return jListAnimals; } COM: <s> this method initializes j list animals </s>
funcom_train/40091939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void failureLogin(String facilityName) { // Process the failure of login LoginInfoPanel infoPanel = loginPanel.getFacilityLoginInfoPanel(facilityName); infoPanel.successLogout(); loginWidget.show(); // Show an error message. showErrorDialog("Error logging in, Please check username and password"); } COM: <s> this method is invoked for the failure to login to facility service </s>
funcom_train/37646163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendPush(RemoteFileDesc file) { PushRequest pr=new PushRequest(GUID.makeGuid(), SettingsManager.instance().getTTL(), file.getClientGUID(), file.getIndex(), acceptor.getAddress(), acceptor.getPort()); try { router.sendPushRequest(pr); } catch (IOException e) { return false; } return true; } COM: <s> sends a push request for the given file </s>
funcom_train/46837272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJListReports() { if (jListReports == null) { jListReports = new JList(model); jListReports.registerKeyboardAction(new ActionListener(){ public void actionPerformed(ActionEvent ev) { createReport(); } },KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),JComponent.WHEN_FOCUSED); } return jListReports; } COM: <s> this method initializes j list reports </s>
funcom_train/50869208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSubscriptions(EventBrokerListener<T> listener) { for (Iterator<EventSubscription<T>> iterator = subscriptions.iterator(); iterator.hasNext();) { EventSubscription<T> subscription = iterator.next(); if (subscription.getListener().equals(listener)) { this.subscriptionQueue.add(new SubscriptionRemovalEvent(subscription)); } } processEvents(); } COM: <s> removes all subscriptions the listener has </s>
funcom_train/32791088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parameterizeTransformationEngine() { TransformationEngine te = TransformationEngine.getInstance(); Collection<TParameter> parameters = te.getRequiredParameters(); if (parameters != null) { for (TParameter parameter : parameters) { String selectedOption = parameterKey2optionPanel.get(parameter.getKey()).getSelectedOption(); te.setConfigurationParameter(parameter.getKey(), selectedOption); } } } COM: <s> maps gui options to transformation engine parameter settings </s>
funcom_train/46056430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { addFormElement("heading1", new TitleElement("form.password.enter.new")); addFormElement(PASSWORD_NEW1, new PasswordElement("form.password.new1", 255)); getPasswordElement(PASSWORD_NEW1).setMandatory(true); addFormElement(PASSWORD_NEW2, new PasswordElement("form.password.new2", 255)); getPasswordElement(PASSWORD_NEW2).setMandatory(true); addSubmitKey("submit.speichernUndpwchange","submit.speichernUndpwchange"); setCancelKey("submit.cancel"); } COM: <s> preferences form definition </s>
funcom_train/24539163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeControlExtension(ControlManagerExtension controlExtension, IExpression expression) { if (extensions != null) { if (extensions.remove(controlExtension)) { if (controlManagerProxy != null && controlManagerProxy.isBeanProxy() && ((IBeanProxy) controlManagerProxy).isValid()) { removeExtensionProxy(controlExtension, expression); } controlExtension.disposed(expression); } } } COM: <s> remove a control manager extension </s>
funcom_train/31438277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setZoom(double pZoom) { if (pZoom != mCurrZoomLevel) { final Double oldZoom = new Double(mCurrZoomLevel); mCurrZoomLevel = pZoom; render(); firePropertyChange(ZOOM_PROPERTY, oldZoom, new Double(pZoom)); } } COM: <s> sets the current zoom level or scaling factor </s>
funcom_train/20740549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String submit() { try { try { m_securityService.saveUser(m_user); } catch (Exception ex) { logger.error("Cannot register user", ex); addErrorMessage("Cannot register user", ex.getMessage()); return null; } return "wiki"; } finally { // generate new secure text // generateCaptcha(); } } COM: <s> performs submit action </s>
funcom_train/9702386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableJetemplate(boolean enable) { if (!enable){ // remove message messageQueue.remove(JETEMPLATE_KEY); } lblJetemplate.setVisible(enable); cmbJetemplate.setVisible(enable); if (enable){ String[] itmes = cmbJetemplate.getItems(); String jetTemplate = helper.getJetemplateName(); for (int i = 0; i < itmes.length; i++) { if (itmes[i].endsWith(jetTemplate)){ cmbJetemplate.select(i); jetemplatePluginID=cmbJetemplate.getItem(i); break; } } } } COM: <s> enable the jetemplate controls </s>
funcom_train/25249927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File addPatientDirectory(File parent, Dataset ds) { String patientName = ds.getString(Tags.PatientName, "X^X"); String patientBirthDate = ds.getString(Tags.PatientBirthDate, "19990101"); return new File(parent, patientName + "_" + patientBirthDate); } COM: <s> adds a subdirectory to a given path </s>
funcom_train/44534006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prepareFilesMap(List typeFilesList) { for (Iterator iter = typeFilesList.iterator(); iter.hasNext();) { String fullPath = (String) iter.next(); File fullPathFile = new File(fullPath); String fileName = fullPathFile.getName(); int extensionIndex = fileName.lastIndexOf(InvictaConstants.DEFINITION_FILE_EXTENSION); String typeName = fileName.substring(0, extensionIndex); this.typeFiles.put(typeName, fullPath); } } COM: <s> goes over the list of files and prepares a map between type </s>
funcom_train/46321916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(float speed, int hitRange, boolean canComplete) { if ( hitRange < 1 ) hitRange = 1; ((NumberProperty)properties().get("Speed")).set(speed); ((NumberProperty)properties().get("hitRange")).set(hitRange); ((BooleanProperty)properties().get("CanComplete")).set(canComplete); } COM: <s> set function to change the speed hit range and can complete variables </s>
funcom_train/7647972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() { hm = new LinkedHashMap(); for (int i = 0; i < objArray.length; i++) hm.put(objArray2[i], objArray[i]); hm.put("test", null); hm.put(null, "test"); } COM: <s> sets up the fixture for example open a network connection </s>
funcom_train/27909911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(String xml) throws ParseException { MiniXMLParser parser = new MiniXMLParser(xml, true); _rootUI.setSearchPath(AbstractPlugin.decodeXML( parser.getAttribute(getUnixName(), "location"))); _rootUI.setRecursive(AbstractPlugin.decodeXMLBoolean( parser.getAttribute(getUnixName(), "recursive"))); } COM: <s> sets the configuration of the plug in based on the contents of the </s>
funcom_train/5346220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isObfuscatedGeneralSearch(final String queryString) { final String unacceptable = "*.- "; for (int i = 0; i < queryString.length(); i++) // if a character is not one of the unacceptable strings, the query // is ok. if (unacceptable.indexOf(queryString.charAt(i)) == -1) return false; return true; } COM: <s> to combat system wide gnutella overflow this method checks for </s>
funcom_train/28544788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateRequiredPartsAreProvided() { BaseValidatedParsedSentence sentence = getSentenceToValidate(); Collection<RabbitFeatureType> availableFeatures = // sentence.getSentenceType().getAvailableFeatures(); for (RabbitFeatureType featureType : availableFeatures) { if (!sentence.isOptionalFeature(featureType)) { if (sentence.getParsedPart(featureType) == null) { addSentenceError("Required feature " + featureType + " is missing."); } } } } COM: <s> validates whether all required features in a sentence are provided </s>
funcom_train/31947708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(EPod.class)) { case SailuserdataPackage.EPOD__POD_UUID: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case SailuserdataPackage.EPOD__RIMS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } COM: <s> this handles model notifications by calling </s>
funcom_train/12192593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMaxCountNotSet() throws Exception { CacheBuilder builder = new CacheBuilderImpl(); try { builder.buildCache(); fail("Did not detect maxCount was not set."); } catch (IllegalStateException expected) { assertEquals("maxCount must be set", expected.getMessage()); } } COM: <s> ensure that max count must be set </s>
funcom_train/23341785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getFindPanel() { if (findPanel == null) { findPanel = new JPanel(); findPanel.setLayout(new BoxLayout(getFindPanel(), BoxLayout.X_AXIS)); findPanel.add(findLabel, null); findPanel.add(DialogStyles.makeSpacer()); findPanel.add(getFindTextField(), null); } return findPanel; } COM: <s> this method initializes find panel </s>
funcom_train/8177083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(GraphModel newModel) { GraphModel oldModel = graphModel; graphModel = newModel; clearOffscreen(); firePropertyChange(GRAPH_MODEL_PROPERTY, oldModel, graphModel); // FIX: Use Listener if (graphLayoutCache != null && graphLayoutCache.getModel() != graphModel) graphLayoutCache.setModel(graphModel); clearSelection(); invalidate(); } COM: <s> sets the code graph model code that will provide the data </s>
funcom_train/934902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayParameters(Graphics g, int x, int y, int width, int height) { this.g = g; this.leftEdge = x; this.topEdge = y; this.displayWidth = width; this.displayHeight = height; this.displayOrigoHorizontal = x + (width + 1) / 2; this.displayOrigoVertical = y + (height + 1) / 2; recalculateVisibility(); } COM: <s> where should the universe be rendered on the next call to render </s>
funcom_train/29403474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubdiagramPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ValueChain_Subdiagram_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ValueChain_Subdiagram_feature", "_UI_ValueChain_type"), VcPackage.Literals.VALUE_CHAIN__SUBDIAGRAM, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the subdiagram feature </s>
funcom_train/38532287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFreeFormFirst() { String text; int index; text = getText().trim(); index = text.indexOf(' '); if ( index > -1 ) { text = text.substring(0, index); } if ( text.endsWith(";") ) { text = text.substring(0, text.length() - 1); } return text; } COM: <s> returns the first free form keyword </s>
funcom_train/41578886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void noteOn() { currentSample = 0; decayEnd = attack + decay; if (attack == 0) { attackSlope = 1; } else { attackSlope = (max - min) / attack; } if (decay == 0) { decaySlope = 1; } else { decaySlope = (max - sustain) / decay; } state = State.ATTACK; } COM: <s> invoked when the note is pressed </s>
funcom_train/50846942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUnicodeStream() throws Exception { testGetXXX("getUnicodeStream"); ResultSet rs = this.newFOROJdbcResultSet(); rs.next(); rs.close(); try { rs.getUnicodeStream(1); fail("Allowed getUnicodeStream after close()"); } catch (SQLException ex) { assertEquals( "error code", ex.getErrorCode(), -ErrorCode.X_24501); } } COM: <s> test of get unicode stream method of interface java </s>
funcom_train/11111846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ignoreError(final Process process) { new Thread() { public void run() { InputStream error = process.getErrorStream(); try { IOUtils.copy(error, new NullOutputStream()); } catch (IOException e) { } finally { IOUtils.closeQuietly(error); } } }.start(); } COM: <s> starts a thread that reads and discards the contents of the </s>
funcom_train/44823541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals (Object other) { if (other instanceof NamedStringValue) { NamedStringValue o = (NamedStringValue) other; return StringUtils.equalStrings(name, o.getName()) && StringUtils.equalStrings(value, o.getValue()); } return false; } COM: <s> equals method overridden to compare the two values </s>