__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44137754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectByElement(OSMElement elt) { if(elt != null) { Iterator it = m_LineList.iterator(); while(it.hasNext()) { OSMSlideBodyLine curLine = (OSMSlideBodyLine)it.next(); if(curLine.isContainElement(elt)) { m_SelectedLine = curLine; select(); break; } } } } COM: <s> to select a line by associated element </s>
funcom_train/45112226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLink(String key, Object... arguments) { if (arguments == null || arguments.length == 0) { return linkMap.getProperty(key); } for (int i = 0; i < arguments.length; i++) { arguments[i] = arguments[i].toString(); } return MessageFormat.format(linkMap.getProperty(key), arguments); } COM: <s> returns a link from the link properties </s>
funcom_train/32769947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelMain() { if (panelMain == null) { panelMain = new JPanel(); panelMain.setLayout(new BorderLayout()); panelMain.add(getJPanel(), BorderLayout.CENTER); panelMain.add(getNorthPanel(), BorderLayout.NORTH); panelMain.add(getConsole(), BorderLayout.SOUTH); } return panelMain; } COM: <s> this method initializes panel main </s>
funcom_train/46459024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBounds() { toolbar.revalidate(); height = playButton.getPreferredSize().height + 8; int y = vidPanel.getHeight() - height; int w = vidPanel.getWidth(); setBounds(0, y, w, height); toolbar.revalidate(); } COM: <s> sets the bounds of this player </s>
funcom_train/45186630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(byte[] rawdata) throws TapeBlockFormatException { if (rawdata.length < 2) throw new TapeBlockFormatException("bad size:" + rawdata.length); // allocate space for data data = new byte[rawdata.length - 2]; // copy data System.arraycopy(rawdata, 1, data, 0, data.length); // check block flag flag = rawdata[0]; // check block crc crc = rawdata[rawdata.length - 1]; } COM: <s> read block from raw tape in spectrum tape format </s>
funcom_train/14514724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test02MakeP12() throws Exception { log.trace(">test02MakeP12()"); BatchMakeP12 makep12 = new BatchMakeP12(); File tmpfile = File.createTempFile("ejbca", "p12"); //System.out.println("tempdir="+tmpfile.getParent()); makep12.setMainStoreDir(tmpfile.getParent()); makep12.createAllNew(); log.trace("<test02MakeP12()"); } COM: <s> tests creation of p12 file </s>
funcom_train/9266582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Lib.assertTrue(!simulationStarted); simulationStarted = true; riders = new RiderState[numRiders]; ridersVector.toArray(riders); if (enableGui) { privilege.doPrivileged(new Runnable() { public void run() { initGui(); } }); } for (int i=0; i<numRiders; i++) riders[i].initialize(); manager.initialize(); for (int i=0; i<numRiders; i++) riders[i].run(); manager.run(); for (int i=0; i<numRiders; i++) riders[i].join(); manager.join(); simulationStarted = false; } COM: <s> run a simulation </s>
funcom_train/22562893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showLearningPath(final ActionEvent event) { PortletUtils.setObjectToSession(Defines.EDITOR_INPUT_PARAM_NAME, path); PortletUtils.setObjectToSession(Defines.INIT_FIELDS, true); final String maxUrl2 = UrlUtils.addParamToUrl(getMaximizedUrl(), UrlUtils.TC_TARGET_VIEW, Outcomes.VIEW_PORTFOLIO_LEARNINGPATH); PortletUtils.redirect(maxUrl2); } COM: <s> go to the related learning path view </s>
funcom_train/40729540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExcludedVolumes6() throws RepositoryException { conn.setExcludedLocationNodes("1729,13832"); afterInit(); assertEquals(0, lam.getExcludedVolumeId(666, null, client)); // But another subtype does exist... assertEquals(9999, lam.getExcludedVolumeId(667, null, client)); } COM: <s> tests a volume excluded by id that does not exist </s>
funcom_train/18802645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValueCount(final Object key) { if (key == null) { throw new NullPointerException("Key must not be null."); } final ArrayList list = (ArrayList) this.table.get(key); if (list != null) { return list.size(); } return 0; } COM: <s> returns the number of elements registered with the given key </s>
funcom_train/265790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawStringCenterAligned(Graphics2D g2, Font f, String s, float x0, float x1 , float y) { java.awt.font.FontRenderContext frc=g2.getFontRenderContext(); float width=(float)f.getStringBounds(s,frc).getWidth(); float x=(x1-x0)/2 + x0 -width/2; g2.drawString(s,x,y); } COM: <s> draws a string center aligned between x0 y and x1 y </s>
funcom_train/19245994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void increaseChapterNumber(final int sections, final boolean chapterNumbering) { this.chapterNumbering = chapterNumbering; absoluteChapterNumber++; if (chapterNumbering) { chapterNumber++; } this.sections = sections; this.subsectionsAndNodes = 0; this.sectionNumber = 0; this.absoluteSectionNumber = 0; this.sectionNumbering = true; this.subsectionNumber = 0; this.nodeNumber = 0; } COM: <s> increase chapter number </s>
funcom_train/5662686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSkillsEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_View_skillsEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_View_skillsEnabled_feature", "_UI_View_type"), ViewPackage.eINSTANCE.getView_SkillsEnabled(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the skills enabled feature </s>
funcom_train/2921756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleDebugEvents(final DebugEvent[] events) { for (final DebugEvent event : events) { if (event.getKind() == DebugEvent.TERMINATE) { DebugPlugin.getDefault().removeDebugEventListener(this); DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(target); getThread().clearStack(0); target.removeThread(); fireTerminateEvent(); } } } COM: <s> this class is registered as idebug event set listener to get terminate </s>
funcom_train/3291592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int insert(MMObjectNode node) { int result=-1; DatabaseTransaction trans=null; try { trans=createDatabaseTransaction(); result=insert(node,trans); trans.commit(); } catch (StorageException e) { if (trans!=null) trans.rollback(); log.error(e.getMessage()); } return result; } COM: <s> this method inserts a new object and registers the change </s>
funcom_train/44166555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NationSummary getNationSummary(Player player) { GetNationSummaryMessage message = new GetNationSummaryMessage(player); Element reply = askExpecting(message, GetNationSummaryMessage.getXMLElementTagName(), null); if (reply == null) return null; return new GetNationSummaryMessage(reply).getNationSummary(); } COM: <s> server query response for asking for the nation summary of a player </s>
funcom_train/37817251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createTopPanel() { JPanel topPane = new JPanel(); topPane.setLayout(new BorderLayout()); topPane.setMinimumSize(new Dimension(600, 300)); topPane.setPreferredSize(new Dimension(800, 600)); return topPane; } COM: <s> creates the top panel used by pulsemem </s>
funcom_train/38529801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings(UNUSED) private void area() {// NOPMD if (commandPresent) { areaCommandPresent(); } else { cursorCommand = true; init(); final String name = ((AbstractHistogram) SelectionTree .getCurrentHistogram()).getFullName().trim(); textOut.messageOut("Area for " + name + " from channel ", MessageHandler.NEW); } } COM: <s> calculate the area and centroid for a region </s>
funcom_train/48909222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfTelefono() { if (txfTelefono == null) { txfTelefono = new JTextField(); txfTelefono.setBounds(new Rectangle(392, 140, 83, 22)); txfTelefono.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) jbtGuardar.grabFocus(); } }); } return txfTelefono; } COM: <s> this method initializes txf telefono </s>
funcom_train/21482846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection values() { List list = cache.getKeysNoDuplicateCheck(); Set set = new HashSet(list.size()); for (int i = 0; i < list.size(); i++) { Object key = list.get(i); Element element = cache.get(key); if (element != null) { set.add(element.getObjectValue()); } } return set; } COM: <s> returns a collection view of the values contained in this map </s>
funcom_train/37830414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getRequiredResourceNamesWithHashes(final int amount) { // use sorted TreeSet instead of HashSet final Set<String> requiredResourcesWithHashes = new TreeSet<String>(); for (final Map.Entry<String, Integer> entry : getRequiredResourcesPerItem().entrySet()) { requiredResourcesWithHashes.add(Grammar.quantityplnounWithHash(amount * entry.getValue(), entry.getKey())); } return Grammar.enumerateCollection(requiredResourcesWithHashes); } COM: <s> gets a nicely formulated string that describes the amounts and names of </s>
funcom_train/28892293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectAssociation() { if (model.getAssociationList().size() == 0) { mainMenu.createAssociation(); // Process specific case of cancellation if (model.getAssociationList().size() == 0) { exit(); } } mainMenu.selectAssociation(model.getAssociationList().get(0) .getName()); } COM: <s> select the association to be used as default </s>
funcom_train/28954687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillMenuBar(IMenuManager menu, MenuEntry menuEntry) { for (MenuEntry entry : menuEntry.children) { if (entry.jobID != null) { menu.add(new JobAction(entry.text, entry.jobID)); } else { MenuManager subMenu = new MenuManager(entry.text, entry.id); menu.add(subMenu); this.fillMenuBar(subMenu, entry); } } } COM: <s> help method for filling the code menu bar code recursively </s>
funcom_train/11703141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void releaseTimedOutCases(Object[] artifact) { for (int j = 0; j < artifact.length; j++) { if (artifact[j] != null) { // Release CASes that timed out back to the pool casPool.releaseCas((CAS) artifact[j]); // synchronized (casPool) { // redundant - the above releaseCas call does this // casPool.notifyAll(); // } artifact[j] = null; } } } COM: <s> release cas back to the cas pool </s>
funcom_train/882606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove() { DateInstance d2; Iterator i; int precount = 0; int postcount = 0; d2 = (DateInstance) dt.createInstance(true); for (i = dt.getInstances(); i.hasNext(); i.next(), precount++) { } d2.remove(); for (i = dt.getInstances(); i.hasNext(); postcount++) { assertNotSame(i.next(), d2); } assertEquals(precount - 1, postcount); } COM: <s> test remove inherited from instance </s>
funcom_train/46701539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String substring(int begIndex, int endIndex) { int i; if (endIndex<=begIndex) return "" ; char[] t = new char[endIndex - begIndex]; for(i=begIndex; i<endIndex; i++) { t[i-begIndex] = b[(pos + i) % length]; } return (new String(t)); } COM: <s> export to the string </s>
funcom_train/33294617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFormatObjects(Collection formatters) { Object obj = null; Iterator it = formatters.iterator(); while (it.hasNext()) { obj = it.next(); if (obj instanceof Format && (((Format) obj).getID() != null)) { m_formatObjects.add(obj); } } // we have to build again our search string init(); } COM: <s> adds additional format objects </s>
funcom_train/3026530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() throws IOException { Iterator iter = viewList.keySet().iterator(); while (iter.hasNext()) { PackageSummary packageSummary = (PackageSummary) iter.next(); UMLPackage view = getPackage(packageSummary).getUmlPackage(); view.save(); } } COM: <s> saves the diagrams </s>
funcom_train/12171749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertToAlign(StyleKeyword textAlign) { String align = null; if (textAlign == TextAlignKeywords.CENTER) { align = "CENTER"; } else if (textAlign == TextAlignKeywords.LEFT) { align = "LEFT"; } else if (textAlign == TextAlignKeywords.RIGHT) { align = "RIGHT"; } return align; } COM: <s> gets the vdxml align keyword equivalent to the given alignment </s>
funcom_train/48491219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean visitUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> unl) { if (unl.getType() != getStandardLibrary().getUnlimitedNatural()) { String message = OCLMessages.TypeConformanceUnlimitedNaturalLiteral_ERROR_; return validatorError(unl, message, "visitUnlimitedNaturalLiteralExp");//$NON-NLS-1$ } return Boolean.TRUE; } COM: <s> callback for an unlimited natural literal exp visit </s>
funcom_train/37597629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setElementType(TypeName t) { if (t == null) throw new IllegalArgumentException("t == null"); elementType = t; if (t instanceof ArrayTypeName) { ArrayTypeName at = (ArrayTypeName)t; for (Expression init : cells) { if (init instanceof ArrayInitializer) { ((ArrayInitializer)init).setElementType(at.getElementType()); } } } } COM: <s> sets the element type </s>
funcom_train/13776901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateTree(MatchNode rootNode, List<TableRow> rows, MatchNode[] nodes) throws SyntaxNodeException { for (MatchNode node : rootNode.getChildren()) { if (node.isLeaf()) { // ok } else { // has at least 1 child checkTreeChildren(node, rows); } } linearizeTree(rootNode, nodes); } COM: <s> checks that tree is consistent </s>
funcom_train/5693954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pick() { // here is where we swap in our option selectors into the default option bar if (myOptionSelectorWidget != null) myOptionSelectorWidget.ReplaceSelectorsList(myOptionSelectors); PaintSurface theSurface = PixContext.instance().getPaintSurface(); if (!theSurface.containsSurfaceConsumer(this)) theSurface.addSurfaceConsumer(this); if (memoriesOfMe != null) restoreMemento(memoriesOfMe); } COM: <s> pick method comment </s>
funcom_train/2603906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double abs() { double absRe = Math.abs(re); double absIm = Math.abs(im); if (absRe == 0 && absIm == 0) { return 0; } else if (absRe>absIm) { double temp = absIm/absRe; return absRe*Math.sqrt(1 + temp*temp); } else { double temp = absRe/absIm; return absIm*Math.sqrt(1 + temp*temp); } } COM: <s> returns the absolute value of the complex number </s>
funcom_train/34008216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelPaymentOrder(Long idPaymentOrder) throws CommonException{ try { this.getConfig().startTransaction(); this.getConfig().update("paymentOrder.cancelPaymentOrderById", idPaymentOrder); this.getConfig().commitTransaction(); } catch (SQLException e) { throw new CommonException(e); } finally { try { this.getConfig().endTransaction(); } catch (SQLException e) { e.printStackTrace(); throw new CommonException(e); } } } COM: <s> cancel a specific order </s>
funcom_train/443309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean finishQuiz() { QuizModel model = (QuizModel) _quiz_tab.getWizard().getModel(); if (model.existsUnfinishedQuiz()) { int result = GUIUtils.showSaveDiscardCancelDialog(_main_frame, "save_quiz"); if (result == JOptionPane.YES_OPTION) { model.saveQuizResults(); } return result == JOptionPane.YES_OPTION || result == JOptionPane.NO_OPTION; } return true; } COM: <s> checks whether there is an unfinished quiz and if yes asks the user </s>
funcom_train/15516799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToSimpleString() { YawebmailVersion yv = YawebmailVersion.getInstance("1.2.3"); String tempExpected = "1.2.3"; assertEquals(tempExpected, yv.toSimpleString()); yv = YawebmailVersion.getInstance("9.8.7dev3"); tempExpected = "9.8.7"; assertEquals(tempExpected, yv.toSimpleString()); } COM: <s> tests the to simple string method </s>
funcom_train/3903954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActivityAbsoluteDurationLimitPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LimitConditionsType_activityAbsoluteDurationLimit_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LimitConditionsType_activityAbsoluteDurationLimit_feature", "_UI_LimitConditionsType_type"), ImsssPackage.Literals.LIMIT_CONDITIONS_TYPE__ACTIVITY_ABSOLUTE_DURATION_LIMIT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the activity absolute duration limit feature </s>
funcom_train/20847103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkActionParameters() throws ActionTypeParameterMismatchException { Vector params; switch (actionType) { // case ACTION_TYPE_IN_ONEWAY: // this case doesn't need input parameters case ACTION_TYPE_IN_OUT_REQUEST_RESPONSE: case ACTION_TYPE_OUT_NOTIFICATION: case ACTION_TYPE_OUT_IN_SOLICIT_RESPONSE: params = getOutputParameters(); if (params == null || params.size() < 1) throw new ActionTypeParameterMismatchException(actionType, "OutputParameters", "No OutputParameters defined for " + this.getName()); break; } } COM: <s> checks if action has all necessary parameters </s>
funcom_train/29629779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long runCheckNet() { if (ci.inventoryCount(ITEM_SMALL_NET) > 0) return 0; else { if (droppedNet != null) { ci.log("Picking lost fishing net up...."); ci.atGroundObject(droppedNet, 3); return 1000 + ci.random(1000, 2000); } else { ci.log("Aah, we don't have any nets, quitting!"); return -1; } } } COM: <s> check if we have a net and pick it up </s>
funcom_train/3889204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateHrefType1_MaxLength(String hrefType1, DiagnosticChain diagnostics, Map context) { int length = hrefType1.length(); boolean result = length <= 2000; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.Literals.HREF_TYPE1, hrefType1, length, 2000, diagnostics, context); return result; } COM: <s> validates the max length constraint of em href type1 em </s>
funcom_train/3104285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Date getSQLDate(String _strDate) { StringTokenizer strtok = new StringTokenizer(_strDate,"/",false); String month = strtok.nextToken(); String day = strtok.nextToken(); String newStrDate = strtok.nextToken() + "-" + month + "-" + day; return Date.valueOf(newStrDate); } COM: <s> converts a date string in mm dd yyyy format to an sql date </s>
funcom_train/20986206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAttributesToTag(TagNode tag, Map attributes) { if (attributes != null) { Map tagAttributes = tag.getAttributes(); Iterator it = attributes.entrySet().iterator(); while (it.hasNext()) { Map.Entry currEntry = (Map.Entry) it.next(); String attName = (String) currEntry.getKey(); if ( !tagAttributes.containsKey(attName) ) { String attValue = (String) currEntry.getValue(); tag.setAttribute(attName, attValue); } } } } COM: <s> add attributes from specified map to the specified tag </s>
funcom_train/3410522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(JobAttributes obj) { copies = obj.copies; defaultSelection = obj.defaultSelection; destination = obj.destination; dialog = obj.dialog; fileName = obj.fileName; fromPage = obj.fromPage; maxPage = obj.maxPage; minPage = obj.minPage; multipleDocumentHandling = obj.multipleDocumentHandling; // okay because we never modify the contents of pageRanges pageRanges = obj.pageRanges; prFirst = obj.prFirst; prLast = obj.prLast; printer = obj.printer; sides = obj.sides; toPage = obj.toPage; } COM: <s> sets all of the attributes of this code job attributes code to </s>
funcom_train/47926148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInitialState() { LOG.fine("setting initial state of round " + roundNo); for (final Entry<Combatant, CombatantState> entry : initialStates.entrySet()) { final Combatant combatant = entry.getKey(); final CombatantState state = entry.getValue(); combatant._setState(state); assert combatant._health() == state.getHealth() : "health correctly restored"; } } COM: <s> ensures that the state of the </s>
funcom_train/47271445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getDefaultFontByPosition(int fontSettingPosition) { if (fontSettingPosition >=0 && fontSettingPosition < defaultFontFamilySettingsValues.length) { return EditorFont.createFontFromStringValues(defaultFontFamilySettingsValues[fontSettingPosition], defaultFontStyleSettingsValues[fontSettingPosition], defaultFontSizeSettingsValues[fontSettingPosition]); } else { return null; } } COM: <s> retrieve a default font setting </s>
funcom_train/16786418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private User findUserByName(String userName) throws RQLException { Iterator iter = users.iterator(); while (iter.hasNext()) { User u = (User) iter.next(); if (u.getName().equals(userName)) { return u; } } throw new ElementNotFoundException("The user with name " + userName + "could not be found in the list of users to check."); } COM: <s> returns the user for the given name </s>
funcom_train/7476116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_toMapPixels_0_0() { final GeoPoint zz = new GeoPoint(0, 0); mOpenStreetMapView.getController().setCenter(zz); mOpenStreetMapView.getController().setZoom(8); final Projection projection = mOpenStreetMapView.getProjection(); final Point point = projection.toMapPixels(zz, null); final Point expected = new Point(0, 0); assertEquals("TODO describe test", expected, point); } COM: <s> this test was retrospectively added based on current implementation </s>
funcom_train/4717581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBaseHzRelative() { SynMessage msg = new SYN().synth(1).tuning(10).herz().relative(); assertEquals("/SYN/ID1/TUNING", msg.getAddress()); assertEquals("TTi", msg.getTypetag()); assertEquals(new Integer(655360), msg.getArguments()[2]); } COM: <s> base frequency in hz default and relative </s>
funcom_train/34716862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload(int rows,long interval) { try { notifyViews(ModelUpdateCaseEnum.RELOAD_PREPROCESS); clear(); // Sets initial articles. for (int i = 0; i < rows; i++) { grow(ArticleGenerationStrategyFactory.getInstance() .createStrategy(ArticleGenerationStrategy.NORMAL_STRATEGY)); Thread.sleep(interval); notifyViews(ModelUpdateCaseEnum.STRUCTURE_CHANGED); } notifyViews(ModelUpdateCaseEnum.RELOAD_POSTPROCESS); } catch (InterruptedException e) { e.printStackTrace(); } } COM: <s> reload articles according to row count </s>
funcom_train/24137192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performExtractReprioritization(final int priority) { for (final RECORD record : table.values()) { if (record.hasData()) { final DATA data = record.getData(); if (data.getPriority() >= priority) { data.setPriority(data.getPriority() - 1); } } } } COM: <s> makes the necessary priority changes in the case of removing data </s>
funcom_train/45251662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAdapter(Class adapter) { if (adapter == IWorkbenchAdapter.class || adapter == IWorkbenchAdapter2.class) { return this; } else if (adapter == IPluginContribution.class) { return this; } else if (adapter == IConfigurationElement.class) { return configurationElement; } return Platform.getAdapterManager().getAdapter(this, adapter); } COM: <s> returns an object which is an instance of the given class associated </s>
funcom_train/33058909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void procDBName(String line, String useLine, DB db) throws Exception { int start = line.indexOf("<dbname>") + 8; int end = line.indexOf("</dbname>") ; String proc = useLine.substring(start,end); proc = proc.trim(); db.setDBName(proc,false); proc = null; } COM: <s> retrieves the name of the data set to be used </s>
funcom_train/17739088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintValue(Graphics g, Rectangle rect) { Color oldColor = g.getColor(); g.setColor(Color.black); g.drawRect(rect.x, rect.y, rect.width-3, rect.height-3); g.setColor(color); g.fillRect(rect.x+1, rect.y+1, rect.width-4, rect.height-4); g.setColor(oldColor); } COM: <s> paints a representation of the value into a given area of screen </s>
funcom_train/16676943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disableDrag(ILayoutPart part) { PartDragDrop partDragDrop = mapPartToDragMonitor.get(part); if (partDragDrop != null) { partDragDrop.dispose( ); mapPartToDragMonitor.remove(part); } // remove d&d on folder when no tabs left if (mapPartToDragMonitor.size( ) == 1) { partDragDrop = mapPartToDragMonitor.get(this); if (partDragDrop != null) { partDragDrop.dispose( ); mapPartToDragMonitor.remove(this); } } } COM: <s> remove the ability to d d using the tab </s>
funcom_train/45186613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(byte newType) { if ((newType != BASIC_ID) && (newType != CODE_ID) && (newType != NUM_ARRAY_ID) && (newType != CHAR_ARRAY_ID)) throw new IllegalArgumentException("can't assign non-standart type to file!"); header.setFileType(newType); } COM: <s> change file type </s>
funcom_train/27850893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getResource(String name) { URL url = super.getResource(name); if (url != null) return url; url = getParent().getResource(name); if (url != null) return url; if (!isSystemLoader) url = Thread.currentThread().getContextClassLoader().getResource(name); return url; } COM: <s> find the resource from urls first if not find by the parent </s>
funcom_train/31907320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLanguages() { StringBuffer result = new StringBuffer(); if (userListModel.getSize() > 0) { result.append(userListModel.getElementAt(0)); for (int i = 1; i < userListModel.getSize(); i++) { result.append("," + userListModel.getElementAt(i)); } } return result.toString(); } COM: <s> returns the selected user languages </s>
funcom_train/43245759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSubscriberID() { System.out.println("getSubscriberID"); InsuranceDG1Object instance = new InsuranceDG1Object(); String expResult = ""; String result = instance.getSubscriberID(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get subscriber id method of class org </s>
funcom_train/3294919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addListener(String buildername,String nodename,RemoteBuilder serv) { if (__debug) { /*log.debug*/__debug("addListener("+buildername+","+nodename+","+serv+"): Adding remote builder ref to listeners hashtable key:"+nodename); } listeners.put(nodename,serv); return(true); } COM: <s> stores remote builder reference in hashtable using the service reference name as key </s>
funcom_train/37012458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void returnObjectToPool(ObjectPool pool, Object o) { if ( pool == null || o == null ) return; try { pool.returnObject(o); } catch ( Exception e ) { log.warn("Unable to return object to pool, object: " +o +"; pool: " +pool +": exception: " +e); } } COM: <s> return an object to an object pool logging warning message if fails </s>
funcom_train/25615742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String escapeUnicode(char ch) { StringBuffer buffy = new StringBuffer("\\u"); String hex = Integer.toHexString((int)ch); buffy.append("0000".substring(4-hex.length())); buffy.append(hex); return buffy.toString(); } COM: <s> return the unicode escape sequence for a character in the form </s>
funcom_train/22233296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAngularAttenuation(Point2f[] attenuation) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_ANGULAR_ATTENUATION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ConeSound6")); ((ConeSoundRetained)this.retained).setAngularAttenuation(attenuation); } COM: <s> sets this sounds angular gain attenuation not including filter </s>
funcom_train/49009570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton11() { if (jButton11 == null) { jButton11 = new JButton(); jButton11.setText("过滤噪声"); jButton11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Filter filter = new RemoveNoiseFilter(); doFilter(filter, true); } }); } return jButton11; } COM: <s> this method initializes j button11 </s>
funcom_train/8064677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndPoints(Point start, Point end) { while (_npoints < 2) { addPoint(start); } synchronized (_TempHandle) { _TempHandle.index = 0; moveVertex(_TempHandle, start.x, start.y, true); _TempHandle.index = _npoints - 1; moveVertex(_TempHandle, end.x, end.y, true); } } COM: <s> set the end points of this polygon regardless of the number of fixed </s>
funcom_train/21997299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getRecs() throws RpcException { try { Vector params = new Vector(); Vector vector = (Vector)execute(GET_RECS, params); return DeviceStatusRec.reconstitute(vector); } catch (RecException e) { throw new RpcException("rec-problem getting status recs", e); } } COM: <s> query the devices </s>
funcom_train/12164480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBaseURL() throws Exception { StyleSheetExternalGenerationConfiguration config = new StyleSheetExternalGenerationConfiguration(); String value = "base url"; config.setBaseUrl(value); String result = config.getBaseUrl(); assertNotNull("Result should not be null", result); assertEquals("Initial value and result should match", value, result); } COM: <s> test the set get base url methods </s>
funcom_train/16758382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File generateLicenseTemp (String str, String path) throws IOException{ new File(path).mkdirs(); if (!path.substring(path.length()-1).equals("/")) path += "/"; //System.out.println(path); File licenseTemp = new File (path + "licenseTemp"); OutputStreamWriter ops = new OutputStreamWriter(new FileOutputStream(licenseTemp), "UTF-8"); BufferedWriter bw = new BufferedWriter(ops); bw.write(beEnCodeVerify(str, 3)); bw.flush(); bw.close(); ops.close(); return licenseTemp; } COM: <s> p description license </s>
funcom_train/46628971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRequestWithoutLogin() { try { PracticeWebService service = getPracticeService(); PracticeListRequest request = new PracticeListRequest(); request.setPractice(new Practice()); service.list(request); fail("Shouldn't be able to request without loging in."); } catch (Exception e) { System.out.println("Test succeeded."); } } COM: <s> makes sure that the practice service requires a token to access it </s>
funcom_train/36960957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getCheckedElements() { if (isOkToUse(fTableControl)) { // workaround for bug 53853 Object[] checked= ((CheckboxTableViewer) fTable).getCheckedElements(); ArrayList res= new ArrayList(checked.length); for (int i= 0; i < checked.length; i++) { res.add(checked[i]); } return res; } return new ArrayList(fCheckedElements); } COM: <s> gets the checked elements </s>
funcom_train/10252274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void close() { if (session != null) { session.close(); session = null; } // fredt@user - closing the socket is to stop this thread try { synchronized (this) { if (socket != null) { socket.close(); } } } catch (IOException e) {} socket = null; synchronized (server.serverConnSet) { server.serverConnSet.remove(this); } } COM: <s> closes this connection </s>
funcom_train/20977029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String result= new String(); result += "title: " + title + "\ndescription: " + description + "\nlink: " + link + "\npubDate: " + pubDate + "\ncopyright: " + copyright; for (int i = 0; i < Items.size() ; i++){ result += "\nItem " + String.valueOf(i+1) + ":\n"; result += Items.get(i).toString(); } return result; } COM: <s> spit all to a string </s>
funcom_train/11344811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteProperties(Dictionary props) { Enumeration keys = props.keys(); boolean mustUpdate = false; while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); mustUpdate = mustUpdate || removeProperty(key); } if (mustUpdate) { m_handler.info("Update triggered when removing properties : " + props); update(); } } COM: <s> remove properties from the list </s>
funcom_train/546679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAll() { int sz = objects.size(); NetObject o; onlyTextSelected = true; for (int i = 0; i < sz; i++) { o = (NetObject) objects.get(i); o.setSelected(true); onlyTextSelected |= (o.type == NetObject.OBJECT_TEXT); } selObject = null; } COM: <s> select all objects in the editor </s>
funcom_train/13390603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeResource() { try { // the connection is not closed, because it is under // control of the application. stmt.close(); } catch(SQLException ex) { logger.log(Level.WARNING, "Closing SQL Statement", ex); } stmt = null; commit(1); if(commitTimer != null) commitTimer.interrupt(); } COM: <s> closes the underlying resource </s>
funcom_train/18939587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeUserPublicKey(XMPPAccount user, String publicKey) throws IOException { PeerControl peer = getPeerControl(); PeerControlClient peerControlClient = EasyMock.createMock(PeerControlClient.class); DeploymentID clientID = new DeploymentID(new ContainerID("a", "a", "a", publicKey),"a"); createStub(peerControlClient, PeerControlClient.class, clientID); peer.addUser(peerControlClient, user.getUsername(), user.getUserpassword()); } COM: <s> changes an user public key by adding it again </s>
funcom_train/50368186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { HTMLDocument doc = (HTMLDocument) textPane.getStyledDocument(); int pos = getCaretPos(); Element elm = doc.getParagraphElement(pos); int start = elm.getStartOffset(); int length = elm.getEndOffset() - elm.getStartOffset(); MutableAttributeSet mas = new SimpleAttributeSet(elm.getAttributes()); mas.addAttribute(HTML.Attribute.ALIGN, "center"); doc.setParagraphAttributes(start, length - 1, mas, false); } COM: <s> implementation of the action listener interface </s>
funcom_train/42134243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransparency(float transp){ transparency = transp; if(renderer != null && renderer instanceof Java2dRenderer){ ((Java2dRenderer) renderer).setTransparency(transparency); } if(preview != null && preview instanceof Java2dRenderer){ ((Java2dRenderer) preview).setTransparency(transparency); } } COM: <s> sets the transparency value for the renderers component </s>
funcom_train/44099060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(byte[] data, int offset, int len) { try { sig.update(data, offset, len); } catch (SignatureException se) { throw new IllegalStateException("Signature not initialized"); } catch (NullPointerException npe) { throw new IllegalStateException("Signature not initialized"); } } COM: <s> updates the data to be verified or signed </s>
funcom_train/12271400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals( Node node ) { return ( node != null && getSeqName().equals( node.getSeqName() ) && getSpecies().equals( node.getSpecies() ) && getECnumber().equals( node.getECnumber() ) && getTaxonomyID() == node.getTaxonomyID() ); } // equals( Node ) COM: <s> compares this node with node node </s>
funcom_train/4853379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLinkPredicate (LinkPredicate pred) { if (pred == linkPredicate || (pred != null && pred.equals (linkPredicate))) return; if (linkPredicate != null) linkPredicate.disconnected (this); linkPredicate = pred; if (linkPredicate != null) linkPredicate.connected (this); } COM: <s> set link predicate </s>
funcom_train/32368866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteUser() throws Exception { String testName = "deleteUser"; if (LOGGER.isInfoEnabled()) { LOGGER.info("\n\t\tRunning Test: " + testName); } UserServiceImpl fixture = getFixture(); User user = getStoredUser(); fixture.deleteUser(user.getUsername()); if (LOGGER.isInfoEnabled()) { LOGGER.info(testName + " - end "); //$NON-NLS-1$ } } COM: <s> run the void delete user string method test </s>
funcom_train/3830011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains( GM_Object gmo ) { boolean con = false; con = exterior.contains( gmo ); if ( con ) { if ( interior != null ) { for ( int i = 0; i < interior.length; i++ ) { if ( interior[i].intersects( gmo ) ) { con = false; break; } } } } return con; } COM: <s> the boolean valued operation contains shall return true if this gm object </s>
funcom_train/8020645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void off (){ setState (OFF); if (channel != null) { channel.noteOff (note, VELOCITY); } ShortMessage sm = new ShortMessage(); try { sm.setMessage(ShortMessage.NOTE_OFF, channel_no, note, VELOCITY); } catch (InvalidMidiDataException e) { e.printStackTrace(); } if (App.hasProjects()) { rcv.send(sm, -1); } } COM: <s> sends a note off event to the receiver </s>
funcom_train/19705805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element findEnclosingElement(final int pos, String name) { int startBefore=pos; if (name!=null) name=name.toLowerCase(); final boolean isXMLTagName=Tag.isXMLName(name); while (true) { StartTag startTag=StartTag.findPreviousOrNext(this,startBefore,name,isXMLTagName,true); if (startTag==null) return null; Element element=startTag.getElement(); if (pos < element.end) return element; startBefore=startTag.begin-1; } } COM: <s> returns the most nested </s>
funcom_train/10016849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxEventCodePart1() { int result = EXIConstants.VALUE_NOT_YET_SET; if(isTransitioned()) { if(isHasEndOptions()) result = 1; else result = 0; }// isTransitioned() else { result = getSize(); if(this.isHasStartOptions()){ result += 1; } }// else not transitioned return result; } COM: <s> max int for event code part 1 during exi read in </s>
funcom_train/29870259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJEditTemplateFieldAddButton() { if (jEditTemplateFieldAddButton == null) { jEditTemplateFieldAddButton = new JButton(); jEditTemplateFieldAddButton.setText("Add Field"); jEditTemplateFieldAddButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { actionJEditTemplateFieldAddButton(e); } }); } return jEditTemplateFieldAddButton; } COM: <s> this method initializes j edit template field add button </s>
funcom_train/48704822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshGroupsForNewDatabase(BibtexDatabase db) { for (int i = 0; i < getChildCount(); ++i) { GroupTreeNode node = (GroupTreeNode)getChildAt(i); node.getGroup().refreshForNewDatabase(db); node.refreshGroupsForNewDatabase(db); } } COM: <s> update all groups if necessary to handle the situation where the group </s>
funcom_train/23943538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu findOrCreateMenu(String name) { for (int i = 0; i < getJMenuBar().getMenuCount(); i++) { if (getJMenuBar().getMenu(i).getText().equals(name)) { return getJMenuBar().getMenu(i); } } JMenu m = new JMenu(name); getJMenuBar().add(m); return m; } COM: <s> find or create a root menu </s>
funcom_train/7631785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int dMethod(int level) { int count = 0; if (level > 0) { count = dMethod(level - 1); } for (int ii = 0; ii < 100; ii++) { count += ii; } if (level == 0) { return count; } return dMethod(level - 1); } COM: <s> calls itself recursively to make some interesting trace data </s>
funcom_train/16570261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getTxtExp() { if (txtExp == null) { txtExp = new JTextArea(); txtExp.addCaretListener(new CaretListener(){ public void caretUpdate(CaretEvent e) { if (txtExp.getText().length()>0) getAcceptCancel().setOkButtonEnabled(true); else getAcceptCancel().setOkButtonEnabled(false); } }); } return txtExp; } COM: <s> this method initializes txt exp </s>
funcom_train/50998309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAtomContainer(AtomContainer ac) { this.atomContainer = ac; // if (this.molecularFormula == null) { // this.molecularFormula = new // MFAnalyser(atomContainer).getMolecularFormula(); // } if (this.newmolecularFormula == null) { this.newmolecularFormula = (MolecularFormula) MolecularFormulaManipulator .getMolecularFormula(atomContainer); } fireChange(); } COM: <s> sets the set of nodes attribute of the seneca dataset object </s>
funcom_train/37004920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCUChange(CompilationUnitChange cuChange) { for (Change codeChange : codeChanges.getChildren()) { //Assert.assertTrue(codeChange instanceof CompilationUnitChange); for (Change cuCh : codeChanges.getChildren()) { //Assert.assertTrue(cuCh instanceof CompilationUnitChange); if (codeChange.equals(cuCh)) { cuCh.toString(); // test } } } } COM: <s> adds a compilation unit type of change </s>
funcom_train/49211328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getAddButton() { if (addButton == null) { addButton = new JButton(); addButton.setMaximumSize(new Dimension(150,30)); addButton.setPreferredSize(addButton.getMaximumSize()); addButton.setMinimumSize(addButton.getMaximumSize()); addButton.setSize(addButton.getMaximumSize()); addButton.setPreferredSize(addButton.getMaximumSize()); addButton.setText("Add Node"); } return addButton; } COM: <s> this method initializes add button </s>
funcom_train/51343778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyStream(InputStream is) throws IOException { super.setContentEncoding(null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); while(true) { int b = is.read(); if(b==-1) { content = baos.toByteArray(); is.close(); return; } } } COM: <s> set the content by copying the given stream </s>
funcom_train/13541870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getItemAttribute(int nIndex, String sName) { if (0<=nIndex && nIndex<=items.size()) { return ((Element)items.get(nIndex)).hasAttribute(sName) ? ((Element)items.get(nIndex)).getAttribute(sName) : null; } else { return null; } } COM: <s> p get an attribute of an option item </s>
funcom_train/4506863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean createDemoUser() { // Do nothing if user store is read-only if (UserManager.getUserProvider().isReadOnly()) { return false; } try { UserManager.getInstance().createUser("demo", "demo", "Fastpath Demo Account", "[email protected]"); return true; } catch (Exception e) { Log.error(e); } return false; } COM: <s> creates a demo user account </s>
funcom_train/46476348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTopPanel() { if (topPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.anchor = GridBagConstraints.WEST; gridBagConstraints.insets = new Insets(4, 4, 4, 4); gridBagConstraints.fill = GridBagConstraints.NONE; topLabel = new JLabel(); topLabel.setText("JLabel"); topPanel = new JPanel(); topPanel.setLayout(new GridBagLayout()); topPanel.add(topLabel, gridBagConstraints); } return topPanel; } COM: <s> this method initializes top panel </s>
funcom_train/30177132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkBitMap(int[] map) { boolean equals = true; int[] localMap = new int[map.length]; for (int i = 0; i < localMap.length; i++) localMap[i] = 1; for (int i = 0; i < map.length; i++) { if (map[i] != localMap[i]) { equals = false; break; } } return equals; } COM: <s> check if a whole bit map is set to 1 true </s>
funcom_train/39185345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(String statusMessage) { if (win!=null) return; if (img==null && ip!=null) img = ip.createImage(); if ((img!=null) && (width>=0) && (height>=0)) { if (stack!=null && stack.getSize()>1) win = new StackWindow(this); else win = new ImageWindow(this); draw(); IJ.showStatus(statusMessage); } } COM: <s> opens a window to display this image and displays </s>