__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12188017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getConvertedLocalName(String name) { String result = null; try { result = (String) PrivateAccessor.invoke( operationProcess, "getConvertedLocalName", new Class[]{String.class}, new Object[]{name}); } catch (Throwable throwable) { throwable.printStackTrace(); fail(throwable.getMessage()); } return result; } COM: <s> helper method to retrieve invoke the private method </s>
funcom_train/38513712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerAction(BaseAction pAction) { if (pAction == null) return; if (getActionByName(pAction.getName()) != null) { Util.warn("Action " + pAction.getName() + " already registered (ignored)!"); return; } name2action.put(pAction.getName(), pAction); } COM: <s> registers an action </s>
funcom_train/12081512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand1() { if (cancelCommand1 == null) {//GEN-END:|63-getter|0|63-preInit // write pre-init user code here cancelCommand1 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|63-getter|1|63-postInit // write post-init user code here }//GEN-BEGIN:|63-getter|2| return cancelCommand1; } COM: <s> returns an initiliazed instance of cancel command1 component </s>
funcom_train/5346519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddWrongLocation() { AlternateLocationCollection collection = AlternateLocationCollection.create (HugeTestUtils.UNIQUE_SHA1); for(int i=0; i<HugeTestUtils.UNEQUAL_SHA1_LOCATIONS.length; i++) { try { collection.add(HugeTestUtils.UNEQUAL_SHA1_LOCATIONS[i]); fail("should not have accepted unequal location: "+ HugeTestUtils.UNEQUAL_SHA1_LOCATIONS[i]); } catch(IllegalArgumentException e) { // this is the expected behavior } } } COM: <s> tests to make sure that unequal sha1s cannot be added to an </s>
funcom_train/45638320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createLink(Connection c) throws SQLException { new QueryRunner().update(c, MessageFormat.format(linkStatement, getGlobalName(), getLinkUser(), CryptUtil.decrypt(getLinkPasswordEncrypted()), getLinkHost(), String.valueOf(getLinkPort()), getLinkSid())); } COM: <s> crates the link </s>
funcom_train/26177545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueuedObject getNext() throws ObjectNotFoundException { final String METHOD = "getNext(): "; // declare the return value QueuedObject rval = null; // get the next printjob synchronized (queue) { if(queue.size() > 0) { rval = (QueuedObject)queue.get(queue.size()-1); } else { throw new ObjectNotFoundException(METHOD + "The queue was empty."); } } // return return rval; } COM: <s> gets the last object in the queue without removing it </s>
funcom_train/25291661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getDistanceFilter(Point2f[] attenuation) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DISTANCE_FILTER_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes12")); ((AuralAttributesRetained)this.retained).getDistanceFilter(attenuation); } COM: <s> retrieve distance filter as a single array containing distances </s>
funcom_train/3415091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean attemptStamp(V expectedReference, int newStamp) { ReferenceIntegerPair<V> current = atomicRef.get(); return expectedReference == current.reference && (newStamp == current.integer || atomicRef.compareAndSet(current, new ReferenceIntegerPair<V>(expectedReference, newStamp))); } COM: <s> atomically sets the value of the stamp to the given update value </s>
funcom_train/37204637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXml() { Element pluginSiteElement = new Element("pluginSite"); pluginSiteElement.addContent(new Element("name").addContent(getName())); Element urlElement = new Element("url"); if (getUrl() != null) { urlElement.addContent(getUrl().toString()); } pluginSiteElement.addContent(urlElement); return pluginSiteElement; } COM: <s> creates an xml element from this code plugin site code </s>
funcom_train/32057497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSelectionCell() { System.out.println("testGetSelectionCell"); JGraph jp = new JGraph(); DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp); Object obj = new Object(); dg.addSelectionCell(obj); assertTrue(dg.getSelectionCell() == obj); } COM: <s> this function tests get selection cell function of default graph cell class </s>
funcom_train/3113281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Font getTitleFont() { double scale = GraphicalObjectLib.getScaleFactor(COORD_ABS, this.getSheet()); Font defaultTitleFont = UIManager.getFont("InternalFrame.titleFont"); if (defaultTitleFont != null) { Font titleFont = defaultTitleFont.deriveFont (defaultTitleFont.getSize2D() / (float)scale); return titleFont; } else { return null; } } COM: <s> gets the font which is used to render the title </s>
funcom_train/32054939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getAllFlaggedEdges() { Set flaggedEdges = new HashSet(); //all nodes flagged in any network //iterate over all networks, saving the flagged objects in each network for (Iterator iter = Cytoscape.getNetworkSet().iterator(); iter.hasNext(); ) { CyNetwork network = (CyNetwork) iter.next(); Set edges = network.getSelectedEdges(); flaggedEdges.addAll(edges); } return flaggedEdges; } COM: <s> returns a set containing all the edges that are flagged in any network </s>
funcom_train/47438956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features agenteEClass = createEClass(AGENTE); recursoEClass = createEClass(RECURSO); ambienteEClass = createEClass(AMBIENTE); modeloEClass = createEClass(MODELO); ecosistemaEClass = createEClass(ECOSISTEMA); createEReference(ecosistemaEClass, ECOSISTEMA__ETIENE_AM); createEReference(ecosistemaEClass, ECOSISTEMA__ETIENE_AG); createEReference(ecosistemaEClass, ECOSISTEMA__ETIENE_R); createEReference(ecosistemaEClass, ECOSISTEMA__ETIENE_M); } COM: <s> creates the meta model objects for the package </s>
funcom_train/17848786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MutableChannelDayProgram getChannelDayProgram(Date date, Channel channel) { MutableChannelDayProgram channelDayProgram = getChannelDayProgram(date, channel, false); /* if (channelDayProgram != null) { mLog.info("Found " + channelDayProgram.getProgramCount() + " programs for " + channel.getName() + " on " + date); } */ return channelDayProgram; } COM: <s> gets the channel day program of the specified date and channel </s>
funcom_train/45622876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUserEnvironmentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VCBuildType_userEnvironment_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VCBuildType_userEnvironment_feature", "_UI_VCBuildType_type"), MSBPackage.eINSTANCE.getVCBuildType_UserEnvironment(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the user environment feature </s>
funcom_train/14219012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shippingApplies() { boolean shippingApplies = false; Iterator i = this.iterator(); while (i.hasNext()) { ShoppingCartItem item = (ShoppingCartItem) i.next(); if (item.shippingApplies()) { shippingApplies = true; break; } } return shippingApplies; } COM: <s> returns true when there are shippable items in the cart </s>
funcom_train/24534844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CategoryModel findParentStyle(String category, CategoryModel treeRoot) { Object[] iterator = treeRoot.getChildren(); for (int i = 0; i < iterator.length; i++) { if (iterator[i] instanceof CategoryModel) { if (((CategoryModel) iterator[i]).getId().equalsIgnoreCase(category)) return (CategoryModel) iterator[i]; } } return null; } COM: <s> finds the parent of the contributed style </s>
funcom_train/33371343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void optimize() { Vector c = new Vector(code.getDimension()); for(int j=0; j<c.getDimension(); j++) { double value = 0; for(int i=0; i<vectors.size(); i++) { Vector v = (Vector)vectors.get(i); value += v.getDouble(j); } c.set(value / (double)vectors.size(), j); } code = c; vectors = new ArrayList(); vectors.add(code); } COM: <s> optimizes this cluster by finding the optimimum code vector based on </s>
funcom_train/40680887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Date value) { Date old = this.value; this.value = value; this.setRenderDate(new Date(this.value.getYear(), this.value.getMonth(), 1)); if (this.isAttached()) { this.render(); } this.changes.firePropertyChange("value", old, this.value); } COM: <s> sets the date value of the calendar </s>
funcom_train/8093473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateGeneralisation() throws Exception { if(m_PreInst == null){ throw new Exception("Exemplar.validateGeneralisation : validateGeneralisation called without previous call to preGeneralise!"); } add(m_PreInst); m_PreRange = null; m_PreMinBorder = null; m_PreMaxBorder = null; } COM: <s> validates a generalisation started with pre generalise </s>
funcom_train/49266245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element asJDOMElement() { Element mqData = new Element("mqQueueManager"); mqData.setAttribute("name", name); mqData.setAttribute("host", host); mqData.setAttribute("port", Integer.toString(port)); mqData.setAttribute("ccsid", Integer.toString(ccsid)); mqData.setAttribute("channel", channel); for (String queueName : queues) { Element queue = new Element("queue"); queue.setText(queueName); mqData.addContent(queue); } return mqData; } COM: <s> returns jdom element representing this mqqueue manager data object </s>
funcom_train/34259395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeTaskDomains(Fmm amFmm) { File theTaskDomainDirectoryName = new File(this.flywheelWorkspace.getFmm().getTaskDomainDirectoryPath()); for (File theFile : theTaskDomainDirectoryName.listFiles()) { if(TaskDomainPersistenceHelper.isValidTaskDomainDirectoryName(theFile)) { PersistenceHelper.retrieveTaskDomain( this.flywheelWorkspace, amFmm, theFile); } } } COM: <s> builds the task domain list and sets the default task domain object </s>
funcom_train/43872726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModificationMap getModificationMap() { if (iModMap == null) { iModMap = new ModificationMap(iXTParser.getRawModMap(), this.getPeptideMap(), this.getInputParameters(), iXTParser.getNumberOfSpectra()); } return iModMap; } COM: <s> this method returns the modification hash map </s>
funcom_train/18726638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitUntilPainted(final long wait) throws InterruptedException { synchronized (lock) { if (painted || (frame == null)) { return; } long remaining = wait; long old = System.currentTimeMillis(); while (remaining > 0) { lock.wait(remaining); if (painted || (frame == null)) { return; } final long now = System.currentTimeMillis(); remaining -= (now - old); old = now; } } } COM: <s> wait for remaining 0 milliseconds until the image has been </s>
funcom_train/31940956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { headingLabel = new JLabel(heading); headingLabel.setForeground(fontColor); Font f = new Font(null, Font.BOLD, 11); headingLabel.setFont(f); subHeadingLabel = new JLabel(subHeading); subHeadingLabel.setForeground(fontColor); f = new Font(null, Font.PLAIN, 11); subHeadingLabel.setFont(f); iconLabel = new JLabel(); iconLabel.setIcon(icon); } COM: <s> create and init the gui components </s>
funcom_train/28471795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeyword() { String keywordName = "Alkoholverdruss"; Category myCategory = new Category(); Keyword myKeyword = new Keyword(keywordName, myCategory.getPrimaryKey()); assertTrue(myKeyword.getCategoryKey() == myCategory.getPrimaryKey()); assertTrue(myKeyword.getKeyword().equals(keywordName)); } COM: <s> this should test the constructor of keyword </s>
funcom_train/34826046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPrevStepAvailable() { if (false == config.isBackwardAllowed()) { return false; } for (int idx = flowStack.size() - 2; idx >= 0; idx--) { if (indexStack.get(idx) > 0) { return false == flowStack.get(idx).isBlockBackward(); } } return false; } COM: <s> checks whether is possible switch to previous step </s>
funcom_train/1823570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List subTriangles(Coordinate newVertex) { ArrayList triangles = new ArrayList(); triangles.add(new Triangle(p1, p2, newVertex)); triangles.add(new Triangle(p2, p3, newVertex)); triangles.add(new Triangle(p3, p1, newVertex)); return triangles; } COM: <s> returns the three triangles that result from splitting this triangle at </s>
funcom_train/45252629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveMruList(IMemento memento) { Iterator iterator = recentWorkingSets.iterator(); while (iterator.hasNext()) { IWorkingSet workingSet = (IWorkingSet) iterator.next(); IMemento mruMemento = memento .createChild(IWorkbenchConstants.TAG_MRU_LIST); mruMemento.putString(IWorkbenchConstants.TAG_NAME, workingSet .getName()); } } COM: <s> saves the list of most recently used working sets in the persistence </s>
funcom_train/19028475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpAboutMenuItem() { if (helpAboutMenuItem == null) { helpAboutMenuItem = new JMenuItem(); helpAboutMenuItem.setText("About"); helpAboutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // TODO Display WUMprep splash/about screen here new JDialog(WUMprepConfigEditor.this, "About", true) .setVisible(true); } }); } return helpAboutMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/29932791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumnAsGUID(String name, Integer pkIndex, Integer position) throws IESException { Column c = new Column(name,java.sql.Types.CHAR,32,null,null,false,true,null, this.getDBVendor(),pkIndex,position); c.setIsGUID(true); } COM: <s> add a column which will be auto generated guid for an id field </s>
funcom_train/17966146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidAnchor(int anchor) { switch (anchor) { case NORTH: case NORTH_NORTHEAST: case NORTH_NORTHWEST: case SOUTH: case SOUTH_SOUTHEAST: case SOUTH_SOUTHWEST: case WEST: case WEST_NORTHWEST: case WEST_SOUTHWEST: case EAST: case EAST_NORTHEAST: case EAST_SOUTHEAST: return true; default: return false; } } COM: <s> tests if the specified anchor is a valid anchor </s>
funcom_train/3926576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int optionValueToInt( Object value ) { int n; try { n = Integer.parseInt(value.toString()); } catch (NumberFormatException e) { System.out.println("Couldn't convert option " + value + " to integer."); n = 0; } return n; } COM: <s> convert an option value to an integer </s>
funcom_train/7442178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User findUser(String userIdentifier) { User result = null; User user; for (int i = 0; (result == null) && (i < getUsers().size()); i++) { user = getUsers().get(i); if (user.getIdentifier().equals(userIdentifier)) { result = user; } } return result; } COM: <s> finds a user in the organization based on its identifier </s>
funcom_train/8091195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildClassifier(Instances data) throws Exception { // can classifier handle the data? getCapabilities().testWithFail(data); // remove instances with missing class Instances newData = new Instances(data); newData.deleteWithMissingClass(); m_Random = new Random(getSeed()); for (int i = 0; i < m_Classifiers.length; i++) { getClassifier(i).buildClassifier(newData); } } COM: <s> buildclassifier selects a classifier from the set of classifiers </s>
funcom_train/5830364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(long nodeid, RTCNode rtcN) { Long key = new Long(nodeid); List nodesList = (List) get(key); if (nodesList != null) { nodesList.add(rtcN); } else { // add current node to list nodesList = new ArrayList(); nodesList.add(rtcN); // add list to map put(key, nodesList); } } COM: <s> add the node with nodeid as key </s>
funcom_train/44977075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void GetChar() { // Check to see if we've walked off the end of the string. // Just return if so and reset Look to smoething to keep // SkipWhitespace from spinning if (pointer == formulaLength) { look = (char)0; return; } look=formulaString.charAt(pointer++); //System.out.println("Got char: "+ look); } COM: <s> read new character from input stream </s>
funcom_train/49719970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemForward() { if (jMenuItemForward == null) { jMenuItemForward = new JMenuItem(); jMenuItemForward.setText("Forward"); jMenuItemForward.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // getJDesktopPane().selectFrame(true); } }); } return jMenuItemForward; } COM: <s> this method initializes j menu item forward </s>
funcom_train/12564994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final void setTrait(String value, String traitType) throws DOMException { if (ElementNode.TRAIT_TYPE_STRING.equals(traitType) || this.traitType.equals(traitType)) { setTraitImpl(value); } else { throw targetElement.unsupportedTraitTypeNS(traitName, traitNamespace, traitType); } } COM: <s> sets the traits base value as a string </s>
funcom_train/4040240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createToolBarForNonWindowsOS(IToolBarManager toolBar) { CalendarAction.create(toolBar, getSite().getShell(), preferences .getStartDate(), " From: ", " "); CalendarAction.create(toolBar, getSite().getShell(), preferences .getEndDate(), " To: ", " "); } COM: <s> creates tool bar items for non windows operating systems </s>
funcom_train/23411282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAttachedToPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TransitionNorm_attachedTo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TransitionNorm_attachedTo_feature", "_UI_TransitionNorm_type"), OMPackage.Literals.TRANSITION_NORM__ATTACHED_TO, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the attached to feature </s>
funcom_train/33598574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem() { if (stringItem == null) {//GEN-END:|25-getter|0|25-preInit // write pre-init user code here stringItem = new StringItem("Result", "");//GEN-LINE:|25-getter|1|25-postInit // write post-init user code here }//GEN-BEGIN:|25-getter|2| return stringItem; } COM: <s> returns an initiliazed instance of string item component </s>
funcom_train/49640192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String group, String name, String value) { if (!groups.containsKey(group)) { groups.put(group, new LinkedList<Pair<String, String>>()); } groups.get(group).add(new Pair<String,String>(name, value)); } COM: <s> put a group into this status object </s>
funcom_train/25523636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAvatarPositions(Collection<Agent> nearbyAgents) { if(getJpMap().getComponentCount() > 0) { MapImage mapImage = (MapImage)getJpMap().getComponent(0); if(mapImage != null) { // Clean up the old agents. mapImage.cleanUp(); // Plot the new agents. mapImage.plotNearbyAgents(nearbyAgents); } } } COM: <s> update avatar positions </s>
funcom_train/45809532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TopicMapStoreIF getStore(Object txnuser, String refkey) { synchronized (txnuser) { if (txnusers.containsKey(txnuser)) { Map<String, TopicMapStoreIF> stores = txnusers.get(txnuser); if (stores.containsKey(refkey)) return stores.get(refkey); } } return null; } COM: <s> internal looks up a topic map store for a given transaction user </s>
funcom_train/46829061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int fileid) { Element file = new Element("file"); Attribute fileidAttrib = new Attribute("id",""+fileid); file.setAttribute(fileidAttrib); Element root = doc.getRootElement(); Element move = root.getChild("add"); move.addContent(file); } COM: <s> creates a schedule entry for a given add operation </s>
funcom_train/31073630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void indent( boolean pIncrease ) { if( pIncrease ) { mActualIndentationLevel++; } else { if( mActualIndentationLevel > 0 ) { mActualIndentationLevel--; } } mActualIndentation = ""; for( int i = 0; i < mActualIndentationLevel; i++ ) { mActualIndentation = mActualIndentation + mIndentationUnit; } } COM: <s> in or decrease the identation </s>
funcom_train/39314700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCancelActionPerformed(){ tests = new Layer(new main_canvas()); tests.change.doClick(); //tests.area =new JTextField("",20); tests.cancelActionPerformed(new ActionEvent(tests, 1, "p")); assertFalse(tests.temp.isVisible()); tests.setVisible(false); tests.dispose(); tests=null; } COM: <s> test of cancel action performed method of class layer </s>
funcom_train/2522871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date parse(String rawString, TimeSeriesFormat format){ try{ if (rawString.equals(format.missingDate)) return null; rawString = correctParseString(rawString, df.toPattern()); return df.parse(Convert.trim(rawString)); } catch (Exception nfe){return null;} //In case of trouble (ParseExeption, etc.) return null } COM: <s> parses a date time stored in one column </s>
funcom_train/26201768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printIndexContents(PackageDoc[] packages, String text) { if (packages.length > 0) { Arrays.sort(packages); printIndexHeader(text); printAllClassesPackagesLink(); for(int i = 0; i < packages.length; i++) { PackageDoc packagedoc = packages[i]; printIndexRow(packagedoc); } printIndexFooter(); } } COM: <s> generate code for package index contents </s>
funcom_train/45810030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyListeners(TopicIF leftRolePlayer, AssociationIF assoc, TopicIF rightRolePlayer) { Iterator<AssociationWalkerListenerIF> it = listeners.iterator(); while (it.hasNext()) { AssociationWalkerListenerIF listener = it.next(); listener.walkAssociation(leftRolePlayer, assoc, rightRolePlayer); } } COM: <s> private this function is invoked by the walk function for each </s>
funcom_train/14237533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateLabelValue(Integer constant) { int size = getSize(); for(int i=0;i < size;i++) { IntegerLabel l = (IntegerLabel)getElementAt(i); if(l.getValue().equals(constant)) { setSelectedItem(l); break; } } } COM: <s> this should be called when the integer constant changes </s>
funcom_train/40616589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(int state) { switch(state) { case COMMIT: store.setInDoubtTransactionState(sessionId, pos, true); break; case ROLLBACK: store.setInDoubtTransactionState(sessionId, pos, false); break; default: DbException.throwInternalError("state="+state); } this.state = state; } COM: <s> change the state of this transaction </s>
funcom_train/3786871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int clearPairingBit(int pairCode) { /* clearPairingBit */ int pc= cvPairCode2PairingBit(pairCode); if(pc!=-1 && ((pc&pairingBits)!=0)) { pairingBits -= pc; } return(pairingBits); } /* clearPairingBit */ COM: <s> clear pairing bit clear the search pairing bit </s>
funcom_train/3117956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteObject(GraphicalObject gob) { if (gob != null) { MacroCommand cmd = new MacroCommand(); cmd.addCommand(new DenimDeleteCommand(gob)); cmd.addCommand(new SetSheetModifiedCommand(this, true)); cmdqueue.doCommand(cmd); repaint(); } } // of method COM: <s> deletes the given object from the sheet </s>
funcom_train/18149462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAcknowledgementDetail(AcknowledgementDetail acknowledgementDetail) { // create the association set if it doesn't exist already if(_acknowledgementDetail == null) _acknowledgementDetail = new AssociationSetImpl<AcknowledgementDetail>(); // add the association to the association set getAcknowledgementDetail().add(acknowledgementDetail); // make the inverse link acknowledgementDetail.setAcknowledgement(this); } COM: <s> adds an association acknowledgement detail </s>
funcom_train/20659766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitMenuItem() { if (exitMenuItem == null) { exitMenuItem = new JMenuItem(); exitMenuItem.setText("Exit"); exitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK, true)); exitMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); } }); } return exitMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/37075550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNewFeature(SeqFeatureI feature) { Transaction tn = null; for (Iterator it = unflattenedTransactions.iterator(); it.hasNext();) { tn = (Transaction) it.next(); if ((tn.isAdd()) && (tn.getSubpart() == null) && (tn.getSeqFeature().isIdentical(feature))) return true; } return false; } COM: <s> returns true if feature has been added in a previous transaction </s>
funcom_train/3423364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValues(Object[] elements, int from) { for (int i=0, j=0; i<fTableSize && j<fNum; i++) { for (Entry entry = fBuckets[i]; entry != null; entry = entry.next) { elements[from+j] = entry.value; j++; } } return fNum; } COM: <s> add all values to the given array </s>
funcom_train/38282783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlAnalyzer(InputStream content0) throws IOException { Tidy tidy = new Tidy(); tidy.setWraplen(1000); tidy.setShowWarnings(false); tidy.setUpperCaseTags(true); doc = (tidy.parseDOM(content0, null)); enableSwapping = false; analyze(doc); plainText = plainText + "\r\n"; } COM: <s> constructs html analyzer from data given from input stream </s>
funcom_train/4726862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateEditorPane(final JEditorPane editorPane, String html) throws Exception { editorPane.setText(html); freezeHorizontalScrollBarsDuring(new Closure() { public void execute() throws Exception { freezeVerticalScrollBarsDuring(new Closure() { public void execute() throws Exception { updateScrollBars(); } }); } }); } COM: <s> populates the editor pane with the contents of the revision </s>
funcom_train/12862665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int countRowsInTable(Class<?> domainObjectClass, String condition) throws Exception { String table; if (domainObjectClass.isAnnotationPresent(Table.class)) { table = domainObjectClass.getAnnotation(Table.class).name(); } else { table = domainObjectClass.getSimpleName(); } return countRowsInTable(table, condition); } COM: <s> counts the number of rows from a table via jdbc </s>
funcom_train/50722571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClasspathCache addClasspath(IContainer classpath) { IPath clpath = classpath.getFullPath(); if (!classpaths.containsKey(clpath)) { ClasspathCache cache; if (classpath.isLinked()) { PluginCache rootCache = PluginCache.getInstance(); cache = new LinkedClasspathCache(classpath); rootCache.bindCloakClasspath((LinkedClasspathCache)cache); } else { cache = new ClasspathCache(classpath); } classpaths.put(clpath,cache); return cache; } return classpaths.get(clpath); } COM: <s> adds a classpath cache </s>
funcom_train/23280063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Phrase getInfo(Project project, String type, String text){ Phrase phrase=new Phrase(); boolean flag=false; for (Information info : project.getInformation()) { if (info.getName().equals(type)){ phrase = new Phrase(text + info.getValue()); flag=true; } } if (!flag) phrase= new Phrase(text); return phrase; } COM: <s> method to get information of the given project </s>
funcom_train/445716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void atestCreateNamespace() throws Exception { try { factory.createNamespace(null, createIRI(defaultNsIri)); fail("Precondtions not checked"); } catch (IllegalArgumentException e) {} try { factory.createNamespace(defaultNsPrefix, null); fail("Precondtions not checked"); } catch (IllegalArgumentException e) {} } COM: <s> tests the preconditions to create namespace </s>
funcom_train/11648438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPrimitiveType(Class type) { // TODO: this method will probably be deprecated when primitive types // are subsumed into the simple type concept TypeBindingStrategy.BindingType bindingType = configuration.getTypeBindingStrategy().bindingType( type ) ; boolean result = (bindingType.equals(TypeBindingStrategy.BindingType.PRIMITIVE)); return result; } COM: <s> is this class a primitive </s>
funcom_train/8310906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpRequestImpl pop() { synchronized (lock) { while (!isTerminated && requests.isEmpty()) { try { lock.wait(); } catch (InterruptedException e) { // Do nothing } } if (isTerminated) { return null; } else { HttpRequestImpl request = (HttpRequestImpl) requests.elementAt(0); requests.removeElementAt(0); return request; } } } COM: <s> pops the first http request if any </s>
funcom_train/26483945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paper(Attributes attributes) { int orientation = PaperFormat.PORTRAIT; // Default value String orientationStr = attributes.getValue("orientation"); if (orientationStr != null && "landscape".equals(orientationStr.toLowerCase())) orientation = PaperFormat.LANDSCAPE; PaperFormat pf = PaperFormat.get(orientation, attributes.getValue("name")); if (pf != null) getReport().setPaperFormat(pf); } COM: <s> reads paper size name and orientation </s>
funcom_train/3595946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHighlighted(int type, ObjectModelElement el) { Set displays = (Set) dataToTextElement.get(el.getID()); if (displays == null) { return; } for (Iterator elit=displays.iterator(); elit.hasNext();) { NTextElement nte = (NTextElement)elit.next(); setHighlighted(type, nte); } } COM: <s> highlight the given object model element typically </s>
funcom_train/20078029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeComment(){ logger.info("Deleting Comment"); String command = getDeleteCommentCommand(getCommentKey()); String query = updateBegin() + command + updateEnd(); String result = executeQuery(query, "Comments.xml"); logger.info("Deleting result is:" + result); if ("fail".equalsIgnoreCase(result)){ return; } } COM: <s> remove comment by comment key parameter </s>
funcom_train/5466391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean overlapsDEBUG(RectArea area, int dis){ System.out.println("check overlap: " + this + " with " + area); System.out.println("\t X : " + overlapsX(area, dis)); System.out.println("\t Y : " + overlapsY(area, dis)); return (overlapsX(area, dis) && overlapsY(area, dis)); } COM: <s> same like overlaps but with debug output </s>
funcom_train/50066779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNotifcnsCommand() { if (notifcnsCommand == null) {//GEN-END:|113-getter|0|113-preInit // write pre-init user code here notifcnsCommand = new Command("Settings", Command.OK, 0);//GEN-LINE:|113-getter|1|113-postInit // write post-init user code here }//GEN-BEGIN:|113-getter|2| return notifcnsCommand; } COM: <s> returns an initiliazed instance of notifcns command component </s>
funcom_train/18744322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printError(String message, boolean showHelp) { if (showHelp) { printHelp(); } try { Thread.sleep(10); } catch (InterruptedException e) { // proceed } System.err.println(); System.err.println("Error: " + message); if (this.logWriter != null) { this.logWriter.close(); } System.exit(0); } COM: <s> prints an error message followed by the help message and exits </s>
funcom_train/38520153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getClassesFromMapping() { NodeList list = template.getElementsByTagNameNS( TemplateProcessor.TEMPLATE_NS, TemplateTags.PUT_INSTANCE); for (int i = 0, listLength = list.getLength(); i < listLength; i++) { Element elem = (Element) list.item(i); String className = elem.getAttributeNS(TemplateProcessor.TEMPLATE_NS, TemplateTags.NAME); if (!this.classes.containsKey(className)) { this.classes.put( className, mappingProcessor.getClassByTemplateName(className)); } } } COM: <s> creates all classes mentioned by put instance in template document </s>
funcom_train/16482639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForAutoSave() { if (!(data.getStream() instanceof Stream)) { return; } Stream s = data.getStream(); if (!s.getUseAutoSaveEvery()) { return; } String msg = messagelabel.getText(); if (s.getReviewed() % s.getAutoSaveEvery() == 0) { if (onSave()) { setMessage(msg + " " + getStreamSavedMessage()); } else { setMessage(msg + " " + Strings.get(50)); } flipbutton.requestFocus(); } } COM: <s> autosaves the stream if the autosave review count has been reached </s>
funcom_train/32766143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLineStroke( final float width, final float ... dashPattern ) { this.lineThick = (int)width; this.lineStroke = new BasicStroke( width, this.lineStroke.getEndCap(), this.lineStroke.getLineJoin(), this.lineStroke.getMiterLimit(), dashPattern, this.lineStroke.getDashPhase() ); } COM: <s> set the line stroke both width and dash pattern </s>
funcom_train/48981911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtension(String fileName){ String extension = FilenameUtils.getExtension(fileName); // verifies if this file is a tar if(FilenameUtils.getExtension(FilenameUtils.removeExtension(fileName)).equals("tar")){ extension = "tar." + extension; } return extension; } COM: <s> retrieves the extension file </s>
funcom_train/38622903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getData(String key) { if (INFO) { LOGGER.info(":::Entering method::: getData - " + key); } try { String content = loadFromUrl(getRemoteUrlSetting(DATE_REMOTE_URL_MAP), DATE_REMOTE_URL_MAP, null); return LogicBlockUtils.getValueFromContent(content, key); } catch (Exception e) { String msg = "Failed to retrieve variable value."; LOGGER.error(msg, e); return null; } } COM: <s> returns value from file sent </s>
funcom_train/43298523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEpsilonEdges() { this.assertEquals(new ArrayList(), state1.getEpsilonEdges()); state1.setEdge(state2, (char) 0); state1.setEdge(state2, 'x'); ArrayList test = new ArrayList(); test.add(state1.getEdge(0)); this.assertEquals(test, state1.getEpsilonEdges()); } COM: <s> test of get epsilon edges method of class state </s>
funcom_train/34962026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOpenCompare() { if (openCompare == null) { openCompare = new JButton(); openCompare.setText("Open compare"); openCompare.setToolTipText("Open a compare langauge file (the left one)"); openCompare.addActionListener(this); } return openCompare; } COM: <s> this method initializes open compare </s>
funcom_train/43245425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTmpCity() { System.out.println("setTmpCity"); String tmpCity = ""; PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object(); instance.setTmpCity(tmpCity); // 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 tmp city method of class org </s>
funcom_train/13256385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(int num, double[] values) throws IllegalArgumentException { if (values.length != xAxis.length) { throw new IllegalArgumentException("Length of provided dataset does not match x-axis points."); } // Clears target dataset clear(num); // Adds values for (int i = 0; i < xAxis.length; i++) { addPoint(num, xAxis[i], values[i], true); } } COM: <s> draw given values on selected line with selected caption </s>
funcom_train/4307190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPlayer( int num, int type, String name ){ Player temp = null; if ( type == Player.LOCALPLAYER ) { temp = new LocalPlayer( num, theRules, this ); temp.setName( name ); } else if ( type == Player.NETWORKPLAYER ) { temp = new NetworkPlayer( num, theRules, this ); temp.setName( name ); } if ( num == 1 ) { playerOne = temp; } else { playerTwo = temp; } } COM: <s> this method creates the correct players for a game </s>
funcom_train/17821070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logQuery() { if ( isSSL ) { if ( ! logHTTPS.isDebugEnabled() ) System.out.println("LOG:WARNING!!!!!!! Couldn't log the HTTPS requests "); logHTTPS.error( sb.toString() ); } else logHTTP.error( sb.toString() ); sb = null; } COM: <s> log the current log line via log4 j system </s>
funcom_train/21647810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReport( int index, HasId report ) { if( report==null ) { return; } String row = hoursFormat.formatValue( report ); if( row!=null ) { hModel[index] = (Report) report; hList.setRow( index, row.split(",") ); } } COM: <s> replaces hours report by report in parameter </s>
funcom_train/15867511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImpossible(OEAgent a) throws MoiseConsistencyException { if (comAgs.contains(a)) { state = GoalState.impossible; // check super goal impossibility setSuperImpossible(); } else { throw new MoiseConsistencyException("The agent "+a+" is not committed to "+this+", so it can not set this goal as impossible!"); } } COM: <s> sets this goal as impossible to be achieved </s>
funcom_train/24379200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getTypeAsNode(Node node, FeedbackBlockType type){ if (type != null) { QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "feedbackBlock"); JAXBElement<FeedbackBlockType> jaxbe = new JAXBElement<FeedbackBlockType>(qname, FeedbackBlockType.class, type); node = getNode(node, jaxbe); } return node; } COM: <s> gets the feedback block type as a dom node </s>
funcom_train/19231242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout(LWMap map) { Iterator<LWNode> nodeIterator = map.getChildIterator(); while (nodeIterator.hasNext()) { LWNode node = nodeIterator.next(); node.setLocation(MAP_SIZE * Math.random(), MAP_SIZE * Math.random()); } } COM: <s> it takes a map and scatters the nodes randomly </s>
funcom_train/50148799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnModel(org.wct.table.TableColumnModel columnModel) { org.wct.table.TableColumnModel oldColumnModel = this.columnModel; this.columnModel = columnModel; if(getTableHeader()!=null) getTableHeader().setColumnModel(this.columnModel); propertyChangeSupport.firePropertyChange("columnModel", oldColumnModel, columnModel); } COM: <s> setter for property column model </s>
funcom_train/22629730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { if (Source_Type.featOkTst && ((Source_Type)jcasType).casFeat_text == null) jcasType.jcas.throwFeatMissing("text", "banner.types.uima.Source"); return jcasType.ll_cas.ll_getStringValue(addr, ((Source_Type)jcasType).casFeatCode_text);} COM: <s> getter for text gets text in the file or line </s>
funcom_train/16969811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isColonATime(final char[] buf, int idx) { if ( buf[idx] != ':' ) { return(false); } else if ( Helper.isPreviousNumber(buf, idx) && Helper.isNextNumber(buf, idx) ) { return(true); } return(false); } COM: <s> determines if the colon at position code idx code in the buffer </s>
funcom_train/784740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { Model theOther = (Model) other; if(theOther==null && this!=null) return false; return (theOther.getName().equals(name) && theOther.getMembersInterval().equals(members) && theOther.getOptions().equals(options) && theOther.getStats().equals(stats)); } COM: <s> compares two model using all their fields and sets </s>
funcom_train/7272159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleAddressStateChanged() { SwingUtilities.invokeLater(new Runnable() { public void run() { // don't touch GUI code if it isn't constructed. // this is necessary here only because addressStateChanged // is triggered by Acceptor, which is init'd prior to the // GUI actually existing. if (GUIMediator.isConstructed()) SearchMediator.addressChanged(); } }); } COM: <s> notification that the address has changed </s>
funcom_train/19305666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRegionBody() { final SimplePageMaster simplePageMaster = getPageMaster(); for (RegionBody regionBody : simplePageMaster.getRegionBodies()) { final RegionRABody area = RegionRABody.makeRegionBodyArea( regionBody, this); this.children.add(area); final String name = regionBody.traitRegionName(); this.bodies.put(name, area); } } COM: <s> creates the region body for this page </s>
funcom_train/3740288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSystemUsers() throws UserManagerException{ List list = new LinkedList(); try { Session sess = HibernateUtil.currentSession(); Criteria crit = sess.createCriteria(User.class); crit.addOrder(Order.asc("id")); list = crit.list(); } catch (Exception e) { String error = e.getClass()+"UserManager.getUser(userId)"; logg.debug(error); throw new UserManagerException(error); } return list; } COM: <s> returns list of all users in the system ascending id numbers </s>
funcom_train/15677745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D focus1() { double a, b, theta; if (r1 > r2) { a = r1; b = r2; theta = this.theta; } else { a = r2; b = r1; theta = this.theta + PI / 2; } return Point2D.createPolar(xc, yc, sqrt(a * a - b * b), theta + PI); } COM: <s> return the first focus </s>
funcom_train/18336558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCaller() { StackTraceElement[] stack = new Throwable().getStackTrace(); String caller = null; for (int i = 0; i < stack.length; i++) { if (!stack[i].getClassName().equals(this.getClass().getName())) { caller = stack[i].getClassName(); break; } } return caller; } COM: <s> takes the current stack frame and searches bottom up </s>
funcom_train/15625637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjectText(@NotNull final String objectText) { this.objectText.setLength(0); this.objectText.append(objectText); if (objectText.length() > 0 && !objectText.endsWith("\n")) { this.objectText.append('\n'); } clearAttributeCache(); } COM: <s> sets the object text </s>
funcom_train/10190442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContentType() { String str; int end=(new SipParser(m_strValue)).indexOf(';'); if (end<0) str=m_strValue; else str=m_strValue.substring(0,end); return (new SipParser(str)).getString(); } COM: <s> gets content length of content length header </s>
funcom_train/40792728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|71-getter|0|71-preInit // write pre-init user code here cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|71-getter|1|71-postInit // write post-init user code here }//GEN-BEGIN:|71-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>