__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49817888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getActionCommand() != null) { if (e.getActionCommand().equals(ACTION_CANCEL)) { this.haltRequested = true; cancelButton.setEnabled(false); // Immediately inform the user that we are canceling the task this.setCancelStatusMsg("Canceling..."); // Request that Task Halt task.halt(); } else if (e.getActionCommand().equals(ACTION_CLOSE)) { dispose(); } } } COM: <s> capture all action events </s>
funcom_train/9235298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object readResolve() throws InvalidObjectException { if (this.getClass() != IRCTextAttribute.class) { throw new InvalidObjectException("subclass didn't correctly implement readResolve"); } final IRCTextAttribute instance = INSTANCE_MAP.get(getName()); if (instance == null) { throw new InvalidObjectException("unknown attribute name"); } else { return instance; } } COM: <s> resolves instances being deserialized to the predefined constants </s>
funcom_train/22383642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ZZDrawing createInstance() { ZZDrawing ret = null; Class g2d = null, zzdj2d = null; try { g2d = Class.forName("java.awt.Graphics2D"); zzdj2d = Class.forName("org.gzigzag.ZZDrawingJ2D"); ret = (ZZDrawing)zzdj2d.newInstance(); } catch(Exception e) { ZZLogger.exc(e); if(g2d != null) { ZZLogger.log("Graphics2D found but support not compiled in."); } } if(ret == null) ret = new ZZDrawing(); return ret; } COM: <s> create an instance </s>
funcom_train/40884285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix4 tra () { tmp[M00] = val[M00]; tmp[M01] = val[M10]; tmp[M02] = val[M20]; tmp[M03] = val[M30]; tmp[M10] = val[M01]; tmp[M11] = val[M11]; tmp[M12] = val[M21]; tmp[M13] = val[M31]; tmp[M20] = val[M02]; tmp[M21] = val[M12]; tmp[M22] = val[M22]; tmp[M23] = val[M32]; tmp[M30] = val[M03]; tmp[M31] = val[M13]; tmp[M32] = val[M23]; tmp[M33] = val[M33]; return this.set(tmp); } COM: <s> transposes the matrix </s>
funcom_train/51226118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleHelpSelection(TreeSelectionEvent e) { DefaultMutableTreeNode curNode = (DefaultMutableTreeNode) helpSelector.getLastSelectedPathComponent(); if(curNode.equals(helpContents)) { setHelpOutput(htmlWelcome); } else if(curNode.equals(hVisualization)) { setHelpOutput(htmlVis); } else if(curNode.equals(hSuggestion)) { setHelpOutput(htmlSugg); } else if(curNode.equals(hStatistics)) { setHelpOutput(htmlStats); } } COM: <s> handles the selections from the help content tree </s>
funcom_train/2861094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { if (statsLogFileOpen) { Log.out.println("StatsLog.close()", "Normal shutdown of Stats Log."); statsLog.close(); } } catch (Exception e) { e.printStackTrace(); } statsLogFileOpen = false; statsLog = null; } COM: <s> close the stats log </s>
funcom_train/45472737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putGroupName(final Group group, final String packageName, final String name) { Hashtable groupNames = (Hashtable) _packageGroupNames.get(packageName); if (groupNames == null) { groupNames = new Hashtable(); _packageGroupNames.put(packageName, groupNames); } groupNames.put(group, name); } COM: <s> sets the qualified group name for a given group instance and package </s>
funcom_train/3157257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayFilter(DisplayFilter displayFilter) { if (_displayFilter != displayFilter) { if (_displayFilter != null) { _displayFilter.removePropertyChangeListener(_displayFilterListener); } _displayFilter = displayFilter; _displayFilter.addPropertyChangeListener(_displayFilterListener); } } COM: <s> sets the filter to be used to filter the displayed bands </s>
funcom_train/14156801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String debugToString() { StringBuffer sb = new StringBuffer(); sb.append("Name: "); sb.append(name); sb.append("Desc: "); sb.append(description); sb.append(streamInfo.toString()); return sb.toString(); } COM: <s> more complete than to string returns all </s>
funcom_train/33668288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int decode(BitReader input) throws IOException { HuffmanNode currentNode = _huffmanTree; byte bit; // read bits until a value is found while (currentNode._leftChild != null) { bit = input.read(); if (bit == 0) { currentNode = currentNode._leftChild; } else { currentNode = currentNode._rightChild; } } return currentNode._value; } COM: <s> reads an encoded input value from the specified code bit reader code </s>
funcom_train/28289340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doFieldTests( String field, String className, Object value ) { getPublicField( field, className, value ); if ( field.startsWith( "dt.PUB_FINAL" )) { setPublicFinalField( field, className, value ); } else { setPublicField( field, className, value ); } setJavaScriptVariable( field, className, value ); } COM: <s> pass the arguments to the different tests all of which take the same </s>
funcom_train/646357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAvailable() { if (getView() == null) return false; Set<SQLConnection> connections = getView().getSelectedConnections(false); for (SQLConnection connection : connections) { if (connection.getSession() == null || !connection.getSession().isConnectionInUse()) return true; } return false; } COM: <s> action is available when there is at least one session selected </s>
funcom_train/35848545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRoleAddedSet() { Model.getPump().addModelEventListener(listener, elem, new String[] { "generalization", }); Model.getCoreFactory().buildGeneralization( elem, Model.getCoreFactory().createClass()); Model.getPump().flushModelEvents(); assertTrue(eventcalled); } COM: <s> tests if a listener that registered for a role added set event really </s>
funcom_train/32615441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { if (current == null) { throw new IllegalStateException(); } if (relationName != null) { try { objectDAO.removeFromRelation(relationName, id, current); } catch (DatabaseException e) { throw new CollectionException("Failed to remove object", e); } } else { throw new UnsupportedOperationException(); } } COM: <s> removes from the underlying collection the last element returned by the </s>
funcom_train/4507163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMultiUserChatService(String subdomain) throws NotFoundException { Long serviceID = getMultiUserChatServiceID(subdomain); if (serviceID == null) { Log.error("MultiUserChatManager: Unable to find service to remove for "+subdomain); throw new NotFoundException(); } removeMultiUserChatService(serviceID); } COM: <s> deletes a configured multi user chat service by subdomain and shuts it down </s>
funcom_train/43526204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFirstLevelGraphPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Graph_firstLevelGraph_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Graph_firstLevelGraph_feature", "_UI_Graph_type"), CallGraphPackage.Literals.GRAPH__FIRST_LEVEL_GRAPH, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the first level graph feature </s>
funcom_train/47332024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean seen(Class<?> c) { boolean seen = false; if (c == null) return false; if (!classes.contains(c)) { classes.add(c); if (c.getPackage() != null) seen(c.getPackage().getName()); seen = true; } seen(c.getSuperclass()); seen(c.getComponentType()); for (Class m : c.getClasses()) seen(m); for (Class i : c.getInterfaces()) seen(i); return seen; } COM: <s> allows the loader to track classes which it has seen </s>
funcom_train/47015036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddJreJar() { try { System.out.println("addJreJar"); String jar = "deploy.jar"; jarClassLoader instance = new jarClassLoader(); instance.addJreJar(jar); instance.loadClass("com.sun.deploy.si.SingleInstanceManager"); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } } COM: <s> test of add jre jar method of class jar class loader </s>
funcom_train/28016816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createFeatureTypeName() { final String path = shpURL_.getPath(); final int slash = Math.max(0, path.lastIndexOf('/') + 1); int dot = path.indexOf('.', slash); if (dot < 0) { dot = path.length(); } return path.substring(slash, dot); } COM: <s> create the type name of the single feature type this data store represents </s>
funcom_train/26587881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnTypeName(int index) throws SQLException { checkValidColumn(index); try { int type = columnCharacteristics.getColumnType(index - DaffodilDBDriver.COLUMN_OFFSET); return Utilities.getDataBaseTypeName(type); } catch (DException e) { throw e.getSqlException(connection.getLocale()); } } COM: <s> retrieves the designated columns database specific type name </s>
funcom_train/17362642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelFileInfo() { if (jPanelFileInfo == null) { jPanelFileInfo = new JPanel(); jPanelFileInfo.setLayout(null); jPanelFileInfo.add(getFileInfoPanel(), null); // jPanelFileInfo.add(getJTabbedPaneTAGS(), null); } return jPanelFileInfo; } COM: <s> this method initializes j panel file info </s>
funcom_train/40445068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcessDescriptionType getProcessDescription(String serverID, String processID) throws IOException { ProcessDescriptionType[] processes = getProcessDescriptionsFromCache(serverID).getProcessDescriptions().getProcessDescriptionArray(); for(ProcessDescriptionType process : processes) { if(process.getIdentifier().getStringValue().equals(processID)) { return process; } } return null; } COM: <s> return the process description for a specific process from cache </s>
funcom_train/20799923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireTrainingInfoReleased(ResultEvent event) { /* Enumeration E; if (resultListeners != null) { E = resultListeners.elements(); while (E.hasMoreElements()) { ResultListener rl = (ResultListener) E.nextElement(); rl.trainingInfoReleased(event); } }*/ } COM: <s> utility function to send a training info released event to all result </s>
funcom_train/28749893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProjectid(Long newVal) { if ((newVal != null && this.projectid != null && (newVal.compareTo(this.projectid) == 0)) || (newVal == null && this.projectid == null && projectid_is_initialized)) { return; } this.projectid = newVal; projectid_is_modified = true; projectid_is_initialized = true; } COM: <s> setter method for projectid </s>
funcom_train/49753352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem4() { if (stringItem4 == null) {//GEN-END:|89-getter|0|89-preInit // write pre-init user code here stringItem4 = new StringItem("Tama\u00F1o del archivo", null);//GEN-LINE:|89-getter|1|89-postInit // write post-init user code here }//GEN-BEGIN:|89-getter|2| return stringItem4; } COM: <s> returns an initiliazed instance of string item4 component </s>
funcom_train/20871792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceParams(String value, Object... params) { if (params.length == 1 && params[0] instanceof Collection<?>) { params = ((Collection<?>) params[0]).toArray(); } return new MessageFormat(value, bundle.getLocale()).format(params, new StringBuffer(), null).toString(); } COM: <s> replaces x with the x th element of the params array </s>
funcom_train/33963107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getThemePath() { String theme = themeResolver.resolveThemeName(actionBeanContext.getRequest()); Theme _theme = themeSource.getTheme(theme); MessageSource themeMessageSource = _theme.getMessageSource(); return themeMessageSource.getMessage("webpages.root", null, actionBeanContext.getLocale()); } COM: <s> return the current non blogs private theme path </s>
funcom_train/18514301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClampedPropertyDescriptors(Vector names) { for (int i = 0; i < descriptors.length; i++) { for (int j = 0; j < names.size(); j++) { if (descriptors[i].getDescriptor().getReadMethod().getName() .substring(3).equals(names.get(j))) setValueAt(new ClampAttribute((String) names.get(j), true), i, COL_CLAMP); } } fireTableDataChanged(); } COM: <s> sets clamped property descriptors based on the vector of variable names </s>
funcom_train/8357039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean toBoolean(Object value) { String valueString = value.toString(); boolean toBoolean = false; if ((valueString.compareTo("true") == 0) || (valueString.compareTo("on") == 0)) { toBoolean = true; } else if ((valueString.compareTo("false") == 0) || (valueString.compareTo("off") == 0)) { toBoolean = false; } return toBoolean; } COM: <s> converts the supplied value to a boolean </s>
funcom_train/9266370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(String[] args) { super.initialize(args); freeListLock = new Lock(); freePhysicalPages = new LinkedList<Integer>(); for(int i=0; i<Machine.processor().getNumPhysPages(); i++){ freePhysicalPages.add(i); } console = new SynchConsole(Machine.console()); Machine.processor().setExceptionHandler(new Runnable() { public void run() { exceptionHandler(); } }); } COM: <s> initialize this kernel </s>
funcom_train/12341881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapping(java.lang.String param){ if (localMapping == null){ localMapping = new java.lang.String[]{}; } java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localMapping); list.add(param); this.localMapping = (java.lang.String[])list.toArray( new java.lang.String[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/1098847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecoveryProcessCount(int aRecoveryProcessCount) { int oldLimit = getEffectiveProcessLimit(); mRecoveryProcessCount = aRecoveryProcessCount; int newLimit = getEffectiveProcessLimit(); if (newLimit > oldLimit) { debug("Increasing effective process limit to {0,number,0} for recovery", newLimit); //$NON-NLS-1$ } else if (newLimit < oldLimit) { debug("Restoring effective process limit to {0,number,0}", newLimit); //$NON-NLS-1$ } } COM: <s> sets the number of processes required for recovery </s>
funcom_train/11706971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int put(String key, int value) { Integer i = (Integer) this.map.get(key); int rc; if (i == null) { rc = 0; } else { rc = i.intValue(); } i = Integer.valueOf(value); this.map.put(key, i); return rc; } COM: <s> add a key value pair to the map </s>
funcom_train/47139397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getRecord (int row) { ((ListenerHelper) listenerList).needModelUpdate(); try { if ((row > -1) && (row < getRowCount())) { return m_cModel.get ((String) m_lKeys.get (row), m_dbBasket, false); } else { return null; } } catch (VetoException ex) { return null; } } COM: <s> get the record at the given index </s>
funcom_train/28899084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRecordText (String id) { String rec = null; try { // DataStoreDriver driver = DataStoreDriverMakerImpl.getDriver(); rec = dataStoreDriverImpl.getResourceByID(id, false); } catch (AnnoteaException ex) { ex.printStackTrace(); } return rec; } COM: <s> fetch the requested record </s>
funcom_train/32212214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectTwoPorts(CcaConnectTwoPortsEvent event) { String providerComponentName = event.getCcaConnection().providesServiceComponentName; String providerPortName = event.getCcaConnection().providesServicePortName; String userComponentName = event.getCcaConnection().usesServiceComponentName; String userPortName = event.getCcaConnection().usesServicePortName; this.broadcastConnection (providerComponentName, providerPortName, userComponentName, userPortName); } COM: <s> the cca server is connecting two ports </s>
funcom_train/26410297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addXmlObjectRecursive(XmlNode parentXmlNode, DefaultMutableTreeNode treeNode) { if (treeNode == null) return; ProjectSourceNode userData = (ProjectSourceNode)(treeNode.getUserObject()); XmlNode currentNode = userData.toXmlNode(); if (currentNode == null) return; parentXmlNode.addChild(currentNode); Enumeration children = treeNode.children(); while (children.hasMoreElements()) { addXmlObjectRecursive(currentNode, (DefaultMutableTreeNode) children.nextElement()); } } COM: <s> add an tree node recursivelly to an xml one </s>
funcom_train/18131523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeWorkflowDataMap(Workflow workflow) { Map<String, WorkflowDataModel> dataModelMap = specificationDataModelMap .get(workflow.getSpecification().getId()); if (dataModelMap != null) { WorkflowDataModel workflowDataModel = dataModelMap.remove(workflow .getId()); for (PropertyChangeListener listener : listeners) { workflowDataModel.removePropertyChangeListener(listener); } } } COM: <s> method for removing a workflow data map </s>
funcom_train/47927829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setBounds(new Rectangle(147, 226, 87, 20)); jButton1.setText("Okay"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { GUI_Preferences.getInstance().close(); } }); } return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/38473225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addModelChangeListener(Object container, IModelChangeListener l) { LinkedList containerListeners = (LinkedList) modelListeners.get(container); if (containerListeners == null) { containerListeners = new LinkedList(); modelListeners.put(container, containerListeners); } containerListeners.add(l); } COM: <s> method add model change listener </s>
funcom_train/511866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addJavaLibraries() { Vector packages = org.apache.tools.ant.util.JavaEnvUtils.getJrePackages(); Enumeration e = packages.elements(); while (e.hasMoreElements()) { String packageName = (String) e.nextElement(); addSystemPackageRoot(packageName); } } COM: <s> add any libraries that come with different java versions </s>
funcom_train/3104102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bind() throws SQLException { // CHECK FOR NULL COLUMN/ROWSET if (columnName==null || columnName.trim().equals("") || sSRowSet==null) { return; } // REMOVE LISTENERS TO PREVENT DUPLICATION removeListeners(); // BIND THE TEXT FIELD TO THE SPECIFIED COLUMN textField.bind(sSRowSet, columnName); // SET THE COMBO BOX ITEM DISPLAYED updateDisplay(); // ADD BACK LISTENERS addListeners(); } COM: <s> method for handling binding of component to a ssrow set column </s>
funcom_train/22360645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(T o1, T o2) { int s1 = o1.getSortIndex(); int s2 = o2.getSortIndex(); if ((s1 == s2) && (sameIndexSubCmp != null)) return sameIndexSubCmp.compare(o1, o2); else return s1 < s2 ? -1 : 1; } COM: <s> compares its two arguments for order according to their sort indices </s>
funcom_train/12587652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemLabel buildItemLabel(KeywordType keyword, LabelProperty labelName) { ItemLabel itemLabel = new ItemLabel(); itemLabel.setIdentity(keyword.getIdentity()); itemLabel.setValue(keyword.getValue()); itemLabel.setLang(keyword.getLang()); itemLabel.setDir(keyword.getDir()); itemLabel.setLabelProperty(labelName); QCodeType role = keyword.getRole(); if (role != null) { itemLabel.setRole(role); } return itemLabel; } COM: <s> build item label object from keyword type </s>
funcom_train/36182460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractXMLValue(String startTag, String endTag, String line) { String retValue = null; int startIndex = line.indexOf(startTag) + startTag.length(); int endIndex = line.indexOf(endTag); if (startIndex > 0 && startIndex < endIndex) { retValue = line.substring(startIndex, endIndex); } return retValue; } COM: <s> extract the xml value between the start and end tags </s>
funcom_train/3122290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HistoryEvent getEvent(int index) { Iterator it = events(); int count = 0; HistoryEvent evt; while (it.hasNext()) { evt = (HistoryEvent) it.next(); if (count == index) { return (evt); } count++; } throw new IndexOutOfBoundsException(); } // of method COM: <s> get the indexth event </s>
funcom_train/20474248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void down() { if (!visible || !open || labels == null || numCommands < 3) { return; } if (openSB) { if (indexSB < numSubCommands) { indexSB++; } else { indexSB = 0; } } else { if (index < numCommands - 1) { index++; } else { index = 1; } } } COM: <s> desce o button group </s>
funcom_train/13442048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RealField resolve(String path) throws JXPathException { logger.debug("Resolving " + path); path = path.trim(); if (!cache.containsKey(path)) { String val[] = path.split("\\."); Object obj = this.obj; for (int i = 0; i < val.length - 1; i++) { obj = penetrate(obj, val[i]); } cacheIn(path, obj, val[val.length - 1]); logger.debug("Caching " + path); } return cache.get(path); } COM: <s> finds a field </s>
funcom_train/3338445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addArgument(Argument<?> argument) { doAdd(argument); Argument<?>[] tmp = new Argument<?>[arguments.length + 1]; System.arraycopy(arguments, 0, tmp, 0, arguments.length); tmp[arguments.length] = argument; arguments = tmp; } COM: <s> add an argument to the bundle </s>
funcom_train/43626890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) { String loginPage = filterConfig.getInitParameter("login_page"); if (loginPage != null) { _loginPage = loginPage; } this.filterConfig = filterConfig; if (filterConfig != null) { logger.debug("AuthenticationFilter:Initializing filter"); } } COM: <s> the filter initialisation event </s>
funcom_train/25494183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplaySourceAnchor(boolean displayed) { if (!isEditable() || displayed == this.sourceAnchor) { return; } this.sourceAnchor = displayed; fireModelChangeEvent(new ModelEvent(this, ModelEventDescriptor.MODEL_PRIMITIVE_CHANGED, sourceAnchor, !sourceAnchor)); } COM: <s> display source anchor </s>
funcom_train/51204535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void backgroundButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backgroundButtonActionPerformed // Pullup the JColorChooser for the background color Color newColor = JColorChooser.showDialog(this, "Background Color", previewTextPane.getBackground()); if(newColor != null) previewTextPane.setBackground(newColor); }//GEN-LAST:event_backgroundButtonActionPerformed COM: <s> p called when the background button is pressed </s>
funcom_train/38827994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check() { DirEntry DE = getDirectoryEntry(); // Set message to unsupported StringBuffer msg = new StringBuffer(RESOURCES.getString("error") + ": DE "); msg.append(DE.getDENum()); msg.append(", type="); msg.append(DE.getType()); msg.append(", form="); msg.append(DE.getForm()); msg.append(": "); msg.append("Entity type "); msg.append(getTypeString()); addErrorMessage(msg.toString()); } COM: <s> checks to see if the entity has any errors or warnings </s>
funcom_train/12071426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String locstr; if (location == null) { locstr = "?:?"; } else { locstr = location.toString(); } String modstr; if (mod_label == null) { modstr = "";} else { modstr = sep + mod_label.toString(); } String astr = arg_label.toString(); return locstr + sep + astr + modstr; } COM: <s> produce a canonical string from the argument </s>
funcom_train/15622955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRelationallyValid() { if (this.getTheFromConcept() == null || this.getTheToConcept() == null) { return false; } if ( ! ((this.getTheFromConcept().getType().equals(Concept.TYPE_DB)) && (this.getTheToConcept().getType().equals(Concept.TYPE_DB)))) { return false; } if (this.getFromKey() == null) { return false; } return true; } COM: <s> a relationship is relationally valid if the from concept </s>
funcom_train/32823601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWebServiceUseridPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Workflow_webServiceUserid_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Workflow_webServiceUserid_feature", "_UI_Workflow_type"), ModelPackage.eINSTANCE.getWorkflow_WebServiceUserid(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the web service userid feature </s>
funcom_train/37248269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { sb = new StringBuffer(); // Create a CSV file with the data. sb.append(csv.format(getTime()) + ", "); sb.append(csv.format(getY()) + ", "); sb.append(csv.format(getPotentialEnergy()) + ", "); sb.append(csv.format(getKineticEnergy()) + ", "); sb.append(csv.format(getTotalEnergy())); return sb.toString(); } COM: <s> method used by the b file data store b to store the measurements </s>
funcom_train/45732372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText (String textID, Hashtable args) { String text = getText(textID, currentLocale); if(text != null) { text = processArguments(text, args); } else { throw new NoLocalizedTextException("The Localizer could not find a definition for ID: " + textID + " in the '" + currentLocale + "' locale.",textID, currentLocale); } return text; } COM: <s> retrieve the localized text for a text handle in the current locale </s>
funcom_train/20294276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValueFromId(String key) { Iterator i = this.iterator(); while (i.hasNext()) { HtmlOption thisOption = (HtmlOption) i.next(); if (key.equals(thisOption.getValue())) { return thisOption.getText(); } } return key; } COM: <s> returns the text of the specified key </s>
funcom_train/35612816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadEntries(boolean useCache) { documentsPanel.clear(); rightPanel.setStylePrimaryName("lab-Loading"); CommandEvent.fire(new SystemListDocumentsCommand(useCache, new AsyncCallback<DocumentServiceEntry[]>() { @Override public void onFailure(Throwable caught) { } @Override public void onSuccess(DocumentServiceEntry[] result) { setEntries(result); showEntries(); } } )); } COM: <s> requests a document list refresh by firing the appropriate command event </s>
funcom_train/22395602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireMailConfigurationChanged() { Object[] listeners = listenerList.getListeners(MailManagerListener.class); MailManagerEvent e = null; for(int i=0; i<listeners.length; i++) { if(e == null) { e = new MailManagerEvent(this); } ((MailManagerListener)listeners[i]).mailConfigurationChanged(e); } } COM: <s> notifies all registered tt mail manager listener tt s that </s>
funcom_train/50749502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDirty () { boolean result = false; for (int row = 0; row < getRowCount(); row++) { for (int col = 0; col < getColumnCount(); col++) { CellDataValue value = (CellDataValue) getValueAt(row, col); if (value != null && value.isDirty()) { result = true; break; } } } return result; } COM: <s> if any of the cells are dirty return true </s>
funcom_train/45618780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayDialog(InputDialogBox idb, String txt$) { try { idb.setModal(true); idb.getinputField().setText(txt$); idb.getinputField().requestFocus(); idb.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); }; }); idb.setVisible(true); } catch (Throwable exception) { System.err.println("Exception occurred in main() of java.awt.Dialog"); exception.printStackTrace(System.out); } } COM: <s> this method displays the an input dialog box obj to allow users </s>
funcom_train/32058016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetVisibleOne() { System.out.println("testSetVisibleOne"); GraphModel gm = new DefaultGraphModel(); CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); Object cell = new DefaultGraphCell(); Object port = new DefaultPort(); ((DefaultGraphCell) cell).add((DefaultPort) port); Object[] o = { cell }; cache.setVisible(o, false); } COM: <s> this function tests set visible one function of graph layout cache class </s>
funcom_train/39484748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInstanceOf (String cname) { if (isPrimitive()) { // no inheritance for builtin types return Types.getJNITypeCode(name).equals(cname); } else { cname = Types.getCanonicalTypeName(cname); for (ClassInfo c = this; c != null; c = c.superClass) { if (c.name.equals(cname)) { return true; } } return getAllInterfaces().contains(cname); } } COM: <s> returns true if the given class is an instance of the class </s>
funcom_train/5395858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadChar() throws Exception { System.out.println("readChar"); BlockDataInputStream instance = null; char expResult = ' '; char result = instance.readChar(); 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 read char method of class org </s>
funcom_train/28982765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(){ System.out.println("size = "+queue.size()); System.out.println("capacity = "+capacity); for (int i = 0; i < queue.size(); i++){ Transaction transactionQueue = (Transaction) queue.elementAt(i); transactionQueue.print(); } } COM: <s> prints the content of the queue 8 </s>
funcom_train/22588628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startBookmark(String content) throws IOException { RTFStartBookmark bookmark = new RTFStartBookmark(); if (startGroup != null) { bookmark.addRTFString(startGroup); startGroup = null; } bookmark.addRTFString(content); getCurrentRTFElement().addRTFElement(bookmark); lastRTFElement = bookmark; } COM: <s> implement start bookmark to start and add rtf bookmark element into </s>
funcom_train/17007035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNtpTimestamps() { byte[] buffer = ntpPacket.getData(); referenceTimeStamp.setTimestamp(NtpOffset.offReferenceTimestamp, buffer); originateTimeStamp.setTimestamp(NtpOffset.offOriginateTimestamp, buffer); receiveTimeStamp.setTimestamp(NtpOffset.offReceiveTimestamp, buffer); transmitTimeStamp.setTimestamp(NtpOffset.offTransmitTimestamp, buffer); } COM: <s> sets reference time stamp originate time stamp receive time stamp transmit time stamp </s>
funcom_train/1536140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final protected boolean circleAxisPoint(Hits hits) { if (hits.isEmpty()) return false; addSelectedPoint(hits, 1, false); addSelectedLine(hits, 1, false); if (selPoints() == 1 && selLines() == 1) { getKernel().getManager3D().Circle3D(null, getSelectedLinesND()[0], getSelectedPointsND()[0]); return true; } return false; } COM: <s> get axis and point </s>
funcom_train/15743825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SPath toSPath(ISarosSession sarosSession) { IProject project = sarosSession.getProject(projectID); if (project == null) throw new IllegalArgumentException( "SPathDataObject cannot be connected to SarosSession because its ID is unknown: " + projectID); return new SPath(project, path); } COM: <s> attach this spath data object to the given isaros session </s>
funcom_train/40883778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forward (float[] buffReal, float[] buffImag) { if (buffReal.length != timeSize || buffImag.length != timeSize) { throw new IllegalArgumentException("FFT.forward: The length of the passed buffers must be equal to timeSize()."); } setComplex(buffReal, buffImag); bitReverseComplex(); fft(); fillSpectrum(); } COM: <s> performs a forward transform on the passed buffers </s>
funcom_train/50345142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resequenceIds(){ List<String> l = getItemsBySequenceList(); int i; for (i=0; i<l.size(); i++){ ScheduleItem si = getItemById(l.get(i)); si.setSequenceId(i+1); // start sequence numbers at 1 } _sequenceNum = i; } COM: <s> reorder the item sequence numbers for this schedule </s>
funcom_train/14177489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent arg0) { // TODO Auto-generated method stub Point p = adjustPointToView(arg0.getPoint()); currentSelectedStation = null; Iterator<JLabelStation> it = stationLabels.iterator(); while(it.hasNext()) { JLabelStation l = it.next(); if(l.isPointOver(p)) { currentSelectedStation = l; // we'll take the station over all the other if more than one station matching } } } COM: <s> a mouse button has been pressed </s>
funcom_train/11724012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Thread createChangeFeed(int pollTimeout, boolean enableObservation) { Thread t = null; if (enableObservation) { t = new Thread(new ChangePolling(pollTimeout)); t.setName("Change Polling"); t.setDaemon(true); t.start(); } return t; } COM: <s> creates a background thread which polls for external changes on the </s>
funcom_train/45740558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here okCommand = new Command("Start", Command.OK, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/25365926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResistIcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Armor_resistIce_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Armor_resistIce_feature", "_UI_Armor_type"), LeveleditorPackage.Literals.ARMOR__RESIST_ICE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the resist ice feature </s>
funcom_train/2760554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lock() throws LockedException { if(_lock != null) { throw new IllegalStateException("Message already locked."); } _lock = _messageStore.getBindContext().getLockGenerator().createLock(); _messageStore.lockMessage(_lock, _message.getId()); _message = _messageStore.getMessageById(_message.getId()); _data = null; } COM: <s> lockas the message in the message store </s>
funcom_train/5603779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getPythonHome() { if(jythonHome == null ) { String aPythonHome = getProject().getProperty("python.home"); if(aPythonHome == null ) { throw new BuildException("No python.home or home specified"); } jythonHome = new File(aPythonHome); } return jythonHome; } COM: <s> get the path to the jython home or python home </s>
funcom_train/3524097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map createParameterMap() { HashMap map = new HashMap(); Enumeration names = request.getParameterNames(); while (names.hasMoreElements()) { String key = (String)names.nextElement(); map.put(key, request.getParameterValues(key)); } return Collections.unmodifiableMap(map); } COM: <s> create a map of parameters contained in the request </s>
funcom_train/26413017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActionsEnabled( boolean state ) { Iterator iter = dropmenuItems.iterator(); while( iter.hasNext() ) { GUIDropmenuItem item = (GUIDropmenuItem) iter.next(); if( item != null && item.getEnableLevel() == ENALEVEL_OPEN ) { item.getAction().setEnabled( state ); } } } COM: <s> set action enabled for all actions when a module is opened or closed </s>
funcom_train/31101022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String dateToString(int[] date) { StringBuffer message = new StringBuffer(6); message.append('-'); message.append('-'); message.append('-'); message.append(date[D]); message.append((char)date[utc]); return message.toString(); } COM: <s> converts g day object representation to string </s>
funcom_train/13814716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShootingPlace(String v) { checkStringProperty( "Shooting place", v, SHOOTING_PLACE_LENGTH ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.shootingPlace = v; modified(); txw.commit(); } COM: <s> set the value of shooting place </s>
funcom_train/44811516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createPropertiesFileName(String name, Locale locale) { // By default we create file name with only language prefix // For example: // en_US: action_en.properties // ru_RU: action_ru.properties if (isNewPropertiesFileWithoutCountry()) { String language = locale.getLanguage(); if ("en".equals(language)) { language = null; } return AppEnvironment.createPropertiesFileName(name, language, null); } return AppEnvironment.createPropertiesFileName(name, locale); } COM: <s> create properties file name by locale </s>
funcom_train/8686274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Collection getCollection() { int ct = getValidCount(); Iterator iter = getResourceCollection().iterator(); ArrayList al = new ArrayList(ct); for (int i = 0; i < ct && iter.hasNext(); i++) { al.add(iter.next()); } return al; } COM: <s> take the first code count code elements </s>
funcom_train/11757532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isGreater(Term t) { t = t.getTerm(); if (t.isNumber()){ return value>((Number)t).intValue(); } else if (t.isStruct()){ return false; } else if (t.isVar()){ return true; } else { return false; } } COM: <s> returns true if this integer term is grater that the term provided </s>
funcom_train/10358873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readLine(byte[] b, int off, int len) throws IOException { if (len <= 0) { return 0; } int count = 0, c; while ((c = read()) != -1) { b[off++] = (byte) c; count++; if (c == '\n' || count == len) { break; } } return count > 0 ? count : -1; } COM: <s> reads the input stream one line at a time </s>
funcom_train/27768753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cachedObjectReset(CacheableEntryEvent event) { CacheableEntry entry = event.getEntry(); Object key = entry.getKey(); synchronized(lock){ Long tstamp = (Long)reverseTimeMap.get(key); reverseTimeMap.remove(key); timeMap.remove(tstamp); tstamp = new Long(System.currentTimeMillis()); timeMap.put(tstamp, key); reverseTimeMap.put(key, tstamp); } } COM: <s> repond to a reset entry in this cache </s>
funcom_train/41621250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processOrientation(int jointIndex, Quaternion raw) { float t = 1.0f - (raw.x * raw.x) - (raw.y * raw.y) - (raw.z * raw.z); if (t < 0.0f) raw.w = 0.0f; else raw.w = -(FastMath.sqrt(t)); // if(this.baseframe && MD5Importer.getInstance().getParents()[jointIndex] < 0) // { // raw.set(MD5Importer.base.mult(raw)); // } } COM: <s> process the quaternion orientation to finalize it </s>
funcom_train/1683166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flushCacheWithAppend(byte bufferToAppend[], int off, int len) throws IOException { this.out.writeLine(Integer.toHexString(this.cachePosition + len)); this.out.write(this.cache, 0, this.cachePosition); this.out.write(bufferToAppend, off, len); this.out.writeLine(""); this.cachePosition = 0; } COM: <s> writes the cache and buffer to append to the underlying stream </s>
funcom_train/35842469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float calculateWeight() { weight = 0; for (ClassdiagramNode node : uplinks) { weight = Math.max(weight, node.getWeight() * UPLINK_FACTOR * (1 + 1 / Math .max(1, node.getColumn() + UPLINK_FACTOR))); } weight += getSubtreeWeight() + (1 / Math.max(1, getColumn() + UPLINK_FACTOR)); return weight; } COM: <s> calculate the weight of this node </s>
funcom_train/11054685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double populationStandardDeviation(double[] v) { double mean = new Mean().evaluate(v); double sum = 0; for (int i = 0; i < v.length; i++) { sum += (v[i] - mean) * (v[i] - mean); } return FastMath.sqrt(sum / v.length); } COM: <s> definitional formula for population standard deviation </s>
funcom_train/33464843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onChanged() { // If builder is null, this is the case where onChanged is being called // from setMessage or clear. if (builder != null) { message = null; } if (isClean && parent != null) { parent.markDirty(); // Don't keep dispatching invalidations until build is called again. isClean = false; } } COM: <s> called when a the builder or one of its nested children has changed </s>
funcom_train/35740578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopApp() { Collection<WirePipe> allWirePipes = new ArrayList<WirePipe>(wirePipes.values()); for (WirePipe aWirePipe : allWirePipes) { // Close all of the wire pipes. aWirePipe.close(); } wirePipes.clear(); // Clear our listener endpoint.removeIncomingMessageListener(WIRE_SERVICE_NAME, null); endpoint = null; rendezvous = null; } COM: <s> ask this service to stop </s>
funcom_train/48589139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void canelButtonActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_canelButtonActionPerformed {// GEN-HEADEREND:event_canelButtonActionPerformed if (worker != null) { worker.interrupt(); } setVisible(false); dispose(); }// GEN-LAST:event_canelButtonActionPerformed COM: <s> cancels the action and closes the dialog </s>
funcom_train/44863078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void referenceNodes() { Node tempnode; for (int i=0; i<nodelist.size(); i++) { tempnode = (Node)nodelist.elementAt(i); tempnode.setForceReference(shareddata.getForce(i)); tempnode.setInternalForceReference(shareddata.getInternalForce(i)); tempnode.setContactForceReference(shareddata.getContactForce(i)); tempnode.setExternalForceReference(shareddata.getExternalForce(i)); tempnode.setHourglassForceReference(shareddata.getHourglassForce(i)); tempnode.setForcePositiveReference(shareddata.getForcePositive(i)); } } COM: <s> this method changes the reference on the node objects to use the </s>
funcom_train/3428638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLast() { // If nodes are stored in _nodes, take advantage of the fact that // there are no duplicates. Otherwise, fall back to the base heap // implementaiton and hope it does a good job with this. return (_nodes != null) ? _nodes.cardinality() : super.getLast(); } COM: <s> returns the number of nodes in this iterator </s>
funcom_train/20775880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decay(double value) { if (value * 10 > N) return; value = (N - value) / N; N = 0; for (int i = 0; i < this.bins.length; i++) { this.bins[i] -= value * this.bins[i]; N += this.bins[i]; } } COM: <s> this methods is used to decay the histograms values uniformly </s>
funcom_train/23057225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getScheduleNewEventjButton() { if (ScheduleNewEventjButton == null) { ScheduleNewEventjButton = new JButton(); ScheduleNewEventjButton.setText("Schedule New Event"); ScheduleNewEventjButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { getAddNewEventjDialog().setVisible(true); } } ); } return ScheduleNewEventjButton; } COM: <s> this method initializes schedule new eventj button </s>
funcom_train/24181520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIterablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ForEachLoop_iterable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ForEachLoop_iterable_feature", "_UI_ForEachLoop_type"), ParallelJPackage.Literals.FOR_EACH_LOOP__ITERABLE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the iterable feature </s>