__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41332725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TwoColors getTexturedButtonBorderColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonBorderDisabled; case DISABLED_SELECTED: return texturedButtonBorderDisabledSelected; case ENABLED: return texturedButtonBorderEnabled; case PRESSED: return texturedButtonBorderPressed; case DEFAULT: return texturedButtonBorderDefault; case SELECTED: return texturedButtonBorderSelected; case DEFAULT_PRESSED: return texturedButtonBorderDefaultPressed; case PRESSED_SELECTED: return texturedButtonBorderPressedSelected; } return null; } COM: <s> get the colors for the border </s>
funcom_train/25647968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStateStatus(State state, StateStatus status) { switch (status) { case PASSED : setStateStatus(state, FocusType.SUCCESS_FOCUS); break; case FAILED : setStateStatus(state, FocusType.FAILED_FOCUS); break; case NOT_EXECUTED : setStateStatus(state, FocusType.NO_FOCUS); } } COM: <s> updates the visual appearance of the state on screen based on state status </s>
funcom_train/1953121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSDAPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_I2CBusSegment_SDA_feature"), getString("_UI_PropertyDescriptor_description", "_UI_I2CBusSegment_SDA_feature", "_UI_I2CBusSegment_type"), I2cPackage.Literals.I2C_BUS_SEGMENT__SDA, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the sda feature </s>
funcom_train/6348017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void floodFill(Point start) { try { int match = image.getRGB(start.x, start.y), paint = offg.getColor() .getRGB(); if (match == paint) return; recurseFlood(start.x, start.y, match, paint); } catch (Error e) { // catch memory errors and other stuff e.printStackTrace(System.err); } repaint(); } COM: <s> flood fill starting at a given point using current color </s>
funcom_train/1598579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPropertyValue(Object component, int property) { StereoVolume volume = (StereoVolume)component; short result; switch (property) { case 0: result = volume.getLeft(); break; case 1: result = volume.getRight(); break; default: throw new IllegalArgumentException("unknown property: " + property); } return new Short(result); } COM: <s> look up the value of one of the properties making up this composite </s>
funcom_train/20479596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSetting(PropertyEntry pe) { sLog.info("" + pe.getKey() + "=" + pe.getValue()); onContentChanged(); Property.setProperty(pe.getKey(), pe.getValue()); Editor er = prefs.edit(); er.putString(pe.getKey(), pe.getValue()); if (!er.commit()) { sLog.warning("Failed to commit preferences update"); } } COM: <s> updates the settings in the runtime and in shared preferences </s>
funcom_train/8486959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbLevel() { if (cbLevel == null) { cbLevel = new JComboBox(); cbLevel.setLocation(new Point(10, 100)); cbLevel.setSize(new Dimension(170, 25)); cbLevel.addItem("Hard"); cbLevel.addItem("Medium"); cbLevel.addItem("Easy"); cbLevel.addItem("Very Easy"); cbLevel.setSelectedItem((String)"Easy"); } return cbLevel; } COM: <s> this method initializes cb level </s>
funcom_train/18954847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public final void debugDefault() { logger.debug("ID = " + ID); logger.debug("creator = " + creator); logger.debug("creationDate = " + String.valueOf(creationDate)); logger.debug("modifiedDate = " + String.valueOf(modifiedDate)); logger.debug("description = " + description); } COM: <s> this method sends debug data to the logger for the debug mode </s>
funcom_train/2713136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int marked() { if (markPosition <= readPosition) { // any space between the markPosition and // the first write is marked. In this case i // is all in one piece. return (readPosition - markPosition); } else { // space at the beginning and end. return (buffer.length - (markPosition - readPosition)); } } COM: <s> characters saved for supporting marks </s>
funcom_train/29720668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsVisibleWorkProductInstanciationPanel() { Project project = this.projectService .getProject((String) WebSessionService .getAttribute(WebSessionService.PROJECT_ID)); Process process = this.projectService.getProcessFromProject(project); if (process != null) { this.isVisibleWorkProductInstanciationPanel = true; } else { this.isVisibleWorkProductInstanciationPanel = false; } return this.isVisibleWorkProductInstanciationPanel; } COM: <s> getter of is visible work product instanciation panel boolean attribute </s>
funcom_train/8085794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setFormat() { for (int i = 0; i < m_OutputFormatClasses.size(); i++) { if (m_OutputFormatNames.get(i).toString().equals( m_OutputFormatComboBox.getItemAt(i).toString())) { m_OutputFormatComboBox.setSelectedIndex(i); break; } } } COM: <s> sets the class of the chosen result matrix </s>
funcom_train/5853924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean writePacket (String message) { try { if ( m_os != null ) { m_os.write(message.getBytes()); return true; } } catch (IOException e) { printError("[SerialReadWrite.writePacket] Unable to write data to FOB"); } return false; } COM: <s> write a string to the serial port as a byte array </s>
funcom_train/46733874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInvoiceText(String invoiceText) { if (Converter.isDifferent(this.invoiceText, invoiceText)) { String oldinvoiceText= null; oldinvoiceText = this.invoiceText; this.invoiceText = invoiceText; setModified("invoiceText"); firePropertyChange(String.valueOf(INVOICES_INVOICETEXT), oldinvoiceText, invoiceText); } } COM: <s> text printed on the invoice </s>
funcom_train/3134028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return (scheme.length() > 0 ? scheme +"://": "") + (domain.length() > 0 ? domain + (port > 0 ? ":"+port : "") : "")+ getPath() + (param.size() > 0 ? param : "")+ (query.length()>0?"?"+query :""); } COM: <s> this is used to convert this uri object into a code string code </s>
funcom_train/3740165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMobilePhone(AllUser user) throws UserManagerException { String ret=null; try { Session sess= HibernateUtil.currentSession(); if (user.getUser()==null) { ret = user.getDeletedUser().getMobile(); } else { ret = user.getUser().getMobile(); } } catch (HibernateException e) { throw new UserManagerException(); } return ret; } COM: <s> return mobile field of the given user </s>
funcom_train/3289703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSetString(String key) { log.debug("getSetString("+key+")"); Vector v=(Vector)setvalues.get(key); if (v!=null) { String result=""; Enumeration res=v.elements(); while (res.hasMoreElements()) { String tmp=(String)res.nextElement(); if (result.equals("")) { result=tmp; } else { result+=","+tmp; } } return(result); } else { log.error("getSetString("+key+"): ERROR: this key is non-existent!"); return(null); } } COM: <s> returns the session variable values comma separaterd </s>
funcom_train/17196089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConsistent() { boolean result = true; if (this.types.size() == 0) { log.warn("property " + getName() + " has no types"); result &= false; } // // FIXME if inverse: class should know it // if (inverse != null) { // inverse.getFirstType().equals(this.getJClass()); // } return result; } COM: <s> apply consistency checks to this jproperty </s>
funcom_train/43245086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPatientIEN() { System.out.println("getPatientIEN"); EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); String expResult = ""; String result = instance.getPatientIEN(); 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 patient ien method of class org </s>
funcom_train/24553862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getAddCommand(ChangeBoundsRequest request) { EditPart beforePart = findBeforePart(findIndexOfTreeItemAt(request.getLocation()), Collections.EMPTY_LIST, getHost().getChildren()); return containerPolicy.getAddCommand(ContainerPolicy.getChildren(request), beforePart != null ? beforePart.getModel() : null).getCommand(); } COM: <s> add the children at the location of the request </s>
funcom_train/4416965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number)object).intValue() : Integer.parseInt((String)object); } catch (Exception e) { throw new JSONException("JSONObject[" + quote(key) + "] is not an int."); } } COM: <s> get the int value associated with a key </s>
funcom_train/25524475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addGroup(Group group) { // Critical region, so lock. synchronized(getJlGroups()) { // Get the list model for the group list. DefaultListModel m = ((SortedListModel)getJlGroups().getModel()).getUnsortedList(); // Add the group. m.add(m.size(), group); } } COM: <s> add a group </s>
funcom_train/46157258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeQuery(TimelineQueryID id) { TimelineResultHolder res = resultsRef.get().remove(id); if (res != null) { // unregister with the registry TimelineProviderRegistry.getInstance().unregister(id); // notify listeners for (TimelineProviderComponentMOListener l : listenersRef.get()) { l.resultRemoved(res); } } return (res != null); } COM: <s> remove a query from the system </s>
funcom_train/10599409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ParamSaxBuffer getMessage(String key, ParamSaxBuffer defaultValue) { SaxBuffer value = getMessage(currentCatalogueId, key); if (value == null) { getLogger().debug("Untranslated key: '" + key + "'"); return defaultValue; } return new ParamSaxBuffer(value); } COM: <s> helper method to retrieve a message from the current dictionary </s>
funcom_train/3543140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLook(Look look) { setBackground(look.getBackground()); setForeground(look.getForeground()); setFont(look.getFont()); downButton.setLook(look); editor.updateLook(); popup.setLook(look); border.color = look.getGridColor(); repaint(); } COM: <s> method required by the table filter header to setup the editor </s>
funcom_train/14157018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(ClockElement ce) throws IllegalArgumentException { if (ce == null || id == null || ce.id == null || !ce.id.equals(id)) throw new IllegalArgumentException("Null value in 'compare' of CLockElement !"); if (value > ce.value) return 1; if (value < ce.value) return -1; return 0; } COM: <s> compare two clock element </s>
funcom_train/22790851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getJTextPane() { if (jTextPane == null) { jTextPane = new JTextPane(); jTextPane.setBounds(28, 27, 240, 93); jTextPane.setText("Arabic Dictionary version 1.0\n\n This software is intended to be used as freeware, it is not a part of a bundle of any kind of software"); jTextPane.setEditable(false); jTextPane.setEnabled(false); jTextPane.setBackground(new java.awt.Color(204,204,204)); } return jTextPane; } COM: <s> this method initializes j text pane </s>
funcom_train/18457770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidComponent() { DialogFinder finder = new DialogFinder(null); JFrame frame = createJFrame(getName()); JDialog dialog = new JDialog(frame, null); setWindow(dialog); packAndShow(dialog); assertFalse("Finder is not working", finder.testComponent(frame)); } COM: <s> tests the test component method for invalid component </s>
funcom_train/19434276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean buttonClicked( Axis ax ) { long checkTime = System.currentTimeMillis(); if ( checkTime - lastInputGetTime > BUTTON_PRESS_DELAY ) { if ( !ax.isAnalog() ) { if ( ax.getPollData() == 1.0f ) { lastInputGetTime = System.currentTimeMillis(); return true; } } } return false; } COM: <s> p checks if the specified axis has been pressed </s>
funcom_train/38307475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addContentPhrase() throws DocumentHandlerException { try { if (phrase != null) { if (!phrase.isEmpty()) { numElements += 1; columnText.addElement(new Paragraph(phrase)); } phrase = null; } } catch (DocumentException ex) { throw new DocumentHandlerException(locator(), "Unable to add content to the <colmn-text> element."); } } COM: <s> adds the content phrase element to the pdf cell </s>
funcom_train/2867219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object arg0) { if(arg0.getClass().getName().equals(this.getClass().getName())){ if (! (this.connectionID == ((Customer)arg0).getConnectionID())){ return (int)(this.connectionID -((Customer)arg0).getConnectionID()); } } return 0; } COM: <s> compares corporate customer objects by their connection id </s>
funcom_train/18318636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reconnect(SimpleVertex source, SimpleVertex target) { if (this.source != null) { this.source.removeEdge(this); } if (this.target != null) { this.target.removeEdge(this); } this.source = source; this.target = target; target.addEdge(this); source.addEdge(this); } COM: <s> reconnect edge for new two vertices </s>
funcom_train/27682980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Log logForName(String logName) { for (Enumeration e = LogManager.getInstance().elements(); e.hasMoreElements(); ) { Log log = (Log) e.nextElement(); if (log.getName().equals(logName)) return log; } // Didn't find a log for the input name, return null return null; } COM: <s> helper method to find a log in the log manager given a string </s>
funcom_train/4211698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeInvitationListener(InvitationListener listener) { synchronized (invitationsListeners) { if (invitationsListeners.contains(listener)) { invitationsListeners.remove(listener); } // If there are no more listeners to notifiy for room invitations // then proceed to cancel/release this monitor if (invitationsListeners.size() == 0) { cancel(); } } } COM: <s> removes a listener to invitation notifications </s>
funcom_train/45918759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopTubeletLoader() { logger.info("Stopping Tubelet Loader..."); try { tubeletLoader.endPolling(); } catch (Exception e) { logger.error("Error while stopping Tubelet Loader.\n", e); } logger.info("Tubelet Loader stopped."); } COM: <s> stops the tubelet loader </s>
funcom_train/40944313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setApplication(Application application) { // If the application is not changed, dont do nothing if (application == this.application) { return; } // Sends detach event if the window is connected to application if (this.application != null) { detach(); } // Connects to new parent this.application = application; // Sends the attach event if connected to a window if (application != null) { attach(); } } COM: <s> sets the application this window is connected to </s>
funcom_train/50538259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onTestSuccess(ITestResult tr) { Class<?> real_class=tr.getTestClass().getRealClass(); addTest(real_class, tr); print(old_stdout, "OK: ", real_class.getName(), tr.getName()); } COM: <s> invoked each time a test succeeds </s>
funcom_train/48874823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Signature createSignature(String accession, String name, SignatureLibraryRelease release) { Model model = new Model(accession, name, null); return new Signature(accession, name, null, null, null, release, Collections.singleton(model)); } COM: <s> creates and returns an instance of signature </s>
funcom_train/13986898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String open() { // Create the dialog window Shell shell = new Shell(getParent(), getStyle()); shell.setText(getText()); shell.setLocation(getParent().toDisplay(200,200)); createContents(shell); shell.pack(); shell.open(); Display display = getParent().getDisplay(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } // Return the entered value, or null return ""; } COM: <s> opens the dialog and returns the input </s>
funcom_train/4990376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumn(int column) { if (column == this.propertyIndex) { // Same column as last sort; toggle the direction direction = 1 - direction; } else { // New column; do an ascending sort this.propertyIndex = column; direction = DESCENDING; } if (columnTypes != null && column >= columnTypes.length) { throw new IllegalArgumentException(Messages.TableSorter_0); } } COM: <s> sets the column </s>
funcom_train/41299561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtons() { if (Buttons == null) { Buttons = new JPanel(); Buttons.setLayout(new BoxLayout(getButtons(), BoxLayout.X_AXIS)); Buttons.setPreferredSize(new Dimension(10, 30)); Buttons.add(getNewDir(), null); Buttons.add(getNewLink(), null); } return Buttons; } COM: <s> this method initializes buttons </s>
funcom_train/22098885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { final byte[] buf = new byte[SIZE]; int length; try { while ((length = is.read(buf)) > 0) { os.write(buf, 0, length); try { Thread.sleep(SLEEP); } catch (InterruptedException e) {} } } catch(IOException e) {} } COM: <s> copies data from the input stream to the output stream </s>
funcom_train/20814193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String remove(String key) { if (root == null) return null; try { Node node = getDom().selectSingleNode(root, key); if (node != null) { String value = getDom().getNormalizedValue(node); if (node.getNodeType() == Node.ATTRIBUTE_NODE) ((Attr)node).getOwnerElement().removeAttribute(node.getNodeName()); else node.getParentNode().removeChild(node); return value; } } catch(Exception e) { throw new RuntimeException(e); } return null; } COM: <s> removes the element text or attribute that matches the supplied xpath expression </s>
funcom_train/45388815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawArc(Object gfx,int x,int y,int width,int height,int startAngle,int arcAngle){ Graphics g =(Graphics)gfx; g.drawArc(x, y, width, height, startAngle, arcAngle); } COM: <s> draws the outline of a circular or elliptical arc covering the specified rectangle </s>
funcom_train/24569784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(List<ValidationMessage> messages) { checkModifiable(); checkNotNull(messages, "The messages list must not be null."); for (ValidationMessage message : messages) { checkArgument(message.severity() != Severity.OK, "You must not add a validation message with severity OK."); } messageList.addAll(messages); } COM: <s> adds all messages from the given list to this validation result </s>
funcom_train/20984111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activate(boolean status) { if (!status) { setExtendedState(JFrame.ICONIFIED); MetaInfoUpdater.getUpdater().stopAutoUpdate(); } else { setVisible(status); setExtendedState(JFrame.NORMAL); MetaInfoUpdater.getUpdater().startAutoUpdate(); requestFocus(); } } COM: <s> opens or hides minimises or if tray present do unvisible window doing </s>
funcom_train/22140746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createNewFlashCard(FlashCard card){ getFlashCardService().create(card.getSourceWord(), card.getSourceLanguageCode(), card.getTargetWord(), card.getTargetLanguageCode(), card.getTags()); //XXX M: as long as no exception handling/hierarchy is set up, just return "success" return "success"; } COM: <s> create a new flashcard </s>
funcom_train/15914258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int kbNameIdGet( String kbName ) throws NotFoundException { Integer idObj = (Integer)kbNameIds.get( kbName ); if ( null == idObj ) { throw new NotFoundException("no id for kb-name \""+kbName+"\""); } return idObj.intValue(); } COM: <s> get id for knowledgebase name </s>
funcom_train/49199433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLocalCopyPathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DSpaceText_localCopyPath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DSpaceText_localCopyPath_feature", "_UI_DSpaceText_type"), DspaceMetamodelPackage.Literals.DSPACE_TEXT__LOCAL_COPY_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the local copy path feature </s>
funcom_train/23239580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeback() { if (curr_ef_r) { writeulong(curr_d, curr_new_result); } if (curr_ef_z) z_flag = curr_new_z; if (curr_ef_c) c_flag = curr_new_c; cog_status = COG_STATUS_PIPE0; pc = curr_new_pc; curr_op = curr_new_op; hubSynchronized = false; } COM: <s> writes back to memory </s>
funcom_train/44846272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String renderString(final String stringToRender, final Map<String, Object> contextObjects) { if (StringUtils.isBlank(stringToRender)) return ""; StringWriter stringWriter = new StringWriter(); renderString(stringWriter, stringToRender, contextObjects); stringWriter.flush(); IOUtils.closeQuietly(stringWriter); return stringWriter.toString(); } COM: <s> renders a string with respect of possible context objects </s>
funcom_train/37556007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeItem getParentItem () { checkWidget (); int hwnd = parent.handle; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM; tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_PARENT, handle); if (tvItem.hItem == 0) return null; OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem); return parent.items [tvItem.lParam]; } COM: <s> returns the receivers parent item which must be a </s>
funcom_train/42010481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getTotalSizeIndexed() { float res = 0f; try { pm.connect(); ManagementDB managementDB = new ManagementDB(pm.getSqlConnection()); res = managementDB.getTotalSizeIndexed(); } catch (Exception ex) { Logger.getLogger(IndexerStatics.class.getName()).log(Level.WARNING, null, ex); } return res; } COM: <s> get the total size of document indexed </s>
funcom_train/1355488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void simulate (double dt){ //TODO shift(vxy[0]*dt,vxy[1]*dt); //Rotation phi.add(dphi*dt); //Motors simMotors(dt); //Friciotn effects simFriction(dt); simSensors(); //brains simBrain(dt); //food-eating behavior eatFood(); //TODO move it to the body? } COM: <s> simulate bot movement </s>
funcom_train/22573862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLine(int i) throws AdtMessageParseException { if(i > 4) // only 4 total lines in a valid ADT message return null; if(this.getFullMessage() == null) return null; String[] parsed = this.getFullMessage().split("\n|\r"); if(parsed.length < i) return null; return parsed[i - 1]; } COM: <s> given an integer return that line </s>
funcom_train/10495907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Iterator getServices(Class<?> cls) { // check the registry List<Class<?>> classes = getClasses(cls); // return nothing if there are no hits if (classes == null) { return null; } // return the wrappered iterator return new OSGiServiceIterator(cls, classes); } COM: <s> return an iterator for instantiating all services matching </s>
funcom_train/46474177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int columnIndex) { switch (columnIndex) { case 0: return "Device Name"; case 1: return "Parent JukeBox"; case 2: return "Device Path"; case 3: return "Volume"; case 4: return "Pool"; case 5: return "Message"; default: return "unknown"; } } COM: <s> 0 root root 0 1970 01 01 01 00 00 opt shares </s>
funcom_train/47866941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ByteArrayInputStream getCommandPayloadFooter() throws IOException { if (commandPayloadFooter == null) { int length = getLength(); ByteArrayOutputStream footer = new ByteArrayOutputStream(3); // 4-byte align switch (length & 3) { case 1: footer.write(0); case 2: footer.write(0); case 3: footer.write(0); break; } commandPayloadFooter = new ByteArrayInputStream(footer.toByteArray()); } else { commandPayloadFooter.reset(); } return commandPayloadFooter; } COM: <s> get the command payload footer </s>
funcom_train/39566117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimer(Object timer_id, long time_ms) { if (state == STOPPED || state == STARTING || state == CLOSED) throw new IllegalStateException("TCP_UnicastAdapter: tried to set Timer when adapter was not running."); if (IP_Timer == null) throw new IllegalStateException("TCP_UnicastAdapter: tried to set Timer when Timer is null."); IP_Timer.setTimer(timer_id, time_ms); } COM: <s> set a code timer code event </s>
funcom_train/26402868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeSince(String indentSpace) { StringBuffer buf = new StringBuffer(indentSpace + "* @since "); String since = System.getProperty(SINCE_FLAG); if (null != since) { buf.append(since); } else { buf.append(DEFAULT_VERSION); } buf.append( " " + getDateString() ); theFile.println(buf.toString()); } COM: <s> write the since information </s>
funcom_train/34289361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setImage() { String[] ext = this.name.split("\\."); if (ext != null && ext.length > 1) ; { Program prog = Program.findProgram("." + ext[ext.length - 1]); if (prog != null) { ImageData data = prog.getImageData(); if (data != null) this.img = new Image(null, data); } } } COM: <s> initialize the image application for a format of document </s>
funcom_train/6226052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while(document.get() != null) { try { RecolorEvent re; synchronized (eventsLock) { // get the next event to process - stalling until the // event becomes available while(events.isEmpty() && document.get() != null) { // stop waiting after a second in case document // has been cleared. eventsLock.wait(1000); } re = (RecolorEvent) events.removeFirst(); } processEvent(re.position, re.adjustment); Thread.sleep(100); } catch(InterruptedException e) { } } } COM: <s> the colorer runs forever and may sleep for long periods of time </s>
funcom_train/32871130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMethodReturn(Method m) { throw new JVMAIRuntimeException("Method HotSwapAdvancedClassWeaver.removeMethodReturn() not implemented"); // String key = m.getDeclaringClass().getName() + "#" + m.getName(); // if( methodReturns.containsKey( key ) ) { // methodReturns.remove( key ); // if( methodReturns.isEmpty() ) // removeWatch(MWEAVER_STATUS_HAS_METHOD_RETURN_WATCH); // else // setModified(); // } } COM: <s> remove a method for which a callback was woven after each call </s>
funcom_train/21907135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createAction() { logger.debug("createAction is invoked"); Assignment newAssignment = getAssignment(); try { this.assignmentService.saveAssignment(newAssignment); } catch (Exception e) { String msg = "could not save assignment"; this.logger.error(msg, e); FacesUtils.addErrorMessage(msg + INTERNAL_ERROR); return NavigationResults.FAILURE; } String msg = "assignment with id of " + newAssignment.getId() + " was created successfully."; logger.debug(msg); FacesUtils.addInfoMessage(msg); return NavigationResults.SUCCESS; } COM: <s> creates an new assignment </s>
funcom_train/45864256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean clickImpl(int x, int y, boolean allowOwnActions) { if (allowOwnActions) { if (y < transY + (visibleRows / 2) * (font.height + gapH)) { pressImpl(true, false, false, false); } else { pressImpl(false, true, false, false); } } return true; } COM: <s> handles mouse or pointer input </s>
funcom_train/4754660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getCurrentMainSetJacobian(final double[][] dYdY0) { // get current state for this set of equations from the expandable fode double[] p = efode.getCurrentAdditionalState(this); int index = 0; for (int i = 0; i < stateDim; i++) { System.arraycopy(p, index, dYdY0[i], 0, stateDim); index += stateDim; } } COM: <s> get the current value of the jacobian matrix with respect to state </s>
funcom_train/45232333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newFamilyAddressWizard() { AddressDialog addressDialog = new AddressDialog(new JFrame()); session = HibernateUtil.beginTransaction(); if (addressDialog.getEnteredAddress()) { Addresses newaddress = addressDialog.getAddress(); Familyaddresses newFamilyaddresses = new Familyaddresses(newaddress); newFamilyaddresses.setFamily(selectedFamily); session = HibernateUtil.beginTransaction(); session.saveOrUpdate(newFamilyaddresses); session.flush(); session.refresh(selectedFamily); HibernateUtil.commitTransaction(); popaddRowFamilyaddresses(newFamilyaddresses); tableFamilyaddresses.revalidate(); } } COM: <s> new family address wizard </s>
funcom_train/18344996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write( OutputStream output, PointTable pointTable) throws IOException { // Get a reference to the output stream writer. BufferedWriter writer = new BufferedWriter( new OutputStreamWriter( output ) ); // Write out the tables to the output stream. writeCSVFile( writer, pointTable ); // Flush the output. writer.flush(); } COM: <s> method for writing out all the data stored in the point table </s>
funcom_train/13321021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendNotification(String sapName, Notification notification) { final String queueName = queueNameFromSapName(sapName); logger.info("sendNotification " + notification.toString() + " for: " + sapName + " using queue " + queueName); final Queue queue = createQueue(queueName); getTemplate().convertAndSend(queue, notification); } COM: <s> sends notifications to queue </s>
funcom_train/35674907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check(final String schemaName) throws Exception { check(new File(SRC_REF_DIR, GEN_SRC_SUBDIR + "/" + schemaName + "/bind"), new File(GEN_SRC_DIR, GEN_SRC_SUBDIR + "/" + schemaName + "/bind"), "java"); } COM: <s> check all generated binding schemas against a reference </s>
funcom_train/15487514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonExport() { if (jButtonExport == null) { jButtonExport = new JButton(); jButtonExport.setBounds(new java.awt.Rectangle(189,200,90,25)); jButtonExport.setText(Application.messages.getString("TITLE_EXPORT")); jButtonExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { export(); } }); } return jButtonExport; } COM: <s> this method initializes j button export </s>
funcom_train/12557990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printReplies() throws IOException { debug.receive(); if (debug.Replies.size() == 0) return; print("\nReplies:\n"); for (int i = 0; i < debug.Replies.size(); i++) print("\n" + (Reply) debug.Replies.elementAt(i) + "\n"); } COM: <s> prints all jdwp replies that were not demanded yet </s>
funcom_train/30075663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException { LoadType loadType = (LoadType) command; // delegate the insert to the Business layer getGpir().storeLoadType(loadType); return new ModelAndView(getSuccessView(), "loadTypeId", Integer.toString(loadType.getId())); } COM: <s> method inserts a new code load type code </s>
funcom_train/2624866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushClip(final Shape clip) { final Shape currentClip = graphics.getClip(); clipStack.push(currentClip); graphics.clip(clip); final Rectangle2D newLocalClip = clip.getBounds2D(); Rectangle2D.intersect(getLocalClip(), newLocalClip, newLocalClip); localClipStack.push(newLocalClip); } COM: <s> pushes the given clip to the pain context </s>
funcom_train/25395244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTreeColor(final JColorf aTreeColor, final boolean aAffectChildren) { // update current object treeColor = aTreeColor; // update children if (aAffectChildren) { for (int i = 0; i < childrens.size(); i++) { childrens.get(i).setTreeColor(aTreeColor, true); } } } COM: <s> set the tree color optionally propagating the change to children </s>
funcom_train/50453333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getOfDescToken (String typename) { List v = new ArrayList(); ConfigChunk ch; Iterator i = chunks.iterator(); while (i.hasNext()) { ch = (ConfigChunk)i.next(); if (ch.getDescToken().equalsIgnoreCase(typename)) v.add (ch); } return v; } COM: <s> gets all config chunks using a particular chunk desc </s>
funcom_train/49470356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PortalObject getManagedAssetCountEvolution(String graphType, String timeScale, String period) throws Exception{ Db db = dbRO(); try { _logger.info("Portal : getManagedAssetCountEvolution: "+graphType+","+timeScale+","+period); return PortalDataProvider.getManagedAssetCountEvolution(db, graphType, timeScale, period); } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> get managed asset count evolution </s>
funcom_train/34568020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { // getting the property from the system property: // derby.drda.portNumber=1110 // derby.drda.host=myhost String msg = "Starting db embedded listener on: "+System.getProperty("derby.drda.host")+":"+System.getProperty("derby.drda.portNumber"); ServerLogger.info(msg,logger); server = new NetworkServerControl(); server.start (null); started=true; ServerLogger.info("listener started !",logger); } catch (Throwable ex) { logger.error("Error: ",ex); } } COM: <s> the life cycle </s>
funcom_train/26526732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fatalError(SAXParseException exception) throws SAXException { logger.fatal("Parse fatal error at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), exception); if (errorHandler != null) errorHandler.fatalError(exception); else throw exception; } COM: <s> forward notification of a fatal parsing error to the application </s>
funcom_train/24121823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { if (getRoot() == null) { final Logger rootLogger = Logger.getLogger(""); //$NON-NLS-1$ setRoot(new LoggerTreeTableNode(new LoggerInfo(rootName, rootLogger .getLevel().getName()))); } updateTree(); } COM: <s> resets the model using the current list of code logger code s </s>
funcom_train/34268849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasValidData() { if(this.required) { return ((this.getText().length() > 0) && (this.validateEmailAddress())); } else { // if not required, it either must be blank, or a valid email address return ((this.getText().length() == 0) || (this.validateEmailAddress())); } } COM: <s> return true if field is a valid email address </s>
funcom_train/29064560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleChangedResources() { if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { System.out.println("Handle it.."); editingDomain.getCommandStack().flush(); for (Iterator i = changedResources.iterator(); i.hasNext();) { Resource resource = (Resource) i.next(); if (resource.isLoaded()) { resource.unload(); try { resource.load(Collections.EMPTY_MAP); validate(); } catch (IOException exception) { AspectxEditorPlugin.INSTANCE.log(exception); } } } } } COM: <s> handles what to do with changed resources on activation </s>
funcom_train/47303981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintTerminations(Graphics2D g2, Point start, Point end, int orientation) { Color oldColor = g2.getColor(); g2.setColor(Color.red); g2.fillOval(start.x - 2, start.y - 2, 4, 4); g2.fillOval(end.x - 2, end.y - 2, 4, 4); g2.setColor(oldColor); } COM: <s> paints red dots </s>
funcom_train/45692406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOriginalNonAudioDataPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_originalNonAudioData_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_originalNonAudioData_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__ORIGINAL_NON_AUDIO_DATA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the original non audio data feature </s>
funcom_train/3720864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMin(short min) throws ProfileException { short oldMin = this.min; try { vetoableChangeSupport.fireVetoableChange("min", new Short(oldMin), new Short(min)); } catch (Exception e) { throw new ProfileException(null, e); } this.min = min; propertyChangeSupport.firePropertyChange("min", new Short(oldMin), new Short(min)); } COM: <s> setter for property min </s>
funcom_train/3062473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getEndOfDay() { cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); return cal.getTime().getTime(); } COM: <s> get the final second of the day in julian milliseconds </s>
funcom_train/6267336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String encodeBody() { StringBuffer encoding = new StringBuffer(); if (wildCardFlag) { return encoding.append("*").toString(); } // Bug report by Joao Paulo if (address.getAddressType() == AddressImpl.NAME_ADDR) { encoding.append(address.encode()); } else { // Encoding in canonical form must have <> around address. encoding.append("<").append(address.encode()).append(">"); } if (!parameters.isEmpty()) { encoding.append(SEMICOLON).append(parameters.encode()); } return encoding.toString(); } COM: <s> encode body of the header into a cannonical string </s>
funcom_train/1958085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runImport(ImporterEnvironment config) throws VerinecImporterException { if (! configPanel.checkHostname.isSelected()) { log.info("Import Hostname: Not selected)"); return; } log.info("Import Hostname: Importing hostname"); if(config.settings instanceof PanelLocal){ hostname=getLocalHostName(); } else if(config.settings instanceof PanelRemote) { hostname=getRemoteHostname(config); } else { hostname="test"; } return; } COM: <s> create the hostname attribute </s>
funcom_train/3641212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFanSpeed(double speed) throws IOException { if ( speed != 0 && speed != 1 ) { throw new IllegalArgumentException("Unsupported speed: " + speed + " (only 0 and 1 are valid)"); } this.speed = new Double(speed); String response = fanConnector.sendExclusive("write " + (int)speed); if ( !"OK".equals(response) ) { throw new IOException("Device response: " + response); } } COM: <s> set the fan speed </s>
funcom_train/36683733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOneIntersectionPoint() { GeometricParameters bodyA = new GeometricParameters(new Circle(5), new Vector2f(0, 0)); GeometricParameters bodyB = new GeometricParameters(new Circle(3), new Vector2f(8, 0)); CircleCircleIntersector intersector = new CircleCircleIntersector( bodyA, bodyB); List<Vector2f> list = intersector.findIntersections(); Assert.assertEquals(list.size(), 1); Assert.assertEquals(list.get(0), new Vector2f(5, 0)); } COM: <s> test one intersection point </s>
funcom_train/19306419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int bpdUsedByChildren() { int sum = 0; for (int i = 0; i < getChildren().size(); i++) { final Object object = getChildren().get(i); if (object instanceof AreaFlexible) { final AreaFlexible area = (AreaFlexible) object; sum += area.usedProgressionDimension(); } } return sum; } COM: <s> returns the sum of the bpd of each child </s>
funcom_train/31208257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getResultSetType() throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId()); checkClosed(); int result=ResultSet.TYPE_SCROLL_INSENSITIVE; if(Trace.isDetailed()) Trace.traceResult(result); return result; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the resultset type created by this object </s>
funcom_train/7640963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleLocation(LocationPoint locationNode, Attributes attributes) { try { double longitude = Double.parseDouble(attributes.getValue(ATTR_LONGITUDE)); double latitude = Double.parseDouble(attributes.getValue(ATTR_LATITUDE)); locationNode.setLocation(longitude, latitude); } catch (NumberFormatException e) { // wrong data, do nothing. } } COM: <s> handles the location attributes and store them into a </s>
funcom_train/853959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateExternalStorageState() { String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { isExternalStorageReadable = true; } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { isExternalStorageReadable = true; } else { isExternalStorageReadable = false; } setChanged(); notifyObservers(); } COM: <s> reads the state of the external storage </s>
funcom_train/1376326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void turnParticles(int theta) { Link link = data.first; // Loop through all particles while (link != null) { PositioningParticle part = (PositioningParticle) link.data; // Update each particles angle value part.angle = ((part.angle + theta) % (Fixed.PI << 1)); link = link.next; } // Update mean mean_angle = ((mean_angle + theta) % (Fixed.PI << 1)); } COM: <s> turn particles i </s>
funcom_train/17782110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WokoUser createUser() { Class<? extends IWokoInternal> userClass = getUserImplementationClass(); try { Object o = userClass.newInstance(); return (WokoUser)o; } catch(Throwable t) { logger.fatal("Unable to instanciate user object from class " + userClass, t); return null; } } COM: <s> creates a transient user instance using this user managers user implementation class </s>
funcom_train/40932137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMeasuredSize(int measureSpec) { int specMode = MeasureSpec.getMode(measureSpec); int specSize = MeasureSpec.getSize(measureSpec); if (specMode == MeasureSpec.EXACTLY) { return specSize; } else if (specMode == MeasureSpec.AT_MOST) { return Math.min(specSize, BOARD_WIDTH - 80); } else { return BOARD_WIDTH - 80; } } COM: <s> gets the measured size </s>
funcom_train/13271951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeight(float height) { if (isResizable()) { if (height != this.height) { float oldHeight = this.height; this.height = height; this.shapeCache = null; this.propertyChangeSupport.firePropertyChange(Property.HEIGHT.name(), oldHeight, height); } } else { throw new IllegalStateException("Piece isn't resizable"); } } COM: <s> sets the height of this piece of furniture </s>
funcom_train/40432822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number computes(Number a, Number b) { if (a instanceof Integer && b instanceof Integer) { return Integer.valueOf(a.intValue() - b.intValue()); } else { return Double.valueOf(a.doubleValue() - b.doubleValue()); } } COM: <s> performs binary operation </s>
funcom_train/29413952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAttribute getAttribute() { return new IAttribute(){ @Override public String getElementID() { return elementID; } @Override public String getName() { return attrName; } @Override public String getValue() { if(type == IAttributeAdjustMessage.TYPE_REMOVE || type == IAttributeAdjustMessage.TYPE_XREMOVE) return null; else return value; } @Override public boolean isLoner() { if(type == IAttributeAdjustMessage.TYPE_XADD || type == IAttributeAdjustMessage.TYPE_XREMOVE) return false; else return true; } }; } COM: <s> wraps the attribute adjust message into an iattribute object </s>
funcom_train/42636797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix submatrix(int fromRow, int toRow, int fromCol, int toCol) { Number[][] e = new Number[toRow-fromRow][toCol-fromCol]; for (int i = fromRow; i < toRow; i++){ int iE = i-fromRow; for (int j = fromCol; j < toCol; j++){ e[iE][j-fromCol] = get(i, j); } } return createMatrix(e); } COM: <s> override to optimize </s>