__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7506270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOtuSet(final int pos, final OtuSet otuSet) { checkNotNull(otuSet); checkArgument(pos >= 0, "pos < 0"); checkArgument( !getOtuSets().contains(otuSet), "this study already contains otu set [" + otuSet.getLabel() + "]"); otuSets.add(pos, otuSet); otuSet.setParent(this); } COM: <s> insert an otu set at the given position </s>
funcom_train/6487323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent ev) { DefaultMutableTreeNode n = (DefaultMutableTreeNode) ev.getPath().getLastPathComponent(); if (n == null) return; MdsNode t = (MdsNode) n.getUserObject(); fireActionEvent(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "OPEN_COMMENT_" + t.getId())); } COM: <s> determine which message is selected and fires an action event </s>
funcom_train/10628626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPosZero() { String numA = "27384627835298756289327365"; String numB = "0"; String res = "27384627835298756289327365"; BigInteger aNumber = new BigInteger(numA); BigInteger bNumber = new BigInteger(numB); BigInteger result = aNumber.xor(bNumber); assertTrue(res.equals(result.toString())); } COM: <s> xor for a positive number and zero </s>
funcom_train/35048512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFTSAnalyzer _getAnalyzer(String language) throws JFTSFrameworkException { JFTSAnalyzer analyzer = null; try { String unsupportedLanguage = config.getLanguageDetectorConfig().getUnknownLanguage(); AnalyzerManager dinamicAnalyzer = new AnalyzerManager(); if (language.trim().equalsIgnoreCase(unsupportedLanguage.trim())){ if (config.getIndexerConfig().getUseDefaultAnalyzer()){ language = dinamicAnalyzer.getDefaultLanguage(); } } analyzer = dinamicAnalyzer.getAnalyzer(language); } catch (Exception e) { _closeSessionWithError(); throw new JFTSFrameworkException(e.getMessage()); } return analyzer; } COM: <s> returns the corresponding jftsanalyzer language that receives as parameter </s>
funcom_train/43571789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuFileProperties() { if (menuFileProperties == null) { menuFileProperties = new JMenuItem(); menuFileProperties.setText(Constant.messages.getString("menu.file.properties")); // ZAP: i18n menuFileProperties.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getMenuFileControl().properties(); } }); } return menuFileProperties; } COM: <s> this method initializes menu file properties </s>
funcom_train/3524654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testObjectArrayListSetGetText() throws Exception { model = new TestSelectModel(); model.setList(new ObjectArrayValueHolder( new String[] {"Juneau","Douglas","Auke Bay","Ketchikan"})); model.setText("Douglas"); assertEquals("Douglas", model.getText()); } COM: <s> test for method get option list array </s>
funcom_train/16107959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoggingEventClass(String string) { loggingEventClass = string; try { setLoggingEvent((Class<HibernateAppenderLoggingEvent>) Class.forName(loggingEventClass)); } catch (ClassNotFoundException cnfe) { logError("Invalid LoggingEvent class " + string, cnfe, ErrorCode.GENERIC_FAILURE); } } COM: <s> sets the name of class implementing the </s>
funcom_train/10644048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTabSize(final int size) { Integer old = tabSize; tabSize = new Integer(size); Document doc = getDocument(); if (doc != null) { doc.putProperty(PlainDocument.tabSizeAttribute, tabSize); } firePropertyChange(PlainDocument.tabSizeAttribute, old, tabSize); } COM: <s> sets documents property plain document </s>
funcom_train/11385891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Path getOutputIndexFile() throws IOException { Path attemptIndexOutput = new Path(getAttemptOutputDir(), MAP_OUTPUT_FILENAME_STRING + MAP_OUTPUT_INDEX_SUFFIX_STRING); return lDirAlloc.getLocalPathToRead(attemptIndexOutput.toString(), conf); } COM: <s> return the path to a local map output index file created earlier </s>
funcom_train/13848307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatch(InboundRequest req) { try { InboundRequest sreq = new Inbound(req, c, c.processRequestData( req.getRequestInputStream(), req.getResponseOutputStream())); sreq.checkPermissions(); dispatcher.dispatch(sreq); } catch (IOException e) { if (logger.isLoggable(Levels.HANDLED)) { logThrow(logger, "dispatchRequest", "{0} throws", new Object[]{c}, e); } } } COM: <s> calls process request data on the connection passing the streams </s>
funcom_train/7455090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTreeStructureChanged(Dossier oldRoot) { //int len = treeModelListeners.size(); TreeModelEvent e = new TreeModelEvent(this, new Object[] {oldRoot}); for (TreeModelListener tml : treeModelListeners) { tml.treeStructureChanged(e); } } COM: <s> the only event raised by this model is tree structure changed with the </s>
funcom_train/13379497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IContainer createFromRoot(IPath path) throws CoreException { int segmentCount = path.segmentCount(); //Assume the project exists IContainer currentFolder = ((IWorkspaceRoot) destinationContainer).getProject(path.segment(0)); for (int i = 1; i < segmentCount; i++) { currentFolder = currentFolder.getFolder(new Path(path.segment(i))); if (!currentFolder.exists()) ((IFolder) currentFolder).create(false, true, null); } return currentFolder; } COM: <s> creates the folders that appear in the specified resource path </s>
funcom_train/26323984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Component c, Graphics2D g2d) { GradientPaint gradientPaint = new GradientPaint(0, 0, startColor, c.getWidth(), c.getHeight(), endColor, repeat); g2d.setPaint(gradientPaint); g2d.fillRect(0, 0, c.getWidth(), c.getHeight()); } COM: <s> paint the component </s>
funcom_train/8673018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OMDataSourceExt copy() { byte[] bytes; try { bytes = getXMLBytes(data.encoding); } catch (UnsupportedEncodingException e) { throw new OMException(e); } InputStream is1 = new ByteArrayInputStream(bytes); InputStream is2 = new ByteArrayInputStream(bytes); data.is = is1; return new InputStreamDataSource(is2, data.encoding); } COM: <s> return a input stream data source backed by a byte array input stream </s>
funcom_train/3319022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String str = new String("<"+name+""); if(attributes != null) { Iterator attrs = getAttributeNames(); while(attrs.hasNext()) { String attr = (String)attrs.next(); str += new String(" "+attr+"=\""+getAttribute(attr)+"\""); } } str += ">"; if(!getBody().equals("")) { str += System.getProperty("line.separator"); str += getBody(); } str+= System.getProperty("line.separator"); str += "</"+name+">"; return str; } COM: <s> create a string representation of this node </s>
funcom_train/5063810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popListener() { if ((null != defListener) && (defListener.eventListeners.size() > 0)) { defListener.eventListeners.pop(); if (defListener.eventListeners.isEmpty()) { SKJava.Native_SetDefaultEventListener(skjConnId, null); // Clear the default handler } } } COM: <s> removes the last event listener that was placed on the stack </s>
funcom_train/51073185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean selectPlayer(Player player) { int previousSelectedPlayerIndex = curPlayerIndex; for (int i = 0; i < players.size(); i++) { Player curPlayer = players.get(i); if (curPlayer.equals(player)) { curPlayerIndex = i; if (previousSelectedPlayerIndex != curPlayerIndex) { fireSelectedPlayerChangedEvent(); } return true; } } return false; } COM: <s> selects the given player </s>
funcom_train/26574191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getMaxHeartRate() { final int max = 220; Integer result = null; if (yearOfBirth.length() > 0) { result = Integer.valueOf(yearOfBirth); result = Integer.valueOf(max - currentYear.intValue() + result); } else { result = Integer.valueOf(max); } return result; } COM: <s> gets the max heart rate attribute of the cyclist object </s>
funcom_train/15606256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentDirectory(File dir) { if (dir != null) { if (getFileSelectionMode() == JFileChooser.DIRECTORIES_ONLY) { File[] subFiles = dir.listFiles(dirFileFilter); if ((subFiles == null) || (subFiles.length == 0)) { setSelectedFile(dir); return; } } } super.setCurrentDirectory(dir); } COM: <s> override to prevent the user from getting into a directory that has </s>
funcom_train/44508926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { //mapped value is ignored - not needed for most (if not all) authc Filters. return isAccessAllowed(request, response, mappedValue) || onAccessDenied(request, response); } COM: <s> returns code true code if </s>
funcom_train/6490769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void regenerate() { altLabel.setFont(state.font_alt); indexLabel.setFont(state.font_index); scale.setValue(state.getScale()); divisions.setValue(state.index_division); shading.setSelected(state.shading); invalidate(); validate(); repaint(); } COM: <s> make internal state consistent with displayed values </s>
funcom_train/31901675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintHorizBorder(Component c, Graphics g, int x, int y, int width, int height) { g.setColor(this.bColor); g.drawLine(x, y, x+width, y); g.drawLine(x, y-height, x+width, y ); } COM: <s> paint a border on just the top and bottom </s>
funcom_train/3431239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPreviousSibling(int nodeHandle) { nodeHandle &= NODEHANDLE_MASK; // Document root has no previous sibling if (nodeHandle == 0) return NULL; int parent = nodes.readEntry(nodeHandle, 1); int kid = NULL; for (int nextkid = getFirstChild(parent); nextkid != nodeHandle; nextkid = getNextSibling(nextkid)) { kid = nextkid; } return kid | m_docHandle; } COM: <s> given a node handle find its preceeding sibling </s>
funcom_train/19660637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readBytes(byte[] b, int offs, int len) throws IOException { int totalBytesRead = 0; while (len > 0) { int bytesRead = source.read(b, offs, len); if (bytesRead == -1) { break; } totalBytesRead += bytesRead; offs += bytesRead; len -= bytesRead; } return totalBytesRead; } COM: <s> simlar to read fully but doesnt throw exception when eof is reached </s>
funcom_train/50389704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerServiceFactory(ServiceFactory factory) { ServiceFactory old=serviceFactories.put(factory.getType(), factory); if(old==null || old.getClass().equals(factory.getClass())){ logger.info("Registered '" + factory.getClass().getName() + "'" + " for service type '" + factory.getType() + "'"); } } COM: <s> register the given service factory </s>
funcom_train/51245686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void requestFocusForSelectedSqllTabEditor() { final Component selectedComponent = getSelectedComponent(); if (selectedComponent instanceof SqlTabPanel) { SwingUtilities.invokeLater(new Runnable(){ public void run() { ((SqlTabPanel)selectedComponent).requestFocusToEditor(); } }); } } COM: <s> requests focus for a selected sql in the overview panel </s>
funcom_train/36949902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSource(IFile resource, IPath containerPath, SourceElementParser parser) { if (RubyCore.getPlugin() == null) return; SearchParticipant participant = BasicSearchEngine.getDefaultSearchParticipant(); SearchDocument document = participant.getDocument(resource.getFullPath().toString()); ((InternalSearchDocument) document).parser = parser; IPath indexLocation = computeIndexLocation(containerPath); scheduleDocumentIndexing(document, containerPath, indexLocation, participant); } COM: <s> trigger addition of a resource to an index </s>
funcom_train/15719867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete( int start, int end ) { int End = stride*end; int Start = stride*start; if(length <= 0) return; if( End < Start ) return; if( Start < 0 ) Start = 0; if( End > length-stride ) End = length-stride; if( End < length-stride) { System.arraycopy(data, End+stride, data, Start, length - End - stride); } length -= End+stride-Start; // Calculate the data range. range(stride); } COM: <s> delete data from the data set start and end are inclusive </s>
funcom_train/18286521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAcceptableType(Type type) { boolean isAcceptable = false; switch (type.getSort()) { case Type.BOOLEAN: case Type.BYTE: case Type.CHAR: case Type.DOUBLE: case Type.FLOAT: case Type.INT: case Type.LONG: case Type.SHORT: case Type.VOID: isAcceptable = true; break; case Type.ARRAY: isAcceptable = isAcceptableType(type.getElementType()); break; case Type.OBJECT: String typename = type.getInternalName().replace('/', '.'); isAcceptable = isAcceptablePackage(typename) && !task.isFilteredClass(type.getInternalName()); break; } return isAcceptable; } COM: <s> is the specified type acceptable for output </s>
funcom_train/38318353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String expand (String sShortCDKey) { if (sShortCDKey == null || sShortCDKey.length() != 16) { illegalKey(sShortCDKey, true); } return new StringBuffer(sShortCDKey.substring(0, 4)).append("-"). append(sShortCDKey.substring(4, 8)).append("-"). append(sShortCDKey.substring(8, 12)).append("-"). append(sShortCDKey.substring(12, 16)).toString(); } COM: <s> expands a key without separators to a key with separators </s>
funcom_train/9029568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToJTable(String code,String name,String partner) { // Add the inserted row to the JTable Vector newrow = new Vector(); // Vector containing the column values newrow.addElement(code); newrow.addElement(name); newrow.addElement(partner); tablemodel.insertRow(newrow); // Add the row to the JTable scrollpane.repaint(); } COM: <s> this method inserts a new row into the jtable </s>
funcom_train/3345667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean groupHasDescriptors(int groupNr) { if (hasROFeature(Ext2Constants.EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) return (checkPow(groupNr, 3) || checkPow(groupNr, 5) || checkPow(groupNr, 7)); else return true; } COM: <s> with the sparse super option set a filesystem does not have a superblock </s>
funcom_train/34837811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void walkModel(XSModel model) { List<? extends XSObject> globalComponents = initialize(model); for (XSObject object : globalComponents) { XsModelWalker.logger.debug("Global component [{" + object.getNamespace() + "}:" + object.getName() + "]"); visitComponent(object, null); } } COM: <s> walk through the given model executing all applicable registered workers for each node </s>
funcom_train/19378177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getOclFragmentName(CtMethod method) { String methodName = "getOclFragmentName"; ExceptionUtils.checkNull(methodName, "method", method); String fragment = method.getName(); String prefix = this.getMethodPrefix(method); int index = fragment.indexOf(prefix); if (index != -1) { fragment = fragment.substring(index + prefix.length(), fragment.length()); } return fragment; } COM: <s> returns the ocl fragment name that must have </s>
funcom_train/18073450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getValidateMenuItem() { if (validateMenuItem == null) { validateMenuItem = new JMenuItem(); validateMenuItem.setText("Validate Ontology"); validateMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { greasoner.validate(); } }); } return validateMenuItem; } COM: <s> this method initializes validate menu item </s>
funcom_train/24960566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculate(String expression, double x[]) { double result = 0.0; for (int n = 0; n < x.length; n++) { expression = expression.replaceAll("x" + (n + 1), "(" + x[n] + ")"); } MathEvaluator evaluator = new MathEvaluator(expression); try { result = evaluator.getValue(); } catch (Exception ex) { System.err.println(expression); } return (result); } COM: <s> calculate mathematical expression </s>
funcom_train/39949102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { VirtualClock.getInstance().addPropertyChangeListener(this); this.getButtonGroupVirtualClockStatus(); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.gridy = 0; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.gridx = 0; this.setSize(519, 315); this.setLayout(new GridBagLayout()); this.add(getJTabbedPane(), gridBagConstraints); } COM: <s> this method initializes this </s>
funcom_train/48587977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserEntry createUser(String username, String givenName, String familyName, String password, String domain) throws AppsForYourDomainException, ServiceException, IOException, Exception { return createUser(username, givenName, familyName, password, domain, null); } COM: <s> creates a new user with an email account </s>
funcom_train/37573974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stampLastWeek() { // M T W R F S U <- last week // m t w r f s u <- this week long mondayTime = Utils.fromMonday().getTime(); Timestamp lastMonday = new Timestamp(mondayTime-Utils.WEEK_LENGTH); Timestamp lastSunday = new Timestamp(mondayTime-1); // end of day setFromTimestamp(lastMonday); setThruTimestamp(lastSunday); } COM: <s> set from and thru dates to last week </s>
funcom_train/18367768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printQuotedString(char[] ch, int offset, int length) { System.out.print('"'); for (int i = 0; i < length; i++) { normalizeAndPrint(ch[offset + i]); } System.out.print('"'); } // printQuotedString(char[],int,int) COM: <s> print quoted string </s>
funcom_train/28749602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCharge(Long newVal) { if ((newVal != null && this.charge != null && (newVal.compareTo(this.charge) == 0)) || (newVal == null && this.charge == null && charge_is_initialized)) { return; } this.charge = newVal; charge_is_modified = true; charge_is_initialized = true; } COM: <s> setter method for charge </s>
funcom_train/22267936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { this.isActive = false; this.timeLeft = Math.max(0, (int) (this.nextTrigger - cpu.getCycles())); if (TIMER_DEBUG && c64.getLogger() != null) { c64.getLogger().info(this.name + ": Stopping timer"); } } COM: <s> stop the timer </s>
funcom_train/44859749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getDefinitionsFactoryKey(String name, ServletRequest request, ServletContext servletContext) { try { return RequestContextUtils.getLocale((HttpServletRequest)request); } catch (RuntimeException e) { log.error("SpringI18nFactorySet.getDefinitionsFactoryKey", e); return null; } } COM: <s> uses springs request context utils to resolve the locale rather than simply </s>
funcom_train/22429016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getTableAuth() { if (tableAuth == null) { tableAuth = new JTable(); tableAuth.setModel(getAuthModel()); tableAuth.setRowHeight(18); tableAuth.setIntercellSpacing(new java.awt.Dimension(1,1)); for (int i = 0; i < 5; i++) { TableColumn column = tableAuth.getColumnModel().getColumn(i); column.setPreferredWidth(width[i]); } } return tableAuth; } COM: <s> this method initializes table auth </s>
funcom_train/40413049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWidget(Widget w) { // wrap TABLE elements in a DIV or they do not layout properly if (DOM.getElementProperty(w.getElement(), "tagName") .equalsIgnoreCase("table")) { SimplePanel p = new SimplePanel(); p.setStyleName(wrapperStyle); p.add(w); w = p; } content.clear(); content.add(w); } COM: <s> replace our contents with w </s>
funcom_train/45250352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJobInfo(JobInfo info) { GroupInfo group = info.getGroupInfo(); if (group != null) { refreshGroup(group); } jobs.put(info.getJob(), info); synchronized (listenersKey) { for (int i = 0; i < listeners.length; i++) { IJobProgressManagerListener listener = listeners[i]; if (!isCurrentDisplaying(info.getJob(), listener.showsDebug())) { listener.addJob(info); } } } } COM: <s> refresh the content providers as a result of an addition of info </s>
funcom_train/8344371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedTab(int index) { if (index < 0 || (index >= tabs.size() && index > 0)) { throw new IndexOutOfBoundsException(); } setDefaultModelObject(new Integer(index)); IPageTab tab = tabs.get(index); Page thisPage = getPage(); if (!tab.getPage().equals(thisPage.getClass())) { setResponsePage(tab.getPage(), tab.getPageParameters()); } } COM: <s> sets the selected tab </s>
funcom_train/23216749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAgentRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoleEnactmentElement_agentRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoleEnactmentElement_agentRef_feature", "_UI_RoleEnactmentElement_type"), ContractPackage.Literals.ROLE_ENACTMENT_ELEMENT__AGENT_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the agent ref feature </s>
funcom_train/18068241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stage3_ChangeStage() throws IllegalAccessException { if (getCurrentStage() == STAGE3) { // stage 3 completed // switch to stage 4 setCurrentStage(STAGE4); getLogger().debug("Stage3 - Changed stge to Stage-4."); } else { getLogger().error(ILLEGAL_METHOD_EXECUTION); throw new IllegalAccessException(ILLEGAL_STATE_TRANSITION); } } COM: <s> changes game controllers state to stage 4 </s>
funcom_train/36147598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector nextVector() { String str = readString(); if (str == null || "".equals(str)) { return null; } char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter()); StringTokenizer stk = new StringTokenizer(str, sep1); stk.next(); String value = stk.next(); return (Vector) getObject(Vector.class.getName(), value, sep1); } COM: <s> gets the next vector object </s>
funcom_train/1049973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendBol(Bol bol){ BolPositionedAndWeighted newBol = new BolPositionedAndWeighted(bol.bolName, bol.style, (double) duration); bols.add(newBol); positionMap.put(new Double(duration), newBol); duration += (1.0 / ((double)bol.getPlayingStyle().getSpeedValue())); duration = algorithm.tools.Calc.roundIfClose(duration); } COM: <s> appends a bol to the sequence </s>
funcom_train/10602450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubnetMask(String mask) throws AccessControlException { try { /* use setSubnetMask(...) to check the mask-format: */ setSubnetMask(InetAddress.getByName(mask).getAddress()); } catch (final UnknownHostException e) { throw new AccessControlException("Failed to convert mask [" + mask + "]: ", e); } } COM: <s> sets the subnet mask </s>
funcom_train/30279291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasIVRPlayAudioSegment(String content) { if (content.contains("playTask") && content.contains("type=\"message\"")) { return true; } // if (content.contains("collectDigitsTask") && content.contains("prompt")) { // return true; // } if (content.contains("collectDigitsTask") && content.contains("type=\"message\"")) { return true; } return false; } COM: <s> this is ivr definition file and it contains links to gsm files </s>
funcom_train/8342468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupComponents() { imagePanel.setBorder(new CompoundBorder(new TitledBorder("Preview"), new EmptyBorder(2, 2, 2, 2))); imagePanel.setLayout(new BorderLayout()); imagePanel.add(imageScroller, BorderLayout.CENTER); pageFormatDisplay.setEditable(false); imageScroller.setPreferredSize(new Dimension(468, 648)); } COM: <s> set any necessary attributes on the components </s>
funcom_train/8528556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeEmptyPageList() { // remove pageList if empty if (0 == pageCount) { Element pageList = (Element) XPathUtils.selectSingleNode( ncxTemplate.getDocumentElement(), "//ncx:pageList", mNsc); pageList.getParentNode().removeChild(pageList); } } COM: <s> removes the code page list code element if its empty </s>
funcom_train/20221376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkFiles(final List<VirtualFile> files) { LOG.info("Scanning current file(s)."); if (files == null) { LOG.debug("No files provided."); return; } final CheckFilesThread checkFilesThread = new CheckFilesThread(this, files); checkFilesThread.setPriority(Thread.MIN_PRIORITY); synchronized (checksInProgress) { checksInProgress.add(checkFilesThread); } checkFilesThread.start(); } COM: <s> run a scan on the currently selected file </s>
funcom_train/17803850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(CtbVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/45472132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMethod makeGetReferenceIdMethod(final FieldInfo fieldInfo) { JMethod method = new JMethod("getReferenceId", SGTypes.STRING, "the reference ID"); JSourceCode jsc = method.getSourceCode(); jsc.add("return this."); jsc.append(fieldInfo.getName()); jsc.append(";"); return method; } COM: <s> creates the get reference id method </s>
funcom_train/12308336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyToClipboard(ISelection selection) { String textVersion = selectionToString(selection); if ((textVersion != null) && (textVersion.trim().length() > 0)) { // set the clipboard contents fClipboard.setContents(new Object[] {textVersion}, new Transfer[] {TextTransfer.getInstance()}); } } COM: <s> copies selected element to clipboard </s>
funcom_train/19752910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasUserAccessTo(String userName,String accessType,String functionPath) throws Exception { try { return hasUserAccessTo(userName,accessType,functionPath,null,null); } catch (Exception e) { throw new Exception(ParseError.parseError("AccessChecker.hasUserAccessTo('"+userName+"','"+accessType+"','"+functionPath+"')",e)); } } COM: <s> checks access to a particular function name </s>
funcom_train/45779067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectionBrokenDown() { if (this.responses == null) { /* * Nothing to do! */ return; } /* synchronize on responses, as all threads accessing this proxy do so */ synchronized (this.responses) { logger.info("Connection broken down!"); this.disconnected = true; /* wake up all threads */ for (WaitingThread thread : this.waitingThreads.values()) { logger.debug("Interrupting waiting thread " + thread); thread.wakeUp(); } } } COM: <s> method to indicate that connection to remote </s>
funcom_train/9818132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BV setValue(byte value, boolean sign_ext) { if (sign_ext == SIGN_EXT) return setValue((int) value, sign_ext); // byte -> int sign-extends return setValue(value & BYTE_MASK, sign_ext); // byte -> int sign-extends, so must mask } COM: <s> sets value of bv with appropriate sign extension as necessary </s>
funcom_train/16616542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getConfigFile() throws FileNotFoundException { File file = new File(homeDir, Definitions.DIRNAME_CONFIG + File.separatorChar + Definitions.FILENAME_CONFIG); if (!file.isFile()) { throw new FileNotFoundException("Could not find configuration file \"" + file.getAbsolutePath() + "\""); } return file; } COM: <s> returns a file object denoting the configuration file infofuze config </s>
funcom_train/25596002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundExpansionColor(Color c) { ModifiedTreeNode root = (ModifiedTreeNode) treeModel.getRoot(); this.nodeBackgroundExpansionColor = c; Enumeration children = root.getBFTEnumeration(); while (children.hasMoreElements()) { ModifiedTreeNode child = (ModifiedTreeNode) children.nextElement(); (child.getNodeRenderer()).setBackgroundExpansionColor(this.nodeBackgroundExpansionColor); } } COM: <s> sets the given background expansion color to all the nodes of the tree </s>
funcom_train/43067033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasBetween(String element) { if (constants.size() != 2) { throw new RuntimeException ("This set doesn't have 2 elements"); } boolean afterFirst=element.compareTo((String)constants.get(0))>0; boolean beforeLast=element.compareTo((String)constants.get(1))<0; return afterFirst && beforeLast; } COM: <s> tests if the element is between the 2 parameters of this couple </s>
funcom_train/45771632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream os) throws IOException { DataOutputStream out = new DataOutputStream(os); // write out PDB name out.write(bName); // write out 2 bytes for number of records out.writeShort(records.length); // let each Record object write out its own info. for (int i = 0; i < records.length; i++) records[i].write(out); } COM: <s> write out the number of records followed by what </s>
funcom_train/37253272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFirstWord(String s) { if (s.indexOf(" ") >= 0) { return s.substring(0, s.indexOf(" ")).trim(); } else if (s.indexOf("\t") >= 0) { return s.substring(0, s.indexOf("\t")).trim(); } else { return s; } } COM: <s> helper to get the first word out of s </s>
funcom_train/21190355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidateMvnHomeReuse() throws Exception { final Maven2Builder mb = createValidM2Builder(); mb.validate(); // rerun validate to test for reuse issues try { mb.validate(); } catch (CruiseControlException e) { assertTrue(e.getMessage().startsWith(MSG_PREFIX_HOME_SCRIPT_BOTH_SET)); } } COM: <s> test validation with mvn home set and resuse issues </s>
funcom_train/15936920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fulFillMessageContent(ContentElement content, ACLMessage message) { // Set predicate into Message ACL INFORM try { _cm.fillContent(message, content); } catch (Exception e) { if (_logger.isLoggable(Logger.SEVERE)) _logger.log(Logger.SEVERE, "FragmentedTransferProtocol: " + this.getName() + ": Error filling message content: " + e); } } COM: <s> fulfill the content of a message </s>
funcom_train/8844508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setupValid() { SetupTabInterface setupView = _gui.getSetupView(); if ( ( setupView.rdoToFileSelected() || setupView.rdoToFileScreenSelected() ) && !setupView.txtGetOutput().isEmpty()) { return true; }else if ( setupView.rdoToScreenSelected() ) { return true; } return false; } COM: <s> checks if setup tab is defined for running </s>
funcom_train/28982763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean almostEquals(Transaction transaction) { String newRegion = Long.toString(this.targetRegion); String recordedRegion = Long.toString(transaction.targetRegion); return (this.id == transaction.id && (newRegion.startsWith(recordedRegion) || recordedRegion.startsWith(newRegion))); } COM: <s> defines if a transaction is almost the same as an another one </s>
funcom_train/1532106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void addPoint(int pos, double x, double y) { PathPoint p = new PathPoint(x, y, true); updateBounds(p); ((ArrayList<Point2D>)pathPoints).ensureCapacity(pos+1); while (pathPoints.size() <= pos) { pathPoints.add(null); } pathPoints.set(pos, p); } COM: <s> adds point to point list and keeps track of largest coordinate </s>
funcom_train/23635979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTransportationModesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Link_transportationModes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Link_transportationModes_feature", "_UI_Link_type"), CescsmodelPackage.Literals.LINK__TRANSPORTATION_MODES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the transportation modes feature </s>
funcom_train/36180040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePSS(PSSAdvertisement pssAdvert) { logger.debug("***PSS DISCOVERY EVENT**** Updated PSS (" + pssAdvert.getPssName() + ") advertisement received"); m_currentPSSs.put(pssAdvert.getPeerGroupID(), pssAdvert); // OVERWRITES // THE KEY receivedUpdatedPSSAd(pssAdvert); } COM: <s> updates a pss advert in the list of known psss </s>
funcom_train/31930566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addResultFilePane() { JPanel p = boxPanel(); m_expectedResultField = createTextField(MapKey.EXPECTED_RESULT, 20); m_actualResultField = createTextField(MapKey.ACTUAL_RESULT, 20); p.add(createExpectedResultPane()); p.add(createActualResultPane()); addBorder(p); add(p); } COM: <s> add a pane containing the names of the actual and expected result files </s>
funcom_train/46964462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxShowVideoFrame() { if (jCheckBoxShowVideoFrame == null) { jCheckBoxShowVideoFrame = new JCheckBox(); jCheckBoxShowVideoFrame.setPreferredSize(new Dimension(140, 19)); jCheckBoxShowVideoFrame .setHorizontalTextPosition(SwingConstants.RIGHT); jCheckBoxShowVideoFrame .setHorizontalAlignment(SwingConstants.CENTER); jCheckBoxShowVideoFrame.setText("Show video frame"); } return jCheckBoxShowVideoFrame; } COM: <s> this method initializes j check box show video frame </s>
funcom_train/1316653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleButton(Player player, int interfaceId, int buttonId, int buttonId2) { if(interfaceId == 105) { handleMainButton(player, buttonId, buttonId2); } else if(interfaceId == 389) { handleItemSearchButton(player, buttonId, buttonId2); } } COM: <s> handles a button in the grand exchange interfaces </s>
funcom_train/39912176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEh8() { System.out.println("setEh8"); TextField tf = null; Page1 instance = new Page1(); instance.setEh8(tf); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set eh8 method of class timesheetmanagement </s>
funcom_train/35607697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void gotoHour(int currentHourIndex) { taskViewPort.setView(pnReminder); Point pt = taskViewPort.getViewPosition(); pt.x = 0; pt.y = currentHourIndex > 0 ? (((currentHourIndex) * taskPanelWidth)) - taskPanelWidth : 0; taskViewPort.setViewPosition(pt); spReminderCenter.setViewport(taskViewPort); } COM: <s> set viewport based on hour selected </s>
funcom_train/2368976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { this.update(); } catch (final Exception e) { LOGGER.error("run()", e); } if (this.running) { WizardEnvironment.schedule(this, UPDATE_INTERVAL); } else { synchronized (this) { this.stopped.set(true); this.notifyAll(); } } } COM: <s> checks the repository state periodically </s>
funcom_train/39263973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void test_pH() { pH( 1.0, 1000.0 ); pH( 1.0, 1000000.0 ); pH( 1.0, 10000000000.0 ); pH( 1.0, 10000000000000.0 ); pH( 1.0, 100000000000000000.0 ); pH( 4727.0, 47269293981481.5 ); } COM: <s> test the p h function </s>
funcom_train/23058059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFireTableDataChanged() { System.out.println("fireTableDataChanged"); final MessageMapper instance = new MessageMapper(); instance.fireTableDataChanged(); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of fire table data changed method of class message mapper </s>
funcom_train/45786102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJcboEdificios() { if (jcboEdificios == null) { jcboEdificios = new JComboBox(); jcboEdificios.setBounds(new Rectangle(165, 15, 195, 20)); jcboEdificios.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { limpiar(); mostrarDatos(); } }); } return jcboEdificios; } COM: <s> this method initializes jcbo edificios </s>
funcom_train/2614704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeRecLen(){ lenBrief = strBrief.length(); lenDate = strDate.length(); lenType = strType.length(); lenNotes = strNotes.length(); // 4 integer fields storing string lengths // 4 string fields storing unicode // 1 integer field recLen = (4 * 4) + 2 * (lenBrief + lenDate + lenType + lenNotes) + 4; return recLen; } COM: <s> used internally to compute length of all string fields </s>
funcom_train/5855436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkShortName(String shortName) { Entry next = entry; while (next != null) { if (shortName.equalsIgnoreCase(next.getShortName())) { return false; } String ln = next.getLongName(); if (ln != null && shortName.equalsIgnoreCase(ln)) { return false; } next = next.next(); } return true; } COM: <s> return true if the given short name does not match any entries in </s>
funcom_train/29954515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetParamEl() throws JDOMException { System.out.println("setParamEl"); HBParamObject instance = new HBParamObject(); instance.setParamEl(el); if (instance.getParamEl()!=null) { System.out.println(instance.getParamEl()); } else { fail("Got a null pointer."); } } COM: <s> test of set param el method of class hbm </s>
funcom_train/40828063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { Object lValue = null; if (columnIndex == 0) { lValue = getRowElementInformation(rowIndex); } else if (columnIndex > 0) { lValue = getPeptideHitInformation(iPh[columnIndex - 1], rowIndex); } return lValue; } COM: <s> returns the value of one cell </s>
funcom_train/7808036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|37-getter|0|37-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|37-getter|1|37-postInit // write post-init user code here }//GEN-BEGIN:|37-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/1117058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeHHCategories(Vector hhCategories) throws IOException { byte []tmp = Category.toBytes(hhCategories); System.arraycopy(tmp, 0, bytes, 0, tmp.length); //write the synchronized categories to the device SyncManager.writeDBAppInfoBlock(db, props.remoteNames[0], bytes); } COM: <s> writes a vector of category objects back to the device </s>
funcom_train/43447955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BasePredictions getBasePredictions(Instance instance) { instance = getTwoClassVersion(instance); // we don't have to check if lastBp is compatible since // it is always compatible, the lastBp is associated // with the model-object, i.e. "this" if (lastBP != null) lastBP = new BasePredictions(lastBP, instance); else lastBP = new BasePredictions(this, instance); return lastBP; } COM: <s> gets the base predictions </s>
funcom_train/18475657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getZipFileDest(String mirrorSuffix) { int substrIndex = mirrorSuffix.lastIndexOf("/") + 1; StringBuffer buf = new StringBuffer(this.getProject().getBaseDir() .getAbsolutePath()); String zipFileDest; buf.append("/"); buf.append(mirrorSuffix.substring(substrIndex)); zipFileDest = buf.toString(); log("Getting zip file destination - " + zipFileDest); return zipFileDest; } COM: <s> get the destination location of the zip file or tarball </s>
funcom_train/33373354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Logger getVerboseLogger(int min_level){ final Logger def = getDefaultLogger(min_level); if(min_level > Logger.INFO){ return def; } else{ final PrintWriter info = new PrintWriter(System.out, true); return Loggers.sequence( new Logger[]{Loggers.filter(Loggers.logger(info), Logger.INFO), def} ); } } COM: <s> to get a more verbose logger that logs all information </s>
funcom_train/21977902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point getPoint(String dmsg) { int start; int end; int x; int y; Point p; String s; start = dmsg.indexOf(",(") + 2; end = dmsg.indexOf(',', start); s = dmsg.substring(start, end); try { x = Integer.parseInt(s); start = end + 1; end = dmsg.indexOf("),", start); s = dmsg.substring(start, end); y = Integer.parseInt(s); p = new Point(x, y); } catch (Exception e) { p = null; } return p; } COM: <s> get coordinate point from datagram message </s>
funcom_train/42089237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { if(menu==null){ return; } else{ try{ OCLManagementAgentCreationDialog dlg=new OCLManagementAgentCreationDialog(window.getShell()); int res=dlg.open(); if(res!=Dialog.OK) return; MenuItem mi=new MenuItem(menu,SWT.CHECK); String s=dlg.getDesc(); mi.setText(s); mi.addSelectionListener(new ManagementAgentListener( dlg.getOCLAnnoExec(), dlg.getCausalConnector(), dlg.getInterval(), mi )); mi.setSelection(false); } catch(Exception e){ e.printStackTrace(); } } MessageDialog.openInformation( window.getShell(), "SelfAdapt Plug-in", "Self Adaptation Agent created"); } COM: <s> the action has been activated </s>
funcom_train/16305004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLeftCoordinate(int upperCoordinate, int bottomCoordinate) { for (int i = 0; i < image.getWidth(); i++) { for (int j = upperCoordinate + 1; j < bottomCoordinate; j++) { if (image.getRGB(i, j) != -1) { return i - 1; } } } throw new RuntimeException("No drawing could be founded, try writing again"); } COM: <s> this method finds out what is the left coordinate of the drawn letter </s>
funcom_train/28462376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisible(final boolean visible) { GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { AbstractRefactoringDialog.this._setVisible(visible); } }); GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { executeButton.requestFocus(); } }); } COM: <s> overridden to make the execute button have focus when the dialog is </s>
funcom_train/25980799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatUserName(String userName) { StringBuffer sb = null; if (userName != null && userName.startsWith("jazn.com/") ) { sb = new StringBuffer(userName); // Remove the jazn.com/ appended to the user name // by the application server sb.replace(0,9,""); return sb.toString(); } else { return userName; } } COM: <s> this method is used to format the user name </s>
funcom_train/3675739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TileSet getTileSet() throws WrongNXMLFileFormatException, IOException, NXMLParseException { try { return NonCachingResourceManager.loadTileSet(this.file); } catch (FileNotFoundException e) { this.logger.severe("I was pretty damn sure the file could be found, but I'm getting a file not found error."); return null; } } COM: <s> p returns the code tile set code generated by the code file code </s>
funcom_train/6474966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void spreadAgent(GridSimulationWorldState state, GridSimulationConfigurationHandCrafted config, int i) { // Spread Agent if(!Server.recoverstep.equalsIgnoreCase("")){ int[] posx_y = Server.agent_pos.get(this.name); posx = posx_y[0]; posy = posx_y[1]; } else{ posx = config.agentPositionX[i]; posy = config.agentPositionY[i]; } oldPosx = posx; oldPosy = posy; state.board[posx][posy].agent = true; state.board[posx][posy].agentTeam = team; } COM: <s> this method set the agents positions </s>
funcom_train/29803796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void deleteOwnership(int bid, int uid){ try{ //Create a statement, a SQL string and execute the sql string with the statement Statement deleteownership = con.createStatement(); deleteownership.executeUpdate("DELETE FROM ownership WHERE bid = '" + bid +"' AND uid = '" + uid +"'"); }catch(Exception e){ System.out.println(e); } }*/ COM: <s> deletes the ownership relationship between a user and an item </s>