__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3114683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ViewImpl clone(ViewImpl v) { v.setAttachedGraphicalObject(this.getAttachedGraphicalObject()); v.setVisible(this.isVisible()); v.setBoundingPoints2DRef((Polygon2D) this.getBoundingPoints2DRef().clone()); return (v); } // of method COM: <s> make the passed view the same as us </s>
funcom_train/27929777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initial() { frame = new JFrame("OSGi Navigator"); frame.pack(); frame.setSize(1024, 786); frame.setJMenuBar(getMenuBar()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); buildLayout(); frame.setVisible(true); helpDialog = new HelpDialog(frame); aboutDialog = new AboutDialog(frame); helpDialog.setLocationRelativeTo(null); aboutDialog.setLocationRelativeTo(null); frame.setLocationRelativeTo(null); } COM: <s> initial the main window and all dialogs </s>
funcom_train/35682102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructorWithPooledStrategy() { try { HostEndpoint endpoint = getPooledHostEndpoint(); HostAccessStrategy has = HostAccessStrategyFactory.createAccessStrategy(endpoint); assertEquals("class com.legstar.host.access.PooledHostAccessStrategy", has.getClass().toString()); } catch (HostAccessStrategyException e) { fail("testConstructor failed " + e.getMessage()); } } COM: <s> get a pooled configuration </s>
funcom_train/5236211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { checkWidget(); if (this.defaultCursor != null) { this.defaultCursor.dispose(); } if (this.defaultRowResizeCursor != null) { this.defaultRowResizeCursor.dispose(); } if (this.defaultColumnResizeCursor != null) { this.defaultColumnResizeCursor.dispose(); } if (this.rowResizeCursor != null) { this.rowResizeCursor.dispose(); } if (this.columnResizeCursor != null) { this.columnResizeCursor.dispose(); } SWTResourceManager.dispose(); super.dispose(); } COM: <s> disposes of the resources associated with this agile grid </s>
funcom_train/12674477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IClass getType() { IClass result = null; if (_javaField.getType().isArray()) { result = new ArrayDef(new ExternalClass(_javaField.getType().getComponentType())); } else { result = new ExternalClass(_javaField.getType()); } return result; } COM: <s> returns the code type code of the variable </s>
funcom_train/37568558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXslFileName(String xslFName) { String path = cm.getProperty("base_path","/tmp"); if ( xslFName.startsWith("/") && xslFName.length() > 1 ) { xslFName = xslFName.substring(1); } xslFileName = path + xslFName; } COM: <s> setter for property xsl file name </s>
funcom_train/43245274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKOneStreetAddr2() { System.out.println("setNOKOneStreetAddr2"); String nOKOneStreetAddr2 = ""; EmergencyContactObject instance = new EmergencyContactObject(); instance.setNOKOneStreetAddr2(nOKOneStreetAddr2); // 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 nokone street addr2 method of class org </s>
funcom_train/18507586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireInputRestricted(DataSetEvent e) { if (dataSetListeners != null) { Vector listeners = dataSetListeners; int count = listeners.size(); for (int i = 0; i < count; i++) { ((DataSetListener) listeners.elementAt(i)).inputRestricted(e); } } } COM: <s> fires the input restricted event for all of the listeners </s>
funcom_train/38809912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__OrgJdomDocument_getDocument() { final Attribute attribute = new Attribute("test", "value"); assertNull("attribute returned document when there was none", attribute .getDocument()); final Element element = new Element("element"); element.setAttribute(attribute); assertNull("attribute returned document when there was none", attribute .getDocument()); final Document document = new Document(element); assertEquals("invalid document", attribute.getDocument(), document); } COM: <s> check that the attribute can return the correct document </s>
funcom_train/48267971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseV8RepeatEntry(JsArrayString logEntries) { int numRepeats = Integer.parseInt(logEntries.get(1)); // run the command after the first 2 arguments numRepeats times. logEntries.shift(); logEntries.shift(); for (int i = 0; i < numRepeats; ++i) { parseLogEntry(logEntries); } } COM: <s> a repeat entry is used to indicate that the command following is repeated </s>
funcom_train/40348206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPreformattedText() { if (fWhiteStart) { int currentPos = fCurrentPosition; int whiteEndPosition = fCurrentPosition - 2; while (whiteEndPosition > fWhiteStartPosition) { if (!Character.isWhitespace(fSource[whiteEndPosition])) { whiteEndPosition++; break; } whiteEndPosition--; } try { fCurrentPosition = whiteEndPosition; createContentToken(0); } finally { fCurrentPosition = currentPos; } } reduceTokenStack(Configuration.HTML_PARAGRAPH_OPEN); fWikiModel.pushNode(new PTag()); } COM: <s> add the content of the wiki lt pre gt block </s>
funcom_train/6332589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePos(int handle) { if (!setInUse(handle, false)) { throw new IllegalArgumentException("pos " + handle + " has already been removed"); } size--; // takes car of the case handle == handleToLast while (handleToLast >= 0 && !isInUse(handleToLast)) { handleToLast--; } } COM: <s> deletes the entry at given position </s>
funcom_train/39103551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(ClientResource clientResource) { if (resourceKey == null) { return; } final String tip = clientResource.getToolTipText(resourceKey); if (tip != null) { setToolTipText(tip); } /* Repaint is not required for Tool tip text */ /* invalidate(); validate(); repaint(); */ } COM: <s> update properties based on client resource </s>
funcom_train/1743217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double fill(double amount) { if (amount <= 0) { throw new IllegalArgumentException("Fuel amount must be positive"); } double amountFilled = Math.min(size - fuelAmount, amount); fuelAmount += amountFilled; if (amountFilled > size) { System.out.println("****"); } return amountFilled; } COM: <s> fills up the fuel tank </s>
funcom_train/39163582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doAdd(){ Object[] selectedItems = sourceList.getSelectedValues(); for (int i = 0 ; i < selectedItems.length; i ++){ targetListModel.addElement(selectedItems[i]); sourceListModel.removeElement(selectedItems[i]); }// end for }// doAdd(); COM: <s> called when user press add button </s>
funcom_train/19318070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char readChar() throws JMSException { if(isBodyModifiable()) { throw new MessageNotReadableException("BytesMessage write_only"); } try { return getInputStream().readChar(); } catch(EOFException e) { throw new MessageEOFException("BytesMessage end_of_message"); } catch(IOException e) { throw new JMSException(e.getMessage()); } } COM: <s> reads a unicode character value from the bytes message stream </s>
funcom_train/3404649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException { // make str printable text = text.toString().replace('\r',' ').replace('\n',' ').replace('\t',' ').trim(); reportError(Messages.UNEXPECTED_TEXT.format(text), true ); } COM: <s> called when this loaderis an active loaderand we see a chunk of text </s>
funcom_train/28424494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() { if ( !open ) { systemOut = System.out; systemErr = System.err; ps_out = createPrintStream(); ps_err = createPrintStream(); System.setOut( ps_out ); System.setErr( ps_err ); open = true; } } COM: <s> opens this logger for logging </s>
funcom_train/40103795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rerandomize() throws BigIntegerClassNotValid { BigInteger r = BigInteger.ZERO; try { r = (BigInteger) this.rngCons.newInstance(this.pub.getBits(), rng); } catch (Exception e) { throw new BigIntegerClassNotValid("Could not construct the given big integer class"); } r = r.modPow(this.pub.getN(), this.pub.getNSquared()); cipherval = cipherval.multiply(r); cipherval = cipherval.mod(this.pub.getNSquared()); } COM: <s> rerandomizes the encrypted integer without needing the private key </s>
funcom_train/3421082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endParameterEntity(String name, Augmentations augs) throws XNIException { // call handlers if(fDTDGrammar != null ) fDTDGrammar.endParameterEntity(name, augs); if (fDTDHandler != null) { fDTDHandler.endParameterEntity(name, augs); } } COM: <s> this method notifies the end of a parameter entity </s>
funcom_train/5551244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test0Choose0() { assertEquals(MathUtils.binomialCoefficientDouble(0, 0), 1d, 0); assertEquals(MathUtils.binomialCoefficientLog(0, 0), 0d, 0); assertEquals(MathUtils.binomialCoefficient(0, 0), 1); } COM: <s> verify that b 0 0 1 </s>
funcom_train/13711829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataObjectType select(Object i_oid) throws InvalidQueryExc, UnsupportedDataObjectExc, NoDataObjectFoundExc{ ResultSet result; DataObjectType dataObject; try{ select.setObject(1, i_oid); result = select.executeQuery(); result.next(); }catch (SQLException e){ throw new InvalidQueryExc(classOfDataObject+"Could not be selected",e); } return getDataObjectFromResultSet(result); } COM: <s> returns a code data object code corresponding to the given oid </s>
funcom_train/2294357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAliasToConfigSite(String alias, String offset) { long timeOffset = 0; try { timeOffset = Long.parseLong(offset); } catch (Throwable e) { // ignore } CmsSiteMatcher siteMatcher = new CmsSiteMatcher(alias, timeOffset); m_aliases.add(siteMatcher); } COM: <s> adds an alias to the currently configured site </s>
funcom_train/9867054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDocument getDocument(IPath filePath) throws CoreException { IDocument document = null; try { this.bufferManager.connect(filePath, LocationKind.IFILE, null); ITextFileBuffer textFileBuffer = this.bufferManager .getTextFileBuffer(filePath, LocationKind.IFILE); document = textFileBuffer.getDocument(); } catch (CoreException e) { IStatus status = new Status(IStatus.ERROR, FlipPlugin.PLUGIN_ID, ExceptionConstants.FILE_ACCESS_FAILED, AJDTMessages.ajdt_FILE_CONNECTION_FAILED, e); throw new CoreException(status); } return document; } COM: <s> returns an idocument object from the provided file path </s>
funcom_train/4108590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreaeVertex() { System.out.println("creaeVertex"); int id = 0; GeneralGraphImp instance = new GeneralGraphImp(); Vertex expResult = null; Vertex result = instance.creaeVertex(id); assertEquals(expResult, result); // TODO 查看生成的测试代码并删除会失败的缺省调用。 fail("测试案例为原型。"); } COM: <s> creae vertex com </s>
funcom_train/20271236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void countPropertyOccurrence(String name) { Property prop = propertyMap.get(name); if (prop == null) { prop = new Property(name); propertyMap.put(name, prop); if (affinityGraph != null) { affinityGraph.createNode(prop); } } prop.numOccurrences++; if (currentHighAffinityProperties != null) { currentHighAffinityProperties.add(prop); } } COM: <s> increments the occurrence count for a property name </s>
funcom_train/29710306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTreeViewer(Composite parent) { // Create drill down DrillDownComposite drillDown = new DrillDownComposite(parent, SWT.BORDER); GridData spec = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL); spec.widthHint = SIZING_SELECTION_PANE_WIDTH; spec.heightHint = SIZING_SELECTION_PANE_HEIGHT; drillDown.setLayoutData(spec); _treeViewer = new TreeViewer(drillDown, SWT.NONE); drillDown.setChildTree(_treeViewer); } COM: <s> returns a new drill down viewer for this dialog </s>
funcom_train/23271227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXAxisLabel(String label) { XYPlot plot = (XYPlot) this.chart.getPlot(); if (plot != null) { ValueAxis axis = plot.getDomainAxis(); String old = axis.getLabel(); axis.setLabel(label); firePropertyChange("xAxisLabel", old, label); } } COM: <s> sets the x axis label and fires a </s>
funcom_train/3315509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InvertedMap (Map<V,K> m) { // the transformer cannot be created before this map exists. // Therefore it is not specified in the constructor. super(m.entrySet(), (TwoWayTransformer<Entry<V,K>,Entry<K,V>>) null); base = m; } COM: <s> constructs an inverted map object </s>
funcom_train/10587331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadCharset(Charset charset) { this.charsets.put(charset.getName().toLowerCase(), charset); String aliases[] = charset.getAliases(); for (int x = 0; x < aliases.length; x++) { this.charsets.put(aliases[x].toLowerCase(), charset); } } COM: <s> load a code charset code into this factory </s>
funcom_train/785235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImagePosition(int pos) { if ( pos != Constants.TOP && pos != Constants.BOTTOM && pos != Constants.LEFT && pos != Constants.RIGHT && pos != Constants.CENTER ) throw new IllegalArgumentException( "Illegal image position value."); m_imagePos = pos; } COM: <s> set the image position determining where the image is placed with </s>
funcom_train/16620866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(int value) { for (int i = 0; i < capacity; i++) { for (int pos = nextPtr[i]; pos != LAST; pos = nextPtr[pos]) { if (elements[pos - capacity] == value) { return true; } } } return false; } COM: <s> tests if some key is mapped to the specified value in this hashtable </s>
funcom_train/45463624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void close() { for (int i = 0; i < playerWindows.size(); i++) { try { ((PlayerWindow)playerWindows.elementAt(i)).close(); } catch (Exception e) {} } playerWindows.removeAllElements(); for (int i = 0; i < mgrs.length; i++) { if (mgrs[i] != null) { mgrs[i].removeTargets( "Closing session from AVReceive2"); mgrs[i].dispose(); mgrs[i] = null; } } } COM: <s> close the players and the session managers </s>
funcom_train/45075698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DecisionCombinator getCombinator(String resourceName, String domain) { cat.debug("Executing getCombinator with " + resourceName + " " + domain); Hashtable<String, PolicyDecisionEvaluators> evaluators = domains.get(domain); PolicyDecisionEvaluators pde = null; if (evaluators != null) pde = evaluators.get(resourceName); if (pde != null) { return pde.decision_combinator; } else return null; } COM: <s> used to get reference to default decision combinator </s>
funcom_train/28750053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGcrich(Long newVal) { if ((newVal != null && this.gcrich != null && (newVal.compareTo(this.gcrich) == 0)) || (newVal == null && this.gcrich == null && gcrich_is_initialized)) { return; } this.gcrich = newVal; gcrich_is_modified = true; gcrich_is_initialized = true; } COM: <s> setter method for gcrich </s>
funcom_train/12652307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EligibilityProfile getEligibilityProfile(PatientHistory patientHistory, String description) { EligibilityProfile eligibilityProfile = new EligibilityProfile(matchDefinitive(patientHistory), description); // Add a descriptive match result for each criterion regardless of type for (ImperativeCriterion imperativeCriterion : imperativeCriteria) eligibilityProfile.addCriterionProfile(imperativeCriterion.getCriterionProfile(patientHistory)); return eligibilityProfile; } COM: <s> returns the result of a descriptive match with a patients history </s>
funcom_train/16393750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countAuthors(Blog blog, Date from, Date to) { Criteria crit = session.createCriteria(Article.class) .add(Restrictions.eq("blog", blog)); if (from != null) { crit.add(Restrictions.ge("createdAt", from)); crit.add(Restrictions.lt("createdAt", to)); } crit.setProjection(Projections.projectionList() .add(Projections.groupProperty("author"))); List result = crit.list(); return result.size(); } COM: <s> find number of different authors of articles for specified blog </s>
funcom_train/10591274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSourceProperty(Source source, SourceProperty property) throws SourceException { SourceInspector inspector; final Iterator inspectors = m_inspectors.iterator(); while (inspectors.hasNext()) { inspector = (SourceInspector) inspectors.next(); if (inspector instanceof SourceDescriptor) { ((SourceDescriptor) inspector).setSourceProperty(source,property); } } } COM: <s> loops over the registered descriptors and calls delegates the call </s>
funcom_train/2040401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNavigateListener() { ORListenerManager.getInstance().addOREventListener(Constants.ListenerNavigateTo, new OREventListener() { public void handleEvent(OREvent event) { Navigate navigate = (Navigate) event.getData(); if (navigate != null) { handleNavigate(navigate); } } }); } COM: <s> adds the navigate listener to handle navigate event </s>
funcom_train/14415917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI getHostURI() throws CIMException { /* * URI( * String scheme, String userInfo, String host, int port, String path, * String query, String fragment * ) */ String path = iFile; if (path.charAt(0)!='/') path = '/'+path; try { return new URI(iProtocol, null, iHost, iPort, path, null, null); } catch (URISyntaxException e) { throw new CIMException(CIMException.CIM_ERR_INVALID_PARAMETER, e); } } COM: <s> returns the uri representation of the cimname space </s>
funcom_train/46111696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StartSubDocument startSubDocument() { StartSubDocument startSubDocument = null; if (!subFilter) { if (hasUnfinishedSkeleton()) { endDocumentPart(); } startSubDocument = new StartSubDocument(subDocumentId.createId()); Event event = new Event(EventType.START_SUBDOCUMENT, startSubDocument); filterEvents.add(event); LOGGER.log(Level.FINE, "Start Sub-Document for " + startSubDocument.getId()); } return startSubDocument; } COM: <s> add the start subdocument </s>
funcom_train/14163633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHighlightTag(String highlightTag) { if(highlightTag != null && !highlightTag.trim().equals("")) { this.highlightTag = highlightTag; this.highlightPrefix = "<" + highlightTag + ">"; this.highlightSuffix = "</" + highlightTag + ">"; } } COM: <s> set the value of highlight tag </s>
funcom_train/7264989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int idx) { if(idx >= size) throw new IndexOutOfBoundsException("idx: " + idx + ", max: " + size); int index = (int)Math.floor(idx / 8d); int offset = idx % 8; if(data == null) data = new byte[(int)Math.ceil(size / 8d)]; data[index] |= MASKS[offset]; } COM: <s> sets the bit corresponding to the index </s>
funcom_train/33741341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initFlags() { _flags.clear(); for (int i = 1; i < env_height; ++i) { for (int j = 1; j < env_width; ++j) { if (getSquareType(i, j) == TypeOfElement.FLAG) { _flags.add(getFlag(i, j)); } } } } COM: <s> initializing all flags in the game </s>
funcom_train/17203823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invalidateAllLoads() { if (!doMemory) return; int i = 0; while (i < cache.size()) { AvailableExpression ae = cache.get(i); if (ae.isLoadOrStore()) { cache.remove(i); continue; // don't increment i, since we removed } i++; } } COM: <s> eliminate all ae tuples that cache any memory location </s>
funcom_train/31046159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIndent(int offset) { try { int start= fDocument.getLineOfOffset(offset); start= fDocument.getLineOffset(start); int count = 0; for(int i=start; i<fDocument.getLength(); ++i) { char c = fDocument.getChar(i); if('\t' == c) count += fTabSpaces; else if(' ' == c) count++; else break; } return count; } catch (BadLocationException x) { return 0; } } COM: <s> returns the indentation of the line of the given offset </s>
funcom_train/17714064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Company retrieveCompany(String id) throws Exception { ICompanyDAO dao = null; Company retValue = null; try { dao = AbstractJASSDAOFactory.getJASSDAO().getCompanyDAO(); retValue = dao.retrieveCompany(id); } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); ex.printStackTrace(); } finally { dao = null; } return retValue; } COM: <s> this operation will retrieve company object from persistent </s>
funcom_train/32709835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder result = new StringBuilder("CharClasses:"); result.append(Out.NL); for (int i = 0; i < classes.size(); i++) result.append("class ").append(i).append(":").append(Out.NL).append(classes.get(i)).append(Out.NL); return result.toString(); } COM: <s> return a string representation of the char classes </s>
funcom_train/48929563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createUrlForResult(String key) { StringBuilder sb = new StringBuilder(); sb.append(rootUrl); sb.append("?method=get"); sb.append("&jobId="); sb.append(urlEncode(key)); return sb.toString(); } COM: <s> create url for getting result video </s>
funcom_train/25289920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConcentration(float concentration) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_CONCENTRATION_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("SpotLight2")); if (isLive()) ((SpotLightRetained)this.retained).setConcentration(concentration); else ((SpotLightRetained)this.retained).initConcentration(concentration); } COM: <s> sets spot light concentration </s>
funcom_train/19262061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processInputMethodEvent(InputMethodEvent e) { for (int i = 0; i < inputMethodListeners.size(); i++) { InputMethodListener iml = (InputMethodListener) inputMethodListeners .get(i); if (e.getID() == InputMethodEvent.CARET_POSITION_CHANGED) iml.caretPositionChanged(e); if (e.getID() == InputMethodEvent.INPUT_METHOD_TEXT_CHANGED) iml.inputMethodTextChanged(e); } } COM: <s> sends input method events to component listeners </s>
funcom_train/4505498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { // Unregister components try { componentManager.removeComponent(SparkVersionManager.SERVICE_NAME); // Finally remove this service (this will set null to componentManager) componentManager.removeComponent(serviceName); } catch (ComponentException e) { Log.error(e); } taskEngine = null; } COM: <s> unload the component </s>
funcom_train/33519678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HoldemPokerHand bestHand(Pocket pocketOne, Pocket pocketTwo) { PokerCard[] pocketOnePlusTable = this.pocketPlusTable(pocketOne); PokerCard[] pocketTwoPlusTable = this.pocketPlusTable(pocketTwo); HoldemPokerHand handOne = new HoldemPokerHand(pocketOnePlusTable); HoldemPokerHand handTwo = new HoldemPokerHand(pocketTwoPlusTable); return HoldemGame.bestHand(handOne, handTwo); } COM: <s> this method is not static because the pocket depends on the current </s>
funcom_train/28344514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeCompositeObject(IComposite sequence, DataAdaptor container) { DataAdaptor sequenceNode = container.createChild(SEQUENCE_LABEL); sequenceNode.setValue(ID_LABEL, sequence.getId()); // comment element is optional, so only add if not null // if (sequence.getComments() != null) // writeCommentObject(sequence.getComments(), sequenceNode); writeCompositeContents(sequence, sequenceNode); } COM: <s> writes xml element for supplied sequence object </s>
funcom_train/46884662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { Evaluator evaluator = new EvaluatorImpl(board); board.setEvaluator(evaluator); pvsaver = new PVSaver(); output = new SearchOutputTextUI(); NegaScout n = new NegaScout(board, transTable, pvsaver, timer); n.setTableBaseProber(getTableBaseProber()); searcher = n; } COM: <s> initialize the driver </s>
funcom_train/3176139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateAge() { String old = getValue(); // calc delta Delta delta = Delta.get(getEarlier(), getLater()); if (delta == null) return false; age = delta; younger_exactly_older = 0; ageAsString = null; // notify propagatePropertyChanged(this, old); // done return true; } COM: <s> update the age </s>
funcom_train/12539951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(String line) throws ExpectJException{ try { debug.print("Sending " + line); if (ps.isClosed()) throw new ExpectJException( "Process already exited with exit code: " + ps.getExitValue()); out.write(line); out.flush(); } catch (Exception exp) { throw new ExpectJException("Error in SpawnedProcess.send", exp); } } COM: <s> this method writes the string line to the standard input of the spawned </s>
funcom_train/46335911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsLoadable() { System.out.println("isLoadable"); PlsqlPackage instance = new PlsqlPackage(); assertFalse(instance.isLoadable()); OpbField f = new OpbField(); f.opb_datatype("date"); instance.getFields().add(f); assertTrue(instance.isLoadable()); } COM: <s> test of is loadable method of class plsql package </s>
funcom_train/7852324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals( DN toDN ){ int length = toDN.rdnList.size(); if( this.rdnList.size() != length) return false; for(int i=0; i<length; i++){ if (!((RDN)rdnList.get(i)).equals( (RDN)toDN.rdnList.get(i) )) return false; } return true; } COM: <s> compares this dn to the specified dn to determine if they are equal </s>
funcom_train/6330611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParamEntity declareParamEntity( ParamEntity param ) { ParamEntity old; isReadOnly(); if (_params == null) { _params = new Hashtable(); old = null; } else { old = (ParamEntity)_params.get( param.getNodeName() ); } if (old == null) { _params.put( param.getNodeName(), param ); return param; } else { return old; } } COM: <s> declares a new parameter entity </s>
funcom_train/48402335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addKeyPressHandler(com.smartgwt.client.widgets.form.fields.events.KeyPressHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.form.fields.events.KeyPressEvent.getType()) == 0) setupKeyPressEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.form.fields.events.KeyPressEvent.getType()); } COM: <s> add a key press handler </s>
funcom_train/43429923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sortFreeList() { Evaluation hlpEval = new Evaluation(this); // create hlpeval as copy hlpEval.maxTD = (byte) 1; // change think depth to 1 MaxMin hlpMM = new MaxMin(hlpEval); // calculate the moves free = new LinkedSet(hlpMM.getFreeSorted(), board.getWidth(), board.getDepth()); } COM: <s> sort free with the best moves at first to accelerate the algorithm to </s>
funcom_train/16615139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(Exon exon, List features) throws AdaptorException { Connection conn = null; try { conn = getConnection(); conn.setAutoCommit(false); store(conn, exon, features); conn.commit(); exon.setDriver(driver); } catch (Exception e) { rollback(conn); throw new AdaptorException( "Failed to store supporting features " + "for exon: " + exon, e); } finally { close(conn); } } COM: <s> stores links between exon and supporting features </s>
funcom_train/35064418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Metadata readImage(File imageFile) throws JpegProcessingException { Metadata metadata = new Metadata(); BufferedInputStream inStream = getJpegInputStream(imageFile); try { readMetadata(metadata, inStream); readImage(metadata, inStream); } finally { closeStream(inStream); } return metadata; } COM: <s> reads metadata and compressed data from a jpeg file </s>
funcom_train/46098769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer1() { if (spacer1 == null) {//GEN-END:|93-getter|0|93-preInit // write pre-init user code here spacer1 = new Spacer(16, 10);//GEN-LINE:|93-getter|1|93-postInit // write post-init user code here }//GEN-BEGIN:|93-getter|2| return spacer1; } COM: <s> returns an initiliazed instance of spacer1 component </s>
funcom_train/13646453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startDBServer(){ //start the database server this.dbServer = new DBServer(); dbServer.start(); while( true ){ try{ Connection connection = DBDriverManager.getConnectionWithoutErrorHandling( "localhost" ); break; } catch( Throwable e ){ try{ Thread.currentThread().sleep( 250 ); } catch( InterruptedException ex ){ //nop } } } return; } COM: <s> starts the database server </s>
funcom_train/4923082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultProperty() { // Create the expected type ManagedObjectTypeBuilder type = this.createCoreType(); // Initiate expected values DefaultPropertySource.setup("property.name", "default.value"); // Validate type ManagedObjectLoaderUtil .validateManagedObjectType( type, HttpSecurityServiceManagedObjectSource.class, HttpSecurityServiceManagedObjectSource.PROPERTY_AUTHENTICATION_SCHEME, "Negotiate", HttpSecurityServiceManagedObjectSource.PROPERTY_HTTP_SECURITY_SOURCE_CLASS_NAME, DefaultPropertySource.class.getName()); } COM: <s> ensure able to obtain default value for property </s>
funcom_train/46504986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComponent getJSplitPaneMyShares(SQLConnection sql) { if (jSplitPaneMyShares == null) { boolean own = sql==null; if(sql==null) sql = new SQLConnection(); myShareDBExplorer = new DBExplorer(sql,own); //DBExplorer myShareDBExplorer = new DBExplorer("files"); jSplitPaneMyShares = myShareDBExplorer.getPanel(); // jSplitPaneMyShares.setDividerSize(5); // jSplitPaneMyShares.setDividerLocation(150); } return jSplitPaneMyShares; } COM: <s> this method initializes j split pane my shares </s>
funcom_train/32144744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyToZipStream(InputStream is, ZipOutputStream zipOutputStream ) throws IOException { byte[] buffer = new byte[1024]; int bytesRead; while ((bytesRead = is.read(buffer)) != -1) { zipOutputStream.write(buffer, 0, bytesRead); setCompletedPercentage(getCompletedPercentage() + bytesRead / size); } is.close(); } COM: <s> copies a source stream into a destination stream </s>
funcom_train/960001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMitarbeiter() { Mitarbeiter mitarbeiter = mitarbeiterDAO.getMitarbeiterById(0); assertNotNull(mitarbeiter); assertEquals("tvname", mitarbeiter.getVname()); assertEquals("tnname", mitarbeiter.getNname()); assertEquals("pwpw", mitarbeiter.getPasswort()); assertEquals(0, mitarbeiter.getRechte()); assertEquals("Support", mitarbeiter.getAbteilung()); assertEquals(3, mitarbeiter.getVorgesetzter()); assertEquals(false, mitarbeiter.isKrank()); } COM: <s> test the method get by id </s>
funcom_train/10009540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int rangeIndexOf(Date date) { int foundIndex = -1; Iterator<DateRange> rangeIterator = ranges.iterator(); for (int rangeIndex = 0; rangeIterator.hasNext(); rangeIndex++) { DateRange range = rangeIterator.next(); if (range.contains(date)) { foundIndex = rangeIndex; break; } } return foundIndex; } COM: <s> returns the index in </s>
funcom_train/3114882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderSelectionHandle(SatinGraphics g, int x, int y) { //// 1. Get the size of the handle. int size = 6; //// 2. Fill it in. g.fillRect(x - size/2, y - size/2, size, size); } // of method COM: <s> paint a selection handle centered at the specified coordinate </s>
funcom_train/50816151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireChange() { if (! this.stateChanging) { this.firingChange = true; try { //System.out.println(this+" - fireChange"); Number nv = getValue(); if (! nv.equals(this.model.getNumber())) { this.model.setValue(nv); this.control.revalidate(); } } finally { this.firingChange = false; } } } COM: <s> called when the application is notified of a change to the underlying </s>
funcom_train/31761304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartDateString(String startDateString) { this.startDateString = startDateString; if (!startDateString.equals("")) try { this.starting = new SimpleDateFormat("MM/dd/yyyy HH:mm").parse(startDateString); } catch(ParseException ex) { //Logger.info("Exception parsing start date: " + ex.getMessage()); Logger.error(this,ex.getMessage(),ex); } } COM: <s> sets the start date string </s>
funcom_train/8813035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void get(AsyncCallback<OrgUnitDTOLight> callback) { // If the cache is available, returns it immediately. if (hasBeenSet) { callback.onSuccess(mapOrgUnits.get(currentUserOrgUnitId)); } // Else put the callback in queue to be called later. else { queueUserOrgUnit.add(new OrgUnitAsyncCallback(currentUserOrgUnitId, callback)); } } COM: <s> gets the root organizational unit for the current user </s>
funcom_train/21474397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadTestCases(final Iterator classNamesIterator) { while (classNamesIterator.hasNext()) { String className = (String) classNamesIterator.next(); try { String classFullName = className; Class candidateClass = Class.forName(/* className */classFullName); addClassIfTestCase(candidateClass); } catch (ClassNotFoundException e) { System.err.println("Cannot load class: " + className); // e.printStackTrace(); } } } COM: <s> the load test cases method examines each class name </s>
funcom_train/42401239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SetValue visitSet(final Element element) { final SetTag tag = new SetTag(); tag.setElement(element); tag.setPlaceHolderResolver(placeHolderResolver); final SetValue set = new SetValue(); final List<Value> elements = this.visitValues(tag.getValues()); set.setElements(elements); set.setFilename(this.getFilename()); set.setGeneratorContext(this.getGenerator().getGeneratorContext()); return set; } COM: <s> creates a set value from a set value element </s>
funcom_train/36982722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void results_to_maple() { double[] Y; System.out.println("with(plots):"); System.out.println("points := ["); for (int i = 0; i < numPoints; i++) { Y = (double[]) getPoint(i); System.out.println("[" + Y[0] + "," + Y[1] + "],"); } System.out.println("]:"); System.out.println( "plotsetup(ps,plotoutput=`plot.ps`,plotoptions=`portrait,noborder,width=6.0in,height=6.0in`):"); System.out.println("plot(points, style=POINT,symbol=CIRCLE);"); } COM: <s> print out low dimensional points so maple can plot them </s>
funcom_train/18376186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDataParser(Class klass, IDataParser dataParser) { IDataParser oldParser = (IDataParser)dataParsers.get(klass); if (oldParser == null) { registerDataParser(klass, dataParser); } else { if (! (oldParser instanceof CompositeDataParser)) { oldParser = new CompositeDataParser(oldParser); dataParsers.put(klass, oldParser); } ((CompositeDataParser)oldParser).addDataParser(dataParser); } } COM: <s> method add data parser </s>
funcom_train/8022188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetServerName() { System.out.println("getServerName"); Config instance = new Config(); String expResult = ""; String result = instance.getServerName(); 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 server name method of class vgrabber </s>
funcom_train/2289719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String normalizeExportPath(String exportPath) { String result = insertContextStrings(exportPath); result = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebApplication(result); if (result.endsWith(File.separator)) { // ensure export path does NOT end with a File.separator result = result.substring(0, result.length() - 1); } return result; } COM: <s> returns a normalized export path </s>
funcom_train/46479622
/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( SecurityContext.diagram.part.SecurityContextVisualIDRegistry .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/33429992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(final CombaTacStatusCode status) { String statusStr = status.toString(); owner.settings.storeSettingOnServerA(Settings.SETTING_NAME_STATUS_CODE, statusStr, owner); owner.settings.setString(Settings.SETTING_NAME_STATUS_CODE, statusStr); } COM: <s> sets the combat status of the user to the given one and </s>
funcom_train/13272252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(float dx, float dy) { if (dx != 0 || dy != 0) { float [][] points = getPoints(); for (int i = 0; i < points.length; i++) { points [i][0] += dx; points [i][1] += dy; } updatePoints(points); } } COM: <s> moves this room of code dx code code dy code units </s>
funcom_train/25779108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParameterValue_state_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ParameterValue_state_feature", "_UI_ParameterValue_type"), TestpackagePackage.Literals.PARAMETER_VALUE__STATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the state feature </s>
funcom_train/3130157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshScrollBars() { Point timeLineViewAreaSize = timeLinesViewArea.getSize(); Point scrollTimeLineContentSize = scrollTimeLineContent.getSize(); if (scrollTimeLineContentSize.x <= timeLineViewAreaSize.x) { timeLinesViewHScrollBar.setSelection(0); timeLinesViewHScrollBar.setEnabled(false); } timeLinesViewHScrollBar.setMaximum( scrollTimeLineContentSize.x - timeLineViewAreaSize.x); } COM: <s> sets the value for the scroll bars </s>
funcom_train/34889852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void connectInBackground() { Thread thread = new Thread( new java.lang.Runnable() { public void run() { if (!connect()) { new Message(Texts.GPE_CAN_NOT_INIT, null, Texts.CMD_OK, Message.NO_PROGRESS_BAR); destroy(); } } }); thread.start(); } COM: <s> tries to connect to an external gps </s>
funcom_train/10789957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePrimaryKey() { boolean rem = _pk != null; if (rem) { Schema schema = getSchema(); if (schema != null && schema.getSchemaGroup() != null) schema.getSchemaGroup().removeName(_pk.getIdentifier()); _pk.remove(); } _pk = null; return rem; } COM: <s> remove the primary key from this table </s>
funcom_train/45602325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void editRules() { if (ruleEditWindow == null) { try { ruleEditWindow = new RuleEditWindow(mainWindow, getRulesFile()); } catch (FileNotFoundException e) { new ErrorWindow(mainWindow, "Could not open rules file", e); } catch (IOException e) { new ErrorWindow(mainWindow, "Could not read rules file", e); } } else { ruleEditWindow.activate(); } } COM: <s> action for editing rules </s>
funcom_train/19777078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getLat(HttpServletRequest request) { try { return Double.parseDouble(Preconditions.checkNotNull(request .getParameter("lat"), "parameter cannot be null: lat")); } catch (NumberFormatException ex) { throw new RuntimeException("lat parameter is not a valid number", ex); } } COM: <s> gets the latitude lat parameter from the request </s>
funcom_train/3400143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ungetc() { if (start == 0) throw new InternalError("ungetc"); start--; if (buf[start] == '\n' || buf[start] == '\r') { if (!isInternal()) lineNumber--; } else if (returnedFirstHalf) returnedFirstHalf = false; } COM: <s> two character pushback is guaranteed </s>
funcom_train/1886289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateUserPresence(User user) { if(userList.updateUser(user)){ log.addDebugLog("Updating user " + user.getName() + " presence, present=" + user.isAvailable()); userInterface.updateUserList(user); return true; } return false; } COM: <s> changes the current status of a user to a available presence or not </s>
funcom_train/10212405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStop(int dimension) throws InvalidParameterException { try{ DArray a = (DArray)getVar(0); DArrayDimension d = a.getDimension(dimension); return(d.getStop()); } catch (NoSuchVariableException e){ throw new InvalidParameterException("SDGrid.getStop(): Bad Value for dimension!: " + e.getMessage()); } } COM: <s> gets the b stop b value for the projection of the </s>
funcom_train/45113277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startClient(String destIp, EnumIperfL4Protocol enumIperfL4Protocol, EnumIperfTransmitMode mode, int timeOrNumber, int bufferLen, String bandwidth) throws Exception { startClient(destIp,enumIperfL4Protocol,mode,timeOrNumber,bufferLen,bandwidth,2000); } COM: <s> start iperf on the client </s>
funcom_train/19305416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incrementAnteriorSpace(final int incrementAmount) { final Area parent = ancestorArea(); if (parent instanceof AreaFlexible) { /* * A change to anteriorSpace does not affect the anteriorSpace * of the parent, but it does affects its progressionDimension. */ final AreaFlexible afParent = (AreaFlexible) parent; afParent.incrementProgressionDimension(incrementAmount); } this.anteriorSpace += incrementAmount; } COM: <s> change the anterior space for this area by increment amount </s>
funcom_train/38785961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Algebraic pow_n(int n) throws JasymcaException{ Algebraic pow, x=this; if(n<=0){ if( n==0 || equals(Zahl.ONE) ) return Zahl.ONE; if( equals( Zahl.ZERO ) ) throw new JasymcaException("Division by Zero."); x = Zahl.ONE.div(x); n = -n; } for(pow = Zahl.ONE; ; ){ if( (n & 1) != 0 ){ pow = pow.mult( x ); } if( (n >>= 1) != 0) x = x.mult(x); else break; } return pow; } COM: <s> integer power function x n </s>
funcom_train/3887661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInitialValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyType_initialValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyType_initialValue_feature", "_UI_PropertyType_type"), ImsldV1p0Package.Literals.PROPERTY_TYPE__INITIAL_VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the initial value feature </s>
funcom_train/44465833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyAnswerListeners (final boolean correct) { AnswerEvent ae = new AnswerEvent (correct, user, questionData, quizData,bookData, chapterData, firstQuestion); for (AnswerListener ev:answerListeners) { try { ev.answerEvent (ae); } catch (Exception ex) { cat.warn("Error sending answerevent",ex); } } } COM: <s> let the registered answerlisteners know that the user has answered </s>
funcom_train/3873841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playerAdded(int playerId, int tag) { // FIXME/REVIEW: what about a "new subscriber" processing it's ENGAGED // message and scheduling player additions? // if self, call back listener if (playerId == client.playerId) { // self is active, now! listener.subscribedActive(); } // FIXME/REVIEW: if tag -1, don't send anything if (tag == -1) return; } COM: <s> called when a scheduled player add has been completed </s>
funcom_train/32057099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBounds() { System.out.println("testGetBounds"); Rectangle rectangle = new Rectangle(); Object obj = new Object(); JGraph jgraph = new JGraph(); CellMapper cellmapper = null; PortView pView = new PortView(obj, jgraph, cellmapper); pView.getBounds(); } COM: <s> this function tests get bounds function of port view class </s>