__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18504238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataColumn getColumnByIndex(int columnIndex) { DataColumn col; col = (DataColumn)dataSet.getColumnVector().elementAt(columnIndex); if (col == null) throw new FHException("Column cannot be located in the dataset. " + "DataSet: " + dataSet.getName() + " " + "Column: " + columnIndex, logger); return col; } COM: <s> returns with the data column of the dataset selected by the column index </s>
funcom_train/12155522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCallingAETitle() { logger.debug("Entering getCalledAETitle()."); String callingAETitle = callingAETitleTextField.getText(); if (logger.isDebugEnabled()) { logger.debug("Exiting getCalledAETitle(); RV = " + (callingAETitle != null ? "\"" + callingAETitle + "\"" : null) + "."); } return callingAETitle; } COM: <s> gets the calling application entity ae in the </s>
funcom_train/33399320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getDemuxTracks() { if (tracks != null) return true; try { if (!openAndStartDemux()) return false; tracks = demux.getTracks(); numTracks = tracks.length; } catch (BadHeaderException e) { logger.log(Level.WARNING, "" + e, e); return false; } catch (IOException e) { logger.log(Level.WARNING, "" + e, e); return false; } catch (Exception e) { logger.log(Level.WARNING, "" + e, e); return false; } return true; } COM: <s> can only be called after demux is open and started </s>
funcom_train/18219773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFiles(DevelopmentLineContainer branchContainer) { ScmFile newFile; for (Iterator<String> fileIterator = branchContainer .getAffectedFilesKeySet().iterator(); fileIterator.hasNext();) { newFile = branchContainer.getAffectedFile(fileIterator.next()); fileIDs.put(newFile.getDevelopmentLinePathFileNameAndFileType(), writeFileTableEntryFor(newFile)); } } COM: <s> entries for scm file table will be written </s>
funcom_train/14514525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test05removeCertificateProfiles() throws Exception { log.trace(">test05removeCertificateProfiles()"); boolean ret = false; try { cacheAdmin.removeCertificateProfile(admin, "TEST"); cacheAdmin.removeCertificateProfile(admin, "TEST2"); ret = true; } catch (Exception pee) { } assertTrue("Removing Certificate Profile failed", ret); log.trace("<test05removeCertificateProfiles()"); } COM: <s> removes all profiles </s>
funcom_train/40312096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBooleanInt() { try { metaData = new DefaultResultSetMetaData(new IOMetaDataEntryMockImpl()); values = new Object[][]{{true}}; ResultSet resultSet = new DefaultResultSet(statement, metaData, values); resultSet.absolute(1); assertTrue("The value mismatches.", resultSet.getBoolean(1)); } catch(SQLException e) { fail("getBoolean failed"); } } COM: <s> tests get boolean with valid column index </s>
funcom_train/34810819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object arg0, Object arg1) { Sgr first = (Sgr)arg0; Sgr second = (Sgr)arg1; int i = first.getChromosome().compareTo(second.getChromosome()); if (i !=0 ) return i; if (first.getPosition()< second.getPosition()) return -1; if (first.getPosition()> second.getPosition()) return 1; return 0; } COM: <s> sorts by chromosome then position </s>
funcom_train/37246860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ret = "ConstantPool:\nThisClass:"+thisClass+"\n"; for (int i=0; i<poolEntries.size(); ++i) { Object obj = poolEntries.elementAt(i); if (obj instanceof ConstantPoolEntry) { ret += (i+1) + " " + obj + "\n"; } } return ret; } COM: <s> get a readable version of hte current constant pool </s>
funcom_train/89807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getCurrentTimeExpression(MethodBuilder mb) { // do any needed setup LocalField lf = getCurrentSetup(); // generated Java: // this.cdt.getCurrentTime(); mb.getField(lf); mb.callMethod(VMOpcode.INVOKEVIRTUAL, (String) null, "getCurrentTime", "java.sql.Time", 0); } COM: <s> this utility method returns an expression for current time </s>
funcom_train/39889260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getGeri() { if (Geri == null) {//GEN-END:|41-getter|0|41-preInit // Insert pre-init code here Geri = new Command("Geri", Command.BACK, 1);//GEN-LINE:|41-getter|1|41-postInit // Insert post-init code here }//GEN-BEGIN:|41-getter|2| return Geri; } COM: <s> returns an initiliazed instance of geri component </s>
funcom_train/20334125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof Kitchen) { Kitchen cmp=(Kitchen)obj; if (getInstanceName()!=cmp.getInstanceName() && (getInstanceName()==null || !getInstanceName().equals(cmp.getInstanceName())) ) return false; return true; } return false; } COM: <s> test the equality of this code kitchen code </s>
funcom_train/28351779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResolutions(int emScrResX, int emScrResY, int emSizeX, int emSizeY) { emScrResX_Spinner.setValue(new Integer(emScrResX)); emScrResY_Spinner.setValue(new Integer(emScrResY)); emSizeX_Spinner.setValue(new Integer(emSizeX)); emSizeY_Spinner.setValue(new Integer(emSizeY)); } COM: <s> sets the screen x and y resolutions and emittance data size on positions </s>
funcom_train/19370388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImport(final OWOntology o, final IRI iri){ OWLImportsDeclaration dcl = projectFactory.getOWLImportsDeclaration(iri); final AddImport importAdd = new AddImport(o.getModel(),dcl); try { projectManager.applyChange(importAdd); } catch (OWLOntologyChangeException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> this actually adds an import declaration the importing happens somewhere else </s>
funcom_train/18552477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void widgetSelected(SelectionEvent event) { Hyperlink link = new Hyperlink(this.url.getText(), this.displayText.getText(), this.newWindow.getSelection()); this.contentField.insert(link.getHyperlinkTag()); this.shell.dispose(); } COM: <s> handles the event when the user clicks the ok button on the hyperlink </s>
funcom_train/9237729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCommand(final String command) { if (!this.command.equals(command)) { this.command = command; ActionCondition argument; argument = arguments.get(0); if (argument.getComparison() != CoreActionComparison.STRING_EQUALS) { argument = arguments.get(1); } argument.setTarget(command); } } COM: <s> sets the aliases command </s>
funcom_train/22233864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDistanceFilter(Point2f[] attenuation) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DISTANCE_FILTER_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes10")); ((AuralAttributesRetained)this.retained).setDistanceFilter(attenuation); } COM: <s> set distance filter using a single array containing distances and </s>
funcom_train/34141269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void caretUpdate(CaretEvent e) { if ((XmlEditorPane) e.getSource() == getEditor()) { hideSelectionPopup(); caretUpdated = true; examiner.reset(); tagTree = new Vector(); currentTag = null; parentStartTag = null; updateMargins(); updatePositionalStuff(); } } COM: <s> messaged when the caret position has changed </s>
funcom_train/47086796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Registration findByEmailAddress(String emailAddress) { Debug.put(": emailAddress = " + emailAddress); //TODO// add .trim().toLowerCase() to emailAddress inside query?? List found = this.getHibernateTemplate().find( "from Registration as r where r.emailAddress = ?", new Object[] { emailAddress } ); Debug.put(": found.size() = " + found.size()); if (found.size() > 0) { return (Registration)found.get(0); } else { return null; } } COM: <s> finds an instance of registration in the database by the registration </s>
funcom_train/51596964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RelationCollection merge(RelationCollection mergedColl) { RelationCollection rv = new RelationCollection(); rv.relations = new HashSet<Relation>(this.relations); rv.addedRelationTypes = new HashSet<Class<? extends Relation>>(this.addedRelationTypes); for (Relation mergedRel : mergedColl) { if (!this.addedRelationTypes.contains(mergedRel.getClass())) rv.add(mergedRel); } return rv; } COM: <s> merges this relation collection with another to produce a new relation </s>
funcom_train/11340950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getService() { Object service = cachedService; if (service != null) { if (DEBUG) { System.out .println("ServiceTracker.getService[cached]: " + filter); } return service; } if (DEBUG) { System.out.println("ServiceTracker.getService: " + filter); } ServiceReference reference = getServiceReference(); if (reference == null) { return null; } return cachedService = getService(reference); } COM: <s> returns a service object for one of the services being tracked by this </s>
funcom_train/20882745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean result(String featName) { if (timeline.length < 2) return true; VitrebiPath path = findBestEnd(); if (path == null) return false; // Trace back from the end to the beginning, setting the feature. while (path != null) { VitrebiCandidate cand = path.getCandidate(); if (cand != null) cand.getItem().getFeatures().setString( featName, cand.getName() ); path = path.getFrom(); } return true; } COM: <s> find the best path through the previously searched space and add a </s>
funcom_train/44158713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testExceptionBehaviour() { // try { // m_calc.throwMeAnException(); // fail("No exception was thrown."); // } catch (CalculatorException e) { // // It's okay. // String stackTrace = SoapHelper.getLastServerSideStackTrace(); // System.err.println(stackTrace); // } // } COM: <s> this test tests the exception handling </s>
funcom_train/45239899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldFracaoSitiosInvariantesF84() { if (jNumberFloatFieldFracaoSitiosInvariantesF84 == null) { jNumberFloatFieldFracaoSitiosInvariantesF84 = new JNumberFloatField(); jNumberFloatFieldFracaoSitiosInvariantesF84.setSize(new Dimension(65, 20)); jNumberFloatFieldFracaoSitiosInvariantesF84.setLocation(new Point(240, 279)); } return jNumberFloatFieldFracaoSitiosInvariantesF84; } COM: <s> this method initializes j number float field fracao sitios invariantes f84 </s>
funcom_train/21483831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { Element element = new Element("key", "value"); assertFalse(element.equals("dog")); assertTrue(element.equals(element)); assertFalse(element.equals(null)); assertFalse(element.equals(new Element("cat", "hat"))); } COM: <s> tests the robustness of equals </s>
funcom_train/35310311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int n) { BoundedRangeModel m = getModel(); int oldValue = m.getValue(); if (oldValue == n) { return; } m.setValue(n); if (accessibleContext != null) { accessibleContext.firePropertyChange( AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, Integer.valueOf(oldValue), Integer.valueOf(m.getValue())); } } COM: <s> sets the sliders current value to </s>
funcom_train/46915097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canUserEdit(User user) { if (user.isAdmin()) return true; TimetableManager tm = TimetableManager.getManager(user); if (tm == null) return false; if (!tm.getDepartments().contains(this.getSubjectArea().getDepartment())) return false; DepartmentStatusType dst = this.getSubjectArea().getDepartment().effectiveStatusType(); return (dst.canOwnerEdit() || dst.canOwnerLimitedEdit()); } COM: <s> checks whether current user can edit the designator list </s>
funcom_train/42068160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSignificantBitsPerSamplePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkFormat_significantBitsPerSample_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkFormat_significantBitsPerSample_feature", "_UI_ChunkFormat_type"), WavPackage.Literals.CHUNK_FORMAT__SIGNIFICANT_BITS_PER_SAMPLE, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the significant bits per sample feature </s>
funcom_train/19457281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyImage(AppleImage destImage, AppleImage srcImage, int xStart, int yStart) { for (int y=0; y<srcImage.getHeight(); y++) { for (int x=0; x<srcImage.getWidth(); x++) { destImage.setPoint(xStart+x, yStart+y, srcImage.getPoint(x,y)); } } } COM: <s> copy an image from the source image to the destination image </s>
funcom_train/13547732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pathExists(Node fromNode, Node toNode) { if (_nodeSet.contains(fromNode) && _nodeSet.contains(toNode)) { Set visitedSet = new HashSet(); return pathExists(fromNode, toNode, visitedSet); } // end of if () else { return false; } // end of else } COM: <s> returns true if a path exists from code from node code to </s>
funcom_train/37069808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveCommentsOver(PubConnection conn, String newId) { pub.db.CommentTable commentTable = new pub.db.CommentTable(conn); commentTable.migrateComments("pub_termannotation", this.getId(), "pub_termannotation", newId, BeanFactory.getUserBean(conn, newUpdatedBy)); } COM: <s> moves comments from one annotation to another </s>
funcom_train/50157020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayState() { if (!getStateMap().containsKey(id)) { stateMap.put(id, defaultState); } // String ret = (String)stateMap.get(id); String ret = getDisplayState(id); // prtln ("collapseBean.getDisplayState for " + CollapseUtils.ppKey(id) + ": " + ret); return ret; } COM: <s> gets the display state attribute of the collapse bean object </s>
funcom_train/43665038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String date(Object value, PageContext pageContext) { String datePattern = DateUtil.getDatePattern(); LOGGER.debug("datePattern = " + datePattern); Date val = (Date) value; if (val == null) { return null; } else { DateFormat df = new SimpleDateFormat(datePattern); return df.format(val); } } COM: <s> if value is not null </s>
funcom_train/38338884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node compile(ExistCondition condition, Rule rule, int conditionIndex) { Object o = condition.getNestedConditionalElement().get(0); AbstractCondition nested = (AbstractCondition) o; try { return nested.compile(this, rule, conditionIndex); } catch (Exception e) { engine.writeMessage(e.getMessage()); return null /* or LONG_OBJECT */; } } COM: <s> the method compiles an exist condition </s>
funcom_train/39117195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logException() { if (LOG.isDebugEnabled()) { LOG.debug("Test message1"); } try { if (LOG.isDebugEnabled()) { LOG.debug("Parsing number"); } Integer.parseInt("abc"); } catch (NumberFormatException e) { LOG.error("Could not parse number", e); } LOG.debug("Test message2", new RuntimeException("Test Message2")); LOG.debug("Test message3", new RuntimeException("Test Message3")); } COM: <s> logs an exception </s>
funcom_train/51573056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWorkingDir() throws Exception { LocalFileSet spec = new LocalFileSet(baseFile); LiveFingerprint testFp = new LiveFingerprint(spec); testFp.scan(); assertEquals(System.getProperty("user.dir"), testFp.getWorkingDir()); } COM: <s> tests get working dir </s>
funcom_train/20364083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void caretUpdate( CaretEvent e ) { int caretPos = e.getDot(); doButtonSettings( caretPos ); copyButton.setEnabled( e.getDot() != e.getMark() ); cutButton.setEnabled( e.getDot() != e.getMark() ); linkButton.setEnabled( e.getDot() != e.getMark() ); } COM: <s> implementation of caret listener interface </s>
funcom_train/18661930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle( final String titleString ) { Runnable r = new Runnable() { public void run() { Tools.checkEDT(); title.setText( titleString ); } }; if ( ! SwingUtilities.isEventDispatchThread() ) { SwingUtilities.invokeLater( r ); } else { r.run(); } } COM: <s> changes the title at the top of the page </s>
funcom_train/22285736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if ((img == null) && (src != null)) { Image newimg = getImage(src); switch (mode) { case SCALE: case PROPORTIONAL: if (Toolkit.getDefaultToolkit().prepareImage(newimg, width, height, this)) { img = newimg; repaint(); } break; default: if (Toolkit.getDefaultToolkit().prepareImage(newimg, -1, -1, this)) { img = newimg; repaint(); } } } } COM: <s> start loading the image </s>
funcom_train/41821628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int loadHalfword(int halfwordAddress) { // Read complete word int word = dataMemory.loadWord(halfwordAddress); // Extract which halfword final int offset = (halfwordAddress >>> 1) & MASK_1_BIT; // Put requested halfword at position 0 int halfword = word >>> (offset * HALFWORD_SIZE); return halfword & MASK_16_BITS; } COM: <s> loads a halfword 16 bits from the halfword aligned memory location </s>
funcom_train/10601219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Runnable command) { synchronized (commandStack) { for (final Iterator i = commandStack.iterator(); i.hasNext();) { final ExecutionInfo info = (ExecutionInfo) i.next(); if (info.m_command == command) { i.remove(); commandStack.notifyAll(); return; } } } getLogger().warn("Could not find command " + command + " for removal"); } COM: <s> remove a code runnable code from the command stack </s>
funcom_train/22032902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void controlChanged(ScalarMapControlEvent evt) { int id = evt.getId(); if (id == ScalarMapEvent.CONTROL_REMOVED || id == ScalarMapEvent.CONTROL_REPLACED) { control = null; } if (id == ScalarMapEvent.CONTROL_REPLACED || id == ScalarMapEvent.CONTROL_ADDED) { control = (ValueControl) evt.getScalarMap().getControl(); } } COM: <s> scalar map listener method used to detect new control </s>
funcom_train/44717728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkWhere(Operation op, ObjectType type) { final String sql = op.getSQL(); final int whereIdx = sql.indexOf("where"); assertTrue( sql, whereIdx != -1 ); final String whereClause = sql.substring(whereIdx); Iterator keyProperties = type.getKeyProperties(); checkForColumnNames( whereClause, keyProperties ); } COM: <s> checks the where clause of ops sql statement </s>
funcom_train/37433357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConnected() { if (binding == null) { connected = false; } /* if(connected){ try { input.mark(1); int b = input.read(); if(b==-1){ close(); } else{ input.reset(); } } catch (IOException ex) { close(); } }*/ return connected; } COM: <s> returns whether or not this instance is connected </s>
funcom_train/3909074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element addOrganization(Element parentElement, boolean doSelect) { XMLPath xmlPath = XMLPath.getXMLPathForElement(parentElement); xmlPath.appendElementName(CP_Core.ORGANIZATION); SchemaElement schemaElement = (SchemaElement)getSchemaController().getSchemaNode(xmlPath); return addElementBySchemaUndoable(this, parentElement, schemaElement, doSelect); } COM: <s> add an organization </s>
funcom_train/4499595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanEatAt() { board.print(); assertFalse(p1_b.canEatAt(1,0)); // cannot eat horizontally assertTrue(p1_b.canEatAt(1,1));//can eat piece of another type diagonally assertFalse(p1_w.canEatAt(2,7)); // cannot eat backwards } COM: <s> test method for </s>
funcom_train/12831670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveDataToModel() { encryption.setKeyName(tKeyName.getText()); encryption.setKeyPassword(tKeyPassword.getText().toCharArray()); encryption.setKeyStore(keyStore); encryption.setKeyStorePassword(tKeyStorePassword.getText()); } COM: <s> saves the selections on this wizard page to the model </s>
funcom_train/23236561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChangedRemoved(RPObject object, RPObject changes, boolean user) { gameObjects.onChangedRemoved(object, changes); if(user) { userContext.onChangedRemoved(object, changes); } /* * Walk each slot */ for(RPSlot cslot : changes.slots()) { if(cslot.size() != 0) { fireChangedRemoved(object, cslot, user); } } } COM: <s> notify listeners that an object removed attribute s </s>
funcom_train/2289721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readProperty(String resourcePath, String property) throws CmsException { CmsResource resource = readResource(resourcePath, CmsResourceFilter.ALL); CmsProperty value = m_securityManager.readPropertyObject(m_context, resource, property, false); return value.isNullProperty() ? null : value.getValue(); } COM: <s> reads the compound value of a property mapped to a specified resource </s>
funcom_train/8103274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddTitle() { System.out.println("addTitle"); String s1 = "string1"; String s2 = "string2"; removed_articles.addTitle(s1); removed_articles.addTitle(s2); removed_articles.addTitle(s2); assertEquals(2, removed_articles.sizeTitle()); } COM: <s> test of add title method of class wikipedia </s>
funcom_train/3111391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyTyped(KeyEvent e) { for (int i = 0; i < amountKeyListeners; i++) { ((Canvas3DKeyListener) continuousKeyListeners.elementAt(i)) .keyTyped(e); } if (currentKeyListener != null) { currentKeyListener.keyTyped(e); } } COM: <s> called when a key is typed </s>
funcom_train/27840810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelSuffix(String newModelSuffix) { modelSuffix = newModelSuffix; ScopeSource source = (ScopeSource) getFileProducer("Model"); source.setSuffix(modelSuffix); Prefs.getInstance().set("generator", "modelSuffix", modelSuffix); } COM: <s> sets the model suffix </s>
funcom_train/44852902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int rootCount() throws SQLException, VException { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(QuestionHome.KEY_GROUP_ID, get(GroupHome.KEY_ID)); lKey.setValue(QuestionHome.KEY_ROOT_QUESTION, QuestionHome.IS_ROOT); return BOMHelper.getQuestionHome().getCount(lKey); } COM: <s> returns the number of root questions attached to this group </s>
funcom_train/952727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { super.actionPerformed(e); if (e.getActionCommand().equals("Agent Database")) { AgentDatabaseDialog agentDatabaseDialog = new AgentDatabaseDialog(getFrame(), this, this.aaa); agentDatabaseDialog.init(); } else if (e.getActionCommand().equals("Revocation List")) { AgentRevocationListDialog dialog = new AgentRevocationListDialog(getFrame(), this.aaa.getRevocationList()); dialog.init(); } } COM: <s> needed by implemented interface action listener </s>
funcom_train/23239402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(String text, String rep, boolean wholeWords, boolean back, boolean caseSensitive, boolean allMatches) { hDoc.replace(text, rep, wholeWords, back, caseSensitive, allMatches, this.getCaretPosition()); } COM: <s> finds and replaces text in the current document </s>
funcom_train/2513146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean reloadConfigurationIfNeeded(String urlInfo) { boolean hotDeployUri = Constants.HOT_REDEPLOY_URI.equals(urlInfo); if (hotDeployUri) { if (logger.isLoggable(Level.INFO)) { logger.info("reloading configuration"); } //reconfigure and mantain the state of the filterOn flag boolean prevFilterOn = RestApplication.getCurrentInstance().isFilterOn(); config(); RestApplication.getCurrentInstance().setFilterOn(prevFilterOn); return true; } return false; } COM: <s> re configure application if development is true and </s>
funcom_train/48966173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void feed() { parent.perspective(fov, aspect, nearClip, farClip); parent.camera(cameraX, cameraY, cameraZ, targetX, targetY, targetZ, upX, upY, upZ); } COM: <s> send what this camera sees to the view port </s>
funcom_train/1842607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getArgsString() { try { if (args == null) return ""; StringBuffer s = new StringBuffer(); for (int i = 0; i < args.length; i++) { if (i > 0) s.append(", "); s.append(args[i] == null ? "null" : Controller .toString(args[i])); } return s.toString(); } catch (RemoteException e) { return "RMI FAILURE"; } } COM: <s> return event arguments as string </s>
funcom_train/20829712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getKeywordsAsString() { StringBuilder sb = new StringBuilder(); Iterator<String> i = getKeywords().iterator(); while (i.hasNext()) { sb.append(i.next()); if (i.hasNext()) { sb.append(" "); } } return sb.toString(); } COM: <s> returns the keywords associated with this descriptor as a space delimited </s>
funcom_train/5254547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModuleList getModuleList() throws IOException { ModuleList result = new ModuleList(); synchronized (commPort) { Message message = sendPCICommand((byte) 0x00); while (true) { if (message == null) { break; } if (message instanceof ShortMessage) { int moduleAddress = Message.getLongAddress(message .getData(), 1); if (moduleAddress == -1) { break; } result.put(moduleAddress, new Module(moduleAddress, getModuleName(moduleAddress))); } message = readFrame(); } } return result; } COM: <s> get a list of all currently connected modules </s>
funcom_train/5662618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Organization.class)) { case DirectoryPackage.ORGANIZATION__NAME: case DirectoryPackage.ORGANIZATION__OBJECT_ID: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case DirectoryPackage.ORGANIZATION__ADDRESS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } COM: <s> this handles model notifications by calling </s>
funcom_train/2762983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readFile(String file) throws IOException { FileReader fr = null; try { StringBuffer content = new StringBuffer(); fr = new FileReader(new File(project.getBasedir(),file)); char[] cbuf = new char[1024]; int lastRead = 0; while((lastRead = fr.read(cbuf)) > 0) { content.append(cbuf, 0, lastRead); } return content.toString(); } finally { if(fr != null) { fr.close(); } } } COM: <s> returns the content of the supplied file </s>
funcom_train/45451417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getEffectiveDateValue() { Date dateValue = null; if (!Pattern.matches("[01]?\\d/[0-3]?\\d/\\d\\d", this.effectiveDate)) { return null; } try { dateValue = new SimpleDateFormat("MM/dd/yy").parse(this.effectiveDate); } catch (ParseException e) { } return dateValue; } COM: <s> returns the effective date as a date value </s>
funcom_train/16380673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMixAllSubTasksPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CategoryType1_mixAllSubTasks_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CategoryType1_mixAllSubTasks_feature", "_UI_CategoryType1_type"), CTEPackage.Literals.CATEGORY_TYPE1__MIX_ALL_SUB_TASKS, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the mix all sub tasks feature </s>
funcom_train/47734119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportOrderFasta() { if (!R2cat.dataModelController .isMatchesListReady()) { errorAlert("There is nothing to save!"); return; } File f = this.chooseFile("Export contig order and orientation to FASTA", false, new CustomFileFilter(".fas,.fna,.fasta", "FASTA File")); if (f != null) { this.exportAsFastaFile(f, false); } else { return; } } COM: <s> gives a dialog to save the contigs in the displayed order and orientation </s>
funcom_train/25289873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatternScaleFactor(int scaleFactor) { if (isLiveOrCompiled() && !this.getCapability(ALLOW_PATTERN_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("LineAttributes10")); if (isLive()) ((LineAttributesRetained)this.retained).setPatternScaleFactor(scaleFactor); else ((LineAttributesRetained)this.retained).initPatternScaleFactor(scaleFactor); } COM: <s> sets the line pattern scale factor to the specified value </s>
funcom_train/10299216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(NavigatorView view) { // Add the requested query engine to our list of engines debug("JHelpSearchNavigator.merge invoked"); debug(" params: "+view.getParameters()); if (search == null) { search = (MergingSearchEngine) getSearchEngine(); } search.merge(view); debug("merge: "+view); this.getUI().merge(view); } COM: <s> merges a navigator view into this instance </s>
funcom_train/16767814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getBean(String beanId) { // for war applications the "application" beans are not stored in the // sub-contexts, so look in the application context first and the core // context second Object bean = null; try { bean = applicationContext.getBean(beanId); } catch (NoSuchBeanDefinitionException e) { logger.warn("Bean lookup failed for {} in the application context", beanId, e); } if (bean == null) { bean = getCoreService(beanId); } return bean; } COM: <s> return bean instantiated by bean factory </s>
funcom_train/10260113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDescription(String description) { if((description == null || "".equals(description.trim())) && (title == null || "".equals(title.trim()))) throw new InvalidRequiredParamException("title or description required: "+title+" "+description); this.description = description; } COM: <s> sets the item synopsis </s>
funcom_train/35846870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activateGlassPane() { // Mount the glasspane on the component window GlassPane aPane = GlassPane.mount(ArgoFrame.getInstance(), true); // keep track of the glasspane as an instance variable setGlassPane(aPane); if (getGlassPane() != null) { // Start interception UI interactions getGlassPane().setVisible(true); } } COM: <s> activate the capabilities of glasspane </s>
funcom_train/35831742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSquares() { squares = new HashMap<SquarePosition, Square>(64); int initRow = 1; int initCol = 'a'; for (int col = initCol; col <= 'h'; col++) { for (int row = initRow; row <= 8; row++) { SquarePosition p = new SquarePosition(col, row); Square s = new Square(p); squares.put(p, s); } } eventHandler.drawBoard(); } COM: <s> creates all the squares with no pieces and records their position </s>
funcom_train/47678836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(String actionName, String info, String result) { ExtraInformation ei = ExtraInformationManager.getInstance().retriveExtraInfo(); ZiExtraInfo zei = ei != null ? (ZiExtraInfo)ei : new ZiExtraInfo(); appendToLog(zei.getApplicationName(), zei.getUserName(), actionName, info, result, "", zei.getRequestUri(), zei.getQueryString(), zei.getMethod(), zei.getSessionId(), zei.getRemoteAddress(), zei.getRemoteHost(), zei.getRemoteUser()); } COM: <s> logs an action with the specifc information </s>
funcom_train/46633340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBrowseImportButton() { if (browseImportButton == null) { browseImportButton = new JButton(); browseImportButton.setBounds(new Rectangle(203, 24, 25, 19)); browseImportButton.setText("Browse"); browseImportButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { browseImport(); } }); } return browseImportButton; } COM: <s> this method initializes browse import button </s>
funcom_train/20062053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buttonPressed(BaseEvent be) { if (cancelButton == be.widget) { onCancel(); } else if (finishButton == be.widget) { onFinish(); } else if (previousButton == be.widget) { onPrevious(); } else if (nextButton == be.widget) { onNext(); } } COM: <s> handle button press event </s>
funcom_train/9202552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(E comparable) { // check for null if (comparable == null) return false; // check for an empty tree if (this.root == null) return false; // otherwise we need to find and remove the node // retaining any children of the removed node Node node = this.remove(comparable, this.root); // see if it was found return node != null; } COM: <s> removes the comparable object from the tree returning the node or </s>
funcom_train/10809307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPrintableName() { String uri = null; if (getNamespace() != null) { uri = getNamespace().getNamespaceURI(); } if (uri == null || uri.length() == 0) { return getLocalName(); } else { return "{" + uri + '}' + getLocalName(); } } COM: <s> generate element name for output </s>
funcom_train/21375311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String run(String scriptName, String argument) throws ResourceException, ScriptException { Binding binding = new Binding(); binding.setVariable("arg", argument); Object result = run(scriptName, binding); return result == null ? "" : result.toString(); } COM: <s> run a script identified by name with a single argument </s>
funcom_train/47204360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEdit(ConcreteOrganism editing) { this.editing = editing; activetraits.clear(); if (editing != null) { for (Gene gene : editing.getGenome()) { activetraits.addElement(gene); //Update button color } btnColor.setBackground(editing.getColor()); btnColor.setForeground(new Color(editing.getColor().getRGB() ^ 0xFFFFFF)); } } COM: <s> set the organism this editor is editing </s>
funcom_train/9049875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { DateFormat newFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US); StringBuilder outputString = new StringBuilder(); Formatter formatter = new Formatter(outputString); String format = "|%-70.70s\t|%-10s|\n"; formatter.format(format, bookTitle, newFormat.format(bookDueDate)); return outputString.toString(); } COM: <s> overriding to string method </s>
funcom_train/20675995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean is(final int size, final String... formats) { if ((result != Result.OK) || !error.equals("") || (size > 0 && this.size != size)) { return false; } if (formats.length == 0) { return true; } for (final String format : formats) { if (this.format == format) { return true; } } return false; } COM: <s> check this file info </s>
funcom_train/49633402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayInfoPanel(String artistAlbum, String trackName, String trackYear, BufferedImage artwork) { artistAlbumInfoLabel.setText(artistAlbum); trackNameLabel.setText(trackName); trackyearLabel.setText(trackYear); ((JImagePanel)albumCoverPanel).setImage(artwork); } COM: <s> generic method for displaying information in the info panel </s>
funcom_train/38518176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log( LogEntry log ) throws DirectorException { Enumeration logs = log.toVector().elements(); while( logs.hasMoreElements() ) { try { send_cmd( "LOG " + logs.nextElement() + "\n" ); } catch( IOException e ) { throw new DirectorException( "I/O exception: " + e ); } } } COM: <s> this implements the server connection log method </s>
funcom_train/331868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPSFName() { switch (runMode) { case RUN_NORMAL: case RUN_REMOTE: case RUN_NETWORKRECEIVER: String fn = PamSettingManager.getInstance().getSettingsFileName(); if (fn == null) { return null; } File aFile = new File(fn); return aFile.getAbsolutePath(); case RUN_MIXEDMODE: case RUN_PAMVIEW: DBControlUnit dbc = DBControlUnit.findDatabaseControl(); if (dbc == null) { return null; } return dbc.getDatabaseName(); } return null; } COM: <s> get the name of the psf or database used to contain settings </s>
funcom_train/20774733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void setTauPathMs (float tauPathMs){ float old = this.tauPathMs; this.tauPathMs = tauPathMs; getPrefs().putFloat("GestureBF2D.tauPathMs",tauPathMs); support.firePropertyChange("tauPathMs",old,this.tauPathMs); lpf.setTauMs(tauPathMs); } COM: <s> the lowpass time constant of the trajectory </s>
funcom_train/5436845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Packet readRecordHeader() throws IOException, PcapException { Packet p = super.readRecordHeader(); if(p != null) { // Skip the extra bytes so we are in the right // position to read. if(in.skipBytes(8) != 8) { throw new IOException("Unable to skip file record."); } } return p; } COM: <s> reads and returns the next packets record header from the underlying </s>
funcom_train/1170546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldAddAdditionalCards(boolean didWin) { float chance = 0.5f; if (inventory.getItemLevel("Lucky Coin") == 1) { chance = 0.65f; } float r = MyRandom.random.nextFloat(); if (didWin) { return r <= chance; } else { return false; } } COM: <s> p should add additional cards </s>
funcom_train/46426283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play(int beatDuration, int pitchOffset, int vol, boolean block) { int dur = this.getDuration(beatDuration); if (this.note >= 0) { Sound.playTone(this.getFreq(pitchOffset), dur, vol); } if (block) { Delay.msDelay(dur); } } COM: <s> play this note after pitch offset using the specified volume </s>
funcom_train/25823033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCycleId(Signature signature, long id) { Signature sig = (Signature) cache.get(signature); if (((sig.acceptingCycleId >> 63) & 1) != 0) sig.acceptingCycleId = id | ((long) 1 << 63); else sig.acceptingCycleId = id & (~((long) 1 << 63)); } COM: <s> sets the signature to the new cycle id </s>
funcom_train/26021330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(){ Cursor cursor = null; try{ Log.d(TAG,">>> begin setData"); Uri curi = Uri.parse("content://transit/route_type"); cursor = managedQuery(curi, new String[] {RouteType._ID,RouteType.TITLE}, null, null); ArrayList <RouteType> list = RouteType.getData(this); arrayAdapter= new ArrayAdapter <RouteType> (this,android.R.layout.simple_list_item_1,list); }catch(Exception e){ Log.e(TAG,"setRouteType()",e); }finally{ if (cursor!=null) cursor.close(); } Log.d(TAG,"<<< end setData"); } COM: <s> fill the array adaptor with data this is called by a worker thread </s>
funcom_train/31804209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeCheck() throws AgletException { _filePath = (String)ARGUMENT; setText("checking update of " + _filePath); if ((f = new File(_filePath)) == null) { throw new AgletException("Null File object error"); } if (f.exists()) { _lastModified = f.lastModified(); MESSAGE = _filePath; return; } else { throw new AgletException("Non-Existing File Access"); } } COM: <s> this method is to specify the intial check performed by this notifier </s>
funcom_train/14375956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String text2Html(String content) { // Escape the actual text since we should be the only source of markup in the HTML. final String escapedContent = content != null ? escapeHtml(content) : ""; String result; result = lineBreaksToBrTags(processUrls(escapedContent)); //result = leadingSpaceToNonBreakingSpace(result); return result; } COM: <s> returns the html to be displayed for the given text content </s>
funcom_train/47676092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attr getAttribute(String name) { if (domNode == null) { return null; } // Get all the attributes of an element in a map org.w3c.dom.NamedNodeMap attrs = domNode.getAttributes(); Attr attr = (Attr) attrs.getNamedItem(name); return attr; } COM: <s> returns an attribute by name </s>
funcom_train/11319491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueObject(Object valueObject) { if (valueObject != null) { String classname = getClassname(valueObject.getClass()); ClassMetadata classMetadata = getSessionFactory().getClassMetadata(classname); Object identifier = classMetadata.getIdentifier(valueObject, EntityMode.POJO); oidField.setValueObject(identifier); copyFrom(valueObject); } } COM: <s> set the given hibernate value object in the form copying the objects </s>
funcom_train/3410823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ColorModel getColorModel() { ComponentPeer peer = this.peer; if ((peer != null) && ! (peer instanceof LightweightPeer)) { return peer.getColorModel(); } else if (GraphicsEnvironment.isHeadless()) { return ColorModel.getRGBdefault(); } // else return getToolkit().getColorModel(); } COM: <s> gets the instance of code color model code used to display </s>
funcom_train/3107968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDownloadSlots(int used, int total) { StringBuffer str = new StringBuffer(); str.append("Used download Slots : ").append(used).append(" / ").append( total); downloadSlotsText = str.toString(); if (uploadSlotsText != null) { lblStatus1.setText(downloadSlotsText + " " + uploadSlotsText); } } COM: <s> update the download slots information label </s>
funcom_train/14229239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dialString_ActionEvents() { Document doc = this.getDialString().getDocument(); try { this.dial(doc.getText(0, doc.getLength())); doc.remove(0, doc.getLength()); } catch (BadLocationException ble) { // then we have a real problem... just report it and ignore System.out.println("Dial String length inconsistency: " + doc.getLength()); } return; } COM: <s> dial digits when the user enters enter from digit line or presses </s>
funcom_train/35781062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Clusterable findClosest(Clusterable point){ Map<Clusterable,Integer> votes = new HashMap<Clusterable,Integer>(); for ( int i = 0; i < trees.length; i++ ){ Clusterable c = trees[i].restrictedNearestNeighbor(point,mMaxBins); if ( votes.containsKey(c) ){ votes.put(c,votes.get(c)+1); } else { votes.put(c,1); } } int highVoteCount = 0; Clusterable highest = null; for ( Clusterable c : votes.keySet() ){ if ( votes.get(c) > highVoteCount ){ highVoteCount = votes.get(c); highest = c; } } return highest; } COM: <s> choses the closest point in the tree through the following method </s>
funcom_train/3395286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String name() { ClassSymbol c = sym.enclClass(); String n = c.name.toString(); for (c = c.owner.enclClass(); c != null; c = c.owner.enclClass()) { n = c.name.toString() + "." + n; } return n; } COM: <s> get the name </s>
funcom_train/47191938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCharacter(int code, int xadvance, int x, int y, int width, int height,int yoffset) { chars.add(new CharData(code, xadvance, x, y, width, height,size + yoffset)); } COM: <s> add a character to the data set </s>
funcom_train/24376186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stripId(String id) { if (id != null) { if (id.startsWith("urn:uuid:")) { id = id.substring(9).trim(); } else { // id is urn id = id.replaceAll(":", "_"); } } return id; } COM: <s> strip urn uuid part from start of registry </s>
funcom_train/26624577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _sendBcastRequest(Message msg, long id) { Message reqMsg; // Store away the message while waiting for the sequencer's reply synchronized(_reqTbl) { _reqTbl.put(new Long(id), msg); } // Send a bcast request immediatelly and also schedule a retransmission _transmitBcastRequest(id); _ackSenderWin.Add(id, null); } // _sendBcastRequest() COM: <s> replace the original message with a broadcast request sent to the </s>