__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/944384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encodeAnonymousResources (ModelWrapper m) { int count = 0; for (Iterator it = m.getMatchingTriples(null, null, null); it.hasNext();) { count++; StatementWrapper stmt = (StatementWrapper)it.next(); encodeAnonResource(stmt.getSubject()); encodeAnonResource(stmt.getPredicate()); NodeWrapper object = stmt.getObject(); if (object instanceof ResourceWrapper) encodeAnonResource((ResourceWrapper)object); } logger.debug("Loaded " + count + " quads."); } COM: <s> install fake uris for anonymous resources and index them </s>
funcom_train/38488560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputProperties(Properties outputProperties) { for (Enumeration e = outputProperties.propertyNames(); e.hasMoreElements(); ) { Object key = e.nextElement(); if (key != null) { String name = key.toString(); String value = outputProperties.getProperty(name); if (value != null) { setOutputProperty(name, value); } } } } COM: <s> override output properties specified in the transformation stylesheet </s>
funcom_train/4014264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addClickHandler(final RadioButtonWidget widget){ addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event){ if(getParent().getParent() instanceof RuntimeWidgetWrapper && ((RuntimeWidgetWrapper)getParent().getParent()).isLocked()){ setValue(checked); } else if(((CheckBox)event.getSource()).getValue() == true && checked) ((CheckBox)event.getSource()).setValue(false); } }); } COM: <s> adds the click event handler for a radio button widget </s>
funcom_train/13646766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Icon getDefinedIcon(){ Object object = this.selectedNode.getUserObject(); //is this root node? if( object == null || !(object instanceof Partner)) return( super.getOpenIcon() ); Partner userObject = (Partner)object; if( userObject.isLocalStation() ) return( this.ICON_LOCAL ); return( this.ICON_REMOTE ); } COM: <s> returns the defined icon of the entry </s>
funcom_train/8103319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDumpICWordSim353_simple() { System.out.println("testDumpICWordSim353_simple"); int n_limit = 100; session.category_black_list.setMaxSteps(n_limit); session.connect = connect_simple; //Hyponyms.dumpICWordSim353(session); } COM: <s> calculates and prints ic for 353 pairs of synonyms </s>
funcom_train/34528501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createProject(ProjectDesigner designer) throws Exception { String projectName = designer.getProjectName(); ProjectMgrConfiguration configuration = designer.getConfiguration(); ProjectContext projectContext = InforamaContext.getInstance(). createProject(projectName, configuration); ProjectMgr projectMgr = getDefaultProjectMgr(); designer.projectCreated(projectMgr, projectContext.getProject()); projectContext.refresh(); projectMgr.saveProject(projectContext.getProject()); ProjectHandler.getInstance(). projectOpened( projectName, projectContext, configuration, designer.getMRUDescription() ); } COM: <s> creates a new project whose configuration </s>
funcom_train/20997875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateSelf(View2d view) { GameElement gameElement = getGameElement(); SimpleVector pos = gameElement.getAbsolutePosition(); SimpleVector size = gameElement.getSize(); x = pos.getX() * view.getZoom(); y = pos.getY() * view.getZoom(); width = (size.getX()+1) * view.getZoom(); height = (size.getY()+1) * view.getZoom(); } COM: <s> the concrate updateing method </s>
funcom_train/130246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleEARMessage () { try { int size = is.readInt (); /* read the packet size */ System.err.println ("[Position3D] : Handling EAR of size = " + size); } catch (Exception e) { System.err.println ("[Position3D] : handleResponsePosition ERROR " + e.toString ()); } } COM: <s> handle error acknowledgement response messages </s>
funcom_train/43244938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringToObjectArray() { System.out.println("StringToObjectArray"); String str = ""; Class arrayType = null; Object expResult = null; Object result = BeanTools.StringToObjectArray(str, arrayType); 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 string to object array method of class org </s>
funcom_train/39104180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ProgressListener remove(ProgressListener oldl) { if (oldl == a) return b; if (oldl == b) return a; ProgressListener a2 = removeInternal(a, oldl); ProgressListener b2 = removeInternal(b, oldl); if (a2 == a && b2 == b) { return this; // it's not here } return addInternal(a2, b2); } COM: <s> removes a listener from this multicaster and returns the </s>
funcom_train/22179684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doApplyButton() { PovClipseRenderConfiguration config = null; boolean saveOK = false; try { config = getRenderConfiguration(false); config.checkConfig(); saveOK = config.save(); if (dialog.selectionTreeContainsRenderConfig(config)) dialog.reloadSelectionTree(true); if (dialog.templateTreeTreeContainsRenderConfig(config)) dialog.reloadTemplateTree(true); return saveOK; } catch (IOException e1) { errorDisplayer.setErrorText(e1); return false; } catch (RenderConfigurationException rcEx) { errorDisplayer.setErrorText(rcEx); return false; } finally { if (saveOK) dialog.setSelectionTreeItemColor(config); } } COM: <s> saves the render configuration </s>
funcom_train/10869529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence getField() { CharSequence field = null; T lower = getLowerBound(); T upper = getUpperBound(); if (lower != null) { field = lower.getField(); } else if (upper != null) { field = upper.getField(); } return field; } COM: <s> returns the field associated with this node </s>
funcom_train/18771019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GraphOutlinePage getOutlinePage() { if (outlinePage == null && getGraphicalViewer() != null) { RootEditPart rootEditPart = getGraphicalViewer().getRootEditPart(); if (rootEditPart instanceof ScalableFreeformRootEditPart) { outlinePage = new GraphOutlinePage( (ScalableFreeformRootEditPart) rootEditPart); } } return outlinePage; } COM: <s> returns the outline view </s>
funcom_train/14465345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateFormulas() throws FunctionNotSupportedException{ Formula[] forms = mybook.getFormulas(); for(int x=0;x<forms.length;x++){ try{ forms[x].calculateFormula(); }catch(Exception e){ Logger.logWarn("Calculating formula failed: "+ forms[x].getSheet().getSheetName() + "!" +forms[x].getCellAddress()); try{ Logger.logInfo(forms[x].getFormulaString()); }catch(Exception a){;} Logger.logInfo(":"+e); } } } COM: <s> iterate through the formulas in this work book and call the </s>
funcom_train/51349237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void acquireLockAndRun() throws Exception { // Note: We MUST request a valid zk connection here. final ZooKeeper zookeeper = fed.getZookeeper(); final ZLock zlock = ZLockImpl.getLock(zookeeper, lockZPath, fed.getZooConfig().acl); zlock.lock(); try { runWithLock(zookeeper, zlock); } finally { zlock.unlock(); } } COM: <s> waits until it acquires the lock and then </s>
funcom_train/16357756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double get(int row, int col){ if(row >= 0 && col >= 0 && row < m[0].length && col < m.length){ return m[col][row]; } else{ throw new MatrixException("index out of range : " + row + "x" + col + " in " + m[0].length + "x" + m.length); } } COM: <s> get the value of the element at the given location </s>
funcom_train/40884155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BoundingBox inf () { min.set(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY); max.set(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY); cnt.set(0, 0, 0); dim.set(0, 0, 0); crn_dirty = true; return this; } COM: <s> sets the minimum and maximum vector to positive and negative infinity </s>
funcom_train/26245571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String sanitiseAllegiance(String code) { String[] im = { "Li", "Fi", "St" }; String[] jp = { "Jo", "Jp", "JP", "Jr", "Ju", "Jv" }; return code; } COM: <s> try and work out what the allegiance should be </s>
funcom_train/45627982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateFirstLetter(char letter) { boolean isCorrect = false; int ascIIValue = (int) letter; if (ascIIValue >= 97 && ascIIValue <= 122) { isCorrect = true; } else if (ascIIValue >= 65 && ascIIValue <= 90) { isCorrect = true; } else if (ascIIValue == 95) { isCorrect = true; } return isCorrect; } COM: <s> verify whether the first character is illegal character </s>
funcom_train/36769709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void layoutComponents() { layoutLeftPanel(); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(Box.createRigidArea(new Dimension(10, 1))); add(leftPanel); add(Box.createRigidArea(new Dimension(10, 1))); add(defectEditorScrollPane); add(Box.createRigidArea(new Dimension(10, 1))); } COM: <s> lays out the defect list defect editor and defect filter editor components </s>
funcom_train/23877176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getBPELChildElementByLocalName(Element parentElement, String localName) { NodeList children = parentElement.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node node = children.item(i); if (localName.equals(node.getLocalName()) && BPELUtils.isBPELElement(node)) { return (Element) node; } } return null; } COM: <s> returns the first child node of code parent element code that is an </s>
funcom_train/46379789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reactivate() { String date = new SimpleDateFormat("h:mm a").format(new Date()); String msg = "--- User " + remoteUser + " has joined the world at " + date + " ---\n"; // messageTextArea.append(msg); messageTextField.setEnabled(true); sendButton.setEnabled(true); } COM: <s> re activates the chat by displaying a message and turning on the gui </s>
funcom_train/8064459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAppletInfo() { return "GEF (the Graph Editing Framework) example editor applet. \n" + "FlexibleApplet a very simple demonstration of how GEF can \n" + "be used. " + "\n\n" + "Author: Jason Robbins\n" + "Copyright (c) 1996-1998 Regents of the University of California.\n" + "All rights reserved.\n\n"; } COM: <s> reply a breif string that describes this applet in the about box </s>
funcom_train/13655293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveKeyStore(KeyStore keystore, char[] keystorePass, String filename) throws Exception { OutputStream out = null; try { out = new FileOutputStream(filename); keystore.store(out, keystorePass); } finally { if (out != null) { out.close(); } } } COM: <s> saves the passed keystore </s>
funcom_train/3381634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Integer getInteger(String key, int defval) { String val = null; try { val = System.getProperty(key, props.getProperty(key)); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } if (val != null) { try { return Integer.decode(val); } catch (NumberFormatException ex) { } } return new Integer(defval); } COM: <s> get an integer networking system property </s>
funcom_train/25980763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBConnection create(ConnInfo cc) { DBConnJavaLite con = new DBConnJavaLite(); con.connInfo = cc; con.caseSensity = properties.getProperty("case","upper","DAD_"+cc.connAlias); if (log.isDebugEnabled()) log.debug(".create - Package Case sensitivy set to: "+con.caseSensity); return con; } COM: <s> create a concrete dbconnection dbconn java </s>
funcom_train/48524329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doCheckpoint() { HashSeq foo = history.getTopLevelEntry(); long topSeq = foo.getSeq(); try { long topIdx = history.findSeq(topSeq); if (history.statEntry(topIdx).getType() != EVT_CHECKPOINT) { writeCheckpoint(); } } catch (IOException ioe) { throw new RuntimeException("Error during checkpoint",ioe); } } COM: <s> periodic timer for writing checkpoints </s>
funcom_train/39012077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPreferences() { IPreferenceStore store = StrakerPlugin.getDefault().getPreferenceStore(); _restoreLastUrl = store.getBoolean(IStrakerPreferenceConstants.PREFS_BROWSERVIEW_RESTORE_URL); _storedUrl = store.getString(IStrakerPreferenceConstants.PREFS_BROWSERVIEW_URL); } COM: <s> load local view preferences </s>
funcom_train/18287481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties getProperties(File propsFile) { Properties properties = new Properties(); InputStream is = null; try { is = new FileInputStream(propsFile); properties.load(is); } catch (IOException e) { EclipseMECorePlugin.log( IStatus.WARNING, "Error reading properties file " + propsFile, e); } finally { if (is != null) { try { is.close(); } catch (IOException e) {} } } return properties; } COM: <s> return a properties object for the properties in the file </s>
funcom_train/21082252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProductPoint getPointsByProductByYear(Product p, int years, int type) { ProductPoint pp = null; try { pp = DaoFactory.getProductPointDao().get(p, years, type); } catch (Exception e) { pp = new ProductPoint(); pp.setProduct(p); pp.setPoints(0); pp.setYears(years); } return pp; } COM: <s> retrieve the list of points for a given product and number of year </s>
funcom_train/27736566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldBypassQueue(HttpRequest request, HTTPUploader uploader) { assert uploader.getState() == UploadStatus.CONNECTING; /* return "HEAD".equals(request.getRequestLine().getMethod()) || uploader.isForcedShare(); */ return "HEAD".equals(request.getRequestLine().getMethod()); } COM: <s> determines whether or not this uploader should bypass queuing meaning </s>
funcom_train/36660641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { System.err.println("Testcase: " + getName()); System.err.println("Parameters:" + "\n test.items=" + items + "\n test.item.size=" + itemSize + "\n test.modify.items=" + modifyItems + "\n test.count=" + count); props = createProperties( DataStoreImplClass + ".directory", createDirectory()); } COM: <s> prints the test case and sets up data store properties </s>
funcom_train/9680064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTestConstructor() { cat.info("Testing CLOC for Test constructor"); final BinClass test = (BinClass) getType("Test"); assertEquals( "CLOC", 0, ClocMetric.calculate(test.getDeclaredConstructors()[0])); cat.info("SUCCESS"); } COM: <s> tests cloc for test constructor </s>
funcom_train/41604294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBoxMenuItem createCheckBoxMenuItem(AbstractActionExt a) { JCheckBoxMenuItem mi = a.isNoCloseAction() ? new JCheckBoxMenuItemNoCloseAction() : new JCheckBoxMenuItem(); configureSelectableButton(mi, a, null); configureMenuItemFromExtActionProperties(mi, a); return mi; } COM: <s> helper method to add a checkbox menu item </s>
funcom_train/38827883
/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(); // DE Label Display Pointer shall be 0 if (DE.getLblDsp() != 0) { String msg = RESOURCES.getString("labelDispay").replace("<DISP/>",String.valueOf(DE.getLblDsp())); addErrorMessage(getWarningString(msg)); } } COM: <s> checks to see if the entity is correct </s>
funcom_train/19972760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reportException(final Exception e) { final String exString = getErrorString(e); Log.e("Hermit", exString, e); if (appContext instanceof Activity) { ((Activity) appContext).runOnUiThread(new Runnable() { @Override public void run() { reportActivityException(e, exString); } }); } else { reportToastException(e, exString); } } COM: <s> report an unexpected exception to the user by popping up a dialog </s>
funcom_train/1684026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addComponents() { for(CountryPanelVC countryPanelVC : this.mapModel.getCountryPanelVCs().values()){ this.add(countryPanelVC); countryPanelVC.setSize(new Dimension(100, 40)); //TODO calculate the width and height } this.add(new JPanel()); } COM: <s> adds country panel vc components deposited in the map model to this map </s>
funcom_train/24117562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JTableHeader header = table.getTableHeader(); //Configure the component// setForeground(header.getForeground()); setBackground(header.getBackground()); setFont(header.getFont()); setBorder(UIManager.getBorder("TableHeader.cellBorder")); //Set the value// setText(value.toString()); setToolTipText(getText()); return this; } COM: <s> configure the component that should be displayed in the renderer </s>
funcom_train/21954490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getTextSelectionColor() { MainPanel mp = Pooka.getMainPanel(); if (mp != null) { FolderPanel fp = mp.getFolderPanel(); if (fp != null) { javax.swing.plaf.metal.MetalTheme currentTheme = fp .getCurrentTheme(); if (currentTheme != null) { return currentTheme.getHighlightedTextColor(); } } } return super.getTextSelectionColor(); } COM: <s> returns the color the text is drawn with when the node is selected </s>
funcom_train/49938679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setType(int nr) { for (int y = 0; y < field.length; y++) { for (int x = 0; x < field[y].length; x++) { field[y][x] = stones[nr][y][x]; } } color = nr + 2; } COM: <s> initialize this stones board field an color </s>
funcom_train/24187634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean processOK(OK<V> msg) { if(!terminated) { if(state == StateValue.IMPROVE) { this.okMsgsToProcess.add(msg); return false; } counter++; setNeighborValue(msg.getSender(), msg.getValue()); if(counter == number_of_neighbors) { calculateCurrentUtility(); counter = 0; assert state == StateValue.OK; state = StateValue.IMPROVE; return true; } } return false; } COM: <s> method to process an ok message </s>
funcom_train/34960882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(SchoolAddress entity) { EntityManagerHelper.log("deleting SchoolAddress instance", Level.INFO, null); try { entity = getEntityManager().getReference(SchoolAddress.class, entity.getSchoolAddressId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent school address entity </s>
funcom_train/18103991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int addBreak(short spot) { if (numLines == lineBreaks.length) { short newBreaks[] = new short[lineBreaks.length + 2]; System.arraycopy(lineBreaks, 0, newBreaks, 0, lineBreaks.length); lineBreaks = newBreaks; } lineBreaks[numLines] = spot; return (isOffset ? (width - offsetWidth) : width); } COM: <s> add a line break </s>
funcom_train/50327411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readCVOpsMode(int CV, jmri.ProgListener p, int addr, boolean longAddr) throws jmri.ProgrammerException { lopsa = addr&0x7f; hopsa = (addr/128)&0x7f; mServiceMode = false; doRead(CV, p, 0x2F); // although LPE implies 0x2C, 0x2F is observed } COM: <s> invoked by ln ops mode programmer to start an ops mode </s>
funcom_train/35178266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getLinksVersion(Long versionId, String relName) throws FinderException { Collection col = new HashSet(); VersionLocal version = EntityHomeCache.getInstance().getVersionHome() .findByPrimaryKey(versionId); if (VersionLite.LINK_VERSION_ENTRY.equals(relName)) { col.add(version.getEntry().getEntryLite()); } else return null; return col; } COM: <s> finds and returns all the code value code objects linked to a version </s>
funcom_train/22335396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testTraceMethodCompiled() { try { XmlHttpClient xmlHttpClient = new XmlHttpClient("org/placidus/xmlhttplib/test/tests/test4/test4-compiled-clients.xml"); Map<String, Object> result = xmlHttpClient.execMap("tracetest", getDefaultParams()); Log.logInfo("Result of tracetest: " + CollectionHelper.dump(result)); assertTrue(((String) result.get("tracetest_statuscode")).equals("200")); assertTrue(((String) result.get("tracetest_requestheader_TraceTestHeaderField")).equals("moped")); } catch (Exception ex) { Log.logError(ex); fail(ex.getMessage()); } } COM: <s> sends a trace request to server and awaits trace response sent headers back </s>
funcom_train/9568556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(PdfObject object) { if (object == null) { text.setText(null); layout.show(this, TEXT); this.repaint(); text.repaint(); return; } switch(object.type()) { case PdfObject.DICTIONARY: case PdfObject.STREAM: table.setModel(new DictionaryTableModel((PdfDictionary)object)); layout.show(this, TABLE); this.repaint(); break; case PdfObject.ARRAY: table.setModel(new PdfArrayTableModel((PdfArray)object)); layout.show(this, TABLE); this.repaint(); break; default: text.setText(object.toString()); layout.show(this, TEXT); break; } } COM: <s> shows a pdf object as text or in a table </s>
funcom_train/28757007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaderbackground(String newVal) { if ((newVal != null && this.headerbackground != null && (newVal.compareTo(this.headerbackground) == 0)) || (newVal == null && this.headerbackground == null && headerbackground_is_initialized)) { return; } this.headerbackground = newVal; headerbackground_is_modified = true; headerbackground_is_initialized = true; } COM: <s> setter method for headerbackground </s>
funcom_train/9085190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createCharacter(String name, String desc, String bio) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_NAME, name); initialValues.put(KEY_DESC, desc); initialValues.put(KEY_BIO, bio); return mDb.insert(DATABASE_TABLE, null, initialValues); } COM: <s> create a new character using the parameters provided </s>
funcom_train/18150084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addControlAct(ControlAct controlAct) { // create the association set if it doesn't exist already if(_controlAct == null) _controlAct = new AssociationSetImpl<ControlAct>(); // add the association to the association set getControlAct().add(controlAct); // make the inverse link controlAct.setPayload(this); } COM: <s> adds an association control act </s>
funcom_train/11724070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyDestroyed() { // copy listeners to array to avoid ConcurrentModificationException ItemLifeCycleListener[] la = listeners.values().toArray(new ItemLifeCycleListener[listeners.size()]); for (int i = 0; i < la.length; i++) { if (la[i] != null) { la[i].itemDestroyed(this); } } } COM: <s> notify the listeners that this instance has been destroyed </s>
funcom_train/18422707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasicListener() { sysUnderTest.addLegacyListener((LegacySystemListener)mockListener1); sysUnderTest.addLegacyListener((LegacySystemListener)mockListener2); //have legacy system fire event to it's one and only listener legacyListener.legacyEventOccurred(5); mockListener1.expectCall("legacyEventOccurred"); mockListener2.expectCall("legacyEventOccurred"); } COM: <s> tests that when the legacy system fires and event to its only </s>
funcom_train/9197410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { // Note: Any changes here should be reflected in // XMLOutputter.printQualifiedName() if ("".equals(namespace.getPrefix())) { return getName(); } return new StringBuffer(namespace.getPrefix()) .append(':') .append(name) .toString(); } COM: <s> returns the full name of the element in the form </s>
funcom_train/18040897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generate() throws HasClException { for (Entry<String, List<EqnDecl>> e : eqns.entrySet()) { String id = e.getKey(); List<EqnDecl> eds = e.getValue(); EqnDecl ed = eds.get(0); defs.put(id, ed.generate(this, id, eds.subList(1, eds.size()))); } } COM: <s> generates evaluation nodes for all of the top level definitions in this </s>
funcom_train/19700135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeFilterNavigationPanel() { pnlFiltersAndNavigation.add(pnlFilter); pnlFilter.setFilterAction(new ClickHandler() { @Override public void onClick(ClickEvent event) { filteredMovies = pnlFilter.filter(allMovies); moviesView.setMovies(filteredMovies); } }); // Add filter and navigation panel to top panel pnlTop.add(pnlFiltersAndNavigation); pnlTop.setCellHorizontalAlignment(pnlFiltersAndNavigation, HasHorizontalAlignment.ALIGN_CENTER); } COM: <s> initializes the filter panel and the navigational elements </s>
funcom_train/22710724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TSContainerInfo selectedTSContainer() { int selectedIndex = this.combo.getSelectionIndex(); if(!this.getVisTSCInfos().isEmpty()) { if(selectedIndex == this.getVisTSCInfos().size()) { return null; } else { return this.getVisTSCInfos().get(selectedIndex); } } else { return null; } } COM: <s> returns the code tscontainer info code which is selected in the </s>
funcom_train/32869596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireRunUnreachable(final ProseRunNode run) { for (Iterator all = getRunListeners().iterator(); all.hasNext();) { final IProseRunListener each = (IProseRunListener) all.next(); Platform.run(new SafeRunnable() { public void run() throws Exception { each.runUnreachable(run); } }); } } COM: <s> notify listeners that a prose run is unreachable </s>
funcom_train/33967992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeFromFavorites(int position) { FMDDataSubmitter dataSubmitter = mAppController.getDataSubmitter(); if (dataSubmitter.canSubmit()) { if (position != ListView.INVALID_POSITION) { mRemovedFavorites = position; FMDStoryDetails story = mFavoritesAdapter .getItem(mRemovedFavorites); dataSubmitter.submitFavoriteStory(story, false); } } else { displayToastNotification(R.string.error_submitted_busy); } } COM: <s> remove a story from the user favorites </s>
funcom_train/33058625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean rsContinue(DB db) throws Exception { boolean ok; boolean hasNext; if (db.getIsPaged()) { //hasNext = db.next(); return ((db.getNumRecs() > (db.getCurrLocation() - db.getFirstRec())) && db.next()); } else { return (db.next()); } } COM: <s> wether or not the set should has another results </s>
funcom_train/4589035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupRender(){ long totalCount = this.totalRowCount; if(totalCount%nPageSize==0){ totalPage = totalCount/nPageSize; } else{ totalPage = totalCount/nPageSize+1; } // System.out.println("setupRender this.curPageNum="+this.curPageNum); // System.out.println("======setupRender执行========="); // System.out.println("setupRender +tempintValue"+ this.tempintValue); } COM: <s> component initialize method </s>
funcom_train/43469190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object obj) { int size = this.collection.size(); Integer num; if (size > 0) { if (size == 1) { num = new Integer(size); } else { num = new Integer(size + 1); } } else { num = new Integer(0); } put(num, obj); } COM: <s> only call this method when you really need to </s>
funcom_train/7689218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics2D g2, Node item, Justification justification, Rectangle2D bounds) { if (getBackground() != null) { g2.setPaint(getBackground()); g2.fill(bounds); } if (getBorderPaint() != null && getBorderStroke() != null) { g2.setPaint(getBorderPaint()); g2.setStroke(getBorderStroke()); } g2.draw(bounds); } COM: <s> the bounds define the shape of the bar so just draw it </s>
funcom_train/31800658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addTaskType(TaskTypeTO typeTO) throws Exception { /* reach for the bean */ boolean noErrors = false; try { /* Localize the bean */ TaskModuleHome home = EjbLocator.getTaskModuleHome(); TaskModule bean = home.create(); /* Save task in database */ noErrors = bean.addTaskType(typeTO); bean.remove(); } catch (Exception e) { throw new ServletException(e); } /* try */ return noErrors; } /* addTaskType() */ COM: <s> this is the class for handling saving tasks types in database using ejb </s>
funcom_train/45718719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V set(int index, V value) { int size = this.size; if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(); } int valueDataIndex = 1 + (index << 1); V result = valueAtDataIndex(valueDataIndex); this.data[valueDataIndex] = value; return result; } COM: <s> sets the value at the given index overriding any existing value mapping </s>
funcom_train/16975126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean shouldRenderId(ViewContext context, UIComponent component) { String id = component.getId(); // Otherwise, if ID isn't set, don't bother if (id == null) return false; // ... or if the ID was generated, don't bother if (id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) return false; return true; } COM: <s> returns true if the component should render an id </s>
funcom_train/21263699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Taxonomia entity) { EntityManagerHelper.log("saving Taxonomia instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved taxonomia entity </s>
funcom_train/7589389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getValue() throws JMException { Class cls = java.lang.String.class; String name = cls.getName(); Configuration.logger_.severe("Class " + name + " does not implement " + "method getValue"); throw new JMException("Exception in " + name + ".getValue()") ; } // getValue COM: <s> gets the double value representign the variable </s>
funcom_train/10591394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawl(URL url, int maxDepth) { crawled = new HashSet(); urlsToProcess = new HashSet(); urlsNextDepth = new HashSet(); depth = maxDepth; if (getLogger().isDebugEnabled()) { getLogger().debug("crawl URL " + url + " to depth " + maxDepth); } urlsToProcess.add(url); } COM: <s> start crawling a url </s>
funcom_train/3290297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(String path) { String res; res=exec.execute(sshpath+"/ssh -q -l "+dstuser+" "+dsthost+" rm -f "+path); log.debug("SCPcopy -> remove "+path+" : "+res); return res.length()<=0; } COM: <s> removes a file at the host </s>
funcom_train/45027662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceRoles(Role[] aRoles) { if (aRoles == null) throw new IllegalArgumentException("Roles can not be null"); roles.clear(); for (int i = 0; i < aRoles.length; i++) { roles.add(aRoles[i]); } } COM: <s> replaces the roles with given roles </s>
funcom_train/45844532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CharacterParams createAttributes(int iGender, int appendNumber) { CharacterParams attribs = null; switch(iGender) { case 1: { attribs = new MaleAvatarParams("MaleAvatar" + appendNumber).build(); break; } case 2: { attribs = new FemaleAvatarParams("FemaleAvatar" + appendNumber).build(); break; } } return attribs; } COM: <s> randomly generates an avatar attribute based on the gender specified </s>
funcom_train/13934934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ISessionStore sessionStoreFactory () { log.debug("Creating a SessionStore object."); ISessionStore inst = null; try { String sessionStoreValue = configMap.getConfigProperty("session_store_class"); log.debug("SessionStore to be created: "+ sessionStoreValue); Class storageClass = Class.forName(sessionStoreValue); inst = (ISessionStore)storageClass.newInstance(); inst.init(); } catch (Exception ex) { log.fatal(ex, ex); } return inst; } COM: <s> this method returns isession store based on b session store class b configurations </s>
funcom_train/10957738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResultConfig createResultConfig(Result result) { Class<? extends Object> cls = result.type(); if (cls == NullResult.class) { cls = null; } return createResultConfig(result.name(), cls, result.value(), createParameterMap(result.params())); } COM: <s> extracts result name and value and calls </s>
funcom_train/30194690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JxplElement evaluate(JxplElement input) throws IllegalArgumentException { try { List list = ((JxplList)input).getElements(); JxplInteger ji = (JxplInteger)environment.evaluate((JxplElement)list.get(1)); BigInteger bi = ji.getValue(); long t = bi.longValue(); Thread.sleep(t); return ji; } catch(Exception ex){ recorder.error("", new IllegalArgumentException(ex.toString())); throw new IllegalArgumentException(ex.toString()); } } COM: <s> expects a jxpl integer value t </s>
funcom_train/22593651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double probabilityMakinFull(GeneticNode sc) { Double result = probM.get(sc.getTreeKey()); if (result == null) { double treeOcc = this.getOccurrencies(sc); // probability of extracting a tree as the number of trees in the // pop plus the number of all trees result = (treeOcc / (double) getSubTreesNumber()); // rememeber it!!! probM.put("" + sc.getTreeKey() + "", result); } return result.doubleValue(); } COM: <s> returns the probabilty of extracting a sub tree from the population </s>
funcom_train/36983903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { try { thread = null; if (clients != null) { Enumeration en = clients.elements(); while (en.hasMoreElements()) { disconnect((Client) en.nextElement()); } clients = null; } if (server != null) { server.close(); server = null; } } catch (IOException e) { errorMessage("stop", e); } } COM: <s> disconnect all clients and stop the server internal use only </s>
funcom_train/15621972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getRelationEditorValues(String opParamName){ LinkedList values=new LinkedList(); int row=tablemodel.getRowOfOpParamByName(opParamName); Object object=editors.get(row); if (object instanceof ListRelationEditor){ values.addAll(((ListRelationEditor) object).getSelectedValues()); }else if (object instanceof SingleRelationEditor){ values.add(((SingleRelationEditor) object).getSelectedValue()); } return values; } COM: <s> gets a code collection code of code relation code s by </s>
funcom_train/38861636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here exitCommand = new Command("Exit", "<null>", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return exitCommand; } COM: <s> returns an initialized instance of exit command component </s>
funcom_train/12552098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GAIGSarray (int rows, boolean isBar) { setInstanceVariables (rows, 1, isBar, DEFAULT_NAME, DEFAULT_COLOR, DEFAULT_X1, DEFAULT_Y1, DEFAULT_X2, DEFAULT_Y2, DEFAULT_FONT_SIZE); } COM: <s> create a 1 d array of length rows explicitly setting the display mode </s>
funcom_train/6431377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSecure(boolean secure) { // 2 (position 3) is the default SECURE position if (mPanelCount>2) { setSecure(secure, 2); } else if (mPanelCount>1) { setSecure(secure, 2); } else { if (DEFAULT_PANEL_INDEX<mPanelCount) setSecure(secure, DEFAULT_PANEL_INDEX); } } COM: <s> displays a strong secure strong context in the default secure panel </s>
funcom_train/47678013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkName() { DialogJdbcConnector currentConnector = getCurrentConnector(); if (currentConnector != null && !settingConnectorName) { currentConnector.setName(connectorNameTF.getText()); lastUsedConnector = currentConnector; connectorsTable.setValueAt(currentConnector, connectorsTable.getSelectedRow(), 0); } } COM: <s> check if the connector name already exists and if so disable the </s>
funcom_train/12167594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getExcludedDevices() { List devices = new ArrayList(); for (int i = 0; i < excludedDevices.size(); i++) { ExcludeDeviceConfiguration edc = (ExcludeDeviceConfiguration) excludedDevices.get(i); devices.add(edc.getName()); } return devices; } COM: <s> get the list of excluded devices </s>
funcom_train/31782469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void receivedBLP( IncomingMessage incomingMessage ) { System.err.println( "NotificationServerConnector.receivedBLP()" ); try { bPrivacyMode = incomingMessage.getPrivacyMode(); } catch( NoSuchFieldException e ) { System.err.println( "NotificationServerConnector.receivedBLP() - " + e ); } } COM: <s> process the blp message received from server </s>
funcom_train/3703051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTitle(int time) { //// 1. Get as a Frame. Window wnd = lstnr.getWindow(); if (wnd instanceof Frame) { updateTitle((Frame) wnd, time); } else if (wnd instanceof Dialog) { updateTitle((Dialog) wnd, time); } } // of method COM: <s> update the window title with the remaining time </s>
funcom_train/37837908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isUsedTileset(final Map map, final TileSet tileset) { for (final Iterator< ? > tiles = tileset.iterator(); tiles.hasNext();) { final Tile tile = (Tile) tiles.next(); for (final MapLayer layer : map) { if ((layer instanceof TileLayer) && (((TileLayer) layer).isUsed(tile))) { return true; } } } return false; } COM: <s> check whether a tileset is in use by a map </s>
funcom_train/44732736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int handleComputeMonthStart(int year, int month, boolean useMonth) { //month is 0 based; converting it to 1-based int imonth; if(month == 12) imonth = 1; else imonth = month +1; double jd = IndianToJD(year,imonth,1); return (int)jd; } COM: <s> return jd of start of given month year </s>
funcom_train/24653641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkForLocalHost(String ipAddress) throws UnknownHostException { InetAddress lh = InetAddress.getLocalHost(); InetAddress ip2 = InetAddress.getByName(ipAddress); if (ip2.getCanonicalHostName().indexOf(lh.getCanonicalHostName()) != -1) { throw new CILogonException("Error: cannot copy to localhost"); } } COM: <s> javas inet address will always give back the localhost as having address 127 </s>
funcom_train/49092305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void joinLine(int line) { DOM.removeChild(tbody, getTr(line + 1)); v.remove(line + 1); resizeLine(line); for (int i = line + 1; i < v.size(); i++) { DOM.setInnerHTML(getDiv(i), "" + (i + 1)); } setWidth(); } COM: <s> a line has been join removed either through del or backspace </s>
funcom_train/44083435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean acceptsTarget(Object edge, Object port) { // if (port != null // && port instanceof Node // && edge != null // && edge instanceof DOMGraphEdge) { // return true; // // return (Node) port == ((DOMGraphEdge) edge).getTarget(); // } return true; // ! isEdgesFromChildToParent(); } COM: <s> todo if we want a real dom editor not just a displayer </s>
funcom_train/24002598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter append(CharSequence csq, int start, int end,final AsyncCallback<Boolean> callback) { CharSequence cs = (csq == null ? "null" : csq); write(cs.subSequence(start, end).toString(),callback); return this; } COM: <s> appends a subsequence of the specified character sequence to this writer </s>
funcom_train/31662538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(java.lang.Object value) { Object oldValue = fieldValue; fieldValue = value; if (oldValue == value) return; if (oldValue != null && oldValue.equals(value)) return; firePropertyChange("value", oldValue, value); } COM: <s> sets the value property java </s>
funcom_train/12713222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WekaCeaParameter getParameter( String name ) { for ( Iterator it = paramList_.iterator(); it.hasNext(); ) { WekaCeaParameter param = (WekaCeaParameter) it.next(); if ( name.equals( param.getName() ) ) { return param; } } throw new IllegalArgumentException( "No such parameter: " + name ); } COM: <s> returns a named parameter of this task </s>
funcom_train/17004784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFault(AddressingHeaders addressingHeaders) { getWsaActions(); if (addressingHeaders == null) { return false; } ActionDocument actionDocument = addressingHeaders.getAction(); String action = null; if (actionDocument != null) { action = actionDocument.getAction().getStringValue(); if (action.equals(wsaActions.getFault()) ) { return true; } } return false; } COM: <s> check to see if the addressing headers indicate that this is a fault </s>
funcom_train/5260765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAffectsEmploymentOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Assesment_affectsEmploymentOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Assesment_affectsEmploymentOf_feature", "_UI_Assesment_type"), BmmPackage.Literals.ASSESMENT__AFFECTS_EMPLOYMENT_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the affects employment of feature </s>
funcom_train/46382028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void triggerGoto(Vector3f worldPosition, Quaternion look) { if (ClientContext.getRendererType()==RendererType.RENDERER_JME) { CellRenderer rend = getCellRenderer(RendererType.RENDERER_JME); if (rend instanceof AvatarActionTrigger) { ((AvatarActionTrigger)rend).triggerGoto(worldPosition, look); } } } COM: <s> todo this is a temporary interface for handling avatar goto need </s>
funcom_train/8039612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSetLocationInfo() { HTMLLayout layout = new HTMLLayout(); assertEquals(false, layout.getLocationInfo()); layout.setLocationInfo(true); assertEquals(true, layout.getLocationInfo()); layout.setLocationInfo(false); assertEquals(false, layout.getLocationInfo()); } COM: <s> tests get location info and set location info </s>
funcom_train/3598098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttributeRegexp() { try { List results = engine.search(nom, "($w word):$w@orth~/the.*/"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==2); NOMElement r1 = (NOMElement)((List)results.get(0)).get(0); NOMElement r2 = (NOMElement)((List)results.get(1)).get(0); assertTrue(r1.getID().equals("w_1")); assertTrue(r2.getID().equals("w_4")); } catch (Throwable ex) { ex.printStackTrace(); fail("Attribute Regexp failed!"); } } COM: <s> check attributes are correctly retrieved and can be compared </s>
funcom_train/43540230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDifferentElementsFile() { try { IUIContext ui = getUI(); diffFiles(ui, "DiffElementsFile.txt"); //$NON-NLS-1$ fail("We expected an exception because the files contain different elements."); //$NON-NLS-1$ } catch (DifferenceException de) { // Do nothing. We expected an exception } } COM: <s> test different elements file files with the same length but different lines should </s>
funcom_train/34479992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enlarge_choices() { int new_length = choices.length * 2; int new_choices[] = new int[new_length]; System.arraycopy(choices, 0, new_choices, 0, choices.length); choices = new_choices; Object new_path[] = new Object[new_length]; System.arraycopy(path, 0, new_path, 0, path.length); path = new_path; } COM: <s> increases the size of the auxiliary arrays path and choices twice </s>
funcom_train/21847503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putFindProperty(String name, Object newValue) { Object oldValue = getFindProperty(name); if ((oldValue == null && newValue == null) || (oldValue != null && oldValue.equals(newValue))) { return; } if (newValue != null) { getFindProperties().put(name, newValue); } else { getFindProperties().remove(name); } firePropertyChange(name, oldValue, newValue); } COM: <s> set find property with specified name and fire change </s>