__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4262624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateProjectListStore() { GWT.log("ProjectManager.updateProjectListStore", null); listProjects(new CallbackAdapter<List<Project>>() { public void onSuccess(List<Project> result) { GWT.log("ProjectManager.updateProjectListStore: store updated: " + result, null); getProjectListStore().setList(result); } }); } COM: <s> updates the reviz project store </s>
funcom_train/38527611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseGtrid(byte[] gtrid) { ByteBuffer bb = ByteBuffer.wrap(gtrid); byte[] chars = new byte[TXMGRID_LEN]; bb.get(chars, 0, TXMGRID_LEN); txmgrId = new String(chars).trim(); txmgrBirthTime = bb.getLong(); myBirthTime = bb.getLong(); id = bb.getLong(); } COM: <s> parse a global transaction identifier </s>
funcom_train/45598307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveDown() { try { //Swaps currently selected, and one below int i = jlist.getSelectedIndex(); Collections.swap(list, i, ++i); jlist.setSelectedIndex(i); } catch (java.lang.IndexOutOfBoundsException e) { } } COM: <s> moves currently selected element up </s>
funcom_train/45623646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOptionStrictTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VbcType_optionStrictType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VbcType_optionStrictType_feature", "_UI_VbcType_type"), MSBPackage.eINSTANCE.getVbcType_OptionStrictType(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the option strict type feature </s>
funcom_train/25391444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractMessage constructPacket(Message m){ AbstractMessage newPacket = new AbstractMessage(); List<Field> lst = m.getField(); for(int i=0; i< lst.size(); i++){ writeField(newPacket, lst.get(i)); } newPacket.MessageName = m.getName(); return newPacket; } COM: <s> construct the data representation as required by the generic composer </s>
funcom_train/10224666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(Song t) { if (t != null) { LOG.debug("Setting source code to '" + t.getSourceCode() + "'"); this.song = t; code.setText(t.getSourceCode()); updateView(); } else { song = new Song(); } dirty = false; } COM: <s> sets the model as the starting point for editing </s>
funcom_train/3632072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void engage(int value) { // load modifier String fs = Promotion.getByClass(this.getClass().getName()); Vector v = Application.dbConnection().fetch(new Promotion(), fs); if (v.size() > 0) { // just get first promotion = (Promotion) v.elementAt(0); // register itself in Ej context().currEj().addEjEventListener(this); } applied = false; } COM: <s> load promotion by class name and adds itself </s>
funcom_train/44452227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCall(ActionEvent event) { CallBean call = new CallBean(); call.setRule(this); addCall(call); currElement = call; Util.getChangeLogger().logChange(new Change(Change.ChangeType.CALL_ADD, null, call, this)); } COM: <s> action listener method for adding calls </s>
funcom_train/11317410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Handler createHandler() { ServletContextHandler servletContext = new ServletContextHandler(ServletContextHandler.SESSIONS); servletContext.setContextPath(contextPath); XmppWebSocketServlet wsServlet = new XmppWebSocketServlet(serverRuntimeContext); servletContext.addServlet(new ServletHolder(wsServlet), "/ws"); return servletContext; } COM: <s> create handler for xmpp over websockets </s>
funcom_train/39569840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void routeMsg(Id key, Message msg, Credentials cred, SendOptions opt) { if (Log.ifp(8)) System.out.println("[" + thePastryNode + "] routemsg " + msg + " to " + key); RouteMessage rm = new RouteMessage(key, msg, cred, opt, getAddress()); thePastryNode.receiveMessage(rm); } COM: <s> routes a message to the live node d with node id numerically </s>
funcom_train/45809840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setItemIdentifiers(TMObjectIF object, Collection<LocatorIF> iids) { if (iids != null) { for (LocatorIF iid : iids) { TMObjectIF obj = tm.getObjectByItemIdentifier(iid); if (obj != null) { } else { object.addItemIdentifier(iid); } } } } COM: <s> internal assigns the collection of item identifiers to a topic map </s>
funcom_train/7427004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(final Collection items) { boolean changes = false; final Iterator itemIt = items.iterator(); while (itemIt.hasNext()) { final PNode node = (PNode) itemIt.next(); changes |= internalSelect(node); } if (changes) { postSelectionChanged(); } } COM: <s> marks all items as selected </s>
funcom_train/20897674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestProteinUtils (String name){ super(name); // initialize the scripts folder by reading the scripts directory from the // configuration properties file scriptsDir = AppConfig.getInstance().getProperty("scriptsfolder"); if (System.getProperty("panda.test.props.dir") != null) { testPropsDir = System.getProperty("panda.test.props.dir") + "org/tigr/panda/dataextract/ProteinUtils/"; } // end of if () } COM: <s> creates a new code test protein utils code instance </s>
funcom_train/33398887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getInfoTextPane() { if (infoTextPane == null) { infoTextPane = new JTextPane(); infoTextPane .setText("<html><body><center>Artist - Album - Title</center></body></html>"); infoTextPane.setContentType("text/html"); infoTextPane.setOpaque(false); infoTextPane.setFont(new Font("Arial", Font.PLAIN, 13)); infoTextPane.setEditable(false); } return infoTextPane; } COM: <s> this method initializes info text pane </s>
funcom_train/31454631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FTPFile getFTPFile(String path) throws RemoteStorageException { try { FTPFile[] file = this.ftpResource.listFiles(path); if ((file != null) && (file.length > 0)) { return file[0]; } else { throw new RemoteStorageException( "Failed to retrieve the requested information. Please make sure the path exists."); } } catch (IOException ioe) { throw new RemoteStorageException(ioe); } } COM: <s> tries to return an ftpfile object </s>
funcom_train/21990257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRootDir(String rootDir) throws DonorServiceException{ fileSystem.setRootDir(rootDir); File index = new File(rootDir, "index"); fileSystem.createDirectory(index); logInfo("Set the index directory to: " + index.getAbsolutePath()); indexer.setIndexDir(index); } COM: <s> sets the directory where the files for this service are stored </s>
funcom_train/10197543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Collection flattenCollection(Collection collection) { if (flatten) { for (Iterator iterator = collection.iterator(); iterator.hasNext();) { Object obj = iterator.next(); if (obj instanceof AbstractPersistentObject) { flattenPersistent(((AbstractPersistentObject) obj)); } } } return collection; } COM: <s> optionally flattens collection of abstract persistent object instances </s>
funcom_train/50531801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void guiPolyChanged() { BigInteger poly = BigIntegerTools.decode(this.dlgPoly.lblHexValue.getText()); int bitWidth = this.getGuiBitWidth(); // Strip hi register bit. poly = poly.clearBit(bitWidth); BitSet bits = BitSetConverter.toBitSet(poly); this.updateFromBitSet(bits); this.adjustBitPane(bitWidth); } COM: <s> this helper method is responsible for ensuring that the appropriate </s>
funcom_train/6477241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceVariableWith(FOS f, FOS f1) { for(int i=0; i<numArguments(); i++) { FOS e = this.argAt(i); if(e.isSameAs(f)) {this.atArgPut(i,f1);} if(e.isComposite() && e.containsVariable(f)) {e.replaceVariableWith(f,f1);} } } COM: <s> replaces formula f with formula f1 in this </s>
funcom_train/36177674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PetstoreCart checkout(PetstoreCart cart, Map<String,String> answers) { PetstoreCart newCart = null; for (;;) { newCart = _checkout(cart); if (newCart.isInProgress()) { String question = newCart.getQuestion(); String answer = prompt(question, answers); newCart.getAnswers().put(question, answer); } else { break; } } return newCart; } COM: <s> overloaded version for testing </s>
funcom_train/39062991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeItem() { if (selectedItem == rootItem) return; TreeItem parent = selectedItem.getParentItem(); SectionMarkerNote selectedNote = (SectionMarkerNote)selectedItem.getData(); IMarkerNote parentNote = (IMarkerNote)parent.getData(); parentNote.removeChild(selectedNote); TreeItem[] selection = {parent}; schemeTree.setSelection(selection); selectedItem.dispose(); selectedItem = parent; } COM: <s> removes a selected item from the marking scheme </s>
funcom_train/21608599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Measurement normalizeTrack(Measurement track) { double value = track.getValue(); if ((0.0D <= value) && (value < TRACK_RANGE)) { return track; /* value is already normalized */ } value %= TRACK_RANGE; if (value < 0.0D) { value += TRACK_RANGE; } return new Measurement(value, track.getError(), track.getUnit(), track .getTime()); } COM: <s> normalize track to be a value such that 0 value 2 pi </s>
funcom_train/12547129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List stepBlock(TMConfiguration config){ EDebug.print("Inside StepBlock"); while (((TuringMachine)(config = (TMConfiguration) stepConfiguration(config).get(0)).getCurrentState().getAutomaton()).getParent() != null); return Arrays.asList(config); } COM: <s> simulates stepping by building blocks top level building blocks </s>
funcom_train/33847252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuxAnalyzepath(Path src) { boolean nonEmpty = false; String[] elementList = src.list(); for (String anElementList : elementList) { if (!anElementList.equals("")) { nonEmpty = true; break; } } if (nonEmpty) { if (auxAnalyzepath == null) { auxAnalyzepath = src; } else { auxAnalyzepath.append(src); } } } COM: <s> the aux analyzepath to use </s>
funcom_train/4427752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SequentialPattern findHigherOrderPattern(SequentialPattern pattern) { SequentialPattern best = pattern; int maxPatternSize = pattern.size() / 2; for (int i = 2; i < maxPatternSize; i++) { SequentialPattern newPattern = findHigherOrderPattern(pattern, i); if (newPattern.cost() < best.cost()) { best = newPattern; } } return best; } COM: <s> finds a higher order pattern in the given sequential pattern </s>
funcom_train/47184011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OverrideReasonBean getORCode(String code) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM DrugReactionOverrideCodes WHERE Code = ?"); ps.setString(1, code); ResultSet rs = ps.executeQuery(); if (rs.next()) return orcLoader.loadSingle(rs); return null; } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> returns a particular description for a given code </s>
funcom_train/29640895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EventPipe put(String name, EventPipe pipe) { if (pipes.containsKey(name)) { throw new IllegalArgumentException(name + " - name already registered"); } EventPipe ret= pipes.put(name, pipe); logger.info("goes in scope "+pipe+", here we have "+pipes.size()+" pipes now"); return ret; } COM: <s> puts a pipe to the storage </s>
funcom_train/43098416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllClassifierRoles(Object ns) { if (!(ns instanceof MNamespace)) { throw new IllegalArgumentException(); } Iterator it = ((MNamespace) ns).getOwnedElements().iterator(); List list = new ArrayList(); while (it.hasNext()) { Object o = it.next(); if (o instanceof MNamespace) { list.addAll(getAllClassifierRoles(o)); } if (o instanceof MClassifierRole) { list.add(o); } } return list; } COM: <s> returns all classifierroles found in this namespace and in its children </s>
funcom_train/7508431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRoles() throws Exception { System.out.println("getRoles"); Authenticator instance = ESAPI.authenticator(); String accountName = ESAPI.randomizer().getRandomString(8, DefaultEncoder.CHAR_ALPHANUMERICS); String password = ESAPI.authenticator().generateStrongPassword(); String role = ESAPI.randomizer().getRandomString(8, DefaultEncoder.CHAR_LOWERS); User user = instance.createUser(accountName, password, password); user.addRole(role); Set roles = user.getRoles(); assertTrue(roles.size() > 0); } COM: <s> test of get roles method of class org </s>
funcom_train/20675366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void limit(final double x1, final double y1, final double x2, final double y2) { clip[0] = Math.max(clip[0], x1); clip[1] = Math.max(clip[1], y1); clip[6] = Math.min(clip[6], x2); clip[7] = Math.min(clip[7], y2); } COM: <s> limit the clip such that it fits within the specified region </s>
funcom_train/15522715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllKeyWords(String[] ids) throws BusinessException { org.hibernate.Transaction transaction = super.begin(KeyWordFactory .getInstance()); try { for (int i = 0; i < ids.length; i++) { KeyWord keyWord = (KeyWord) KeyWordFactory.getInstance() .findByKey(ids[i]); KeyWordFactory.getInstance().remove(keyWord); } super.commit(transaction); } catch (DAOException daoe) { super.rollback(transaction); throw new BusinessException(daoe); } } COM: <s> removes a bunch of code key word code instances in a single </s>
funcom_train/43468229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String attr(String pstrName, String pstrValue) { StringBuffer attr = new StringBuffer(); if (StringUtil.len(pstrName) > 0) { attr.append(" ").append(pstrName).append("=\"").append(pstrValue).append("\""); } return attr.toString(); } COM: <s> construct attribute that can be added to a tag </s>
funcom_train/29773716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeAllItems(){ try { String response = dao.removeAll().getAnswer(); dao.removeAllItemKeys(); dao.removeAllItemInfo(); if (log.isInfoEnabled()) { log.info("removeAllItems response: " + response); } } catch (YahooDataAccessException ex) { ex.printStackTrace(); } } COM: <s> removes all items on the yahoo server </s>
funcom_train/16395054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Group validGroupFromForm(HttpServletRequest req, F messageSendForm) { Long selectedGroupId = messageSendForm.getGroupId(); if (selectedGroupId == null){ throw new ConfigurationException("validation of group failed: group ID = null"); } GroupManager groupManager = new GroupManager(locale,session); Group group = groupManager.getGroup(selectedGroupId); if (group == null){ throw new ConfigurationException("validation of group failed: group ID = " + selectedGroupId); } return group; } COM: <s> evaluates the group selection in the input form </s>
funcom_train/21422775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public INavigationItem previous() { if(curNavPoint!=null) { Object newPos = null; newPos = curNavPoint.getPreviousSibling(); if(newPos==null) { newPos = curNavPoint.parent; } if(newPos != null && newPos instanceof NcxNavPoint) { curNavPoint = (NcxNavPoint)newPos; curIndex--; return curNavPoint; } } throw new NoSuchElementException(); } COM: <s> returns the previous element in the list </s>
funcom_train/28759339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSboxbackground(String newVal) { if ((newVal != null && this.sboxbackground != null && (newVal.compareTo(this.sboxbackground) == 0)) || (newVal == null && this.sboxbackground == null && sboxbackground_is_initialized)) { return; } this.sboxbackground = newVal; sboxbackground_is_modified = true; sboxbackground_is_initialized = true; } COM: <s> setter method for sboxbackground </s>
funcom_train/40946730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component getComponent() { if (components.size() > 0) { // components found, return any final int i = rand.nextInt(components.size()); final Component c = (Component) components.get(i); components.remove(i); return c; } else { // no components left return null; } } COM: <s> get component that has uuid defined </s>
funcom_train/1104833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDisabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WindowAlan_disabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WindowAlan_disabled_feature", "_UI_WindowAlan_type"), HarzemliUIPackage.Literals.WINDOW_ALAN__DISABLED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_anaPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the disabled feature </s>
funcom_train/37447514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StorageEntry getEntry(Vertex v) { StorageEntry se = (StorageEntry) storageMap.get( v ); // if for the current node no data is given a new one is created. if ( se == null ) { se = new StorageEntry(); storageMap.put( v, se ); } return se; } COM: <s> returns the storage entry class which stores the elements for the given </s>
funcom_train/32353650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GPXLink parseLink(final XMLNode node) { final String nodeName = node.getName(); if (nodeName.equals(TAGNAME_LINK)) { final String href = node.getAttribute(ATTRIBUTE_HREF); final String text = node.getNodeSubNodeValue(TAGNAME_TEXT); final String type = node.getNodeSubNodeValue(TAGNAME_TYPE); final GPXLink link = new GPXLink(href, text, type); return link; } return null; } COM: <s> parse a link tag </s>
funcom_train/3391779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printOverviewHeader() { if (root.inlineTags().length > 0) { printSummaryComment(root); p(); bold(configuration.getText("doclet.See")); br(); printNbsps(); printHyperLink("", "overview_description", configuration.getText("doclet.Description"), true); p(); } } COM: <s> print the overview summary comment for this documentation </s>
funcom_train/20790075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Map<?, ?> values) { if (values != null) { Object userService = values.get("userService"); Object configurationService = values.get("configurationService"); if (userService instanceof UserService) { this.userService = (UserService) userService; } if (configurationService instanceof ConfigurationService) { this.configurationService = (ConfigurationService) configurationService; } } } COM: <s> this method is called after creating a new instance of the authenticator </s>
funcom_train/13275205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FurnitureController getFurnitureController() { // Create sub controller lazily only once it's needed if (this.furnitureController == null) { this.furnitureController = new FurnitureController( this.home, this.preferences, this.viewFactory, this.contentManager, getUndoableEditSupport()); } return this.furnitureController; } COM: <s> returns the furniture controller managed by this controller </s>
funcom_train/1653564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPutOverwrite_String() { String methodKey = "foo.bar"; String[] methodValues = {"boo","bar","zoo"}; String expectedResult = "zoo"; SimpleFieldSet methodSFS = new SimpleFieldSet(true); for (int i = 0 ; i < methodValues.length; i++) methodSFS.putOverwrite(methodKey,methodValues[i]); assertEquals(methodSFS.get(methodKey),expectedResult); } COM: <s> test the put overwrite string string method </s>
funcom_train/15627102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireSelectionChanged(@Nullable final BaseObject<G, A, R, ?> gameObject) { if (cursorSelection == gameObject) { return; } cursorSelection = gameObject; for (final ObjectChooserListener<G, A, R> listener : listeners) { listener.selectionChanged(gameObject); } objectChoiceDisplay.showObjectChooserQuickObject(gameObject, isPickmapActive()); } COM: <s> notifies all listeners that the selection may have changed </s>
funcom_train/16464041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUsersMessage() { for(String pdu : SUBMITTED_PDUS) { try { new CIncomingMessage(pdu, 0, ""); System.out.println("Decoded ok: " + pdu); } catch (MessageDecodeException ex) { ex.printStackTrace(); log.error("There was a problem decoding the PDU: " + pdu, ex); fail("There was a problem decoding the PDU (' " + ex.getMessage() + " '): " + pdu); } } } COM: <s> test messages that have been declared undecipherable and submitted in logs </s>
funcom_train/47998649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeEmail(String userName, String email) throws ParameterException, SQLException { if (checkName(userName)) { Connection con = getConnection(); Statement stmt = con.createStatement(); String sqlCommand = "UPDATE parasites_player SET email = '" + email + "' WHERE name = '" + userName + "'"; stmt.executeUpdate(sqlCommand); stmt.close(); con.close(); } else { throw new ParameterException("userName not found!"); } } COM: <s> changes the email address of the user </s>
funcom_train/20797836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAssociation(IResource resource, String tagid){ ensureAssociations(); try { final ITaggedMarker marker = TaggedMarkerHelper.getOrCreateMarker(resource); if(marker != null){ final TagAssociation tags = getOrCreateAssociation(marker.getResourceId()); tags.addTagId(tagid); fireTagAssociationEvent(new TagAssociationEvent(this,TagAssociationEvent.Type.ADDED,resource)); saveAssociations(); } } catch(CoreException ce){ TaggerLog.error("Unable to create tag association: " + ce.getMessage(),ce); throw new TagAssociationException(TaggerMessages.TagAssociationManager_Error_Create,ce); } } COM: <s> used to associate the tag with the specified id to the given resource </s>
funcom_train/44154483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initDao(GenericDao<?> dao) { if (getSessionFactory() != null) { try { PropertyDescriptor pd = new PropertyDescriptor(SESSION_FACTORY_BEAN_DEFAULT_NAME, dao.getClass()); Object value = pd.getReadMethod().invoke(dao); if (value == null) { pd.getWriteMethod().invoke(dao, m_sessionFactory); } s_logger.debug("value set in dao set"); } catch (Exception e) { // ignore problems s_logger.info("problem when auto-setting sessionFactory", e); } } } COM: <s> try to init the session factory of the bean </s>
funcom_train/43245324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetECTwoName() { System.out.println("setECTwoName"); String eCTwoName = ""; EmergencyContactDG4Object instance = new EmergencyContactDG4Object(); instance.setECTwoName(eCTwoName); // 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 ectwo name method of class org </s>
funcom_train/9877816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int col) { if(col == 0) return lem.getLocusID(getLocusIndex(row)); else if(col == 1) return new Integer(lem.getStart(getLocusIndex(row))); else if(col == 2) return new Integer(lem.getEnd(getLocusIndex(row))); else return new Integer(lem.getNumReplicates(getLocusIndex(row))); } COM: <s> returns the value at row and col </s>
funcom_train/39264293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Object o) { if (getVal_Object().equals(o)) { return true; } XholonContainmentHierarchyNode node = (XholonContainmentHierarchyNode)getFirstChild(); if ((node != null) && (node.contains(o))) { return true; } node = (XholonContainmentHierarchyNode)getNextSibling(); if ((node != null) && (node.contains(o))) { return true; } return false; } COM: <s> does this node or its children or siblings contain the specified object </s>
funcom_train/29917789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSettings(List<GlobalPropertySetting> settings){ for(GlobalPropertySetting setting : settings){ List<GlobalPropertySetting> list = currentLists.get(setting.getOrgId()); GlobalPropertySetting toRemove = null; if(list != null){ for(GlobalPropertySetting next : list){ if(setting.equals(next) ){ toRemove = next; break; } } if(toRemove != null){ list.remove(toRemove); } list.add(setting); this.setChanged(); notifyObservers(currentLists); } } } COM: <s> updates the current setting </s>
funcom_train/3159409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(File file, ImageInputStream dataInputStream) throws IOException { _logger = BeamLogManager.getSystemLogger(); Debug.assertTrue(dataInputStream != null); Debug.assertTrue(_dataInputStream == null); _file = file; _dataInputStream = dataInputStream; readMPH(); postProcessMPH(_parameters); readSPH(); postProcessSPH(_parameters); traceDddbFieldSizeParameters(); readGADS(); } COM: <s> initializes a product file object with for the given seekable data input stream </s>
funcom_train/22031043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCursorStringVector(Vector vect) { synchronized (cursorStringVector) { cursorStringVector.removeAllElements(); if (vect != null) { Enumeration strings = vect.elements(); while(strings.hasMoreElements()) { cursorStringVector.addElement(strings.nextElement()); } } } render_trigger(); } COM: <s> set code vector code of code string code s describing the </s>
funcom_train/32340157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet query(Transaction tx, Collection col, String style, String query, NamespaceMap nsMap, Key[] keys) throws DBException, QueryException { QueryResolver res = getResolver(style); return res.query(tx, col, query, nsMap, keys); } COM: <s> query performs the specified query and returns a node set with </s>
funcom_train/43213231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getConfigurationCacheTime() { try { return Integer.parseInt(config.getValue(ConfigKeys.GET_CONFIGURATION_CACHE_TIME)); } catch (Exception ex) { config.setValue(ConfigKeys.GET_CONFIGURATION_CACHE_TIME, String.valueOf(DEFAULT_GET_CONFIGURATION_CACHE_TIME)); } return FlatFileTrancheServer.DEFAULT_GET_CONFIGURATION_CACHE_TIME; } COM: <s> p gets the time to internally cache the configuration </s>
funcom_train/21179700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean changeTabPane(sandmark.gui.SandMarkFrame f) { if (sandmark.watermark.DynamicTrace.traceInProgress()) f.raiseTabPane("Trace"); else if (sandmark.watermark.DynamicEmbed.embeddingInProgress()) f.raiseTabPane("Embed"); else if (sandmark.obfuscate.Obfuscator.obfuscationInProgress()) f.raiseTabPane("Obfuscate"); else if (sandmark.optimise.Optimise.optimisationInProgress()) f.raiseTabPane("Optimise"); else if (sandmark.watermark.DynamicRecognize.recognitionInProgress()) f.raiseTabPane("Recognize"); else return false; return true; } COM: <s> this is a very inelegant routine which is used to ensure that </s>
funcom_train/51000364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getUserList(String group_id) throws SQLException { Connection con = getConnection(); if(con == null) { throw new IllegalStateException("Connection not yet opened."); } PreparedStatement ps = con.prepareStatement( "SELECT user_id FROM user_group WHERE " + "group_id = ?"); ps.setString(1,group_id); ResultSet rs = ps.executeQuery(); List user_list = createEmptyList(); UserVO user; while(rs.next()) { user_list.add(rs.getString("user_id")); } rs.close(); return user_list; } COM: <s> returns a list of users that belongs to a particular group </s>
funcom_train/29954509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSolverType() { System.out.println("getSolverType"); SolverParamObject instance = new SolverParamObject(); EnumSolverType expResult = EnumSolverType.NONOISE; EnumSolverType result = instance.getSolverType(); System.out.println(result); assertEquals(expResult, result); } COM: <s> test of get solver type method of class hbm </s>
funcom_train/40359780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDocumentMetaDataRepositoryException() throws Exception { instantiator.addConnector(connectorName, new MockConnector(null, null, null, new MockRetriever())); try { manager.getDocumentMetaData(connectorName, MockRetriever.DOCID_REPOSITORY_EXCEPTION); fail("Expected RepositoryException"); } catch (RepositoryException expected) { // Expected. } } COM: <s> test get document meta data with repository exception </s>
funcom_train/18671378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTank(int id, Point location, double direction, byte state,int imageIndex,int colorIndex, int energy) { int index = findTankIndex(id); if (index!=-1) { ClientTank tank = (ClientTank)tanks.get(index); tank.setLocation(location); tank.setDirection(direction); tank.setState(state); tank.setColorIndex(colorIndex); tank.setImageIndex(imageIndex); tank.setEnergy(energy); } //if not create one } COM: <s> update the maps knowledge of the tank using supplied parameters </s>
funcom_train/37007293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection find(String profileType, Id profileId) { try { return getHome().findAllForProfile(profileType, profileId!= null ? profileId.getValue():0); } catch (ObjectNotFoundException onfe) { log.debug(onfe); } catch (FinderException fe) { log.log(Log.ERROR, fe); } return null; } COM: <s> nalezne reference podle typu a id profilu tj </s>
funcom_train/19000110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toBinString(int groupsize, String separator) { StringWriter out = new StringWriter(); for (int x = 0; x < data.length; x++) { out.write(byteAsBin(x)); if ((groupsize != 0) && (x % groupsize == 0)) out.write(separator); } return out.toString(); } COM: <s> returns a binary string representing the bit buf </s>
funcom_train/24237028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSynonym(String primaryRepresentation, String synonym) { // find parent synonym fact type factType = list_checker.checkForFactType(primaryRepresentation); // create binaryFactType init(synonym, 0); if(super.create(true, true, true)) { super.factSymbol.setPreferred(false); super.factSymbol.setProhibited(true); } } COM: <s> creates synonym of the given fact type </s>
funcom_train/328994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getRMSFromRaw(double[][] rawData) { double rms; double sumOfWindow = 0.0; for (int i = 0; i < rawData[0].length; i++) { sumOfWindow+=rawData[0][i] * rawData[0][i]; } rms = Math.sqrt(sumOfWindow/rawData[0].length); return rms; } COM: <s> calculate the rms value from the raw data </s>
funcom_train/1343957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinAGame() { if ( client == null ) // Checking this condition is not neccessary, action of menu causing invoking of this method is possible only when we're not joined joinAGame( false ); else JOptionPane.showMessageDialog( mainFrame, "Already joined, close game first!", "Error", JOptionPane.ERROR_MESSAGE ); } COM: <s> to handle join menu item and join to a game </s>
funcom_train/31462662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLogLevel(int level) { switch(level) { case LOG_VERBOSE: m_loggingManager.setLevel(m_loggerTopic, Logger.DEBUG); break; case LOG_QUIET: m_loggingManager.setLevel(m_loggerTopic, Logger.WARN); break; default: m_loggingManager.setLevel(m_loggerTopic, Logger.INFO); } } COM: <s> set the log level of the project generator </s>
funcom_train/2331292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String repeat(char character, int length) { if (character == ' ') return blanks(length); if (length < 0) length = 0; StringBuffer buf = new StringBuffer(length); for (int k = 0; k < length; k++) { buf.append(character); } return buf.toString(); } COM: <s> returns a string with the given character repeated tt length tt times </s>
funcom_train/43095152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getPopUpActions(MouseEvent me) { Vector popUpActions = super.getPopUpActions(me); // the menu item for RE a sequence into the diagram is offered always, // becauase some check (does a operation with a body exist) would be // too expensive popUpActions.insertElementAt(new ActionRESequenceDiagram(this), popUpActions.size() - getPopupAddOffset()); return popUpActions; } COM: <s> build a collection of menu items relevant for a right click </s>
funcom_train/6458170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(byte input) { int pos = (int)byteCount & 0x3f; W[pos >> 2] |= ((int)input & 0xff) << (((~pos) & 3) * 8); byteCount++; if ((byteCount & 63) == 0) { doOneBlock(); for (int i = 0; i < 16; i++) { W[i] = 0; } } } COM: <s> update the hash an object of this class </s>
funcom_train/51572677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() throws Exception { if ((nestedZip != null) && nestedZip.exists()) { nestedZip.delete(); nestedZip = null; } if ((baseZip != null) && baseZip.exists()) { baseZip.delete(); baseZip = null; } deleteTestFiles(); if (baseDir.exists()) { baseDir.delete(); } } COM: <s> delete all test files and directories created by </s>
funcom_train/34289403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title) { boolean flag = false; int i = 0; LangText lt = new LangText(title); if (!getTitles().contains(lt)) { List<LangText> titlesList = getTitles(); while (i < titlesList.size() || !flag) { LangText tit = titlesList.get(i); if (tit.getLang().equals(LangText.LANG_DEFAULT)) { getTitles().set(i, lt); flag = true; } i++; } if (!flag) { this.addTitle(lt); } } } COM: <s> set the default title </s>
funcom_train/18519336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { getLogger().info("Starting thread " + getName()); processLoop(); synchronized (threadList) { // I'm done, remove myself from the list threadList.remove(this); } getLogger().info("Ending thread " + getName()); } COM: <s> main thread method at the end removes this from the list of threads </s>
funcom_train/45239325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComboBox getJComboBoxTipoDado() { if (jComboBoxTipoDado == null) { jComboBoxTipoDado = new JComboBox(); jComboBoxTipoDado.setBounds(new Rectangle(40, 135, 131, 24)); jComboBoxTipoDado.addItem("DNA"); jComboBoxTipoDado.addItem("RNA"); jComboBoxTipoDado.addItem("Proteína"); jComboBoxTipoDado.setCursor(new Cursor(Cursor.HAND_CURSOR)); } return jComboBoxTipoDado; } COM: <s> this method initializes j combo box tipo dado </s>
funcom_train/31955573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(short[] s, int start, int len) throws IOException { for (int i = start; i < start + len; i += 1) { if (count + 2 > buf.length) { checkBuf(2); } buf[count++] = (byte) (s[i] >> 8); buf[count++] = (byte) (s[i]); } } COM: <s> write a segment of an array of shorts </s>
funcom_train/8806349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateParentBalanceAfterDeletion(Node node, boolean wasLeftChild) { while (node != null) { if (wasLeftChild) node.balance++; else node.balance--; Node parent= node.parent; if (parent != null) wasLeftChild= node == parent.left; switch (node.balance) { case 1: case -1: return; // done, no tree change case -2: if (rebalanceAfterDeletionRight(node.left)) return; break; // propagate up case 2: if (rebalanceAfterDeletionLeft(node.right)) return; break; // propagate up case 0: break; // propagate up default: break; } node= parent; } } COM: <s> updates the balance information in the parent chain of node </s>
funcom_train/25027874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minimalId() { String string = null; Cursor cursor = this.sqLiteDatabase.rawQuery("SELECT id FROM " + DATABASE_TABLE + " WHERE " + KEY_SCORE + " = (SELECT MIN(" + KEY_SCORE + ") FROM " + DATABASE_TABLE + ")", null); if (cursor.moveToFirst()) { string = cursor.getString(0); } return (Integer.parseInt(string)); } COM: <s> get the id of the minimal score </s>
funcom_train/43605478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean run() { if (Report.should_report(Report.frontend, 1)) Report.report(1, job + " at barrier " + id); if (Report.should_report(Report.frontend, 2)) Report.report(2, "dependencies of " + job.sourceJob() + " = " + job.sourceJob().dependencies()); return true; } COM: <s> run all the other jobs with the same parent up to this pass </s>
funcom_train/18569812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsAssignableFromIdenticalArgs() { Class[] newArgTypes = new Class[] {String.class, Integer.class}; Signature newSignature = new Signature(Signature.class, "myMethod", newArgTypes); assertTrue(signature.isAssignableFrom(newSignature)); } COM: <s> test the is assignable from method when it returns true due to comparing </s>
funcom_train/36108977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillModuleParameterMap() { for (ExternalModuleBridge moduleBridge : getListOfBlocks()) { Data[] currentArray = getStorage(MODULE_PARAMETER).findArrayWith(MODULE_PARAMETER_MODULE, moduleBridge.getExternalModuleModel().get("ID")); for (int i = 0; i < currentArray.length; i++) moduleParameterMap.put(new Integer(((DataWrapper)currentArray[i]).getId()), currentArray[i]); } } COM: <s> filling module parameter map from model through extended data factory </s>
funcom_train/31728898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getAncestors(Person p, HashMap H, int gen) { H.put(p, new Integer(gen)); Collection parents = family.parentsOf(p); for(Iterator i=parents.iterator(); i.hasNext(); ) getAncestors((Person)i.next(), H, gen+1); } COM: <s> collect all ancestors of a person along with the generation gap </s>
funcom_train/45147569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTargetResourceUri(HttpServletRequest request) { String uri = request.getHeader("URIQA-uri"); if (uri == null) uri = request.getParameter("uri"); if (uri == null) uri = (String) request.getAttribute("uri"); return uri; } COM: <s> get the requested resource uri string </s>
funcom_train/31146567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(StageWrapperIF stage, ThreadPool tp) { SandstormConfigIF config = mgr.getConfig(); int thresh = config.getInt("stages." + stage.getStage().getName() + ".threadPool.sizeController.threshold", controllerThreshold); tpvec.addElement(new tpcClient(stage, tp, null, thresh)); } COM: <s> register a thread pool with this controller using the queue threshold </s>
funcom_train/18433615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateBoundsForAddedItem(TimeSeriesDataItem item) { Number yN = item.getValue(); if (item.getValue() != null) { double y = yN.doubleValue(); this.minY = minIgnoreNaN(this.minY, y); this.maxY = maxIgnoreNaN(this.maxY, y); } } COM: <s> updates the cached values for the minimum and maximum data values </s>
funcom_train/2724148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCacheHints(final TypedQuery<?> typedQuery, final String comment) { typedQuery.setHint("org.hibernate.cacheMode", CacheMode.NORMAL); typedQuery.setHint("org.hibernate.cacheable", true); typedQuery.setHint("org.hibernate.comment", comment); } COM: <s> adds the cache hints </s>
funcom_train/975839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void keyDownUp(int keyEventCode) { getCurrentInputConnection().sendKeyEvent( new KeyEvent(KeyEvent.ACTION_DOWN, keyEventCode)); getCurrentInputConnection().sendKeyEvent( new KeyEvent(KeyEvent.ACTION_UP, keyEventCode)); } COM: <s> helper to send a key down key up pair to the current editor </s>
funcom_train/35072794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vendor create(EcsService service, String name, String description) { setName(name); setDescription(description); service.persist(this); service.refresh(this); // The root category is just a common anchor for all the other categories // Use the name and description from the store just to initialize it. new Category().create(service, this, "root", "This is the root category."); return this; } COM: <s> initializes this entity with the specified properties </s>
funcom_train/4122943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean hasFocus) { JLabel c; if (isSelected) { c = SELECTED_COMPONENT; } else { c = NORMAL_COMPONENT; } c.setForeground(list.getForeground()); c.setFont(list.getFont()); setLabelValues(c, value); return c; } COM: <s> returns a code list cell renderer code for the given code jlist code </s>
funcom_train/28150863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public String toString() { StringBuilder sb = new StringBuilder("["); boolean first = true; for(Object x: this) { if (first) first=false; else sb.append(", "); if (x==this) sb.append("(this collection)"); else sb.append(x); } return sb.append(']').toString(); } COM: <s> returns a string representation of this list </s>
funcom_train/19411921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphVertex getVertex(Class<?> plugInClass) { for (Iterator<GraphVertex> i = getVertices().iterator();i.hasNext();) { GraphVertex v = i.next(); if (getPlugInClass(v).equals(plugInClass)) return v; } return null; } COM: <s> return the vertex or null if none that has the specified class associated </s>
funcom_train/26574197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent, Object child) { int result = -1; int count = getChildCount(parent); for (int i = 0; result != i && i < count; i++) { if (getChild(parent, i).equals(child)) { result = i; break; } } return result; } COM: <s> gets the index of child attribute of the abstract tree table model object </s>
funcom_train/40792588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ticker getSendSMSMessage() { if (sendSMSMessage == null) {//GEN-END:|69-getter|0|69-preInit // write pre-init user code here sendSMSMessage = new Ticker("Bitte warten Sie, w\u00E4hrend ihre Anfrage versendet wird");//GEN-LINE:|69-getter|1|69-postInit // write post-init user code here }//GEN-BEGIN:|69-getter|2| return sendSMSMessage; } COM: <s> returns an initiliazed instance of send smsmessage component </s>
funcom_train/37125212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Icon generatePressedIcon(final Icon icon) { Icon pressedIcon = null; if (icon != null) { BufferedImage bim = new BufferedImage(icon.getIconWidth(), icon .getIconHeight(), BufferedImage.TYPE_INT_ARGB); bim.getGraphics().drawImage(((ImageIcon) icon).getImage(), 1, 1, null); pressedIcon = new ImageIcon(bim); } return pressedIcon; } COM: <s> generates a pressed icon corresponding to the specified icon </s>
funcom_train/584282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJControlPane() { if (jControlPane == null) { jControlPane = new JPanel(); jControlPane.setLayout( new FlowLayout() ); jControlPane.add(getJAdd(), null); jControlPane.add( getJClose() ); // , BorderLayout.NORTH); } return jControlPane; } COM: <s> this method initializes j control pane </s>
funcom_train/46737506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTemplateName(String templateName) { if (Converter.isDifferent(this.templateName, templateName)) { String oldtemplateName= null; oldtemplateName = this.templateName; this.templateName = templateName; setModified("templateName"); firePropertyChange(String.valueOf(USERTEMPLATETEXTS_TEMPLATENAME), oldtemplateName, templateName); } } COM: <s> name of the template </s>
funcom_train/19177754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean lockContainer(Long id, SessionUserWrapper u) { if(!containsKey(id)) { put(id, u.getUser()); pcl_st.addSession(u.getSession_id(), id); return true; } else { return false; } } COM: <s> lock container to user </s>
funcom_train/9697084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInnerClassesInGenerics() throws Exception { int oldJvmMode = Project.getDefaultOptions().getJvmMode(); Project.getDefaultOptions().setJvmMode(FastJavaLexer.JVM_50); definedProjectTest(); Project.getDefaultOptions().setJvmMode(oldJvmMode); } COM: <s> generic test inner classes </s>
funcom_train/25489078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getChatTest() { if (chatTest == null) { chatTest = new JTextField(); chatTest.setColumns(10); chatTest.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { chatTestEnterKeyPressed(e); } }); } return chatTest; } COM: <s> this method initializes chat </s>
funcom_train/47282816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveInput() { if(mungeStep.canAddInput()) { InputDescriptor desc = new InputDescriptor("test", Object.class); mungeStep.addInput(desc); MatchMakerEventCounter mml = new MatchMakerEventCounter(); mungeStep.addSPListener(mml); mungeStep.removeInput(0); assertEquals("Did not get any events",1,mml.getChildRemovedCount()); } } COM: <s> test to ensure that remove input removes the munge step output and </s>