__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/43069305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(int rc) { if (shouldAddWatch(rc)) { Map<String, Set<Watcher>> watches = getWatches(rc); synchronized(watches) { Set<Watcher> watchers = watches.get(path); if (watchers == null) { watchers = new HashSet<Watcher>(); watches.put(path, watchers); } watchers.add(watcher); } } } COM: <s> register the watcher with the set of watches on path </s>
funcom_train/2859580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetList() throws DbOutOfSyncException, IOException { //System.out.println("resetList"); miscTuple = null; tuplenum = 0; buffer = posting.getList(tuples[0]); if (buffer != null) region = buffer.region; //rec_no = Integer.MAX_VALUE - recordOffset; next_rec_ptr = 0; next_exten_ptr = 0; } COM: <s> get ready to re walk the list from the beginning </s>
funcom_train/37817226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane createConsoleTextarea() { JTextPane console = new JTextPane(); console.setEditable(false); console.setMinimumSize(new Dimension(50, 50)); console.setPreferredSize(new Dimension(50, 50)); console.setMaximumSize(new Dimension(50, 50)); return console; } COM: <s> creates the console textarea used by pulsemem </s>
funcom_train/18741877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(boolean labelBased) { this.selected.clear(); this.entryJCellMap.clear(); this.jCellEntryMap.clear(); this.labelEntryMap.clear(); this.nodeTypeEntryMap.clear(); this.edgeTypeEntryMap.clear(); this.typeGraph = null; this.labelBased = labelBased; } COM: <s> clears the entire filter and resets it to label or type based </s>
funcom_train/5425143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Album importAlbum(final String content) { final Matcher m = _albumPattern.matcher(content); if (m.matches()) { final Album a = new Album(); a.setAlbum(m.group(2)); a.setAlbumType(AlbumType.values()[Short.parseShort(m.group(3))]); a.setIncomplete(false); return a; } return null; } COM: <s> imports an album </s>
funcom_train/1011703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void thread2(String name) { // DONE try { Method m = this.getClass().getMethod(name, (Class[]) null); if (dl != null) { dl.append(this, m, null); } else { m.invoke(this, (Object[]) null); } } catch (Throwable e) { e.printStackTrace(); } } COM: <s> calls a method with given name </s>
funcom_train/17500282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException { if (isOutsideDocElem() && isWhiteSpace(ch, start, length)) return; // avoid DOM006 Hierarchy request error String s = new String(ch, start, length); CDATASection section = (CDATASection) this.currentNode.getLastChild(); section.appendData(s); } COM: <s> receive notification of cdata </s>
funcom_train/24634637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if(!(obj instanceof RtfColor)) { return false; } RtfColor color = (RtfColor) obj; if(this.red == color.getRed() && this.green == color.getGreen() && this.blue == color.getBlue()) { return true; } else { return false; } } COM: <s> tests if this rtf color is equal to another rtf color </s>
funcom_train/49792286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { // Assume that the host HTML has elements defined whose // IDs are "slot1", "slot2". In a real app, you probably would not want // to hard-code IDs. Instead, you could, for example, search for all // elements with a particular CSS class and replace them with widgets. // RootPanel panel = RootPanel.get("slot1"); panel.add(new MainPanel()); panel.setWidth("100%"); } COM: <s> this is the entry point method </s>
funcom_train/28672760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultAutowirePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeansType_defaultAutowire_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeansType_defaultAutowire_feature", "_UI_BeansType_type"), BeansPackage.Literals.BEANS_TYPE__DEFAULT_AUTOWIRE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default autowire feature </s>
funcom_train/34425068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluate_NE() { for (int y = -2; y < 2; y++) for (int x = -2; x < 2; x++) { Object result = verifyAndEvaluate(context, x + "!=" + y); assertEquals(x + "!=" + y, x != y, result); } } COM: <s> test evaluation the inequality operator </s>
funcom_train/5855279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setValues() { try { area.setText(getTrace()); } catch (Exception e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); area.setText("Unable to assemble stack trace: " + sw); } finally { area.setCaretPosition(0); } } COM: <s> set the values of the internal components </s>
funcom_train/4509746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteAvatar(long userID) { try { String path = AVATAR_URL_PREFIX + "avatar/" + userID; ClearspaceManager.getInstance().executeRequest(ClearspaceManager.HttpType.DELETE, path); } catch (Exception e) { // It is not supported exception, wrap it into an UnsupportedOperationException throw new UnsupportedOperationException("Unexpected error", e); } } COM: <s> deletes the avatar of the user </s>
funcom_train/29598157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixMultipleNodePositioners() { boolean foundActiveNodePos = false; for (final Plugin p : pluginsInternal) { if ((p instanceof NodePositionerPlugin) && p.isActive()) { if (foundActiveNodePos) { log.error("Found more than one active NodePositioner. I will disable " + p); p.setActive(false); } foundActiveNodePos = true; } } } COM: <s> check that there is max </s>
funcom_train/4563002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHostRequestHandlerResolver(String host, HttpRequestHandlerResolver resolver) { if (host == null) { host = DEFAULT_HOST; } if (useVirtualHost == false && hostHandler.size() >= 1) { useVirtualHost = true; } if (host.equals(DEFAULT_HOST) == false) { LOG.info("add virtual host: " + host + "=" + resolver.getClass().getName()); } hostHandler.put(host, resolver); } COM: <s> p set the host and </s>
funcom_train/27973384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { // notify all listeners that WE changed (not that the checkbox changed) ActionEvent ae = new ActionEvent(this, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()); for (Enumeration en = listeners.elements(); en.hasMoreElements(); ) ((ActionListener) en.nextElement()).actionPerformed(ae); } COM: <s> listens to the checkbox and report change </s>
funcom_train/50911579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSerialOfNearestPoint(Real2 point) { double dist = Double.MAX_VALUE; int serial = -1; for (int j = 0; j < vector.size(); j++) { double d = this.get(j).subtract(point).getLength(); if (d < dist) { serial = j; dist = d; } } return serial; } COM: <s> get serial number of nearest point </s>
funcom_train/45934727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OGoResultSet doFetch(final String _command, Object... _args) { final EOFetchSpecification fs = this.buildFetchSpecification(_command, _args); if (fs == null) return new OGoResultSet(new NSException("Could not resolve command")); /* perform fetch */ return this.doFetch(fs, 0 /* retry count */); } COM: <s> conveniently perform a fetch </s>
funcom_train/46092688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Character isCharToken(char ch) { String allElements=(String) getOperators().get(0); for (int i=0;i<allElements.length();i++) if (allElements.charAt(i)==ch) return new Character(ch); return null; } COM: <s> returns null if ch isnt token </s>
funcom_train/33724469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("Contact", null, getContactPanel(), null); jTabbedPane.addTab("Address", null, getAddressPanel(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/50865093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit findUnit(String name) { Unit result = null; Iterator<Unit> i = units.iterator(); while (i.hasNext() && (result == null)) { Unit unit = i.next(); if (unit.getName().equals(name)) { result = unit; } } return result; } COM: <s> finds a unit in the simulation that has the given name </s>
funcom_train/24428600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date getDate(String day) { Date date = null; try { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); date = formatter.parse(day); } catch (ParseException e) { LOG.warn("Cannot parse date: " + day, e); } return date; } COM: <s> parse date for day string </s>
funcom_train/35529915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String save() { log.debug("save: {}", article); article = getArticleService().save(article); if (article != null && article.getId() != null) { addActionMessage(getText("article.message.create.success")); } else { addActionError(getText("article.error.article.not.created")); } return SUCCESS; } COM: <s> from parameters passed object iarticle without identifier create news </s>
funcom_train/4528432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tearDown() throws Exception { try { if (mrCluster != null) { mrCluster.shutdown(); } } catch (Exception ex) { System.out.println(ex); } try { if (dfsCluster != null) { dfsCluster.shutdown(); } } catch (Exception ex) { System.out.println(ex); } super.tearDown(); } COM: <s> destroys hadoop instance based on constructor configuration after </s>
funcom_train/40335367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleSync(Synchronism syncModel) { //return SYNC_MANAGER.handleSync(syncModel); if (sending) { printError("manager busy"); printError("Operation:" + Integer.toString(request)); } else { synchronized (this) { request = handleSync; this.syncModel = syncModel; sending = true; } } } COM: <s> executed on manager </s>
funcom_train/33296910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecute() throws Exception { TaconiteAction action = new TaconiteRemoveContentAction("testId"); String result = action.execute(); System.out.println(result); assertXpathEvaluatesTo("testId", "/taconite-replace-children/@contextNodeID", result); } COM: <s> test of execute method of class net </s>
funcom_train/1550307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V remove(Object key, Object item) { Collection valuesForKey = getCollection(key); if (valuesForKey == null) { return null; } valuesForKey.remove(item); // remove the list if it is now empty // (saves space, and allows equals to work) if (valuesForKey.isEmpty()) { remove(key); } return (V)item; } COM: <s> removes a specific value from map </s>
funcom_train/11024006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPropertyOnPrimitiveWrappers() throws Exception { BeanUtils.setProperty(bean,"intProperty", new Integer(1)); assertEquals(1,bean.getIntProperty()); BeanUtils.setProperty(bean,"stringProperty", new Integer(1)); assertEquals(1, Integer.parseInt(bean.getStringProperty())); } COM: <s> test converting to and from primitive wrapper types </s>
funcom_train/49026681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBCerca() { if (bCerca == null) { bCerca = new JButton(); bCerca.setText("Cerca"); bCerca.setFont(new Font("Dialog", Font.BOLD, 12)); bCerca.setMnemonic(KeyEvent.VK_UNDEFINED); bCerca.setIcon(new ImageIcon(getClass().getResource("/icone/search-icon.png"))); bCerca.setCursor(new Cursor(Cursor.HAND_CURSOR)); bCerca.setEnabled(true); bCerca.addActionListener(this); } return bCerca; } COM: <s> this method initializes b cerca </s>
funcom_train/974651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeTable(IMarkupWriter writer, Properties properties) { writer.begin("table"); writer.appendAttribute("class", "props"); for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) { String key= (String) iter.next(); writer.begin("tr"); { writer.begin("td"); writer.appendAttribute("nowrap", "nowrap"); writer.print(key + ":"); writer.end(); writer.begin("th"); writer.print(properties.getProperty(key)); writer.end(); } writer.end(); } writer.end(); } COM: <s> writes table from properties </s>
funcom_train/50310392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importFolder(String importFile, String importPath) throws CmsException { // import the resources clearcache(); m_rb.importFolder(m_context.currentUser(), m_context.currentProject(), importFile, getSiteRoot(importPath), this); clearcache(); } COM: <s> imports a import resource folder or zipfile to the cms </s>
funcom_train/50823906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) { // 'requiredFeatures', 'requiredExtensions' and 'systemLanguage' if (!SVGUtilities.matchUserAgent(e, ctx.getUserAgent())) { return null; } JoCompositeGraphicsNode gn = new JoCompositeGraphicsNode(); associateSVGContext(ctx, e, gn); CompositeGraphicsNode ret = buildCompositeGraphicsNode(ctx, e, gn); return ret; } COM: <s> creates a tt graphics node tt according to the specified parameters </s>
funcom_train/14394691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HostSystem getHostedSystemByType(String typeOfHostedSystem) throws WbemsmtException { List list = getList(); for (Iterator iterator = list.iterator(); iterator.hasNext();) { HostSystem host = (HostSystem) iterator.next(); if (host.getVirtualSystemType().equals(typeOfHostedSystem)) { return host; } } return null; } COM: <s> return the host systen which is the hostsystem for the given type </s>
funcom_train/34339618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand() { if (itemCommand == null) {//GEN-END:|26-getter|0|26-preInit // write pre-init user code here itemCommand = new Command("Item", Command.ITEM, 0);//GEN-LINE:|26-getter|1|26-postInit // write post-init user code here }//GEN-BEGIN:|26-getter|2| return itemCommand; } COM: <s> returns an initiliazed instance of item command component </s>
funcom_train/45026091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { boolean check = false; if (obj != null && obj.getClass() == getClass()) { ActionState castedObj = (ActionState) obj; check = ((this.id == castedObj.id) && (this.name == null ? castedObj.name == null : this.name.equals(castedObj.name))); } return check; } COM: <s> returns code true code if this code action state code is the </s>
funcom_train/41961243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String GetThemeDesc(String theme) { Properties tp = new Properties(); try { tp.load(new FileInputStream(new File(ThemePath + java.io.File.separator + theme + java.io.File.separator + "theme.properties"))); } catch ( Exception e ) { ortus.api.DebugLog(ERROR, "GetThemeDesc: " + e ); return theme; } return tp.getProperty("description",theme); } COM: <s> get the theme description for a certain theme </s>
funcom_train/11371505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public String getFullName(final String parent) { if (isEmptyLocalName()) { return parent; } StringBuilder fullName = new StringBuilder(parent); if (!parent.endsWith(Path.SEPARATOR)) { fullName.append(Path.SEPARATOR); } fullName.append(getLocalName()); return fullName.toString(); } COM: <s> get the string representation of the full path name </s>
funcom_train/39290782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TProcess getModel() { try { if (process == null) { EList l = resource.getContents(); Iterator i = l.iterator(); while (i.hasNext()) { Object o = i.next(); if (o instanceof TProcess) { process = (TProcess) o; } } } } catch (Exception e) { e.printStackTrace(); } return process; } COM: <s> gets the top level workflow model </s>
funcom_train/23721613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSelf_SelfIsDefined(Self self, DiagnosticChain diagnostics, Map<Object, Object> context) { Node constrainedNode = getConstrainedNode(self); if (constrainedNode instanceof MetadataSchema) { diagnoseError(diagnostics, self, "_UI_Self_SelfIsDefined"); return false; } return true; } COM: <s> validates the self is defined constraint of em self em </s>
funcom_train/39911068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBilled() { System.out.println("getBilled"); timesheet instance = new timesheet(); String expResult = ""; String result = instance.getBilled(); 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 billed method of class buissness </s>
funcom_train/32051784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MetricEvaluation getMetricEvaluation(String key, MetricType type) throws UndefinedMetricException { MetricEvaluation eval = metricEvals.get(key); if (eval == null) { if (type == null) throw new UndefinedMetricException("Undefined metric: '" + key + "'."); eval = new MetricEvaluation(); eval.key = key; eval.type = type; metricEvals.put(key, eval); } return eval; } COM: <s> returns a metric for the given code key code </s>
funcom_train/36249836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent arg0) { RooMak.getInstance().getMainWindow().view.setCommandText(this.getValue(Action.SHORT_DESCRIPTION).toString()); RooMak.getInstance().getMainWindow().view.setViewPortActionListener(this); selectedPointA = null; selectedPointB = null; relativeHelpers = false; currentHelper = null; helpers.clear(); helperpoints.clear(); } COM: <s> initializes the creation of points by forwarding several viewport events to this action </s>
funcom_train/38737442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { TodoIO tio = new TodoIO(cid); try { tio.save(todos); } catch (Exception e) { MessageDialog md = new MessageDialog(shell); md.setMode(MessageDialog.M_ERROR); md.setMessage( e.getMessage() ); md.open(); } } COM: <s> save the todo list </s>
funcom_train/15954471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsertInt() throws BMLException{ String lsValue = "Good"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); int lValue = 7; ldString.insert(1,lValue); assertEquals("G7ood",ldString.toString()); } COM: <s> test of insert method using offset int </s>
funcom_train/32746368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTeamAlpha(int n) throws ArrayIndexOutOfBoundsException, NullPointerException { try { return (String)teams_.elementAt( ((Integer)teamOrder_.elementAt(n)).intValue()); } catch (ArrayIndexOutOfBoundsException e) { throw e; } catch (NullPointerException e) { throw e; } } COM: <s> returns team number n in alphabetical order </s>
funcom_train/7231323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer buildStringValue(){ StringBuffer strValue; if (getParent() != null){ strValue = getParent().buildStringValue(); } else { strValue = new StringBuffer(); } strValue.append(AppConfig.getInstance().getDirectorySwitch()) .append(msNodeName); return strValue; } COM: <s> if this object has a parent call this method in parent first </s>
funcom_train/10670989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testGetBeanDescriptor() { try { if (!beanInfo.getBeanDescriptor().getBeanClass().equals( ReturnTheSameAsInRealBeanInfoTest.class)) { throw new LocationException("mistake BeanDescriptor"); } Bean1BeanInfo.verifyException(); return passed(); } catch (Exception e) { e.printStackTrace(); return failed(e.getMessage()); } } COM: <s> verify get bean descriptor method </s>
funcom_train/36254114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OVFNetwork getPublicNetwork() { /*String networkName = getProductProperty(PROPERTYNAME_PUBLIC_NETWORK); if(networkName == null) { return null; } else { return getNetworks().get(networkName); }*/ return this.getNetworks().get("public"); } COM: <s> returns the public network </s>
funcom_train/25422001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String determineEncoding(HttpClientRequest request) { String encoding = request.getResponseInfo().getContentEncoding(); if ((encoding == null) || (encoding.length() == 0)) { encoding = request.getResponseInfo().getDefaultEncoding(); } if ((encoding == null) || (encoding.length() == 0)) { encoding = "UTF-8"; } return encoding; } COM: <s> determines the character encoding associated with the http response </s>
funcom_train/25098439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectFlow_target_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectFlow_target_feature", "_UI_ObjectFlow_type"), TransactioneditorPackage.Literals.OBJECT_FLOW__TARGET, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the target feature </s>
funcom_train/18744546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEdge(Aspect edge) throws FormatException { assert edge.getKind() == EDGE : String.format( "Aspect %s is not an edge declaration", edge); if (this.edge != null) { throw new FormatException("Duplicate edge pattern specification"); } this.edge = edge; } COM: <s> sets the edge aspect of this node </s>
funcom_train/42393139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadIdentity() { mM.A = 1; mM.B = 0; mM.C = 0; mM.D = 0; mM.E = 0; mM.F = 1; mM.G = 0; mM.H = 0; mM.I = 0; mM.L = 0; mM.M = 1; mM.N = 0; mM.O = 0; mM.P = 0; mM.Q = 0; mM.R = 1; } COM: <s> converts this matrix into an identity matrix </s>
funcom_train/17859551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Rectangle moved(Graphics g, final Rectangle bounds) { if (bounds != null) { updateTCObjectContainerEntryPlacementContext( placementContext, cachedFilters, bounds); drawed = computeTCObjectContainerEntryInsertionBounds(placementContext); } if (drawed != null) { g.setColor(Color.blue); g.fillRect(drawed.x, drawed.y, drawed.width, drawed.height); } return drawed; } COM: <s> handle movement of the filter element </s>
funcom_train/21883964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getOsversion(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("node.").append(type + ".").append(name + ".").append(Constants.PROPERTY_NODE_OSVERSION_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the os version </s>
funcom_train/29934821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLandscapesPanel() { if (landscapesPanel == null) { GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); gridBagConstraints5.gridx = 0; gridBagConstraints5.gridy = 0; landscapesPanel = new JPanel(); landscapesPanel.setLayout(new GridBagLayout()); landscapesPanel.setName("landscapesPanel"); landscapesPanel.add(getPlainLSToggleButton(), gridBagConstraints5); } return landscapesPanel; } COM: <s> this method initializes landscapes panel </s>
funcom_train/18216727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(final IField field, final Object value) { if (!field.isMultiValued()) { changedFields.put(field, value); } else { // append to existing values for that field. List<Object> multiValues = (List<Object>) get(field); if (multiValues == null) { multiValues = new ArrayList<Object>(); } multiValues.add(value); changedFields.put(field, multiValues); } } COM: <s> changes the value for a </s>
funcom_train/26410299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadXml(XmlNode node) { clear(); final String xmlTag = node.getName(); if (!xmlTag.equals(Constants.SOURCE_FILES)) return; final Enumeration children = node.getChildren(); while (children.hasMoreElements()) { addTreeNodeObjectRecursive(rootNode, (XmlNode) children.nextElement()); } } COM: <s> init all data from xml node </s>
funcom_train/22827811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printComment(String text, StringBuilder ddl) { if (sqlCommentsOn) { ddl.append(databaseInfo.getCommentPrefix()); // Some databases insist on a space after the prefix ddl.append(" "); ddl.append(text); ddl.append(" "); ddl.append(databaseInfo.getCommentSuffix()); println(ddl); } } COM: <s> prints an sql comment to the current stream </s>
funcom_train/37450180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Protein search( Collection proteins, String shortlabel ) { // TODO: fail is several occurence of a Protein is found for ( Iterator iterator = proteins.iterator(); iterator.hasNext(); ) { Protein protein = (Protein) iterator.next(); if( protein.getShortLabel().equals( shortlabel ) ) { return protein; } } return null; } COM: <s> search for a protein by shortlabel in a given collection </s>
funcom_train/14216014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResultInfo() { int von = startwert+1; int bis = minimum((von + this.resultsPerPage-1),this.anzSearchResults); String myString=""; myString+=this.langObject.getTextFor("search.Shown")+": "+von+" - "+bis+" von "+this.anzSearchResults; if(this.maximumHits==this.anzSearchResults || this.anzSearchResults==0) return ""; else return myString; } COM: <s> get information about the current search </s>
funcom_train/34519339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEnum(){ if (superClass==null) return false; if (!(superClass instanceof AssemblyTypeRef)) return false; AssemblyTypeRef ref = (AssemblyTypeRef)superClass; return (ref.getAssemblyRefInfo().equals(AssemblyRefInfo.MSCORLIB) && ref.getNamespace().equals("System") && ref.getName().equals("Enum")); } COM: <s> returns true iff this type def is an enum i </s>
funcom_train/2878484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object sfParseTags(InputStream is) throws SmartFrogCompilationException { Object o = null; try { return sfParseTags(new InputStreamReader(is, SF_ENCODING)); } catch (UnsupportedEncodingException e) { throw new SmartFrogParseException("error in encoding of stream", e); } } COM: <s> parses tags from an input stream </s>
funcom_train/5855599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolve(Type type) { Entry[] pool = type.getPool(); for (int i = 0, n = pool.length; i < n; i++) { Entry entry = pool[i]; Type t = (entry != null) ? get(entry.getClassnameToResolve()) : null; if (t != null) { pool[i] = entry.resolve(t); } } } COM: <s> resolve all the entries in the runtime constant pool of the given type </s>
funcom_train/24601411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFreeChart createChart() { XYSeries series = new XYSeries(getLabel()); for (int i = 0; i < vector.length; i++) series.add((double) i, vector[i]); XYSeriesCollection dataset = new XYSeriesCollection(series); JFreeChart chart = ChartFactory.createXYLineChart( "", "", "", dataset, PlotOrientation.VERTICAL, true, true, false); chart.removeLegend(); return chart; }//function createChart COM: <s> create chart based on vector data </s>
funcom_train/37519767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLookAndFeel() { try { UIManager.setLookAndFeel(preferences.get(toolName + "LAF", UIManager.getSystemLookAndFeelClassName())); } catch (Exception e) { // !FIXME! should do something with this... (also below) } updateTreeUI(); } COM: <s> sets this windows look and feel to the preferred look and feel </s>
funcom_train/37513907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeGenericFunction(MjMethodDoc top, MjMethodDoc prev, MjMethodDoc next, java.util.ArrayList v) throws DocletAbortException { PackageDoc pkg = top.containingPackage(); MjdocGFWriter.generate(configuration,top,prev,next,v,false); } COM: <s> writes out a specific generic function page </s>
funcom_train/23164622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JavaField getJavaField() { if (javaField != null) { // return java field, if explicitly set by the setter return javaField; } // not set => calculate JavaType javaType = getDeclaringClass().getJavaType(); return javaType.getJavaField(getName()); } COM: <s> get the corresponding java field representation for this jdofield </s>
funcom_train/3081503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderBackgroundImageIntoStyle(ImageReference cellImageRef, CssStyle cssStyle) { if (cellImageRef != null) { String iconUri = ImageManager.getURI(rc,cellImageRef); cssStyle.setAttribute("background-image","url(" + iconUri + ")"); cssStyle.setAttribute("background-repeat","repeat-y"); } } COM: <s> renders an image into the background of a style </s>
funcom_train/16093696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void menuItemO_1_actionPerformed(ActionEvent e) { if(ProductFrame.getFrame() != null) { ProductFrame.getFrame().getSorter().createProdPopupMenu(); } OrderScreen.getInstance().processWindowEvent(new WindowEvent(OrderScreen.getInstance(), WindowEvent.WINDOW_CLOSING)); MainMenuBar.launchwin = true; } COM: <s> cancel the order </s>
funcom_train/17774329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (thread == this) { // Make the time step handleTimer(); // Sleep for some time try { Thread.sleep(sleepTime); } catch (InterruptedException ignore) { // Do nothing } // Sleep if paused while (paused && thread == this) { try { Thread.sleep(1000); } catch (InterruptedException ignore) { // Do nothing } } } } COM: <s> runs the game </s>
funcom_train/42337766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveMetaInfo(Workspace workspace, IProgressMonitor monitor) throws CoreException { WorkspaceDescription description = workspace.internalGetDescription(); if (description.isDirty()) workspace.getMetaArea().writeWorkspace(description); IProject[] roots = workspace.getRoot().getProjects(); for (int i = 0; i < roots.length; i++) saveMetaInfo((Project) roots[i], null); } COM: <s> writes the metainfo e </s>
funcom_train/14660879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getStoreButton() { if (storeButton == null) { storeButton = new JButton(); storeButton.setPreferredSize(new Dimension(180, 26)); storeButton.setAction(new StoreModelAction(getSymbolConfigurator(), getFunctionConfigurator(), this)); storeButton.setMnemonic(KeyEvent.VK_S); storeButton.setDisplayedMnemonicIndex(0); } return storeButton; } COM: <s> this method initializes store button </s>
funcom_train/36070959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double infoContent(Synset synset, Linkdef linkType) { synset = get(synset); Integer conceptCount = getConceptCount(synset.getPos()); double infoContent = (1.0d - ((Math.log(synset.getSubsumerCount(linkType) + 1)) / (Math .log(conceptCount)))); if (log.isDebugEnabled()) { log.debug("synset: " + synset + " conceptCount: " + conceptCount + " ic: " + infoContent); } return infoContent; } COM: <s> calculate the information content of a synset using the measure of seco </s>
funcom_train/23777873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSuffix(File f) { String s = f.getPath(), suffix = null; int i = s.lastIndexOf('.'); if (i > 0 && i < s.length() - 1) { suffix = s.substring(i + 1).toLowerCase(); } return suffix; } COM: <s> gets the suffix of the file </s>
funcom_train/50933886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinRGroupsExplicitly(Element scopeElement) { List<CMLAtom> atomList = molecule.getAtoms(); for (CMLAtom atom : atomList) { if ("R".equals(atom.getElementType())) { // AtomTool atomTool = AtomTool.getOrCreateTool(atom); //FIXME // CMLAtom refAtom = atomTool.getReferencedGroup(scopeElement); } } } COM: <s> joins rgroups to molecule </s>
funcom_train/2560844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyApp(boolean unconditional) throws MIDletStateChangeException { if (irc != null && irc.isConnected()) { if (!unconditional) throw new MIDletStateChangeException("IRC is still connected"); jmIrc.disconnect("QUIT :jmIrc destroyed by the OS"); } if (db.usehttp) { try {Thread.sleep(1000);} catch (InterruptedException ie) {} } //if (uihandler != null) uihandler.cleanup(); } COM: <s> destroy must cleanup everything </s>
funcom_train/11008961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFamily() { CTIntProperty family = _ctFont.sizeOfFamilyArray() == 0 ? _ctFont.addNewFamily() : _ctFont.getFamilyArray(0); return family == null ? FontFamily.NOT_APPLICABLE.getValue() : FontFamily.valueOf(family.getVal()).getValue(); } COM: <s> get the font family to use </s>
funcom_train/4904734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BrowsableItem getItem() { if (item != null) return item; try { item = BrowsableItemFactory.createItem(sourceElement); sourceElement = null; // discard the XML representation } catch (Exception ex) { ConfigManager.getConfigManager().logError(Messages.getString("BackupItem.ErrorLoadingItem") + ex.getMessage()); //$NON-NLS-1$ } return item; } COM: <s> get the underlying item to be backed up </s>
funcom_train/26454842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIterator() { // Verify that the iterator returns MAX_ENTRIES and no more elements int nbEntries = getCache().size(); Iterator iterator = getCache().entrySet().iterator(); assertNotNull(iterator); for (int count = 0; count < nbEntries; count++) { assertNotNull(iterator.next()); } assertTrue(!iterator.hasNext()); } COM: <s> test the iterator </s>
funcom_train/15618368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TopicVersion lookupTopicVersion(int topicVersionId, Connection conn) throws SQLException { PreparedStatement stmt = null; ResultSet rs = null; try { stmt = conn.prepareStatement(STATEMENT_SELECT_TOPIC_VERSION); stmt.setInt(1, topicVersionId); rs = stmt.executeQuery(); return (rs.next()) ? this.initTopicVersion(rs) : null; } finally { DatabaseConnection.closeConnection(null, stmt, rs); } } COM: <s> private version of lookup topic version that works with an existing connection </s>
funcom_train/20310270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model extractInto( Model model, Resource r, Model s ) { TripleBoundary tb = boundary.asTripleBoundary( s ); Graph g = getGraphExtract( tb ) .extractInto( model.getGraph(), r.asNode(), s.getGraph() ); return ModelFactory.createModelForGraph( g ); } COM: <s> answer code model code after updating it with the sub graph of </s>
funcom_train/47281088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPhoneNumber(Random r) { int rand = r.nextInt(3); if (rand == 0) { return "" + rand10(r) + rand10(r) + rand10(r) + rand10(r) + rand10(r) + rand10(r) + rand10(r); } else { return "" + rand10(r) + rand10(r) + rand10(r) + "-" + rand10(r) + rand10(r) + rand10(r) + rand10(r); } } COM: <s> generates a phone number at random </s>
funcom_train/50846831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDate() throws Exception { testGetXXX("getDate"); ResultSet rs = this.newFOROJdbcResultSet(); rs.next(); rs.close(); try { rs.getDate("c_date"); fail("Allowed getDate after close()"); } catch (SQLException ex) { assertEquals( "error code", ex.getErrorCode(), -ErrorCode.X_24501); } } COM: <s> test of get date method of interface java </s>
funcom_train/22758040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { int selCount = 0; for (int i = 0, n = dimensions.length; i < n; i++) { if (dimensions[i].isSelected()) { selCount++; } } okButton.setEnabled(selCount >= 2); } COM: <s> if a checkbox has been selected the number of checked checkboxes is </s>
funcom_train/20480167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructionNoLinks() throws Exception { PageRecord linkless = new PageRecord("aPage 1.2324"); assertEquals("aPage", linkless.getName()); assertEquals(1.2324, linkless.getRank()); assertArrayEquals(new String[] {}, linkless.getLinks()); } COM: <s> test that construction from string with no links yields string 0 </s>
funcom_train/45357456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { // display popup menu if ( e.isPopupTrigger() ) { e.consume(); setPopupMenuState(); popupMenu.show(this, e.getX()-listScroll.getViewport().getViewPosition().x+20, e.getY()-listScroll.getViewport().getViewPosition().y+15); } } COM: <s> mouse event mouse pressed </s>
funcom_train/28289361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayResults() { for ( int i = 0; i < file.caseVector.size(); i++ ) { TestCase tc = (TestCase) file.caseVector.elementAt(i); p( tc.description +" = "+ tc.actual+ ( tc.expect != tc.actual ? " FAILED! expected: " + tc.expect : " PASSED!" ) ); } getFailedCases(); } COM: <s> write a summary of the test case to standard out </s>
funcom_train/29290036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FaqCMPData findByPrimaryKey(String faq_id) throws EJBException { FaqCMPData faqData = new FaqCMPData(); try { FaqCMPLocal faqLocal = getFaqCMPLocalHome().findByPrimaryKey(faq_id); faqData.setFaq_question(faqLocal.getFaq_question()); faqData.setFaq_answer(faqLocal.getFaq_answer()); } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } return faqData; } COM: <s> find faq where faq id </s>
funcom_train/4505383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdleTime(int idleTime) { if (idleTime < 1) { throw new IllegalArgumentException("Idle time less than 1 is not valid: " + idleTime); } JiveGlobals.setProperty("conversation.idleTime", Integer.toString(idleTime)); this.idleTime = idleTime * JiveConstants.MINUTE; } COM: <s> sets the number of minutes a conversation can be idle before its ended </s>
funcom_train/36679697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(int elapsedTime) { if (autoScroll) { time += elapsedTime; if (time >= SCROLL_DELAY) { attemptToScroll(Direction.NORTH); attemptToScroll(Direction.EAST); attemptToScroll(Direction.SOUTH); attemptToScroll(Direction.WEST); time = 0; } } } COM: <s> if auto scroll is on then attempt to scroll in each game loop </s>
funcom_train/18641352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSelectedUserObject() { LOGGER.debug("getSelectedUserObject()"); if (tree.getLastSelectedPathComponent()==null) { return null; } else { return ((DefaultMutableTreeNode)tree.getLastSelectedPathComponent()).getUserObject(); } } COM: <s> method returns the user object of the selected node </s>
funcom_train/124096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object construct() { try { if (classToBuild == null) return null; if (method != null) { Object rt = method.invoke(this, new Object[0]); return rt; } return classToBuild.newInstance(); } catch (Throwable ex) { return ex; } } COM: <s> gets the constructed object or an instance of code exception code </s>
funcom_train/34810947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setSubWindowScoreAsMinScore(){ SubWindow sw = interval.getBestSubWindow(); if (sw == null) return false; Oligo[] swOligos = sw.getOligos(); double length = swOligos.length; double total = 0; for (int x = 0; x < length; x++) total += swOligos[x].getSmoothedScore(); double score = total/length; scoreCutOff = score * maxScoreFractionDrop; System.out.println("Score "+score +" minScore "+scoreCutOff); return true; } COM: <s> averages the smoothed scores in the best sub window </s>
funcom_train/21644792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getTeamCreateTeamMenuItem() { if (teamCreateTeamMenuItem == null) { teamCreateTeamMenuItem = new JMenuItem(); teamCreateTeamMenuItem.setText("Create Team"); teamCreateTeamMenuItem.setMnemonic('C'); teamCreateTeamMenuItem.setDisplayedMnemonicIndex(0); teamCreateTeamMenuItem.addActionListener(eventHandler); } return teamCreateTeamMenuItem; } COM: <s> return the team create team menu item </s>
funcom_train/45054426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { FileOutputStream fos; try { fos = new FileOutputStream(current.getProperty(SETTINGS_FILENAME)); current.store(fos, "MozillaTranslator " + current.getProperty(SYSTEM_VERSION) + " configurations file"); fos.close(); } catch (Exception e) { // FIXME:: refactor exception handling Kernel.appLog.log(Level.SEVERE, "Logging under development", e); } } COM: <s> saves the settings </s>
funcom_train/32982166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getMmsiPanel() { if (mmsiPanel == null) { mmsiTitle = new JLabel(); mmsiTitle.setText("MMSI: "); mmsiPanel = new JPanel(); mmsiPanel.setLayout(new BoxLayout(getMmsiPanel(), BoxLayout.X_AXIS)); mmsiPanel.add(mmsiTitle, null); mmsiPanel.add(getMmsiValue(), null); } return mmsiPanel; } COM: <s> this method initializes mmsi panel </s>
funcom_train/1033620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vec3f getPosition() { Vec3f result = null; float[] pos = new float[3]; al.alGetSourcefv(sourceID, AL.AL_POSITION, pos, 0); result = new Vec3f(pos[0], pos[1], pos[2]); return result; } COM: <s> gets the x y z position of the source </s>
funcom_train/42474944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReferences(List<Reference> references) throws EnzymeReferenceException { if (references == null) throw new NullPointerException("Parameter 'references' must not be null."); if (references.size() < 1) throw new EnzymeReferenceException("At least one reference must be part of this list."); this.references = references; } COM: <s> sets the list of refernces </s>
funcom_train/1146849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void switchToPreviousDisplayable() { Displayable __currentDisplayable = getDisplay().getCurrent(); if (__currentDisplayable != null) { Displayable __nextDisplayable = (Displayable) __previousDisplayables.get(__currentDisplayable); if (__nextDisplayable != null) { switchDisplayable(null, __nextDisplayable); } } } COM: <s> switches a display to previous displayable of the current displayable </s>
funcom_train/36851813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeInt(int v) throws IOException { newWritePosition(4); int pos = position; buffer[pos++] = (byte) (v >>> 24); buffer[pos++] = (byte) (v >>> 16); buffer[pos++] = (byte) (v >>> 8); buffer[pos++] = (byte) v; position = pos; } COM: <s> writes an tt int tt into the buffer </s>