__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25222211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeleteIntermediateFiles(boolean deleteIntermediateFiles) { boolean oldDeleteIntermediateFile = this.deleteIntermediateFiles; if ( oldDeleteIntermediateFile != deleteIntermediateFiles ) { this.deleteIntermediateFiles = deleteIntermediateFiles; firePropertyChange(PROP_DELETEINTERMEDIATEFILES, oldDeleteIntermediateFile, this.deleteIntermediateFiles); setRunPrepared(false); } } COM: <s> set the value of delete intermediate files </s>
funcom_train/51360217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(int ackBit) { int i2cData; i2cData = CPU.shiftIn(sdaPin, sclPin, 8, CPU.PRE_CLOCK_MSB); // send Ack (more reads) or Nak (last read) CPU.shiftOut(sdaPin, sclPin, 1, CPU.SHIFT_LSB, ackBit); return i2cData; } COM: <s> read 8 bit value from i2 c device </s>
funcom_train/44778920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOfMatchingGenotypeExperiment(GenotypeExperiment exp) { for (int i=0, n=size(); i<n; i++) { GenotypeExperiment current = (GenotypeExperiment) get(i); if (exp.propsEqualAllGivenProps(current)) { return i; } } return -1; } COM: <s> returns the index of the genotype experiment in this group </s>
funcom_train/13965373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String listItemClass() { String result = ""; if (tabItem != null && tabItem.equals(currentTab())) { result = "CurrentStep"; } if (index == tabSectionsContents().count() - 1) { result = "Last " + result; } if (index == 0) { result = "First " + result; } return result.equals("") ? null : result; } COM: <s> css class for the current step list li </s>
funcom_train/944023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { TreePath tp = e.getNewLeadSelectionPath(); if (tp == null) return; TaxonomyNode node = (TaxonomyNode) tp.getLastPathComponent(); selectedNode = node.getSubject(); lblSelectedClass.setText("URI: [" + node.getSubject() + "]"); } COM: <s> called whenever the value of the selection changes </s>
funcom_train/9272313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPKGNAMCBytes(byte[] b, int resultSetHoldability) { if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) { agent_.sectionManager_.holdPKGNAMCBytes = b; } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) { agent_.sectionManager_.noHoldPKGNAMCBytes = b; } } COM: <s> store the packagename and consistency token information this is called from section </s>
funcom_train/15958312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFieldDataCache(FieldDataCache fieldDataCache, BoboIndexReader reader) throws IOException { try { _lonLats=new GeoPluginFieldData(reader,fieldDataCache.getFieldName()); fieldDataCache.setUserObject(_lonLats); } catch (GeoSearchingException gse) { throw new IOException("trouble loading field data cache: "+gse.toString()); } } COM: <s> this method must be called first before building any filters with this </s>
funcom_train/33807168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TreePackage addPackage(String packageName){ for(TreePackage p: packages){ if (p.name.equals(packageName)) return p; } TreePackage p = new TreePackage(); p.name = packageName; if (fullName!=null){ p.fullName = fullName + '.' + packageName; }else{ p.fullName = packageName; } packages.add(p); return p; } COM: <s> returns existing or creates new package if not exists </s>
funcom_train/32778740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activate(TimeSpan dt) { // get the current process SimProcess currentProcess = currentSimProcess(); if (currentProcess == null) { sendWarning("The current process of a cooperation is not found. " + "The attempted action is ignored!", "ProcessCoop: " + getName() + " Method: activate()", "The current process is only a null pointer.", "Make sure that only real SimProcesses are cooperating."); return; } currentProcess.activate(dt); } COM: <s> activates schedules the current sim process at the current simulation </s>
funcom_train/32907398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addProperties(Element parent) { Iterator iter = parent.elementIterator("property"); while (iter.hasNext()) { Element node = (Element) iter.next(); String name = node.attributeValue("name"); String value = node.getText().trim(); log.debug(name + "=" + value); properties.setProperty(name, value); } } COM: <s> get name and value from property save them into properties </s>
funcom_train/535959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrack(Track t) { if (t.getArtist() != this) { throw new IllegalArgumentException(String.format( "Track %s has artist %s, but I'm artist %s", t, t.getArtist(), this)); } if (t.getLastPlayed() != null) { this.unplayed = false; } this.tracks.add(t); } COM: <s> adds a track to this artist </s>
funcom_train/18882789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(final PropertyChangeEvent e) { final String prop = e.getPropertyName(); if (JFileChooser.SELECTED_FILE_CHANGED_PROPERTY.equals(prop)) { file = (File) e.getNewValue(); if (isShowing()) { loadImage(); repaint(); } } } COM: <s> updates image preview when received jfile chooser </s>
funcom_train/27843081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Frame getSharedNullFrame() { if (sharedNullFrame == null) { try { sharedNullFrame = new NullFrame(); sharedNullFrame.setIconImage(getDefaultWindowIcon()); AWTUtilities.centreOnScreen(sharedNullFrame); } catch (UnsupportedOperationException ignore) { ; // thrown by JDK 1.4 } } return sharedNullFrame; } COM: <s> get the frame used as default parent for the views </s>
funcom_train/1655226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHead() { StringBuilder builder = new StringBuilder(); synchronized (message) { for (Header hdr : Header.values()) { String text = getHeader(hdr); if (!text.equals("")) { builder.append(hdr.getName()); builder.append(": "); builder.append(wrapHeader(hdr.getName(), text, 72, 998)); builder.append("\n"); } } } return builder.toString(); } COM: <s> get the complete list of headers </s>
funcom_train/7971649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeButtons() { buttonPanel = new JPanel(); okButton = new JButton( "OK" ); okButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { okButtonWasPressed = true; setVisible( false ); } } ); buttonPanel.add( okButton ); } COM: <s> initializes the ok button </s>
funcom_train/41726595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getFailedTests(String className, String methodName) { // System.out.println(mCache); Map map = (Map) mCache.get(className + "." + methodName); if (map != null) { return new HashSet(map.values()); } else { return new HashSet(); } } COM: <s> gets a set of all the tests associated with failing on mutating the </s>
funcom_train/4940624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long putlong(long value, int n) throws FlIOException { if (n > 32) { int i = (int)(value >>> 32); putbits(i, n-32); i = (int)(value & 0x00000000FFFFFFFF); putbits(i, 32); return value; } else return putbits((int)value, n); } COM: <s> put n bits output only </s>
funcom_train/8409836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StrBuilder appendWithSeparators(Iterator it, String separator) { if (it != null) { separator = (separator == null ? "" : separator); while (it.hasNext()) { append(it.next()); if (it.hasNext()) { append(separator); } } } return this; } COM: <s> appends an iterator placing separators between each value but </s>
funcom_train/23949429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() { if (keyStoreFile.canRead()) { try { synchronized (keyStores) { keyStores.clear(); for (AdvanceKeyStore ks : XSerializables.parseList(XElement.parseXML(keyStoreFile), "keystore", AdvanceKeyStore.CREATOR)) { keyStores.put(ks.name, ks); } } } catch (Throwable ex) { GUIUtils.errorMessage(CCMain.this, ex); } } } COM: <s> load the existing keystore list </s>
funcom_train/3990023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRozpoznaniePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SkierowaniePoradniaSpec_rozpoznanie_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SkierowaniePoradniaSpec_rozpoznanie_feature", "_UI_SkierowaniePoradniaSpec_type"), PrzychodniaPackage.Literals.SKIEROWANIE_PORADNIA_SPEC__ROZPOZNANIE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the rozpoznanie feature </s>
funcom_train/42345501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State exe(QueuedTask qt) { NetworkAck ack = null; try { ack = sendCmd("EXE"); } catch(IOException e) { LOG.error("IOError", e); setIsValid(false); return null; } if(ack != null && ack.isOk()) { try { getOut().writeObject(qt); getOut().flush(); ack = (NetworkAck)readObj(); return State.valueOf(ack.getMsg()); } catch (IOException e) { LOG.error("IOError", e); setIsValid(false); return null; } } return null; } COM: <s> assign the given task to the task client </s>
funcom_train/7589390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(double value) throws JMException { Class cls = java.lang.String.class; String name = cls.getName(); Configuration.logger_.severe("Class " + name + " does not implement " + "method setValue"); throw new JMException("Exception in " + name + ".setValue()") ; } // setValue COM: <s> sets a double value to a variable in subclasses of code variable code </s>
funcom_train/7511067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelSettings() { if (jPanelSettings == null) { GridBagConstraints jbc = AppHelper.getJBCBorderPanel(0, true); jbc.fill = GridBagConstraints.BOTH; jPanelSettings = new JPanel(); jPanelSettings.setLayout(new GridBagLayout()); jPanelSettings.add(getJTabbedPaneSettings(), jbc); } return jPanelSettings; } COM: <s> this method initializes j panel settings </s>
funcom_train/35563703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"); out.println("<HTML>"); out.println("<HEAD><TITLE></TITLE></HEAD>"); out.println("<SCRIPT LANGUAGE=\"javascript\">"); out.println("var url=\""+request.getContextPath()+"/logon.do?client=true\"+\"&width=\"+window.screen.width+\"&height=\"+window.screen.height;"); out.println("document.location =url;"); out.println("</SCRIPT>"); out.println("</HTML>"); out.flush(); out.close(); } COM: <s> the do get method of the servlet </s>
funcom_train/7803687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component createInfoPanel() { // Create the information panel and set its layout manager. JPanel infoPanel = new JPanel(); infoPanel.setLayout(new BoxLayout(infoPanel, BoxLayout.Y_AXIS)); // Add the label for messagesSent to the infoPanel. infoPanel.add(messagesSentLabel = new JLabel()); // Add the tablePane to the infoPanel. infoPanel.add(createTablePanel(), BorderLayout.WEST); return infoPanel; } COM: <s> create the information panel gui component </s>
funcom_train/44820683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(String string) { checkWidget(); if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); int index = doControlIndexOf(string); if (index < 0) SWT.error (SWT.ERROR_INVALID_ARGUMENT); //list.remove (string); doControlRemove(index); doModelRemove(index); } COM: <s> searches the receivers list starting at the first item </s>
funcom_train/9853108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double EM(ISampleSet sampleSet) { calcP(sampleSet); // sample probs. for(IKernel kernel : kernels) { calcP(kernel, sampleSet); // sample probs. under kernel kernel.EM(sampleSet); // adapt kernel params. } return logL(); // log likelihood of samples } COM: <s> performs a single expectation maximization step </s>
funcom_train/42061345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyComponent(Identifier i) throws NotFoundException { synchronized(ctable) { T t = ctable.get(i); if(t != null) { typeMap.get(t.getType()).remove(i); remove(t); } else { logger.error("Component " + i.toString()+ " doesnt exist and can NOT be removed"); throw new NotFoundException("Component " + i.toString()+ " doesnt exist and can NOT be removed"); } } } COM: <s> removes a previously created component </s>
funcom_train/17135413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOccupied(float x, float y) { boolean dirx = (x >= this.getMinX()); dirx &= (x <= this.getMaxX()); boolean diry = (y >= this.getMinY()); diry &= (y <= this.getMaxY()); return dirx && diry; } COM: <s> checks if a given point on the map is occupied by this object </s>
funcom_train/28363327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public Component getTableCellRendererComponent( final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column ) { setText( ( value != null ) ? value.toString() : "" ); _isOpaque = isSelected; return this; } COM: <s> get the table component </s>
funcom_train/49318509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _updateTitle(Catalog catalog) { String title = _I18N.getString("catalogNavigator"); String s = catalog.getTitle(); if (s != null && s.length() > 0) { title += " - " + s; } JFrame parent = SwingUtil.getFrame(this); if (parent != null) { parent.setTitle(title); } } COM: <s> update the frames title to display the name of the given catalog </s>
funcom_train/18748138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPriorities() { testExploration("priorities.gps", "start", "full", 13, 34); testExploration("priorities.gps", "start", "branching", 13, 34); testExploration("priorities.gps", "start", "linear", 8, 8); } COM: <s> tests the priorities sample </s>
funcom_train/37208293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUpContents() { contentsPanel.setBackground(ColourSet .getColour("ocula.panelbackground")); contentsPanel.setOpaque(true); Border border = BorderFactory.createCompoundBorder(BorderFactory .createLineBorder(ColourSet.getColour("ocula.panelborder"), 2), BorderFactory.createEmptyBorder(2, 2, 2, 2)); contentsPanel.setBorder(border); } COM: <s> configures the look of the contents area of the component </s>
funcom_train/3726281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse() throws Exception { super.parse(); // inService m_strURIService = Parsing.readEventualPropertyValue(m_instance, SBOVocabulary.URI_SBO_IN_SERVICE, SBOErrors.ERROR_ONE_AND_ONLY_ONE_IN_SERVICE); m_setArgumentWithValue = Parsing.readPropertyValues(m_instance, SBOVocabulary.URI_SBO_APPLIES_ARGUMENT_WITH_VALUE, null); } COM: <s> parses the properties of the entity from the mapping oimodel </s>
funcom_train/3719482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseEmptySegment() throws EncodingNotSupportedException, HL7Exception { String message = "MSH|^~\\&|||||20080627102031.292+0100||ADT^A31^ADT_A31|EJ557600005480760|P|2.3|||||BE|8859/1|FR\r\n" + "EVN||20080627101943+0100\r\n" + "PID|||M07869D^^^ADMISSION^^ISSTLUC||DUPONT^JEAN||19701004000000+0100|M\r\n" + "PD1\r\n" + "PV1||N"; parser.parse(message); } COM: <s> check that parsing an empty segment doesnt crash </s>
funcom_train/10207079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Hashtable buildItemTable() { if (feed == null) { return null; } final int size = feed.getItemsCount(); final Hashtable itemtable = new Hashtable(size + 10); RSSItem item; for (int i = 0; i < size; i++) { item = feed.getItem(i); itemtable.put(item.title, item); } return itemtable; } COM: <s> builds and return a hashtable with the mapping item title item </s>
funcom_train/4925611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Values getTemplateData() { // Obtain the time String time = SimpleDateFormat.getTimeInstance().format(new Date()); // Create the listing of properties List<Property> properties = new LinkedList<Property>(); for (String name : System.getProperties().stringPropertyNames()) { String value = System.getProperty(name); properties.add(new Property(name, value)); } // Return the populated values return new Values(time, properties.toArray(new Property[properties .size()]), null); } COM: <s> reflectively invoked by wo of to obtain the dynamic values to render to </s>
funcom_train/34564043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkHist() { final int hl = queries.length; if(hist + 1 == hl) { Array.move(queries, 1, 0, hl - 1); Array.move(cont, 1, 0, hl - 1); Array.move(marked, 1, 0, hl - 1); hist--; } } COM: <s> checks the history data arrays </s>
funcom_train/19097240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void errorEmptyName(Object player) { String playerStr; if (m_Config.getModel().getPlayer1() == player) { playerStr = "Player 1"; } else { playerStr = "Player 2"; } fireErrorMessage("The name of " + playerStr + " must not to be empty!"); } COM: <s> create an emtpy name error message and send it to the </s>
funcom_train/21437939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean importFrom(String filename, String format) { try { // read file FileInputStream fis = new FileInputStream(filename); BufferedReader br = new BufferedReader(new InputStreamReader(fis)); return importFromString(consume(br),format); } catch( Exception e ) { LogUtils.report(e); return false; } } COM: <s> parse the structures from a file content using the specified </s>
funcom_train/7442493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEntityAsText() { if (this.entityText == null) { try { this.entityText = getEntity().getText(); } catch (java.io.IOException e) { Context.getCurrentLogger().log(java.util.logging.Level.FINE, "Unable to get the entity text.", e); } } return this.entityText; } COM: <s> returns the entity as text </s>
funcom_train/25332912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDBSpeciesID_String() { String version = "anything"; DBSpecies instance = new DBSpecies(); Integer expResult = 1; Integer result = instance.getDBSpeciesID(version); assertEquals(expResult, result); result = instance.getDBSpeciesID(); assertEquals(expResult, result); } COM: <s> test of get dbspecies id method of class dbspecies </s>
funcom_train/2427582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DbTranFilters getCopy() { DbTranFilters copy = new DbTranFilters(); Set<Entry> copied_entries = Sets.newHashSet(); for (Entry e : entries) { copied_entries.add(e.getCopy()); } copy.entries = copied_entries; return copy; } COM: <s> creates and returns a copy of this code db tran relations code object </s>
funcom_train/43894035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { MarkImpl clone = (MarkImpl) super.clone(); if (fill != null) { clone.fill = (Fill) ((Cloneable) fill).clone(); } if (stroke != null) { clone.stroke = (Stroke) stroke.clone(); } return clone; } catch (CloneNotSupportedException e) { // this will never happen throw new RuntimeException("Failed to clone MarkImpl"); } } COM: <s> creates a deep copy of the mark </s>
funcom_train/22659422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syntaxError(java.lang.Exception ex) { if (ex instanceof MismatchedTokenException) { this.syntaxError((MismatchedTokenException)ex); } else if (ex instanceof NoViableAltException) { this.syntaxError((NoViableAltException)ex); } else { BugReport bug = new BugReport("Unknown parser exception " + ex); this.error(bug.getReport()); } } COM: <s> dispatch the parser exception to one of the two handlers </s>
funcom_train/40092573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void download(final String url) { DOM.setElementAttribute(RootPanel.get("__download" + downloadCount).getElement(), "src", url); downloadCount = downloadCount + 1; if (downloadCount > (Constants.MAX_DOWNLOAD_FRAMES - 1)) { downloadCount = 0; } } COM: <s> download the url in a seperate window </s>
funcom_train/27825853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadObjects(Collection objects,int loadFlag) throws KAONException { List list=new LinkedList(); Iterator iterator=objects.iterator(); while (iterator.hasNext()) { VirtualEntity entity=(VirtualEntity)iterator.next(); list.add(entity.getEntity()); } m_oimodel.loadObjects(list,loadFlag); } COM: <s> loads objects in the collection </s>
funcom_train/25597703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyStateChanged (ObjectState previousState, ObjectState state) { LookFeel lookFeel = getScene ().getLookFeel (); setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (8, 2), lookFeel.getMiniBorder (state))); setForeground (lookFeel.getForeground (state)); } COM: <s> implements the widget state specific look of the widget </s>
funcom_train/46188602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeProperties() throws BlogServiceException { try { FileOutputStream fout = new FileOutputStream(new File(getRoot(), BLOG_PROPERTIES_FILE)); properties.store(fout, "Properties for " + getName()); fout.flush(); fout.close(); } catch (IOException ioe) { log.error(ioe); } } COM: <s> stores the properties associated with this blog </s>
funcom_train/50106796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map select(String property, String value) { if ((null==property) || (null==value)) { throw new RuntimeException(SELECT_ERROR); } Map map = new HashMap(2); map.put(Tokens.PN_PROPERTY,property); map.put(Tokens.PN_VALUE,value); return map; } COM: <s> return a map with property and value entries </s>
funcom_train/33970243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getNextDirectory(File currentDirectory, String directoryName) { for (File file : currentDirectory.listFiles()) { if (file.getName().equals(directoryName)) { return file; } } throw new GameLoadingError("Invalid name : directory " + directoryName + " does not exist inside " + currentDirectory.getName()); } COM: <s> get the directory named directory name that is contained by </s>
funcom_train/43244891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSelectBestMethod() { System.out.println("SelectBestMethod"); Method[] meths = null; Variant va = null; Method expResult = null; Method result = BeanTools.SelectBestMethod(meths, va); 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 select best method method of class org </s>
funcom_train/4477199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace() { if (createdBy != null) { System.out.println(format.format(new Date(createdTime))); createdBy.printStackTrace(System.out); } synchronized(this) { Iterator it = this.trace.iterator(); while (it.hasNext()) { AbandonedTrace at = (AbandonedTrace)it.next(); at.printStackTrace(); } } } COM: <s> if log abandoned true print a stack trace of the code that </s>
funcom_train/45228469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gradeProjects() { List<Project> projects = gradeBook.getProjects(); for (Project project : projects) { try { project.grade(); } catch (Exception e) { log.error("Error grading project [" + project + "]", e); } } fireProjectsGraded(); } COM: <s> grades all projects known to the data manager notifying the application that the </s>
funcom_train/36190004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ungetService(ServiceReference ref) { pssIpojoLog("ungetService", ref); Object svc = m_tracker.getService(ref); // Get the service object m_tracker.ungetService(ref); Object obj = m_serviceObjects.remove(ref); // Remove the service object if (svc instanceof PSSIPOJOServiceFactory) { ((PSSIPOJOServiceFactory) svc).ungetService(m_instance, obj); } } COM: <s> ungets a used service reference </s>
funcom_train/253783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { final ProjectView view = parent.getProjectsView().getSelectedView(); final URI uri = view.getURI(); File file = null; if ( uri != null) { file = new File( uri); } if ( file == null) { SaveAsAction.saveAs( parent); } else { save(parent, view, uri, file); } } COM: <s> the implementation of the save project action called </s>
funcom_train/26435683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void live() { if (env.lookup("live") != null) try { interp.eval("(live)",env); } catch(Exception e){ System.err.println("Error in the (live) function : "+ e); e.printStackTrace(); } catch (Throwable ex){ System.err.println("Error in evaluating (live): "+ ex); } } COM: <s> evaluates the live function if bounded </s>
funcom_train/18758455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePlayerReadiness(String nick, boolean ready) { if (ready && !playerReadiness.contains(nick)) { playerReadiness.add(nick); firePropertyChange("PlayerReadiness", null, nick); } else if (!ready) { if (playerReadiness.remove(nick)) { firePropertyChange("PlayerReadiness", nick, null); } } } COM: <s> updates a players readiness state </s>
funcom_train/30247142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TagsMapModel performPostprocessing(TagsMapModel model, List<? extends MappableTag> _tags, Map<String, String[]> params){ TagsMapModel result = model; for(PostProcessor processor : ExecuteEngine.getPostProcessors()){ result = processor.process(model, _tags, params, this); } return result; } COM: <s> ivokes all registers post processors </s>
funcom_train/40712740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextModeCombo(int mode) { switch(mode) { case TextEditorPane.TEXTMODE_VIEWHTML: textModeCombo.setSelectedIndex(0); return; case TextEditorPane.TEXTMODE_EDITHTML: textModeCombo.setSelectedIndex(1); return; } throw new RuntimeException("" + mode); } COM: <s> sets the currently selection in the text mode combo </s>
funcom_train/28928192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ProjectInfo getProjectInfo(int pid) { String projectstring; for (String key : basicProjects.keySet()) { Vector<ProjectInfo> vpi = basicProjects.get(key); for (ProjectInfo pi : vpi) { if (pi.lpid == pid) { pi.connected = (projects.get(pid)).size(); return pi; } } } return null; } COM: <s> get project info gets information related to a local project </s>
funcom_train/2301917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeNodes(State[] states) { myNodes = new Node[states.length]; /** Color all vertices white. */ for (int k = 0; k < states.length; k++) { Node node = new Node(states[k]); node.colorWhite(); myNodes[k] = node; } } COM: <s> initializes all nodes for dfs by creating a node object </s>
funcom_train/50576100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doDelete() { DefaultMutableTreeNode[] sel = ft.getSelection(); for(int i = 0; i < sel.length; i++) { ((DirectoryContents) contents).remove((TuneologyFile) sel[i].getUserObject()); ft.removeNode(sel[i]); } ft.fireDataChanged(); updateStatus(); } COM: <s> deletes the selected items from the list to be written to the cd </s>
funcom_train/13966904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GSVRule ruleNamed(String name){ GSVRule currentrule = null; for(int i=0;i<rules.count();i++){ currentrule = (GSVRule)rules.objectAtIndex(i); if(currentrule.ruleName().equals(name)) return currentrule; } return null; } COM: <s> returns the rule with the provided name </s>
funcom_train/1589658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property property(DateTimeFieldType type) { if (type == null) { throw new IllegalArgumentException("The DateTimeFieldType must not be null"); } DateTimeField field = type.getField(getChronology()); if (field.isSupported() == false) { throw new IllegalArgumentException("Field '" + type + "' is not supported"); } return new Property(this, field); } COM: <s> gets the property object for the specified type which contains many useful methods </s>
funcom_train/46439380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(Element parent) { minusRowCount = DomReader.getRequiredIntValue(parent, ATTRIBUTE.minusRowCount.name()); eolCharacter = DomReader.getValue(parent, ATTRIBUTE.eolCharacter.name()); eolLength = getEOLLength(eolCharacter); rows = parceRows(parent); } COM: <s> contains the instructions for parsing data from child elements within </s>
funcom_train/20400397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object parse(String arg) throws ParseException { Short result = null; try { result = Short.decode(arg); } catch (NumberFormatException e) { throw ( new ParseException( "Unable to convert '" + arg + "' to a Short.", e)); } return (result); } COM: <s> parses the specified argument into a short </s>
funcom_train/18502950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replace() { int start = text.getSelectionRange().x; text.replaceTextRange(start, text.getSelectionCount(), replaceText.getText()); text.setSelection(start, start + replaceText.getText().length()); } COM: <s> function for replacing </s>
funcom_train/23056805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPopupMenu createContextMenu(BarProvider provider) { if ( logger.isDebugEnabled() ) { logger.debug("entering createContextMenu(BarProvider)"); } JPopupMenu menu = this.createContextMenu(provider, this.getDefaultPopupMenuCustomizer()); if ( logger.isDebugEnabled() ) { logger.debug("exiting createContextMenu(BarProvider)"); } return menu; } COM: <s> create a list of jmenu item according to bar provider </s>
funcom_train/14262616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTargetAttributes(Attributes atts, Locale locale) { // If this is a new locale, create a new target if (!tuTargets.containsKey(locale)) { tuTargets.put(locale, new TuTarget()); } tuTargets.get(locale).setAttributes(atts); } COM: <s> passed the attributes of a target element identified by a locale </s>
funcom_train/45867533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawDisk(Posn center, int radius, Color color) { if (radius <= 0) return; if (color == null) color = new Color(0, 0, 0); this.drawShape(new Ellipse2D.Double(center.x - radius, center.y - radius, 2 * radius, 2 * radius), color, true); } COM: <s> p draws a disk in this panel p </s>
funcom_train/16683532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileName() { final FxPK pk = getPagePK(); if (pk.isNew()) { return ""; } BinaryDescriptor binaryDescriptor = (BinaryDescriptor) getPageContent().getValue("/filecontent").getBestTranslation(); return binaryDescriptor.getName(); } COM: <s> returns file name of file stored in file content instance </s>
funcom_train/28549673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI getURI() { URI result = null; switch (type) { case CONFLUENCE: result = getAsKangaVocab().getURI(); break; case DUBLIN_CORE: result = getAsDublinCoreVocab().getURI(); break; case OWLRDF: result = getAsOWLRDFVocab().getIRI().toURI(); break; case RABBIT: result = getAsRabbitVocab().getURI(); break; default: throw new RuntimeException("Not supported"); } return result; } COM: <s> returns the uri of the vocabulary </s>
funcom_train/16677373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void localeChanged() { if (textKey != null) { if (objects != null) { setTextForLocaleKey(textKey, objects); } else { setTextForLocaleKey(textKey); } } if (descriptionKey != null) { if (descriptionObjects != null) { setDescriptionForLocaleKey(descriptionKey, descriptionObjects); } else { setDescriptionForLocaleKey(descriptionKey); } } } COM: <s> this method must be called from the list for each of its items </s>
funcom_train/10906630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PDFInfo makeInfo(String prod) { /* * create a PDFInfo with the next object number and add to * list of objects */ PDFInfo pdfInfo = new PDFInfo(); // set the default producer pdfInfo.setProducer(prod); getDocument().registerObject(pdfInfo); return pdfInfo; } COM: <s> make an info object </s>
funcom_train/13754318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFooterText() { HeaderStories hs = new HeaderStories(doc); StringBuffer ret = new StringBuffer(); if(hs.getFirstFooter() != null) { appendHeaderFooter(hs.getFirstFooter(), ret); } if(hs.getEvenFooter() != null) { appendHeaderFooter(hs.getEvenFooter(), ret); } if(hs.getOddFooter() != null) { appendHeaderFooter(hs.getOddFooter(), ret); } return ret.toString(); } COM: <s> grab the text from the footers </s>
funcom_train/624858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Report evaluate(String resourceName) throws Exception { Report report = new Evaluator(new ExampleModel()).evaluate(parse("/de/tuberlin/cs/cis/ocl/example/constraints",resourceName)); System.out.println("File: " + resourceName + "\n"); System.out.println(report.toString()); return report; } COM: <s> evaluates an ocl constraint file </s>
funcom_train/49791243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IStatus refreshProject() throws CoreException { HaltProgressMonitor m = new HaltProgressMonitor(); project.refreshLocal(IResource.DEPTH_INFINITE, m); try { while (!m.isDone()) { Thread.sleep(300); } } catch (InterruptedException e) { return new Status(Status.ERROR, PLUGIN_ID , "refresh thread was interrupted", e); } return Status.OK_STATUS; } COM: <s> force a complete refresh of the entire project and </s>
funcom_train/36924510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void detectMode(int algo) { if (algo < 0 || algo > 1) { CCSoundIO.error("Unrecognized detect mode, defaulting to SOUND_ENERGY."); algo = SOUND_ENERGY; } if (algo == SOUND_ENERGY) { if (algorithm == FREQ_ENERGY) { releaseFEResources(); initSEResources(); initGraphs(); algorithm = algo; } } else { if (algorithm == SOUND_ENERGY) { releaseSEResources(); initFEResources(); initGraphs(); algorithm = FREQ_ENERGY; } } } COM: <s> set the object to use the requested algorithm </s>
funcom_train/46858238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAllMaps() { for (int i = 0; i < keyActions.length; i++) { GameAction action = keyActions[i]; keyActions[i] = null; } for (int i = 0; i < mouseActions.length; i++) { GameAction action = mouseActions[i]; mouseActions[i] = null; } } COM: <s> clears all mapped keys and mouse actions </s>
funcom_train/49627479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPath(final Command command) { if ((command.getParameter("path") == null) || command.getParameter("path").getFirstValue() == null) { return null; } StringBuilder path = new StringBuilder(command.getParameter("path") .getFirstValue()); if (path.length() == 0) { LOGGER.warn("Given path is empty!"); return null; } return path.toString(); } COM: <s> returns the path string or </s>
funcom_train/2578236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(TitleChangeEvent event) { if (this.notify) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == TitleChangeListener.class) { ((TitleChangeListener) listeners[i + 1]).titleChanged( event); } } } } COM: <s> notifies all registered listeners that the chart title has changed in </s>
funcom_train/47826605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAgents() { // At the moment, only one agent is created manager = new Agent(configurationFilesPath + properties.getProperty(AGENT_CONFIGURATION_FILE)); SharedKnowledgePlane.getInstance(this.pacID).getStatefulSession().insert(manager); addManagedElements(manager); new Thread(manager).start(); } COM: <s> at the moment we only create one agent the manager </s>
funcom_train/30006487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getEndPanel() { if (this.endPanel == null) { this.endPanel = new JPanel(); this.endPanel.setLayout(new BorderLayout()); this.endPanel.add(this.getEndLabel(), BorderLayout.WEST); this.endPanel.add(this.getEndTimeInput(), BorderLayout.CENTER); } return this.endPanel; } COM: <s> gets the end panel </s>
funcom_train/985997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage() { Image myImage = null; if (fakeVideo) { myImage = fakeVideoImage; }else { try { if (compressedImageBytes == null ) grabFrame(); myImage = Image.createImage(compressedImageBytes, 0, compressedImageBytes.length); } catch (SecurityException e2) { System.out.println("Security Issue" + e2); } catch (OutOfMemoryError e) { System.out.println("Memory Trouble" + e); } } return myImage; } COM: <s> give the image of the most recent frame </s>
funcom_train/12551992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getWidth(){ double width = 0; //for each line for (String line : getText().split("\n")){ //count characters after removing color escapes int length = line.replaceAll("\\\\#[0-9A-Fa-f]{6}", "").length(); if (length > width){ width = length; } } return width*charWidth; } COM: <s> returns the displaying width of all characters including white space </s>
funcom_train/25893556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getParentWeighting(String child, String parent) { List<WeightedRelation> parents = relations_.get(child); if (parents != null) { // Find the relation using the parent as a lookup WeightedRelation wr = new WeightedRelation(parent, 1); int index = parents.indexOf(wr); if (index != -1) return parents.get(index).getWeight(); } return 0; } COM: <s> gets the parent weighting for a child tag how much the parent affects </s>
funcom_train/8091542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Grid subgrid(int top, int left, int bottom, int right) { return new Grid( getValues(left, top).getX(), getValues(right, top).getX(), getStepX(), getLabelX(), getValues(left, bottom).getY(), getValues(left, top).getY(), getStepY(), getLabelY()); } COM: <s> returns a subgrid with the same step sizes but different borders </s>
funcom_train/36615675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void executedSQLs() { HistoryDialog dlg = new HistoryDialog(shell); dlg.setTitle("DB Explorer"); dlg.doLayout(); StringBuffer s = new StringBuffer(""); for (int i = 0; i < queries.size(); i++) { s.append("(" + (i + 1) + ") " + queries.get(i).toString() + System.getProperty("line.separator") + System.getProperty("line.separator")); } dlg.getSqls().setText(s.toString()); dlg.open(); } COM: <s> copy executed sqls to history dialog </s>
funcom_train/37202804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCorrectQName() throws Exception { TypeDescriptor desc = XMLSplitterSerialisationHelper .extensionXMLToTypeDescriptor(new SAXBuilder().build( new StringReader(eInfoXML())).getRootElement()); assertEquals("NamespaceURI is incorrect", "http://www.ncbi.nlm.nih.gov/soap/eutils/espell", desc .getQname().getNamespaceURI()); assertEquals("Localpart is incorrect", "eSpellRequest", desc.getQname() .getLocalPart()); } COM: <s> tests the qname is constructed with the correct uri and local part </s>
funcom_train/8066561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void undo() { undoInProgress = true; Memento memento; boolean startChain = false; do { memento = pop(undoStack); startChain = memento.isStartChain(); undo(memento); } while (!startChain); decrementUndoChainCount(); incrementRedoChainCount(); undoInProgress = false; } COM: <s> undo the most recent chain of mementos received by the undo stack </s>
funcom_train/28346907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllForShowBPMs_Y() { Vector v = new Vector(); for(int i = 0, n = bpmV.size(); i < n; i++) { RingBPM rbpm = (RingBPM) bpmV.get(i); RingBPMtbtAvg rbpmPV = rbpm.getBPM_Y(); if(rbpmPV.show()) { v.add(rbpmPV); } } return v; } COM: <s> returns all ring bpms pvs with show true for y position </s>
funcom_train/7618675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int parseTag(int offset) { int sum = 0, i = 0; try { for (i = 0; i < 8; i++) { char ch = mBuffer.charAt(offset); if (!isLetter(ch)) { break; } sum++; offset++; } } catch (IndexOutOfBoundsException e) { ; } if (i == 0) { return PARSE_ERROR; } return sum; } COM: <s> from first 8 position is sequence letter </s>
funcom_train/13491521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Predicate lookupLib(Predicate p,String className,Predicate[] libPredicates) { if (p!=null) return p; for (int i=0;i<libPredicates.length;i++) { if (libPredicates[i].getClass().getName().equals(className)) return libPredicates[i]; } return null; } COM: <s> lookup the lib for a predicae with a certain class name </s>
funcom_train/4466025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getKey(OWLObject obj) { Object objKey = obj; if (((obj instanceof OWLDescription) && !(obj instanceof OWLNamedObject)) || (obj instanceof OWLDataEnumeration)) { List v = new Vector(); v.add(0, objectStack.clone()); v.add(1, currentClass); v.add(2, currentProperty); v.add(3, obj); objKey = v; } return objKey; } COM: <s> returns a key representing the object </s>
funcom_train/20612450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHeightPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComponentInstance_height_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComponentInstance_height_feature", "_UI_ComponentInstance_type"), GCLACSPackage.Literals.COMPONENT_INSTANCE__HEIGHT, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the height feature </s>
funcom_train/24050406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkInteriorIntersections() { for (Iterator i = segStrings.iterator(); i.hasNext();) { SegmentString ss0 = (SegmentString) i.next(); for (Iterator j = segStrings.iterator(); j.hasNext();) { SegmentString ss1 = (SegmentString) j.next(); checkInteriorIntersections(ss0, ss1); } } } COM: <s> checks all pairs of segments for intersections at an interior point of a </s>
funcom_train/49046052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonImaginary() { if (buttImaginary == null) { buttImaginary = new JRadioButtonMenuItem(); buttImaginary.setText("Imaginary"); buttImaginary.setPreferredSize(new Dimension(60,10)); buttImaginary.setToolTipText("calculates the imaginary part"); buttImaginary.addActionListener(this); buttImaginary.setActionCommand("parameter"); //buttImaginary.setEnabled(false); } return buttImaginary; } COM: <s> this method initializes the option imaginary </s>
funcom_train/33447255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(Collection<T> objects) { if (objects.isEmpty()) return; synchronized (fBuffer) { /* New Batch */ if (fBuffer.isEmpty()) { fBuffer.addAll(objects); fBufferProcessor.schedule(fBatchInterval); } /* Existing Batch */ else { fBuffer.addAll(objects); } } } COM: <s> adds all objects of the given collection to this buffer </s>
funcom_train/4022534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropItem(int playerId) { Item item = getInventory().getHoldingItem().getItem(); if (item == null) { return; } LocalMap map = getPosition().getLocalMap(); map.getWorld().getCommand().dropItem(getPosition(), item); getInventory().setHoldingItem(null); } COM: <s> manages the item drop </s>