__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/122997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { final FastComparator comp = this.getValueComparator(); int h = 1; for (Node n = _head, end = _tail; (n = n._next) != end;) { h = 31 * h + comp.hashCodeOf(n._value); } return h; } COM: <s> returns the hash code value for this list </s>
funcom_train/42307592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyStage(String stagename) throws Exception { if (stagename == null) throw new NoSuchStageException("no such stage: null"); StageIF stage = (StageIF)_stages.get(stagename); if (stage == null) throw new NoSuchStageException("no such stage: "+stagename); // destroy and remove this sucker _stages.remove( stagename ); stage.destroy(); } COM: <s> note that calling this slightly violates the semantics of this </s>
funcom_train/50812856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOption(StringBuffer sb, String label, String value) { sb.append("<option value=\""); sb.append(value); sb.append("\""); sb.append(">"); sb.append(TagUtils.getInstance().filter(label)); sb.append("</option>\r\n"); } COM: <s> add an option element to the specified string buffer based on the </s>
funcom_train/2928167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBooleanTag () throws Exception { parser = new QuickParser (metaenv, "(:x:y:z:ABC[MyClass] someBooleanTag)"); ElementSet elements = parser.parse(); QAttribute attr = getSingleAttribute(getSingleElement(elements)); assertEquals ("Attribute name", "someBooleanTag", attr.AttrName()); assertEquals ("Attribute value", "true", attr.Value()); } COM: <s> tests parsing of boolean tags </s>
funcom_train/21876209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computeNewTabId() { Integer lc_id = (Integer) pageContext.getRequest().getAttribute(LAST_TAB_KEY); if (lc_id==null) { lc_id = new Integer(0); } pageContext.getRequest().setAttribute(LAST_TAB_KEY, new Integer(lc_id.intValue()+1)); return lc_id.toString(); } COM: <s> used internally to compute a unique id for each tab in a request </s>
funcom_train/21777472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { Object [] viewSet = views.values().toArray(); try { for(int i = 0; i < viewSet.length; i++) { ((MDIInternalFrame)viewSet[i]).setIcon( false); } if (contentSpecWindow != null) { contentSpecWindow.setIcon( false); } } catch(PropertyVetoException pve){} } COM: <s> shows all of the iconified views in the view set </s>
funcom_train/11011745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddCondFormatAfterDataValidation_bug46547() { // Create a sheet with data validity (similar to bugzilla attachment id=23131). InternalSheet sheet = InternalSheet.createSheet(); sheet.getOrCreateDataValidityTable(); ConditionalFormattingTable cft; // attempt to add conditional formatting try { cft = sheet.getConditionalFormattingTable(); // lazy getter } catch (ClassCastException e) { throw new AssertionFailedError("Identified bug 46547b"); } assertNotNull(cft); } COM: <s> bug 46547 happened when attempting to add conditional formatting to a sheet </s>
funcom_train/21252359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Property_type_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Property_type_feature", "_UI_Property_type"), EntityPackage.Literals.PROPERTY__TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/1474629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DecisionNode deepCopy(DecisionTree tree, DecisionNode father) { DecisionNode result = newNode(tree, father); result.setLevel(level); result.setDecisionAttribute(decisionAttribute); result.setTargetRepartition(targetRepartition); result.setLabel(label); result.setInstancesShallow(instances); Iterator childIterator = childs.iterator(); while (childIterator.hasNext()) { DecisionNode child = (DecisionNode) childIterator.next(); result.getChilds().add(child.deepCopy(tree, result)); } return result; } COM: <s> copy a node and all of his descendents </s>
funcom_train/17178589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getUserModificationsFile() { File result = new File(USER_MODIFICATION_FILE); if (!result.exists()) { JOptionPane.showMessageDialog(null, USER_MODIFICATION_FILE + " not found.", "Modification File Error", JOptionPane.ERROR_MESSAGE); } return result; } COM: <s> returns the user defined modifications file </s>
funcom_train/5236268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void hookEventListener(AgileGrid agileGrid, Listener listener) { agileGrid.addListener(SWT.KeyDown, listener); agileGrid.addListener(SWT.FocusIn, listener); agileGrid.addListener(SWT.MouseDown, listener); agileGrid.addListener(SWT.MouseMove, listener); agileGrid.addListener(SWT.MouseDoubleClick, listener); agileGrid.addListener(SWT.MouseHover, listener); agileGrid.addListener(SWT.MouseExit, listener); } COM: <s> hooks all of the listeners which listen the event on the agile grid </s>
funcom_train/40479607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCurrentDemo(AbstractDemo demo) { currentDemo = demo; if (currentDemo.getReference() != null) { referenceLink.setHref(currentDemo.getReference()); referenceLink.setText(currentDemo.getReference()); } else { referenceLink.setHref(""); referenceLink.setText(""); } extraPanel.clear(); if (currentDemo.getExtraWidget() != null) { extraPanel.add(currentDemo.getExtraWidget()); } } COM: <s> sets the currently selected demo </s>
funcom_train/38542348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getMap() { final HashMap map = new HashMap(); synchronized (this.subCaches) { // Loop in reverse order so that the object associated with a key // belongs to the hightest priority cache. Map results = null; for (int i = this.subCaches.size() - 1; i >= 0; i--) { results = ((Cache) this.subCaches.get(i)).getMap(); if (results != null) { map.putAll(results); } } } return map; } COM: <s> this method enables to access to the cache contents </s>
funcom_train/15487508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonBrowse() { if (jButtonBrowse == null) { jButtonBrowse = new JButton(); jButtonBrowse.setBounds(new java.awt.Rectangle(254,160,25,25)); jButtonBrowse.setText("..."); jButtonBrowse.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { chooseExportFile(); } }); } return jButtonBrowse; } COM: <s> this method initializes j button browse </s>
funcom_train/1707668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) throws ServletException { log.debug("Initializing filter..."); log.debug("Obtaining SessionFactory from static HibernateUtil singleton"); String propsFileName = filterConfig.getInitParameter("jdbc.properties"); Environment.startup(propsFileName); sf = HibernateHelper.getSharedInstance().getSessionFactory(); } COM: <s> initializes the filter and sets up the database environment </s>
funcom_train/4467387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToCss() { assertNotNull(color.toCss(true)); assertEquals("rgba(127, 255, 233, 0.49803921580314636)",color.toCss(true)); assertNotNull(color.toCss(false)); assertEquals("rgb(127, 255, 233)",color.toCss(false)); } COM: <s> tests the to css method </s>
funcom_train/40312107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBooleanString() { try { metaData = new DefaultResultSetMetaData(new IOMetaDataEntryMockImpl()); values = new Object[][]{{true}}; ResultSet resultSet = new DefaultResultSet(statement, metaData, values); resultSet.absolute(1); assertTrue("The value mismatches.", resultSet.getBoolean("field1")); } catch(SQLException e) { fail("getBoolean failed"); } } COM: <s> tests get boolean with valid column name </s>
funcom_train/29413833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadRules() throws IOException { IConfigurationElement[] config = Platform.getExtensionRegistry() .getConfigurationElementsFor(EXTENSION_ID_VALIDATION_RULE); for (IConfigurationElement element : config) { IContributor con = element.getContributor(); Bundle bundle = Platform.getBundle(con.getName()); String file = element.getAttribute("File"); String abbr = element.getAttribute("Abbr"); InputStream stream = bundle.getEntry(file).openStream(); ArrayList<Rule> rules = RuleParser.parseFile(stream, bundle); rulesMap.put(abbr, rules); } } COM: <s> loads the installed rules </s>
funcom_train/9545065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface KClosestNodesLookupAnalyzer extends Analyzer { /** * A data lookup has completed. * * @param key * the KademliaOverlayKey of the data item that has been * looked up. * @param result * a Collection containing the k closest nodes that have * been found. * @param op * the KClosestNodesLookupOperation that has completed. */ public void kClosestNodesLookupCompleted(KademliaOverlayKey key, Collection<? extends KademliaOverlayContact<?>> result, KClosestNodesLookupOperation<?> op); } COM: <s> interface for analyzers of kclosest nodes lookup operations </s>
funcom_train/14215793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAddress() { String myWert=this.address; String myFieldName="address"; if(this.getUserObject().isEditor()){ return "<input type=\"input\" name=\""+myFieldName+"\" size=\""+this.editFieldWidth+"\" value=\""+myWert+" \">"; }else{ return myWert; } } COM: <s> returns the variable indicatd by the method name </s>
funcom_train/14241320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MVisibilityKind getVisibility(String name) { if ("+".equals(name) || "public".equals(name)) return MVisibilityKind.PUBLIC; else if ("#".equals(name) || "protected".equals(name)) return MVisibilityKind.PROTECTED; else /* if ("-".equals(name) || "private".equals(name)) */ return MVisibilityKind.PRIVATE; } COM: <s> finds a mvisibility kind for the visibility specified by name </s>
funcom_train/40885786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ray getPickRay (float x, float y, float viewportX, float viewportY, float viewportWidth, float viewportHeight) { unproject(ray.origin.set(x, y, 0), viewportX, viewportY, viewportWidth, viewportHeight); unproject(ray.direction.set(x, y, 1), viewportX, viewportY, viewportWidth, viewportHeight); ray.direction.sub(ray.origin).nor(); return ray; } COM: <s> creates a picking </s>
funcom_train/330312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getStorageProbability(AcousticDataUnit dataUnit) { double usedTimeFraction = (double)(dataUnit.getTimeMilliseconds()-budgetPeriodStart) / (double) budgetPeriod; double usedDataFraction = (double) totalStoredSize / budgetSize; if (totalStoredSize == 0) { return 1; } if (usedDataFraction >= 1) { return 0; } double prob = usedTimeFraction / usedDataFraction; return prob; } COM: <s> calculate a probability for storing the next unit </s>
funcom_train/18466834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isUnambigous(String xPathStr, Node node) { //first check the simple case with no attributes if(isUnambiguous(node) && xPathStr.equals(node.getNodeName())) { return true; } //TODO: check if the attribut(s) of the xPathStr equals and uniqely specify the node return true; } COM: <s> check if a dom node is unambigously defined by the given xpath part </s>
funcom_train/19716855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getFOHypernymsByILI(String ili) throws Exception { Hashtable hypers = new Hashtable(); Set hypernyms = getHypernyms(ili, false); for (Iterator it = hypernyms.iterator(); it.hasNext(); ) { String hypernymIli = (String) it.next(); TreeSet hypernymLexicalForms = getLexemesByILI(hypernymIli); hypernymLexicalForms.addAll(getLexemesByILI(ili)); hypers.put(hypernymIli, hypernymLexicalForms); } return hypers; } COM: <s> look for the hypernyms of a given word reading ili ili </s>
funcom_train/29618595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisComboBox getJLossBox() { if (jLossBox == null) { Vector lossOptions = new Vector(); lossOptions.add(AppTextsDAO.get("OPTION_ALL")); lossOptions.add(AppTextsDAO.get("OPTION_ALIVE")); lossOptions.add(AppTextsDAO.get("OPTION_ELIMINATED")); lossOptions.add(AppTextsDAO.get("OPTION_LOST")); jLossBox = new MgisComboBox(lossOptions); jLossBox.setBounds(new java.awt.Rectangle(100,46,79,19)); } return jLossBox; } COM: <s> this method initializes j lost box </s>
funcom_train/32058071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChangeChildCount() { System.out.println("testChangeChildCount"); ParentMap parentmap = new ParentMap(); int i = 1; Object child = new Object(); Object parent = new Object(); parentmap.addEntry(child, parent); parentmap.changeChildCount(child, i); //cant assert to check the set child count } COM: <s> this function tests change child count function of parent map class </s>
funcom_train/10547380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultHashAlgorithm() throws SQLException { // SHA-256 should be the default hash algorithm now, if it's supported // on the platform. Otherwise, we fall back to SHA-1. String expected = supportsAlgorithm("SHA-256") ? "SHA-256" : "SHA-1"; assertEquals(expected, getDatabaseProperty(BUILTIN_ALGO_PROP)); } COM: <s> derby 4483 test that the database by default has the configurable </s>
funcom_train/24000194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateResults() throws Exception { Bag p = new Bag(); assertSame(p,instance.updateResults(null, p, null, OclObjectFactory.TRUE)); assertEquals(1,p.size()); assertTrue(p.contains(OclObjectFactory.TRUE)); } COM: <s> test of update results method of class ocl collection collect nested iterator </s>
funcom_train/4509788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAdmin(JID user) { if (getOwners().contains(user) || service.isServiceAdmin(user)) { return true; } // Check if we should try again but using the bare JID if (user.getResource() != null) { user = new JID(user.toBareJID()); return isAdmin(user); } return false; } COM: <s> returns true if the specified user is allowed to administer the node </s>
funcom_train/4154514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRemoteObjectRegistry() throws RemoteObjectRegistryCreationFailedException { try { if ( remoteObjectRegistry == null ) remoteObjectRegistry = LocateRegistry.createRegistry( GeneralConsts.REGISTRY_PORT ); remoteObjectRegistry.rebind( GeneralConsts.REMOTE_Q_SERVER_OBJECT_REGISTRY_NAME, this ); } catch ( RemoteException re ) { throw new RemoteObjectRegistryCreationFailedException( GeneralConsts.REGISTRY_PORT ); } } COM: <s> creates the remote object registry </s>
funcom_train/7624748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addValue(String key, int value, Bundle results) { if (results.containsKey(key)) { List<Integer> list = results.getIntegerArrayList(key); if (list != null) { list.add(value); } } else { ArrayList<Integer> list = new ArrayList<Integer>(); list.add(value); results.putIntegerArrayList(key, list); } } COM: <s> if results already contains key it appends value to the keys array list </s>
funcom_train/2488603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(String fileName) throws IOException{ InputStream inputStream = null; if (fileName != null && fileName.length() > 0) { inputStream = this.getClass().getResourceAsStream(fileName); } if (inputStream != null) { load(inputStream); } else { throw new IOException("Could find file in jar: "+fileName); } } COM: <s> load the specified file from the jar file </s>
funcom_train/28214032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int initQuestionDialog(String displayString) { this.popupShell = new Shell(this.getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); MessageBox messageBox = new MessageBox(this.popupShell, SWT.YES | SWT.NO | SWT.CANCEL | SWT.ICON_QUESTION); messageBox.setText("MQ eXplored - Decision"); messageBox.setMessage(displayString); int answer = messageBox.open(); System.out.println("GenericPopup: Displayed"); return answer; } COM: <s> pop up window to with possible decisions of yes no or cancel </s>
funcom_train/31301286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int scanAttributes(char[] input, int offset, int end, int[] lineNr) throws XMLParseException { String key, value; for (;;) { offset = this.skipWhitespace(input, offset, end, lineNr); char ch = input[offset]; if ((ch == '/') || (ch == '>')) { break; } offset = this.scanOneAttribute(input, offset, end, lineNr); } return offset; } COM: <s> scans the attributes of the object </s>
funcom_train/3290032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openAllChannels(MMObjectNode community) { if (channelBuilder == null) { log.error("No channel builder"); return; } Enumeration relatedChannels = mmb.getInsRel().getRelated(community.getNumber(), channelBuilder.oType); while (relatedChannels.hasMoreElements()) { channelBuilder.open((MMObjectNode)relatedChannels.nextElement()); } } COM: <s> opens all the channels that are connected to this community </s>
funcom_train/51377585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultPermissions() throws DBException { RowPermissions rowPermissions = getPermissions(); rowPermissions.owner(getRequestingUid()); rowPermissions.permissions(defaultPermissions()); rowPermissions.addOrUpdate(); // default group may be null String group = defaultGroup(); if ((group != null) && (group.length() > 0)) { addGroupPerm(group, defaultPermissions()); } } COM: <s> called by add does not check as to whether caller has permission admin </s>
funcom_train/20342223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSaveCommand() { if (saveCommand == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here saveCommand = new Command("Save", Command.OK, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return saveCommand; } COM: <s> returns an initiliazed instance of save command component </s>
funcom_train/47705891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CubridGroovy getCubridGroovy() { CubridGroovy cubridGroovy = null; if (use) { cubridGroovy = new CubridGroovy(); List filePathList = getFilePathList(); if (filePathList.size() == 0) return null; cubridGroovy.setScriptFilePaths(filePathList); cubridGroovy.setNeedCompare(true); cubridGroovy.setNeedDrop(true); cubridGroovy.setRunMode(ScriptRunMode.RUN_ALL); } return cubridGroovy; } COM: <s> get the groovy configuration from the composite </s>
funcom_train/26576386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAsObject() { Object result; if (topNode != null && !hasError()) { // evaluate the expression try { result = ev.getValue(topNode,errorList,symTab); } catch (Exception e) { if (debug) System.out.println(e); errorList.addElement("Error during evaluation"); return null; } return result; } else { return null; } } COM: <s> evaluates and returns the value of the expression as an object </s>
funcom_train/11714092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public List getFSList() { // if (fsList == null) { // // Lazy loading // FSIterator iter = iterator(); // fsList = new ArrayList (); // while (iter.isValid()) { // fsList.add (iter.get()); // iter.moveToNext(); // } // } // return fsList; // } COM: <s> get list of feature structure objects </s>
funcom_train/41722474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RhythmFilter createFilter(String filterName) { // If name is not fully qualified, assume part of standard filters if (!filterName.contains(".")) { filterName = this.packageName + "." + filterName; } try { RhythmFilter rf = (RhythmFilter)(Class.forName(filterName).newInstance()); return rf; } catch (Exception e) { return null; } } COM: <s> returns an instance of the filter </s>
funcom_train/25638867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void table(int border, int cellpadding, int cellspacing, String summary) { println(DocletConstants.NL + "<TABLE BORDER=\"" + border + "\" CELLPADDING=\"" + cellpadding + "\" CELLSPACING=\"" + cellspacing + "\" SUMMARY=\"" + summary + "\">"); } COM: <s> print html lt table border border cellpadding cellpadding </s>
funcom_train/29735859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) throws ClassCastException { if ( o instanceof Property ) return this.getName().compareTo( ((Property)o).getName() ); else if ( o instanceof String ) return this.getName().compareTo( (String) o ); else throw new ClassCastException( "Property can compare to another Property or String only!"); } COM: <s> compare to the given object </s>
funcom_train/43378629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumn(IVColumnDefinition columnDef) { if (!columns.contains(columnDef)) { columns.add(columnDef); } else { throw new IllegalArgumentException("column with name: " + columnDef.getName() + " exists. The table definition does not accept 2 columns wiht same name."); } } COM: <s> add a new column to the table </s>
funcom_train/38735019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String filterProjectLangNS(String projectName, String language, String ns) { String nsDbCode = "NULL"; FilteredWMProject pr = projects.get(projectName.toUpperCase()); if (pr != null) { nsDbCode = pr.filterLangNS(language.toUpperCase(), ns.toUpperCase()); } return nsDbCode; } COM: <s> checks whether a namespace name corresponds to the translation into a </s>
funcom_train/16677418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void increment() { int textLength = getTextLength( ); value += currentIncrement; valueChanged( ); if (showIncrement) { // if the new value is longer than the old // value update the position // to remain at the same 10 power int newTextLength = getTextLength( ); if (value > 0) { if (newTextLength > textLength) { position += 1; updatePosition( ); } } else { if (textLength > newTextLength) { position -= 1; updatePosition( ); } } } fireSelectionEvent( ); } COM: <s> increments the current value at the current position and </s>
funcom_train/23297672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void setDefaultCladeBranchStroke(BasicStroke stroke) { if (stroke == null) { throw new IllegalArgumentException("Null 'stroke' argument."); } if ( !sDefault_Clade_Branch_Stroke.equals(stroke) ) { sDefault_Clade_Branch_Stroke = stroke; notifyAllTree2DPanelPreferenceChangeListeners(new Tree2DPanelPreferenceChangeEvent(null, Tree2DPanelPreferenceChangeEvent.STROKE_MODIFIED)); } } COM: <s> sets the global default stroke used to draw the branch line </s>
funcom_train/19253505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkValidation() { boolean andCheck = true; for (int i = 0; i < components.size(); i++) { ValidatableComponent c = (ValidatableComponent) components.get(i); c.fireValidation(false); if (!c.isValid()) { errorMessage = c.getErrorMessage(); } andCheck = andCheck && c.isValid(); } return andCheck; } COM: <s> calls the validation routines for each component this validation group is managing </s>
funcom_train/49318593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComposite(Composite composite) { this.composite = composite; // apply change to any selected figures for (CanvasFigure fig : graphics.getSelectedFigures()) { if (fig instanceof BasicFigure) { ((BasicFigure) fig).setComposite((AlphaComposite) composite); // XXX cast for diva-28Jan02 } } fireChange(); } COM: <s> set the composite transparency </s>
funcom_train/3991374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void background(float x, float y, float z, float a) { // if (format == RGB) { // background(x, y, z); // don't allow people to set alpha // // } else { // colorCalc(x, y, z, a); // backgroundFromCalc(); // backgroundImpl(); // } colorCalc(x, y, z, a); backgroundFromCalc(); } COM: <s> clear the background with a color that includes an alpha value </s>
funcom_train/32355346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkUniqueProject() { String properties[] = new String[3]; String values[] = new String[3]; properties[0] = ProjectConstants.NAME; properties[1] = ProjectConstants.STATUS; properties[2] = ProjectConstants.TYPE; values[0] = project.getName(); values[1] = ItemConstants.ACTIVE; values[2] = String.valueOf(Project.TYPE); boolean exists = dtAdapter.itemExists(properties, values); logger.info("The project name is unique: " + !exists); return !exists; } COM: <s> check if a project name is unique </s>
funcom_train/32057096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); GPGraphpad graphpad = new GPGraphpad(); WindowMaximize bottom = new WindowMaximize(graphpad); ActionEvent action = null; bottom.actionPerformed(action); JInternalFrame[] ajif = graphpad.getAllFrames(); assertTrue( ajif != null ); //graphpad.getFrame().dispose(); } COM: <s> test of action performed method of class window maximize </s>
funcom_train/48091292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OMElement build(String rep) throws BpelTestbedException { try { XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(rep)); StAXOMBuilder builder = new StAXOMBuilder(parser); return builder.getDocumentElement(); } catch (Exception e) { throw new BpelTestbedException("Unable to build XML document from string : " + e.getMessage() + ".", e); } } COM: <s> builds an xml document from its string representation </s>
funcom_train/33238329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verifyUserNameToken(Document doc) throws Exception { System.out.println("Before verifying UsernameToken...."); long startTime = System.nanoTime(); secEngine.processSecurityHeader(doc, null, this, null); long stopTime = System.nanoTime(); System.out.println("UsernameToken verification successfully!"); this.printElapsedTime( stopTime - startTime ); } COM: <s> verifies the soap envelope </s>
funcom_train/17024967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasCorelatingDiagramElement(FlowElement element) { for(DiagramElement diaEl : defs.getFirstPlane().getDiagramElement()) { if(diaEl instanceof BPMNShape && ((BPMNShape) diaEl).getBpmnElement().equals(element)) { return true; } if(diaEl instanceof BPMNEdge && ((BPMNEdge) diaEl).getBpmnElement().equals(element)) { return true; } } return false; } COM: <s> checks whether the </s>
funcom_train/7622741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performItemClick(View view, int position, long id) { if (mOnItemClickListener != null) { playSoundEffect(SoundEffectConstants.CLICK); mOnItemClickListener.onItemClick(this, view, position, id); return true; } return false; } COM: <s> call the on item click listener if it is defined </s>
funcom_train/39475579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean redirectHome(FacesContext facesContext, String s) { ValueBinding b = facesContext.getApplication() .createValueBinding(methodBind); Boolean loggedIn = (Boolean) b.getValue(facesContext); if (loggedIn) { return false; } for (String checkPage : allowedPages) { if (checkPage.equals(s)) { return false; } } return true; } COM: <s> checks whether if user is logged in or not </s>
funcom_train/25766802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int dimCalcShare(double[] sv) { double sum = MathUtil.sum(sv); int len = sv.length; double[] pct = new double[len]; for (int i = 0; i < len; i++) { pct[i] = sv[i] / sum; } double share = 0.5; double cumulate = 0.0; for (int i = 0; i < len; i++) { cumulate += pct[i]; if (cumulate >= share) { return i + 1; } } return sv.length; } COM: <s> return the position with which 50 share of the summed up singular values </s>
funcom_train/22397120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleClosingConnection() throws IOException, MailException { showTransitionStatus(resources.getString(LogicMailResource.MAILCONNECTION_CLOSING_CONNECTION)); handleBeforeClosing(); try { client.close(); } catch (IOException e) {} catch (MailException e) {} setConnectionState(STATE_CLOSED); if(!shutdownInProgress) { MailConnectionManager.getInstance().fireMailConnectionStateChanged( client.getConnectionConfig(), MailConnectionStateEvent.STATE_DISCONNECTED); } } COM: <s> handles the closing state to close an existing connection </s>
funcom_train/36062016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatabaseMetaData getDatabaseMetaData() throws SQLException, NoDatabaseConnectionException{ if( connectionBroker != null ){ Connection connection = null; try{ connection = connectionBroker.getConnection(); if( connection == null ) throw new NoDatabaseConnectionException(); DatabaseMetaData metaData = connection.getMetaData(); return metaData; } finally{ if( connection != null ) connection.close(); } } //We should not have gotten here unless an exception occurred that prevented us from getting the database information throw new NoDatabaseConnectionException(); } COM: <s> get the meta date associated with the database that is being used </s>
funcom_train/23271343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYAxisLabel(String label) { XYPlot plot = (XYPlot) this.chart.getPlot(); if (plot != null) { ValueAxis axis = plot.getRangeAxis(); String old = axis.getLabel(); axis.setLabel(label); firePropertyChange("yAxisLabel", old, label); } } COM: <s> sets the y axis label and fires a </s>
funcom_train/34341489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCantidadArticulo3() { if (CantidadArticulo3 == null) {//GEN-END:|53-getter|0|53-preInit // write pre-init user code here CantidadArticulo3 = new TextField("CantidadArticulo3", null, 5, TextField.NUMERIC);//GEN-LINE:|53-getter|1|53-postInit // write post-init user code here }//GEN-BEGIN:|53-getter|2| return CantidadArticulo3; } COM: <s> returns an initiliazed instance of cantidad articulo3 component </s>
funcom_train/9806127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _init(EdifCellInterface parent, int width, int direction) { _parentInterface = parent; _direction = direction; _singleBitPorts = new EdifSingleBitPort[width]; for (int i = 0; i < width; i++) _singleBitPorts[i] = new EdifSingleBitPort(this, i); } COM: <s> helper function for the constructor </s>
funcom_train/8662547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Frame copy() { Frame frame = new Frame(locals.length, stack.length); System.arraycopy(locals, 0, frame.locals, 0, locals.length); System.arraycopy(stack, 0, frame.stack, 0, stack.length); frame.top = top; return frame; } COM: <s> makes a shallow copy of this frame i </s>
funcom_train/44492333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateBrowserWithIndex(int browserIndex) { InternetExplorer matchingWindow = session.getBrowserAt(browserIndex); if (matchingWindow != null) { session.removeBrowser(matchingWindow); session.addBrowser(matchingWindow); activateLastNewWindow(); }else{ throw new RuntimeException("Could not activate window located at the provided index - '"+browserIndex+"'!"); } } COM: <s> activates the browser that was opened the nth time </s>
funcom_train/47107326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemArmor06() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Armor.A_06.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { controller.setPlrReadiedArmor(Armor.A_06); } }); return menuItem; } COM: <s> creates the seventh choice for the armor menu </s>
funcom_train/2951307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildToolbar() { JPanel toolbarPanel = new JPanel(); //toolbarPanel.setLayout(new BorderLayout()); toolbar = new JToolBar(); toolbar.add(hideShowJini); toolbar.add(hideShowSystemInfo); toolbar.add(hideShowLogger); toolbarPanel.add(toolbar, BorderLayout.CENTER); getContentPane().add(toolbarPanel,BorderLayout.NORTH); } COM: <s> creates main application toolbar </s>
funcom_train/1651770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readExtraPeerData() { DarknetPeerNode[] peers = getDarknetPeers(); for(int i = 0; i < peers.length; i++) { try { peers[i].readExtraPeerData(); } catch(Exception e) { Logger.error(this, "Got exception while reading extra peer data", e); } } String msg = "Extra peer data reading and processing completed"; Logger.normal(this, msg); System.out.println(msg); } COM: <s> ask each peer node to read in its extra peer data </s>
funcom_train/34813667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double calculateAdditivePairCorrelation(){ double top = (totalN * xYTot) - (xTot * yTot); double botLeft = Math.sqrt( (totalN * sqrXTot) - Math.pow(xTot,2) ); double botRight = Math.sqrt( (totalN * sqrYTot) - Math.pow(yTot,2) ); double bot = botLeft*botRight; if (bot == 0) return null; return new Double(top/bot); } COM: <s> following loading of this class using the add pairs to correlate </s>
funcom_train/15399067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteJobTemplate (JobTemplate jt) throws DrmaaException { if (jt == null) { throw new NullPointerException ("JobTemplate is null"); } else if (jt instanceof JobTemplateImpl) { nativeDeleteJobTemplate (((JobTemplateImpl)jt).getId ()); } else { throw new InvalidJobTemplateException (); } } COM: <s> the delete job template method releases all resources associated with the drmaa </s>
funcom_train/4389866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected File promptSketchbookLocation() { File folder = null; folder = new File(System.getProperty("user.home"), "sketchbook"); if (!folder.exists()) { folder.mkdirs(); return folder; } folder = Base.selectFolder( "Select (or create new) folder for sketches...", null, null); if (folder == null) { System.exit(0); } return folder; } COM: <s> check for a new sketchbook location </s>
funcom_train/12560550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSelection() { if (selectionLength==0) { return ""; } synchronized (Display.LCDUILock) { textFieldLF.lUpdateContents(); String s = buffer.toString(); int s_idx = selectionLength < 0 ? selectionStart+selectionLength : selectionStart; int e_idx = selectionLength < 0 ? selectionStart : selectionStart+selectionLength; return s.substring(s_idx, e_idx); } } COM: <s> get the string value of the current selection </s>
funcom_train/7745939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(IDomainObjectRelation relation) throws Exception { PreparedStatement insertStatement = null; try { insertStatement = Registry.getInstance().getConnection().prepareStatement(insertStatement()); insertStatement.setLong(1, relation.getTargetObject().getId().longValue()); insertStatement.setLong(2, relation.getRelatedObject().getId().longValue()); insertStatement.execute(); } catch (SQLException e) { throw new PersistenceException(e); } finally { insertStatement.close(); } } COM: <s> this method inserts a relation object into the database </s>
funcom_train/16928694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFilename(Part part) { for (String cd : part.getHeader(CONTENT_DISPOSITION).split(";")) { if (cd.trim().startsWith(CONTENT_DISPOSITION_FILENAME)) { return cd.substring(cd.indexOf('=') + 1).trim().replace("\"", ""); } } return null; } COM: <s> returns the filename from the content disposition header of the given part </s>
funcom_train/44340822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initiateInterpreter() { activationRecords.destroy(); newActivationRecords.destroy(); activePrimitives.destroy(); assignementRecords.clear(); activationRecords.add(new ActivationRecord(workSpace, null)); workSpace.setState(IN_ACTIVATION); // SynergyFrame.hierWndGC.DisplayWndGC(SynergyFrame.CptWM); //**** For Drawing Frame } COM: <s> initiate interpreter it set the appropriate context for starting the interpretation </s>
funcom_train/36105038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|40-getter|0|40-preInit // write pre-init user code here backCommand = new Command("Indietro", Command.BACK, 6);//GEN-LINE:|40-getter|1|40-postInit // write post-init user code here }//GEN-BEGIN:|40-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/11344289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onServiceDeparture(ServiceReference ref) { // Remove the reference is contained Object instance = m_factories.remove(ref); if (instance != null) { m_handler.info("Dispose the instance (departure of the factory) " + ((ComponentInstance) instance).getInstanceName()); ((ComponentInstance) instance).dispose(); } } COM: <s> a used service is leaving </s>
funcom_train/11012785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyRegistry() { POIFSReaderRegistry registry = new POIFSReaderRegistry(); for (int j = 0; j < paths.length; j++) { for (int k = 0; k < names.length; k++) { Iterator listeners = registry.getListeners(paths[ j ], names[ k ]); assertTrue(!listeners.hasNext()); } } } COM: <s> test empty registry </s>
funcom_train/3379210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setExtensions(Object val) throws CertificateException { if (version.compare(CertificateVersion.V3) < 0) { throw new CertificateException("Invalid version"); } if (!(val instanceof CertificateExtensions)) { throw new CertificateException( "Extensions class type invalid."); } extensions = (CertificateExtensions)val; } COM: <s> set the extensions in the certificate </s>
funcom_train/36004252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void denyContact (String clientCode) { Client isChanged = null; for(Client c: waitingContacts) if(c.getClientCode().equals(clientCode)){ SMSHandler.sendSMS(c,SMSType.Loser); isChanged = c;} if(isChanged!=null) waitingContacts.remove(isChanged); server.changed(this); } COM: <s> removes the contact in waiting contacts with the given client code </s>
funcom_train/10748757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1() { try { Constructor c = java.lang.ProtectedConstructor.class .getDeclaredConstructor((Class[]) null); c.newInstance((Object[]) null); fail("Exception expected"); } catch (Exception e) { assertTrue(e.getMessage(), e instanceof IllegalAccessException); } } COM: <s> attempt to create a class with a protected constructor </s>
funcom_train/20080052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTotalWidth() { int total = 0; int cols = getColumnCount(); for (int i = 0; i < cols; i++) { TableColumn col = getColumn(i); if (!col.isHidden()) { total += getWidthInPixels(col.index); } } return total; } COM: <s> returns the total column model width </s>
funcom_train/29022154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProjectionPanelInfo(String coordString){ if(coordString.equals(coordStrings[0])){ projPanel.setVisible(false); } else{ projPanel.setVisible(true); projPanel.setProjectionInfo((String)projPanel.projBox.getSelectedItem()); } } COM: <s> set the info in the projection panel based on the coordinate string </s>
funcom_train/44828161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toFullPath (String basePath) { String fullPath = getResolvedPath(); if (basePath != null && basePath.length() > 0 && isRelativePath()) { fullPath = basePath + System.getProperty("file.separator") + path; } return fullPath; } COM: <s> get the path prepended with the base path if this path is relative </s>
funcom_train/40106854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatOutput() { StringBuffer buffer = new StringBuffer(); buffer.append(this.commandExpression + "\n"); for(int i = 0, strLength = this.commandDescription.length(); i < strLength; i += 70) { buffer.append("\t"); if(strLength - i > 70) { buffer.append(this.commandDescription.substring(i, i + 70)); buffer.append("\n"); } else { buffer.append(this.commandDescription.substring(i, strLength)); } } return buffer.toString(); } COM: <s> to format the description output of the command </s>
funcom_train/14122732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getAnswer() { AsyncCallback callback = new AsyncCallback() { public void onSuccess(Object result) { afterGotAnswer((GWTMailMessage) result); } public void onFailure(Throwable caught) { try { throw caught; } catch (Throwable t) { // last } } }; GWTMailServiceCaller.getService().getAnswer(callback); } COM: <s> rpc for getting answer from the server </s>
funcom_train/44282570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void eventListener(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED){ sendSysex(cb.getSelectedIndex() + getValueMin()); if (autoUpdate) { try {Thread.sleep(100); } catch (Exception ex){} ((Driver) thisPatch.getDriver()).send(sndChange(((Driver) thisPatch.getDriver()).getChannel())); } else updater.itemStateChanged(); } } COM: <s> invoked when the an item is selected </s>
funcom_train/18215663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reloadEvaluationTimeData(EvaluationTimeWidget evaluationTimePanel) { evaluationTimePanel.datePickerFROM.setText(parser.getFromDate()); evaluationTimePanel.datePickerTO.setText(parser.getToDate()); boolean todayOption = parser.getToDate().equals(CommonConstants.TODAY); evaluationTimePanel.todayOption.setValue(todayOption); evaluationTimePanel.datePickerTO.setEnabled(!todayOption); evaluationTimePanel.setTimeGranularity(parser.getGranularity()); } COM: <s> reload the evaluation time widget data into the interface </s>
funcom_train/3582711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void labelEdge(Graphics2D g2d, Edge e, String label, int x1, int x2, int y1, int y2) { tg2d.setDelegate(g2d); labelEdge(tg2d, e, label, x1, x2, y1, y2); } COM: <s> overridden to wrap passed graphics2 d in my transforming graphics then call </s>
funcom_train/51270371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNsURI(String prefix) { if (prefix == null) { prefix = ""; } Namespace uri = null; if (inherit) for (XDMScope c = this; uri == null && c != null; c = c.parent) uri = (Namespace) c.prefixNamespaceMap.get(prefix); else uri = (Namespace) prefixNamespaceMap.get(prefix); if (uri!= null && !"".equals(uri.getURI())) return uri.getURI(); else return null; } COM: <s> gets the namespace uri associated with the given prefix </s>
funcom_train/46328257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void turnOnWifi() { WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); wifiManager.setWifiEnabled(true); ResultProcessor.process(this, intent, ResultProcessor.RESULT_SUCCESS, getString(R.string.wifi_turned_on)); } COM: <s> turn on the wifi </s>
funcom_train/37790410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireNakedActionVetoed(Permission perm) { Object listeners[] = listenerList.getListenerList(); for (int i=listeners.length-2; i>=0; i-=2) { if (listeners[i] == NakedActionListener.class) { ((NakedActionListener) listeners[i+1]).nakedActionVetoed(perm); } } } COM: <s> fired when an action failed </s>
funcom_train/8347694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitVolver() { if (exitVolver == null) {//GEN-END:|167-getter|0|167-preInit // write pre-init user code here exitVolver = new Command("Volver", Command.EXIT, 0);//GEN-LINE:|167-getter|1|167-postInit // write post-init user code here }//GEN-BEGIN:|167-getter|2| return exitVolver; } COM: <s> returns an initiliazed instance of exit volver component </s>
funcom_train/34888850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(ArrayList< Map<String,String> > results) { ListIterator< Map<String,String> > rowIterator = results.listIterator(); while ( rowIterator.hasNext() ) { Map<String,String> result = rowIterator.next(); result.clear(); result = null; } results.clear(); results = null; } COM: <s> release memory used for database query results </s>
funcom_train/15625036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragStart() { if (onMap && !dragging) { beginTransaction(); try { dragStart.setLocation(pos); mapGrid.preSelect(dragStart, pos); dragging = true; dragOffset.setSize(0, 0); } finally { endTransaction(); } } } COM: <s> set cursor to drag mode when it is active </s>
funcom_train/20896228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseOrganism(String pEntry) { String organism = null; Pattern p = Pattern.compile("\\s+ORGANISM\\s+(.+)\n"); Matcher m = p.matcher(pEntry); if (m.find()) { organism = m.group(1); } if (logger.isFinerEnabled()) { logger.finer("organism:\n" + organism); } return organism; } COM: <s> the method code parse organism code prses the entry fro the organism name </s>
funcom_train/39035787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processStartOfComplexType(final SAXDocumentElement docElement) { if (docElement.hasAttribute(XSDAttribute.NAME)) { currentNamedType = docElement.getAttributeValue(XSDAttribute.NAME); //namedTypes.put(currentNamedType, new XSDNamedType()); createAndPushContent(docElement, true); } } COM: <s> there are 2 kinds of complex type tags </s>
funcom_train/7373696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean writeErrorToHDFS(int limit, String taskId) { if (command.getPersistStderr()) { int tipId = TaskAttemptID.forName(taskId).getTaskID().getId(); return tipId < command.getLogFilesLimit(); } return false; } COM: <s> should the stderr data of this task be persisted on hdfs </s>
funcom_train/51296352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NamedId getGoodsType(int groupId) { String sql = "SELECT id, name FROM goods_group WHERE id = " + "(SELECT root_id FROM goods_group WHERE id = " + groupId + ")"; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); res.next(); return new NamedId(res.getInt("id"), res.getString("name")); } catch (Exception ex) { } finally { DBAccessor.getInstance().releaseConnection(res); } return new NamedId(); } COM: <s> retrieve sku group type </s>