__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44853243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBAccessConfiguration getExtDBConfiguration() { try { return new DBAccessConfiguration(get(KEY_DBX_DRIVER), get(KEY_DBX_SERVER), get(KEY_DBX_SCHEMA), get(KEY_DBX_USER), get(KEY_DBX_PW)); } catch (IOException exc) { // intentionally left empty } return DBAccessConfiguration.getEmptyConfiguration(); } COM: <s> returns the configuration to access an external member database </s>
funcom_train/5580540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _remove() { int[] selection = _table.getSelectedRows(); if (selection.length == 0) { return; } Host[] hosts = _table.getSelectedHosts(); _fireIntervalDeleted(selection[0], selection[selection.length-1], true); _table.removeSelectedHosts(); _unregisterListeners(); _controller.remove(hosts); _registerListeners(); } COM: <s> remove selected hosts </s>
funcom_train/39531233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newDocument() { DocumentEditorSessionController sessionController = new DocumentEditorSessionController(this); sessionController.getFrame().setJMenuBar(buildMenuBar(sessionController)); sessionController.getFrame().setVisible(true); documentEditorSessionControllerList.add(sessionController); updateWindowMenu(); } COM: <s> create a new document and the corresponding window </s>
funcom_train/5582765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void message(Message message) { if( status == WAITING_OPERATOR ) { chatTranscript.setText("Now talking with " + message.getAuthor() + "\n"); status = CHATTING; } chatTranscript.append(message.getAuthor() + ": " + message.getMessage() + "\n"); } COM: <s> called when there is an incoming message </s>
funcom_train/43245138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPatientHRN() { System.out.println("setPatientHRN"); String patientHRN = ""; PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object(); instance.setPatientHRN(patientHRN); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set patient hrn method of class org </s>
funcom_train/44315082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatePeriod getDatePeriod( String name, DatePeriod defaultValue ) throws NamedValueParseException { String parameter = _accessor.getValue( name ); if ( isEmpty( parameter ) ) { return defaultValue; } DatePeriod value = toDatePeriod( parameter.trim() ); if ( value != null ) { return value; } throw new NamedValueParseException( name ); } COM: <s> returns the named parameter as a date period </s>
funcom_train/17944681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeOutBase64(String text) throws IOException, BadLocationException { File whatFile = getFileFromChooser( ".", JFileChooser.SAVE_DIALOG, MutableFilter.EXT_BASE64, translatrix.getTranslationString("FiletypeB64")); if(whatFile != null) { String base64text = Base64Codec.encode(text); FileWriter fw = new FileWriter(whatFile); fw.write(base64text, 0, base64text.length()); fw.flush(); fw.close(); refreshOnUpdate(); } } COM: <s> method for saving text as a base64 encoded document </s>
funcom_train/45451626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDateStartValue() { Date dateValue = null; if (!Pattern.matches("[01]?\\d/[0-3]?\\d/\\d\\d", this.dateStart)) { return null; } try { dateValue = new SimpleDateFormat("MM/dd/yy").parse(this.dateStart); } catch (ParseException e) { } return dateValue; } COM: <s> returns the start date as a date value </s>
funcom_train/31077907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanDescriptor getBeanDescriptor() { BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] { "preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "A spot light component." }); //bd.setValue("hidden-state", Boolean.TRUE); bd.setValue("helpSetName", "net/jbeans/j3d/light/resources/SpotLight/jhelpset.hs"); return bd; } COM: <s> returns a bean descriptor for spot light bean </s>
funcom_train/28340580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSwitchOn(boolean switchOn) { this.switchOn = switchOn; synchronized (syncObj) { if (!switchOn) { if (vals.length != 0) { vals = new double[0]; } mpv.stopMonitor(); } } if (switchOn) { mpv.startMonitor(); } } COM: <s> sets the switch on key for monitoring </s>
funcom_train/40360724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toXml(PrintWriter out, int indent) { ServletUtil.writeXMLTag(out, indent, ServletUtil.XMLTAG_CONNECTOR_INSTANCES, false); for (ImportExportConnector connector : this) { connector.toXml(out, indent + 1); } ServletUtil.writeXMLTag(out, indent, ServletUtil.XMLTAG_CONNECTOR_INSTANCES, true); } COM: <s> serializes this list of connectors to an xml output stream </s>
funcom_train/16257530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { if (hashCode == 0) { int result = 17; result = 37 * result + type.hashCode(); result = 37 * result + propertyName.hashCode(); if (parameterTypes != null) { for (int i = 0; i < parameterTypes.length; i++) { result = 37 * result + ((parameterTypes[i] == null) ? 0 : parameterTypes[i].hashCode()); } } hashCode = result; } return hashCode; } COM: <s> hash code computed using algorithm suggested in effective java item 8 </s>
funcom_train/43999055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateChildrenNodes() { Collection keys = getChildrenKeys(); Children children = getChildren(); if (children == Children.LEAF) { if (!keys.isEmpty()) { children = new MNChildren(); setChildren(children); } } if (children != Children.LEAF) { ((MNChildren)children).setChildrenKeys(keys); } } COM: <s> create remove children nodes </s>
funcom_train/26489506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translateAttribute(Element element, String name) { String transText = element.getAttribute(name); if (transText.length()>0) { // Replace translation tags with the corresponding translated text. transText = translateText(transText); element.setAttribute(name, transText); } } COM: <s> searches the element apos s attribute value for translation tags and </s>
funcom_train/15490975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics g) { //IJ.log("draw: " + nPoints+" "+width+" "+height); updatePolygon(); if (ic!=null) mag = ic.getMagnification(); int size2 = HANDLE_SIZE/2; for (int i=0; i<nPoints; i++) drawPoint(g, xp2[i]-size2, yp2[i]-size2); //showStatus(); if (updateFullWindow) {updateFullWindow = false; imp.draw();} } COM: <s> draws the points on the image </s>
funcom_train/18745687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBundle(EdgeBundle bundle) { Set<EdgeBundle> bundles = this.bundleMap.get(bundle.node); if (bundles == null) { bundles = new MyHashSet<EdgeBundle>(); this.bundleMap.put(bundle.node, bundles); } bundles.add(bundle); this.allBundles.add(bundle); } COM: <s> adds the given bundle to the materialisation structures </s>
funcom_train/50464767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLocation() { switch(type) { case SwingConstants.NORTH: setLocation(0,0); break; case SwingConstants.SOUTH: setLocation(0, scrollBar.getHeight()-getHeight()); break; case SwingConstants.EAST: setLocation(scrollBar.getWidth() - getWidth(), 0); break; case SwingConstants.WEST: setLocation(0, 0); break; } } COM: <s> set the correct location for the buttons based on the type </s>
funcom_train/2579408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseExited(MouseEvent e) { if (this.ownToolTipDelaysActive) { // restore original tooltip dealys ToolTipManager ttm = ToolTipManager.sharedInstance(); ttm.setInitialDelay(this.originalToolTipInitialDelay); ttm.setReshowDelay(this.originalToolTipReshowDelay); ttm.setDismissDelay(this.originalToolTipDismissDelay); this.ownToolTipDelaysActive = false; } } COM: <s> handles a mouse exited event </s>
funcom_train/7667801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ShortBuffer put(ShortBuffer src) { if (src == this) { throw new IllegalArgumentException(); } if (src.remaining() > remaining()) { throw new BufferOverflowException(); } short[] contents = new short[src.remaining()]; src.get(contents); put(contents); return this; } COM: <s> writes all the remaining shorts of the </s>
funcom_train/27976671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDistance (float distance) { if (distance >= 0) { this.distance = distance; // TODO: Make the 10 feet increment locale dependent. if (distanceModifier == null) { distanceModifier = new Modifier ((int) (distance / 10)); Modifiers modifiers = getModifiers (); modifiers.addModifier (distanceModifier); } else { distanceModifier.setValue ((int) (distance / 10)); } } } COM: <s> change the distance of the target from the spotter </s>
funcom_train/25849138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendLog(String s) { StringItem si = midlet.get_debugOutput(); final String prestring = si.getText(); if ( s != null ) { try { si.setText(prestring + s); } catch (IllegalArgumentException ile) { // Reached maximum length, start again si.setText(s); } } else { si.setText(s); } } COM: <s> appends a string to the log </s>
funcom_train/42431050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fileUpload(InputStream in, int size, String contentType, String filename) { if (uploadListener != null) { UploadEvent e = new UploadEvent(this, in, size, contentType, filename); if (size == 0) { uploadListener.invalidFileUpload(e); } else { uploadListener.fileUpload(e); } } } COM: <s> notifies the upload listener that a file has been uploaded </s>
funcom_train/31412944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubStructure( Structure s ) { Structure[] acNew; if( acSubStructures == null ) { acNew = new Structure[1]; } else { acNew = new Structure[1 + acSubStructures.length]; int i; for( i = 0; i < acSubStructures.length; i++ ) { acNew[i] = acSubStructures[i]; } } acNew[ acNew.length - 1 ] = s; acSubStructures = acNew; } COM: <s> add a parsed substructure into this </s>
funcom_train/46098287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getPacienteBajaItem() { if (pacienteBajaItem == null) { pacienteBajaItem = new JMenuItem(); pacienteBajaItem.setText("Baja"); pacienteBajaItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("baja"); // TODO Auto-generated Event stub actionPerformed() pacienteBaja_actionPerformed(e); } }); } return pacienteBajaItem; } COM: <s> this method initializes paciente baja item </s>
funcom_train/44602644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_jml_array_type_reference_01() { compileAndExecGivenStatement( "X.java", "class X {\n" + " //@ requires ((Integer[]) null) == null;\n" + " void m() {\n" + " }\n" + "}\n", "new X().m()"); } COM: <s> jml array type reference </s>
funcom_train/11344595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deployBundles(BundleContext context) throws BundleException { for (int i = 0; i < m_bundles.size(); i++) { URL url = (URL) m_bundles.get(i); Bundle bundle = context.installBundle(url.toString()); bundle.start(); } } COM: <s> installs and starts required bundles </s>
funcom_train/46161836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text, Color color) { this.text = text; this.color = color; updateDrawScale(); float newHeight = getDrawHeight(); float w = getTextureWidth(); float h = getTextureHeight(); float factor = newHeight / h; float newWidth = w * factor; this.resize(newWidth, newHeight); } COM: <s> set the text to be displayed by this geometry </s>
funcom_train/39314741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBrushType() { System.out.println("testSetBrushType"); brushTool myBrush=new brushTool(); myBrush.setBrushType(1); assertEquals("should have set brushType to 1", myBrush.getBrushType(), 1); } COM: <s> test of set brush type method of class brush tool </s>
funcom_train/6329177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, Object o) { checkBoundsInclusive(index); Entry e = new Entry(o); if (index < size) { modCount++; Entry after = getEntry(index); e.next = after; e.previous = after.previous; if (after.previous == null) first = e; else after.previous.next = e; after.previous = e; size++; } else addLastEntry(e); } COM: <s> inserts an element in the given position in the list </s>
funcom_train/4780261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getOpenLastFileMenuItem() { if (openLastFileMenuItem == null) { openLastFileMenuItem = new JCheckBoxMenuItem(); openLastFileMenuItem.setText(ResourceUtil.getString("menu.settings.openlastfile")); openLastFileMenuItem.addActionListener(actionListener); openLastFileMenuItem.setActionCommand(ActionConstants.OPEN_LAST_EDITED_FILE_ACTION); openLastFileMenuItem.setSelected(UserPreferences.getOpenLastFile()); } return openLastFileMenuItem; } COM: <s> this method initializes open last file menu item </s>
funcom_train/50077199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(Object key) { CacheUpdateEvent event = null; Object previousValue = null; previousValue = super.remove(key); //fire a cache update event event = new CacheKeyRemovalEvent(this.getLocalAddress(), key); try { this.triggerDistributedUpdate(event); } catch (EventDispatchException ede) { //a jgroups event dispatcher never throws this exception } return previousValue; } COM: <s> additionally this method also triggers a </s>
funcom_train/15892238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(Map options) throws IOException { super.load(options); DataGraphResourceFactoryImpl.DataGraphResourceImpl dataGraphResource = createDataGraphResource(); doSoap(dataGraphResource, LOAD_OPERATION, options); // Start logging to populate the change-summary EDataGraph eDataGraph = (EDataGraph ) dataGraphResource.getContents().get(0); eDataGraph.getChangeSummary().beginLogging(); } COM: <s> the method invoked when the resource is loaded </s>
funcom_train/16165639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean contains(ImportablePicture pic) { assert pic != null; try { String sql = "SELECT COUNT(id) FROM pictures WHERE path = ?"; PreparedStatement pstmt = this.connection.prepareStatement(sql); pstmt.setString(1, pic.getImagePath()); ResultSet rs = pstmt.executeQuery(); rs.next(); if (rs.getInt(1) > 0) { pstmt.close(); return true; } pstmt.close(); } catch (SQLException e) { TethysFrame.displaySQLException(e); } return false; } COM: <s> tests if the database contains a picture with the same </s>
funcom_train/15406528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processBean(int row, String[] line, T bean) { // assumes single bean or Cascade.PERSIST will save any // related beans (e.g. customer -> customer.billingAddress server.save(bean, transaction); if (logInfoFrequency > 0 && (row % logInfoFrequency == 0)) { logger.info("processed " + row + " rows"); } } COM: <s> will save the bean </s>
funcom_train/44287131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilter(String category, String filterstring) { if (category.length() > 0) comboFilter.reload("filter:" + category); else comboFilter.removeAllItems(); comboFilter.setSelectedCode(filterstring); comboFilter.setVisible(comboFilter.getItemCount() > 0); } COM: <s> defines a filter for a specific category </s>
funcom_train/32057561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsDataFlavorSupported() { System.out.println("testIsDataFlavorSupported"); // Add your test code below by replacing the default call to fail. BasicTransferable x = new BasicTransferable(); DataFlavor f = new DataFlavor(); assertEquals("is Data Flavor Supported", x.isDataFlavorSupported(f), false); } COM: <s> test of is data flavor supported method of class basic transferable </s>
funcom_train/3276533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() { // Add your handling code here: if (!ics.isConnected()) { try { System.out.println("[Client] attempting to connect"); ics.setHandle(handle); ics.setPassword(passwd); ics.setLagCompensation(true); ics.connect(); } catch (java.net.UnknownHostException e) { e.printStackTrace(); } catch (java.io.IOException e) { e.printStackTrace(); } } } COM: <s> if not already connected this will establish a connection to the </s>
funcom_train/40531205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVehicle(int entranceNumber, String regNo, String buildingName){ t.debug("EventExec: Vehicle Added"); ICS ics = new ICS(entranceNumber, regNo, buildingName, false); ICSList.add(ics); try { Thread.sleep(3000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } icsContainer.addICS(ics); //ics.startCar(); } COM: <s> creates a vehicle for the simulation </s>
funcom_train/37229048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAssigningFacilityName( String sNamespaceId ) { HDElement e = new HDElement( iLevel + 1, this ); e.setNamespaceId( sNamespaceId ); e.setName( "CX.6" ); try { setComponent( e, 6 ); } catch( MalformedFieldException mfe ) { mfe.printStackTrace(); } } COM: <s> set just the namespace id of the assigning facility </s>
funcom_train/45933356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseObjectType bookmarkKeywords(BookmarkKeywordsRequest parameters) { ResponseObject responseObject = keywordService.bookmarkKeywords( IdentificationSdoHelper.fromIdentificationType(parameters.getIdentification()), parameters.getRequestId(), parameters.getKeywordIds().getKeywordIds()); return ResponseObjectSdoHelper.toRepsonseObjectType(responseObject); } COM: <s> interface to the bookmark keywords method in key word service </s>
funcom_train/51297200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addItem(GoodsItem item) { LinkedList<GoodsItem> items = new LinkedList<GoodsItem>(getGoods()); for (int i = 0; i < items.size(); i++) { GoodsItem itm = items.get(i); if (item.compareTo(itm) == 0) { itm.setCount(itm.getCount() + item.getCount()); return; } } } COM: <s> if sku is in the list its number gets increased by the number </s>
funcom_train/46528892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rysujZaleznoscCzasowa(Graphics g, Double con, Color c) { g.setColor(c); g.drawLine(x(0), y(con), x(maxValue), y(con)); g.drawOval(x(0) - 2, y(con) - 2, 4, 4); g.drawOval(x(maxValue) - 2, y(con) - 2, 4, 4); } COM: <s> draw constant value on the chart of time function </s>
funcom_train/21996527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void listen() throws IOException { byte[] buf = new byte[SENDRECV_BUFSIZE]; DatagramPacket packet = new DatagramPacket(buf, buf.length); log.debug("listening for datagram on port " + sock.getLocalPort()); sock.receive(packet); //TODO: launch separate thread to process the packet connection handleRequest(packet); } COM: <s> make a single attempt at listening for a datagram no loop </s>
funcom_train/43471378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseEntityMassagers(String pstrPattern) { digester.addObjectCreate(pstrPattern, ArrayList.class); digester.addObjectCreate(pstrPattern + "/entitymassager", PFENTITYMASSAGERS_CLAZZ); // this will set all of the bean property avaiable in the page digester.addSetNestedProperties(pstrPattern + "/entitymassager"); digester.addSetNext(pstrPattern + "/entitymassager", "add"); } COM: <s> this will parse entitymassagers that appear in pfactions entities </s>
funcom_train/21302720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SetType getSet(EntryType entry, String id) { // each set must have a ID and this must be unique, we just have to find it for (SetType set : entry.getSet()) { if (set.getId().equalsIgnoreCase(id)) { return set; } } // return null if the set was not found return null; } COM: <s> finds the set with the specified id </s>
funcom_train/45231962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteTmembertrainingWizard() { int index = tableTmembertraining.getSelectedRow(); if (index == -1) { JOptionPane.showMessageDialog(frame, "You must select a row before deleteing", "Selection Error", JOptionPane.ERROR_MESSAGE); } else { tableTmembertraining.remove(index); Tmembertraining ru = allTmembertraining .get(index); session = HibernateUtil.beginTransaction(); session.delete(ru); selectedTmember.getTmembertraining().remove(ru); session.saveOrUpdate(selectedTmember); HibernateUtil.commitTransaction(); rowsTmembertraining.remove(index); tableTmembertraining.addNotify(); } } COM: <s> delete tmembertraining wizard </s>
funcom_train/17141604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFromString(String input) { if (input.length() != dimension) { throw new IllegalArgumentException("Found " + (input.length()) + " possible coordinates: " + "expected " + dimension); } for (int i = 0; i < dimension; ++i) { if (input.charAt(i) == '1') bitSet.fastSet(i); } } COM: <s> writes vector from a string of the form 01001 etc </s>
funcom_train/18751420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TemporalFormula createExistsFinally(TemporalFormula operand) throws FormatException { // EF(phi) <==> E(true U phi) List<TemporalFormula> operandList = new ArrayList<TemporalFormula>(); operandList.add(new True()); operandList.add(operand); CTLStarFormula factory = TemporalFormula.getFactory(); TemporalFormula until = factory.createUntil(operandList); return factory.createExists(until); } COM: <s> creates an equivalent exists formula from the current exists formula </s>
funcom_train/28225000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void terminateGlobalMeeting() { Iterator<Agent> peopleIt = world.getPeople().iterator(); while (peopleIt.hasNext()) { Agent p = peopleIt.next(); if (((Text) p.get(EVENT)).toString().equalsIgnoreCase( "ConferenceRoomMeeting")) { p.set(EVENT, new Text("GlobalMeetingEnded")); } } } COM: <s> finish a meeting by changing the event in the involved agents </s>
funcom_train/2585667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRowCount() { DefaultCategoryDataset underlying = new DefaultCategoryDataset(); SlidingCategoryDataset dataset = new SlidingCategoryDataset(underlying, 10, 5); assertEquals(0, dataset.getRowCount()); underlying.addValue(1.0, "R1", "C1"); assertEquals(1, dataset.getRowCount()); underlying.clear(); assertEquals(0, dataset.getRowCount()); } COM: <s> some checks for the get row count method </s>
funcom_train/51406428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getFleschKincaidGradelLevelNotIncludingFragments() { double fleschKincaidGradeLevel = 0.0; fleschKincaidGradeLevel = ((0.39 * ((double) wordsInFileNotIncludingFragments / (double) sentencesInFile)) + (11.8 * getSyllablesPerWordInFile())) - 15.59; if (fleschKincaidGradeLevel < 0) { fleschKincaidGradeLevel = 0; } return fleschKincaidGradeLevel; } COM: <s> calculate and return the files flesch kincaid grade level score </s>
funcom_train/26085737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String datasetRowToString(Comparable<?>[] row) { String rowString = ""; for (int i = 0; i < row.length; i++) { rowString += row[i].toString(); rowString += (i == row.length - 1) ? "" : "\t"; } rowString += System.getProperty("line.separator"); return rowString; } COM: <s> composes a string from a dataset row that resides in a table </s>
funcom_train/26188543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastScanDate(final Date last_scan_date) { final Date old_last_scan_date = this.last_scan_date; this.last_scan_date = last_scan_date; event_dispatcher.lastScanChanged(this, old_last_scan_date, last_scan_date); } COM: <s> sets this medias last scan date </s>
funcom_train/878319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector getCreationTypes() { Vector out = new Vector(); Vector creationAbilities = getHasCreationAbility(); ItemCreationAbilityImpl ability; for (int i=0; i<creationAbilities.size(); i++){ ability = (ItemCreationAbilityImpl)creationAbilities.elementAt(i); out.addAll(ability.getAllowsCreationOf()); } return out; } COM: <s> determine what items can be created by this person </s>
funcom_train/22166972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signedExtend(int newLength) { if (newLength <= value.length) return; boolean[] newValue = new boolean[newLength]; System.arraycopy(value, 0, newValue, newLength - value.length, value.length); if (value[0]) { for (int i = 0; i < newLength - value.length; i++) { newValue[i] = true; } } value = newValue; } COM: <s> extends this bit sequence to the new length using the sign bit </s>
funcom_train/7867547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAbout() { AboutDialog ad = new AboutDialog(this, "About Peptizer"); Point p = this.getLocation(); Point result = new Point((int) (p.x + this.getWidth() / (6)), (int) (p.y + this.getHeight() / 5)); ad.setLocation(result); ad.setVisible(true); } COM: <s> this method shows the about dialog </s>
funcom_train/33259797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCalendar() { guiRun(new Runnable() { public void run() { String date = getDateString(SchedulerTableItem.this.calendar); String time = getTimeString(SchedulerTableItem.this.calendar); SchedulerTableItem.this.tableItem.setText(SchedulerView.DATE_COLUMN, date); SchedulerTableItem.this.tableItem.setText(SchedulerView.TIME_COLUMN, time); } }); } COM: <s> sets the calendar entry for the current table </s>
funcom_train/40547801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document unarchiveOrder(String orderNumber) throws ProtocolException { try { UnarchiveOrderElement unArchiveReqeust = _objectFact.createUnarchiveOrderElement(); unArchiveReqeust.setGoogleOrderNumber(orderNumber); return convertToDOM(unArchiveReqeust); } catch (JAXBException jaxbEx) { throw new ProtocolException(jaxbEx.getMessage()); } } COM: <s> the b unarchive order b method creates the xml request for an </s>
funcom_train/25915279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startVerticalLine(long now, float x, float y) { for (BallRegion region : mRegions) { if (region.canStartLineAt(x, y)) { region.startVerticalLine(now, x, y); return; } } throw new IllegalArgumentException("no region can start a new line at " + x + ", " + y + "."); } COM: <s> start a vertical line at a certain point </s>
funcom_train/18008814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkBoard(Board board) { Zone[] zones=board.getZones(); assertEquals("standard board should have expected number of zones", 83, zones.length); for (int i=0; i<zones.length; i++) { assertNotNull("persistent board zones have an id", zones[i].getId()); } } COM: <s> p utility method to check if given board matches the standard </s>
funcom_train/44853234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEmbedded() { try { String lUserID = get(KEY_DB_USER); String lPWrd = get(KEY_DB_PW); return (lUserID == null ? true : lUserID.length() == 0) && (lPWrd == null ? true : lPWrd.length() == 0); } catch (IOException exc) { // intentionally left empty } return false; } COM: <s> checks whether the application is started in embedded mode </s>
funcom_train/39536644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLabel(String baseString){ String returnLabel=baseString; if(baseString!=null){ //getting the set of the ids of the siblings of the current node HashSet<String> siblingLabels=getSiblingLabels(getJWidgetElement(), null); //computes the first id that is not already used for(int i=0; i<siblingLabels.size(); i++){ returnLabel=baseString+(i+1); if(! siblingLabels.contains(returnLabel)){ break; } } } return returnLabel; } COM: <s> creates and returns a unique label in the application given a base string </s>
funcom_train/3517724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(String votingName, String question, Integer[] result, String[] voteTypes, int numberVoters) { this.votingName = votingName; this.question = question; this.result = result; this.voteTypes = voteTypes; this.numberVoters = numberVoters; repaint(); } COM: <s> paints a pie diagram for the result of the vote </s>
funcom_train/5601982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOptionGroupDuplication() { String help = unifyNewLines(getFormattedHelp()); String expectedHelp = unifyNewLines(new String("usage: syntax [-a | -b]\n-a,--Aa option A\n-b,--Bb option B\n")); assertEquals("expected usage to be '" + expectedHelp + "' instead of '" + help + "'", expectedHelp, help); } COM: <s> the set up above used to print a b a b </s>
funcom_train/18722078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMinimumSimilarity(int row) { float minSimilarity = 1f; int minIndex = -1; for (int i = 0; i < dimension; i++) { if (i != row) { float similarity = getSimilarity(i,row); if (similarity<minSimilarity) { minSimilarity = similarity; minIndex = i; } } } return minIndex; } COM: <s> returns the index of the col with minimum similarity to the given row </s>
funcom_train/15406444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JsonWriteOptions copy() { JsonWriteOptions copy = new JsonWriteOptions(); copy.callback = callback; copy.valueAdapter = valueAdapter; copy.pathProperties = pathProperties; if (visitorMap != null) { copy.visitorMap = new HashMap<String, JsonWriteBeanVisitor<?>>(visitorMap); } return copy; } COM: <s> this creates and returns a copy of these options </s>
funcom_train/49863903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String TakeSnap() { String file_name = CreateFileNameByTime("pics"); file_name += ".jpg"; Image snapshot; snapshot = getImage(); if (snapshot != null) { if (!saveSnapshot(snapshot, file_name)) { return null; } } else { return null; } return file_name; } COM: <s> saves current frame into a file </s>
funcom_train/22368661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLyricsEnginesInfo(List<ILyricsEngineInfo> list) { List<ILyricsEngineInfo> copy = new ArrayList<ILyricsEngineInfo>(); for (ILyricsEngineInfo lyricsEngineInfo : list) { copy.add(lyricsEngineInfo.copy()); } ((LyricsEnginesTableModel) enginesTable.getModel()).setLyricsEnginesInfo(copy); } COM: <s> sets the lyrics engines info </s>
funcom_train/5584089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeLength(int value) throws IOException { if (value <= 0xFFFFFF) { for (int i = 0; i < 3; i++) { int offset = (2 - i) * 8; this.outputstream.write((byte) ((value >>> offset) & 0xFF)); } } else { throw new IOException("Block length is too large."); } } COM: <s> writes the length of the block as 3 byte value </s>
funcom_train/13955470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String plurifiedString(String name, int count) { if (name != null) { NSKeyValueCoding exceptions = (NSKeyValueCoding) valueForKey(KEY_LOCALIZER_EXCEPTIONS); if (exceptions != null) { String exception = (String) exceptions.valueForKey(name + "." + count); if (exception == null) { exception = (String) exceptions.valueForKey(name); } if (exception != null) { return exception; } } } return plurify(name, count); } COM: <s> returns a plurified string </s>
funcom_train/7368478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyAction(final int action, final Object obj) { // Notify each of the observers final Enumeration enm = observers.elements(); while (enm.hasMoreElements()) { ((StoreObserver) enm.nextElement()).actionDone(action, obj, this); } } COM: <s> notifies all observers of the store about action on the object </s>
funcom_train/16605467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishBlock() throws IOException { if (outMode == OutMode.HEADER) { out.flush(); out.close(); header = ((ByteArrayOutputStream) out).toByteArray(); } else if (outMode == OutMode.FOOTER) { out.flush(); out.close(); footer = ((ByteArrayOutputStream) out).toByteArray(); } else { throw new IllegalStateException(); } outMode = OutMode.START; out = null; } COM: <s> finish a header or footer block </s>
funcom_train/37083159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataAdapterUI getUI(IOOperation op) { DataAdapterUI ui = (DataAdapterUI)syntenyOpToUI.get(op); if (ui == null) { ui = new SyntenyAdapterGUI(op, this); syntenyOpToUI.put(op,ui); } return ui; } COM: <s> gets ui for op from cache </s>
funcom_train/11728505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDocOrderFirstFunction() throws Exception { String xpath = xpathRoot + "/*[first()]"; String resultPath = testRootNode.getNodes().nextNode().getPath(); docOrderTest(new Statement(xpath, Query.XPATH), resultPath); } COM: <s> tests the code first code function </s>
funcom_train/14355133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addItem(OrderItemTO item) { if (orderBTO.getOrderItems().containsKey( new Integer(item.getProductID()))) { orderBTO.addItem(item); } else { orderBasket.add(item); orderBTO.addItem(item); } log.info("Add Item to the Order Basket :"+item.getProductID()); setTotalPrice(); return "updateItemToOrder"; } COM: <s> method name add item </s>
funcom_train/35498790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JLabel getMasterJobConnectionImage(boolean connection) { if (!firstTimeMasterConnectionImage) jPanel6.remove(masterJobConnectionImage); int tipo = 0; if (connection) tipo = 1; masterJobConnectionImage = new MyConnectionLabel(tipo); masterJobConnectionImage.setPreferredSize(new java.awt.Dimension(224, 202)); masterJobConnectionImage.repaint(); jPanel6.add(masterJobConnectionImage); return masterJobConnectionImage; } COM: <s> inizio parte immagini connected disconnected </s>
funcom_train/39915642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTextField32() { System.out.println("getTextField32"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getTextField32(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get text field32 method of class timesheetmanagement </s>
funcom_train/5304702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintConnector(Color fg, Color bg, Graphics g) { g.setColor(fg); g.setXORMode(bg); paintPort(jgraph.getGraphics()); if (firstPort != null && start != null && current != null) { g.drawLine((int) start.getX(), (int) start.getY(), (int) current.getX(), (int) current.getY()); } } COM: <s> use xor mode on graphics to paint connector </s>
funcom_train/33265581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gadget add( Gadget gadget, int i ) { Gadget rtn; if ( gadget instanceof ListGridItem ) { rtn = super.add(gadget,i); } else { rtn = super.add(new ListGridItem(this,gadget,itemBorder),i); } invalidate(); return rtn; } COM: <s> adds a gadget to the list </s>
funcom_train/38868621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void formatTest() { LatLon ll; ll = new LatLon(45.5f, 110.0f); ll.setFormat("lat=%5.2f","lon=%6.2f"); ll.setDelimiter(" and "); Assert.assertEquals("lat=45.50 and lon=110.00", ll.toString()); } COM: <s> test display format and other misc stuff </s>
funcom_train/18183524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxConnections() throws ResourceException { if (log.isTraceEnabled()) { log.trace("ENTER/EXIT: getMaxConnections()[" + getManagedConnectionImpl().getManagedConnectionFactoryImpl().getRecaptchaMaxConnections() + "]"); } checkSetup(); return getManagedConnectionImpl().getManagedConnectionFactoryImpl().getRecaptchaMaxConnections(); } COM: <s> gets this resource adapters max connections as defined in ra </s>
funcom_train/49160171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { // Remove trailing end-lines while (count >= 0) if (buf[count - 1] == '\n' || buf[count - 1] == '\r') count--; else break; if (count == 0) { return; } // OK, we have more than a new line // Let's go final byte[] theBytes = new byte[count]; System.arraycopy(buf, 0, theBytes, 0, count); logger.log(level, new String(theBytes)); reset(); } COM: <s> flushes this output stream and forces any buffered output bytes to be </s>
funcom_train/43324364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performFinish() { //save our selection state mainPage.saveWidgetValues(); // if we're finishing from the main page then perform finish on the selected wizard. if (getContainer().getCurrentPage() == mainPage) { if (mainPage.canFinishEarly()) { IWizard wizard = mainPage.getSelectedNode().getWizard(); wizard.setContainer(getContainer()); return wizard.performFinish(); } } return true; } COM: <s> the user has pressed finish </s>
funcom_train/46760457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RecordItemModel getRecordItem(final long recordItemId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ClinicalData.getRecordItem(recordItemId, chain, call); }}; return (RecordItemModel) call(method, call); } COM: <s> same transaction return the single record item model for the primary key </s>
funcom_train/30239037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String serializeCollection(Collection<?> v, Shuttle s){ String out = "a:"+v.size()+":{"; int i =0; for (Object o : v) { try { out += serializeIntegerNoRef(i++,s); // serialize the array index out += serializeByType(o,s); } catch (Exception e) { log("ARRAY serialization error: "+e); e.printStackTrace(); return null; } } out += "}"; return out; } COM: <s> serialize collections into php </s>
funcom_train/2635711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMembershipValue(double universalValue) { if (universalValue > this.modalValue) { // R-Function return this.Rfunction.getValue( universalValue - this.modalValue ); } if (universalValue < this.modalValue) { // L-function return this.Lfunction.getValue( this.modalValue - universalValue ); // we need positive value, because L function is defined for positive values } return 1; // else - it's exactly for modal value -> 1 } COM: <s> calculates value of fuzzy numbers membership function for wanted universal value </s>
funcom_train/599252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String executeAndRead(String relativeSlgenFileName) throws IOException, MojoExecutionException { String ret; // cut slgen-extension and velocity-extension String relativeOutputFilename = getOutputFilename(relativeSlgenFileName); File outputFile = getOutputFile(relativeOutputFilename); ret = executeAndRead(relativeSlgenFileName, outputFile.getAbsolutePath()); return ret; } COM: <s> creates prepares and executes a task and reads the generated content </s>
funcom_train/26219551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSchemeCreate() { int i = 0; long start = System.currentTimeMillis(); for (i = 0; i < 1000; i++) { Scheme s = new Scheme(); s.getStringInput("(* 3 3)"); } // end of the for ... long end = System.currentTimeMillis(); System.out.println( "[Scheme-Create-Instance]-->" + (end - start) + " ms."); } // end of the method ... COM: <s> test if creating multiple scheme objects hurts performance </s>
funcom_train/25457487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCBProbConst() { if (CBProbConst == null) { CBProbConst = new JCheckBox(); CBProbConst.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { ProbProtected.setEnabled(CBProbConst.isSelected()); parentPane.setConstProb(CBProbConst.isSelected()); } }); } return CBProbConst; } COM: <s> this method initializes cbprob const </s>
funcom_train/31818200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent event) { // check params if( event == null ) return; // change the status of the buttons and of the menues // depending on the selection on the list boolean enable = false; if( this.agletList.getItemCount() > 0 ) enable = true; else enable = false; // enable/disable conditional elements this.menuBar.enableConditionalItems(enable); this.toolBar.enableConditionalButtons(enable); } COM: <s> manages events from the agent list panel </s>
funcom_train/28147363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BDD getOrderBDD(String cnfFileName, String ordFileName) { this.fileNameControl(cnfFileName, ".cnf"); // No specific extension for order files. // this.fileNameControl(ordFileName, ".ord"); this.fileNameControl(ordFileName); Parser parser = new Parser(this, cnfFileName); return parser.BDDMaker(parser.formatCnf(), ordFileName); } COM: <s> method get order bdd </s>
funcom_train/35166016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perspective(float fovY, float aspect, float near, float far) { float h = (float) Math.tan(fovY) * near * .5f; float w = h * aspect; frustum(-w, w, h, -h, near, far); } COM: <s> sets the view frustum to perspective projection </s>
funcom_train/4953402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generatePackageRunItems(BufferedWriter buf, String packageName) throws IOException { int idx = th.getRuns().size(); for (TestRun tr : th.getRuns()) { TestPackage tp = tr.getTestPackages().get(packageName); if (null != tp) { generatePackageRunItem(buf, tp, idx, tr); } idx--; } } COM: <s> this method creates the list of runs for a specific package </s>
funcom_train/21465499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTheSameAs(ActionInstance otherActionInstance) { if (this.associatedAction.isSimilar(otherActionInstance .getAssociatedAction())) { // both have a similar action if (this.getParameters().size() == otherActionInstance .getParameters().size()) { // both have the same number of parameters return this.getParameters().containsAll( otherActionInstance.getParameters()); } } return false; } COM: <s> validates if another action instance is the same as this one two action </s>
funcom_train/48045887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTimeFormatterBuilder padNext(int padWidth, char padChar) { if (padWidth < 1) { throw new IllegalArgumentException("The pad width must be at least one but was " + padWidth); } active.padNextWidth = padWidth; active.padNextChar = padChar; active.valueParserIndex = -1; return this; } COM: <s> causes the next added printer parser to pad to a fixed width </s>
funcom_train/14596871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TopoData getTopoData(String encodedUrl) { switch (mode) { case DEFAULT: case ISOLATED: case SMART: return identifier.isInternal(encodedUrl) ? internal : external; case INTERNAL_ONLY: return internal; case EXTERNAL_ONLY: return external; default: throw new RuntimeException("unexpected error: invalid mode " + mode); } } COM: <s> returns the internal code topo data code for internal documents </s>
funcom_train/44870438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTopPanel() { if (topPanel == null) { addLabel = new JLabel(); addLabel.setText("Drawable Types: "); topPanel = new JPanel(); topPanel.setLayout(new BoxLayout(getTopPanel(), BoxLayout.X_AXIS)); topPanel.add(addLabel, null); topPanel.add(getAddComboBox(), null); topPanel.add(getAddButton(), null); } return topPanel; } COM: <s> this method initializes top panel </s>
funcom_train/4291086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferencedEntityPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Identifier_referencedEntity_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Identifier_referencedEntity_feature", "_UI_Identifier_type"), IdentificationPackage.Literals.IDENTIFIER__REFERENCED_ENTITY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the referenced entity feature </s>
funcom_train/4715081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayType getArrayType(String elemType, int dimention){ for(Type type : this.typesMap.values()){ if(type.getName().equals("array")){ ArrayType temp = (ArrayType) type; if(temp.getElemType().getName().equals("class")){ if((((ClassType)temp.getElemType()).getIcClass().getName().equals(elemType)) && (temp.getDimension() == dimention)){ return temp; } } } } return null; } COM: <s> used only to create arrays of class types </s>
funcom_train/51143193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAllComparismStars(List comparismStars) { // List is null or empty if( (comparismStars == null) || (comparismStars.size() == 0) ) { return false; } // Add each entry seperatly to ensure it is a Float and not Float.NaN ListIterator iterator = comparismStars.listIterator(); String current = null; while( iterator.hasNext() ) { current = (String)iterator.next(); this.addComparismStar(current); } return true; } COM: <s> adds a list of comparism stars to this finding </s>