__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11319548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String toBeanName(Class<?> aClass) { String className = aClass.getName(); String beanName = className.substring(className.lastIndexOf(".") + 1); return Character.toLowerCase(beanName.charAt(0)) + beanName.substring(1); } COM: <s> return the spring bean name for the given class </s>
funcom_train/40866375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getObject(String objectName, RequestContext context) { Cookie[] cookies = super.getHttpServletRequest(context).getCookies(); if(cookies != null && objectName != null) { for(int i = 0; i < cookies.length; i++) { if(objectName.equals(cookies[i].getName())) { return cookies[i]; } } } return null; } COM: <s> returns a the cookie with the given name </s>
funcom_train/22769830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reinit() { if(isInitialized()){ PerformanceTimer timer = new PerformanceTimer(toString()+".loadChildren()"); timer.start(); try { lockEvents(); reloadChildren(); } finally{ unlockEvents(); } fireTreeStructureChanged(); timer.report(); } } COM: <s> reinit the node </s>
funcom_train/50575461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private class OurMouseListener implements MouseListener { public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseClicked(MouseEvent e) { } public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { store.doPopup(ourTree, e); } } } COM: <s> this class listens for mouse events in the tree control </s>
funcom_train/22678394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doSaveAs() { loadSaveDialog.setCurrentDirectory(directory); loadSaveDialog.setFileFilter(new FileNameExtensionFilter("XML", "xml")); if (loadSaveDialog.showSaveDialog(frame) == JFileChooser.APPROVE_OPTION) { File f = loadSaveDialog.getSelectedFile(); if (f.getName().indexOf('.') < 0) { f = new File(f.getAbsolutePath() + ".xml"); } save(f); return true; } return false; } COM: <s> perform the save as </s>
funcom_train/33606784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultiplyBy() { System.out.println("multiplyBy"); double d = 0.0; R2 instance = new R2(); VectorSpaceElement expResult = null; VectorSpaceElement result = instance.multiplyBy(d); 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 multiply by method of class r2 </s>
funcom_train/19309571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean allStringsFound() { if (this.copyrightNotice.equals(StringUtil.EMPTY_STRING) || this.fullName.equals(StringUtil.EMPTY_STRING) || this.postscriptName.equals(StringUtil.EMPTY_STRING) || this.familyName.equals(StringUtil.EMPTY_STRING) || this.subFamilyName.equals(StringUtil.EMPTY_STRING)) { return false; } return true; } COM: <s> indicates whether all of the strings that we want have been parsed from </s>
funcom_train/1589329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public YearMonthDay withDayOfMonth(int dayOfMonth) { int[] newValues = getValues(); newValues = getChronology().dayOfMonth().set(this, DAY_OF_MONTH, newValues, dayOfMonth); return new YearMonthDay(this, newValues); } COM: <s> returns a copy of this date with the day of month field updated </s>
funcom_train/20400213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSyntax() { StringBuffer buf = new StringBuffer(); boolean shortFlag = false; buf.append("["); if (getShortFlag() != Arguments.NO_SHORTFLAG) { buf.append("-" + getShortFlag()); shortFlag = true; } if (getLongFlag() != Arguments.NO_LONGFLAG) { if (shortFlag) { buf.append("|"); } buf.append("--" + getLongFlag()); } buf.append("]"); return (buf.toString()); } COM: <s> returns usage instructions for this switch </s>
funcom_train/12145798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDataToMIME(Exporter theArchive) { int numChildren = mNode.getChildren().size(); if (numChildren>0) { //A NObListNode writeNObListNodeDataToMIME(theArchive); } else { //A NObNode writeNObNodeDataToMIME(theArchive); } } COM: <s> constructor for the write data to mime object </s>
funcom_train/30194560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertENTString(String fn) { int i = 0, j = 1; double FN = Double.parseDouble(fn); StringBuffer nfn = new StringBuffer(""); if (FN < 0) { nfn.append('-'); i = 1; } while (i < fn.length() && j < 25) { //System.out.println("J = " + j + " I = " + i); nfn.append(fn.charAt(i)); i++; j++; } return nfn.toString(); } COM: <s> parses the file into dat format </s>
funcom_train/11004692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(Shape shape){ GeneralPath path = new GeneralPath(_transform.createTransformedShape(shape)); Freeform p = new Freeform(_group); p.setPath(path); applyPaint(p); p.setLineColor(null); //Fills must be "No Line" _group.addShape(p); } COM: <s> fills the interior of a code shape code using the settings of the </s>
funcom_train/31651418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node evalXPath(Node context, String xpath)throws java.lang.Exception{ if(xpath!=null&&!xpath.equals("")){ Document result = DocumentBuilderFactory.newInstance( ).newDocumentBuilder( ).newDocument( ); Node n = XPathAPI.selectSingleNode(context, xpath); result.importNode(n,true); return result.getDocumentElement( ); } return context; } COM: <s> evaluates an xpath query on the context node and returns </s>
funcom_train/22502746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addNavigationToFile(){ if(_file == null){ throw new NullPointerException("No file loaded."); } if(_navigationText == null){ throw new NullPointerException("No navigation text set."); } // Put after the <body> tag the navigation data. String body = new String("<body>"); int bodyPosition = _file.indexOf(body); if(bodyPosition < 0){ // No body tag in this file. return false; } bodyPosition = bodyPosition + body.length(); _file.insert(bodyPosition,"\n"+_navigationText); return true; } COM: <s> adds the navigation text to the current file </s>
funcom_train/45245666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldGamaF81() { if (jNumberFloatFieldGamaF81 == null) { jNumberFloatFieldGamaF81 = new JNumberFloatField(); jNumberFloatFieldGamaF81.setLocation(new Point(345, 279)); jNumberFloatFieldGamaF81.setSize(new Dimension(65, 20)); } return jNumberFloatFieldGamaF81; } COM: <s> this method initializes j number float field gama f81 </s>
funcom_train/28982654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackRetrieveEmail () { if (backRetrieveEmail == null) {//GEN-END:|51-getter|0|51-preInit // write pre-init user code here backRetrieveEmail = new Command ("Back", Command.BACK, 0);//GEN-LINE:|51-getter|1|51-postInit // write post-init user code here }//GEN-BEGIN:|51-getter|2| return backRetrieveEmail; } COM: <s> returns an initiliazed instance of back retrieve email component </s>
funcom_train/3924098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field getHibernateField( String hibernateName ) { Field ret = null; checkFieldMap(); String name = (String) fieldMap.get( hibernateName.toLowerCase() ); try { ret = getClass().getField( name ); } catch ( Exception e ) { Logger.logError( "Can't get field "+hibernateName, e ); } return ret; } COM: <s> returns the field for a given database field name </s>
funcom_train/49703378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convertSdtToName(String sdt) { if (sdt.startsWith(http)) { int lastSlash = sdt.lastIndexOf('/'); if (lastSlash < 0) { throw new IllegalArgumentException("Could not convert sdt to name"); } return sdt.substring(lastSlash + 1); } // Otherwise sdt is already the name. return sdt; } COM: <s> converts an sdt string to the sdt name </s>
funcom_train/7336046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPathToPicture(HttpSession session, String path) { // find relative path to existing directory String relativePath = getPathToDirectory(session, path); String docroot = Config.getProperty(Config.DIR_DOCROOT); File dir = new File(docroot + relativePath); // collect possible relative picture paths List<String> possibleSources = new ArrayList<String>(); collectPictures(dir, relativePath, possibleSources); // randomly choose one of them int index = new Random().nextInt(possibleSources.size()); return possibleSources.get(index); } COM: <s> get path to randomly choosen picture relative to document root </s>
funcom_train/48211564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highLightText() { SimpleAttributeSet attributeSet = new SimpleAttributeSet(); if(isJoined) { StyleConstants.setForeground(attributeSet, Color.blue); } else { StyleConstants.setForeground(attributeSet, Color.black); } DefaultStyledDocument doc = (DefaultStyledDocument)columnText.getDocument(); doc.setCharacterAttributes(0, doc.getLength(), attributeSet, false); columnText.repaint(); columnText.syncWithDocument(); } COM: <s> high lights the column text </s>
funcom_train/45252568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHighlight(boolean highlight) { isHighlight = highlight; // if we're displaying as a 'bar' then set the control's background to the // appropriate value if (isHighlight) { caretControl.setBackground(hilightColor); end1.setBackground(hilightColor); end2.setBackground(hilightColor); } else { caretControl.setBackground(baseColor); end1.setBackground(baseColor); end2.setBackground(baseColor); } } COM: <s> sets the hilight mode for the control </s>
funcom_train/8485204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMandatory() throws InterpreterException { // normal case: fun2(0,1) fun2.base_applyInScope(NATTable.atValue(new ATObject[] { NATNumber.ZERO, NATNumber.ONE }), bindCtx_); ensureBound(at_a, NATNumber.ZERO); ensureBound(at_b, NATNumber.ONE); } COM: <s> tests parameter binding for methods with mandatory arguments only </s>
funcom_train/18065544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void db_add_table(){ String newTable = interfacemanager.createPlainPopup("Insert new table's name:", "Insert new table", "[T]new"); DbTable table = null; if (newTable == null) return; else { try { this.createTable(newTable); }//TODO add a better graph consistency check! catch (NullPointerException e){ interfacemanager.bottomMessage("Adding a new table: NullPointerException"); } catch (InvalidOperationException e) { interfacemanager.bottomMessage("Adding a new table: InvalidOperationException"); } } } COM: <s> adds a new table both to the internal model and the graphical model </s>
funcom_train/29738538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCustomProperty(String propertyName) { if (propertyName == null) { throw new NullPointerException("The propertyName for a custom property " + "on MetaData cannot be null"); } Object oldValue = customProps.get(propertyName); customProps.remove(propertyName); firePropertyChange(propertyName, oldValue, null); } COM: <s> removes the custom property from the custom properties map </s>
funcom_train/12182643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderSize(PixelDimensionsMetaDataBuilder metaData) { String sizeFormat = EditorMessages.getString( RESOURCE_PREFIX + "size.format"); String size = MessageFormat.format(sizeFormat, new Object[] { new Integer(metaData.getWidth()), new Integer(metaData.getHeight()) }); appendText(size); } COM: <s> render the size for a give piece of metadata that has one </s>
funcom_train/1440475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyDownload(Connection connection, FileObject file, long size) { try { dataListener.addFileData( createFileData(connection, file, FileType.DOWNLOADED)); } catch (RemoteException ex) { logger.error("ServerSideConnectionObserver.notifyDownload()", ex); } } COM: <s> information about downloaded file </s>
funcom_train/307861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void diagnoseSql() throws SQLException, ClassNotFoundException { Class.forName(driver); Connection connection = DriverManager.getConnection(url, username, password); Statement statement = connection.createStatement(); if(sql != null) { statement.execute(sql); } } COM: <s> try to connect to the jdbc url using the driver username and </s>
funcom_train/17419843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoard(Board board) { if(this.board !=null) this.board.removeBoardSelectionListener(this); if(board !=null){ this.board = board; this.board.addBoardSelectionListener(this); } if(model !=null) board.setModel(model); } COM: <s> setter for property board </s>
funcom_train/47967779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateData(){ gui.jLabelCurentTemperature.setText(""+formatString(temperature)); gui.jLabelCurentHumidity.setText(""+formatString(humidity)); gui.jLabelCurentDewPoint.setText(""+formatString(dewPoint)); if(showGraph){ if(sc < scm){ sd.addValues(temperature, humidity, dewPoint); averageData(); sc++; } else{ gui.stopShowingGraph(); autoSavingData(); } } } COM: <s> method to update the new values </s>
funcom_train/4015275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuestion(QuestionDef questionDef){ this.questionDef = questionDef; if(questionDef != null) fieldHyperlink.setText(questionDef.getText()); else{ horizontalPanel.remove(fieldHyperlink); horizontalPanel.remove(sgstField); //Removing and adding of fieldHyperlink is to prevent a wiered bug from //happening where focus is taken off, brought back and the hyperlink //displays no more text. horizontalPanel.add(fieldHyperlink); fieldHyperlink.setText(""); } } COM: <s> sets the question for this widget </s>
funcom_train/45750176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsImmutableWholePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Meronymic_isImmutableWhole_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Meronymic_isImmutableWhole_feature", "_UI_Meronymic_type"), OntoUMLPackage.Literals.MERONYMIC__IS_IMMUTABLE_WHOLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is immutable whole feature </s>
funcom_train/46189887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParent() { Category java = new Category("/java", "Java"); Category junit = new Category("/java/junit", "JUnit"); java.addSubCategory(junit); assertEquals(java, junit.getParent()); } COM: <s> tests for the get parent method </s>
funcom_train/877594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String trimPath(String path) { StringBuffer sb = new StringBuffer(path.trim()); while (sb.length() > 0) { char last = sb.charAt(sb.length() - 1); if (last == '/' || last == '*' || last == '!') sb.deleteCharAt(sb.length() - 1); else break; } return sb.toString(); } COM: <s> removes trailing delimiters or </s>
funcom_train/18587320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(Object object, ValidationResult result) { result = new PrefixedValidationResult(result, propertyName); // work on the property instead of object Object property = extractProperty(object, propertyName); for (Object element : elements) { if (element instanceof Validator) { Validator validator = (Validator) element; validator.validate(property, result); } } } COM: <s> implementation should validate given object and use result parameter to </s>
funcom_train/39169085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireStatusChanged(String e) { if(statusListeners != null) { Vector listeners = statusListeners; int count = listeners.size(); for(int i = 0; i < count; i++) { ((StatusListener)listeners.elementAt(i)).statusChanged(e); } } } COM: <s> notifies all the </s>
funcom_train/1796998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIds(String ids) { // check if setting to existing value if (this.ids == null ? ids != null : !this.ids.equals(ids)) { // set to new value for customer parameter this.ids = ids; setStringCustomParameter("ids", ids); } } COM: <s> sets the google analytics profile id prefixed by ga </s>
funcom_train/1512198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void node(N n) { assert !frozen; assert parents.size() == children.size(); if (parents.containsKey(n)) return; parents.put(n, new LinkedHashSet<N>()); children.put(n, new LinkedHashSet<N>()); } COM: <s> adds a node to the graph </s>
funcom_train/46832930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hideeAssignedEMailComponent() { item4 = null; if (myListmodel.getSize() == 4) { myListmodel.remove(3); this.jListnames.updateUI(); this.jListnames.repaint(); } if (ebiModule.getAvailableEMailPanel().jMenuAssign != null) { ebiModule.getAvailableEMailPanel().jMenuAssign.setEnabled(false); } } COM: <s> remove assigned folder from the email panel view </s>
funcom_train/25646972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWindowTitle() { String title = Settings.getProperty("application.name"); File file = getActiveProject().getFile(); if (file != null) { title = title + " - " + file.getName(); } else { title = title + " - unsaved model"; } title = title + " (" + Settings.getProperty("language.variant") + ")"; return title; } COM: <s> gets the title for main window </s>
funcom_train/29954533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTypeElStr() { System.out.println("getTypeElStr"); SimuParamObject instance = new SimuParamObject(el); String expResult = "Simu"; String result = instance.getTypeStr(); System.out.println(result); assertEquals(expResult, result); } COM: <s> test of get type el str method of class hbm </s>
funcom_train/17549034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void work() { try { while(true) { think(); space.take(leftFork, null, Long.MAX_VALUE); space.take(rightFork, null, Long.MAX_VALUE); eat(); space.write(leftFork, null, Lease.FOREVER); space.write(rightFork, null, Lease.FOREVER); } } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> the main algorithm </s>
funcom_train/37228048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Message readMeetingIdMessage() throws IOException, XmlPullParserException { // Create the message MeetingIdMessage message = new MeetingIdMessage(); // Now read the MeetingId message.setMeetingId(parser.getRequiredElementText(MSG_NS, "meeting-id")); // Consume </message> parser.nextEndTag(MSG_NS, "message"); return message; } COM: <s> reads a meeting id message </s>
funcom_train/25419600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPortNoAsString(String portNoAsString) { _portNoAsString = Val.chkStr(portNoAsString); try { int portNo = Integer.parseInt(_portNoAsString); if (portNo >= 0 && portNo < 65536) { _portNo = portNo; } } catch (NumberFormatException ex) { } } COM: <s> sets port number as string </s>
funcom_train/34761194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReturnedObject invokeMethod(String methodName, String value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { Method method = getMethod(methodName, 1); Class targetClass = method.getParameterTypes()[0]; Object convertedVal = ConvertUtils.convert(value, targetClass); Object returnObj = method.invoke(_domainObject, new Object[] {convertedVal}); return new ReturnedObject(returnObj); } COM: <s> used for setting simple values or getting back and indexed mapped value </s>
funcom_train/19815212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getErrorMessage() { List<String> errorList = this.isernData.getSemanticErrors(); String result = ""; if (errorMessage != null) { result += errorMessage; } for (String error : errorList) { result += "<br>" + error; } if (!result.isEmpty()) { result = "<b>Semantic errors:</b>" + result; } return result; } COM: <s> returns the error message which may be empty </s>
funcom_train/2036404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point getPosition(DNDEvent event) { Point mousePoint = event.getXY(); Point distance = ((LayoutContainer) event.getData()).getData(AbsoluteLayoutContainer.ABSOLUTE_DISTANCE_NAME); int left = mousePoint.x - distance.x - absolutePosition.x; int top = mousePoint.y - distance.y - absolutePosition.y; return new Point(left, top); } COM: <s> gets the position </s>
funcom_train/4590093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(SimpleMailMessage msg, String templateName, Map<String, Object> model) { String result = null; try { result = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, templateName, model); } catch (VelocityException e) { e.printStackTrace(); log.error(e.getMessage()); } msg.setText(result); send(msg); } COM: <s> send a simple message based on a velocity template </s>
funcom_train/177725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTableName(ResultSetMetaData rsmd, int columnNumber) throws SQLException { if (rsmd instanceof PGResultSetMetaData) {//this should be always true PGResultSetMetaData pgrsmd = (PGResultSetMetaData) rsmd; return pgrsmd.getBaseTableName(columnNumber); } else { return rsmd.getTableName(columnNumber); } } COM: <s> get the table name of a result set meta data column </s>
funcom_train/31816478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ev) { if( ev == null ) return; String command = ev.getActionCommand(); if( GUICommandStrings.OK_COMMAND.equals(command)){ // ok button pressed, check for the authentication if( ! this.checkAuthentication() ) // show a gui with problem for authentication here JComponentBuilder.showErrorDialog(this, this.baseKey + ".errorDialog"); } else super.actionPerformed(ev); } COM: <s> manages events from the button </s>
funcom_train/199584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeName(Task task) { String name = task.getName(); if (name == null) { int i = 0; synchronized(SGEExecutor.class) { i = unique++; } name = "cog-" + IDF.format(i); } else if (name.length() > 15) { name = name.substring(0, 15); } if (logger.isDebugEnabled()) { logger.debug("SGE name: for: " + task.getName() + " is: " + name); } return name; } COM: <s> create sge job name </s>
funcom_train/18118294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureXStream() { xstream.alias("topic", Topic.class); xstream.alias("subtopic", SubTopic.class); xstream.alias("document", Document.class); xstream.alias("image", Image.class); xstream.alias("author", Author.class); xstream.alias("quote", Quote.class); xstream.alias("book", Book.class); xstream.alias("webdocument", WebDocument.class); } COM: <s> set the tag names used for the classes </s>
funcom_train/36887751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlantView converterPlantDtoToView(PlantDTO dto){ PlantView plantView = null; if(dto!=null){ plantView = new PlantView(); plantView.setPlantId(dto.getPlantId()); plantView.setShortName(dto.getShortName()); plantView.setDescription(dto.getDescription()); plantView.setStorageAmount(dto.getStorageAmount()); plantView.setUnloadAmount(dto.getUnloadAmount()); plantView.setGrindProtectionDays(dto.getGrindProtectionDays()); plantView.setPriority(dto.getPriority()); } return plantView; } COM: <s> plant converter dto to view </s>
funcom_train/2963687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRandomValue(IntDomainVar var, Random r) { int v = var.getInf() + r.nextInt(var.getSup() - var.getInf() + 1); while (!var.canBeInstantiatedTo(v)) { v = var.getInf() + r.nextInt(var.getSup() - var.getInf() + 1); } return v; } COM: <s> get a random value in the domain </s>
funcom_train/3595015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseBuild(String filename) throws IOException { System.out.println("Loading data from file: " + filename); try{ parser = XMLReaderFactory.createXMLReader(DEFAULT_PARSER_NAME); parser.setContentHandler(new MyContentHandler()); } catch (Exception pce) { pce.printStackTrace(); } try { parser.parse( new InputSource( new FileInputStream(filename) ) ); } catch (SAXException saxex) { saxex.printStackTrace(); } } COM: <s> parse the build spec </s>
funcom_train/7869790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPawnConstructors() { Board board0 = new Board(); board0.emptyBoard(); Pawn pawn1 = new Pawn(true, board0, 2, 1); assertEquals(true, pawn1.getColor()); assertEquals(board0, pawn1.getBoard()); assertEquals("w", pawn1.getColorAsString()); assertEquals("p", pawn1.getType()); } COM: <s> it test the pawn constructors </s>
funcom_train/41163648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoMatrixExercises2 entity) { EntityManagerHelper.log("saving CoMatrixExercises2 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 co matrix exercises2 </s>
funcom_train/5481008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isChar(int line,int col,char[] c) { if (line>=pageData.length) return false; if (col>=pageData[line].length) return false; for (int i=0;i<c.length;i++) if (pageData[line][col]==c[i]) return true; return false; } COM: <s> compare character at a given position in page </s>
funcom_train/10840066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasUnresolvedPackages(final Bundle bundle) { if ( !this.unresolvedPackages.isEmpty() ) { final ExportedPackage[] pcks = this.pckAdmin.getExportedPackages(bundle); if ( pcks != null ) { for(final ExportedPackage pck : pcks ) { if ( this.unresolvedPackages.contains(pck.getName()) ) { return true; } } } } return false; } COM: <s> check if an exported package from the bundle has not been </s>
funcom_train/6203386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null) return false; else { Rule that = (Rule) obj; return this.breakRule == that.breakRule && this.getBeforebreak().equals(that.getBeforebreak()) && this.getAfterbreak().equals(that.getAfterbreak()); } } COM: <s> indicates whether some other rule is equal to this one </s>
funcom_train/28295529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDeliveryMode() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - getDeliveryMode"); System.out.println(" ::--> " + mDeliveryMode); System.out.println(" :: SeqActivity --> END - getDeliveryMode"); } return mDeliveryMode; } COM: <s> retrieves the value of the delivery mode </s>
funcom_train/18836300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EndPoint findEndPointByTransId(int id) { for (int i = 0; i < this.pendingEndPoints.size(); i++) { EndPoint endpt = (EndPoint) this.pendingEndPoints.elementAt(i); if (endpt.transId == id) { return endpt; } } return null; } COM: <s> finds endpoint by the discovery id </s>
funcom_train/20765665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void setAutoExposure(boolean yes) throws HardwareInterfaceException { if(yes!=isAutoExposure()) setChanged(); if (!setCameraParam(CLEYE_AUTO_EXPOSURE, yes ? 1 : 0)) { throw new HardwareInterfaceException("setting auto exposure=" + yes); } notifyObservers(EVENT_AUTOEXPOSURE); } COM: <s> enables auto exposure </s>
funcom_train/25333085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCoreFactory() { assertNull(instance.getCoreFactory()); DBSpecies sp = new DBSpecies(); instanceWithReg.setSpecies(sp); instanceWithReg.setDbSpeciesName("bob_bill"); assertNotNull(instanceWithReg.getCoreFactory()); } COM: <s> test of get core factory method of class dbsingle species core database </s>
funcom_train/9890683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onElementSizeChanged(int width, int height) { menubar.setElementSize(width, height); TMEV.storeProperty(TMEV.ELEMENT_SIZE_WIDTH, new Integer(width).toString()); TMEV.storeProperty(TMEV.ELEMENT_SIZE_HEIGHT, new Integer(height).toString()); fireMenuChanged(); } COM: <s> sets a spot size </s>
funcom_train/18479410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cancelCurrent() { ignore = true ; if (next != null) { next.removePropertyChangeListener("Destination",dlistener) ; next.cancelCurrent() ; next = null ; } if (listener != null) { starting_location.removePropertyChangeListener(listenerprop,listener) ; starting_location.removePropertyChangeListener(PropertiedObject.DESTROY,destroyed_listener) ; listener = null ; } ignore = false ; } COM: <s> cancels the current path listener </s>
funcom_train/15513137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadFromProperties(Properties properties) { super.loadFromProperties(properties); try { defaultFileInfo = DefaultFileInfo.valueOf( properties.getProperty(PPT_FILEINFO) ); } catch(Exception x) { // nullpointer or illegal argument x defaultFileInfo = DefaultFileInfo.READONLY; } showPlainBytes = Boolean.valueOf(properties.getProperty(PPT_PLAINBYTES)).booleanValue(); } COM: <s> overwrites the super implementation to load the default </s>
funcom_train/39314409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetOpaque() { System.out.println("testSetOpaque"); System.out.println("testSetOpaque"); selectTool myAll=new selectTool(); myAll.setOpaque(false); assertEquals(myAll.getOpaque(), false); myAll.setOpaque(true); assertEquals(myAll.getOpaque(), true); } COM: <s> test of set opaque method of class select tool </s>
funcom_train/3560511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach(Clippable newSon) { try { ID = MediLinker.link(containerType, ID, newSon.getType(), (Object[]) newSon.getValue()); } catch (DbException e) { System.out.println("[MediTableModel]: Cannot link"); } } COM: <s> attaches another object into this one </s>
funcom_train/10482622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadContent() throws MessagingException { // if we've loaded this already, just return if (content != null) { return; } IMAPConnection connection = message.getConnection(); try { // load the content from the server. content = connection.fetchContent(message.getSequenceNumber(), section); } finally { message.releaseConnection(connection); } } COM: <s> load the message content into the body part object </s>
funcom_train/36851952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readInt() throws IOException { newReadPosition(4); int pos = position; int result = buffer[pos++] << 24 | (buffer[pos++] & 0xFF) << 16 | (buffer[pos++] & 0xFF) << 8 | (buffer[pos++] & 0xFF); position = pos; return result; } COM: <s> reads an tt int tt from the buffer </s>
funcom_train/15392290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUniqueMethodName(Method method) { String name = ""; name = method.getName(); for (int i = 0; i < method.getParameterTypes().length; i++) { Class theType = method.getParameterTypes()[i]; name += "_" + theType.getName(); } return name; } COM: <s> create a string with a unique method name appended with the parameter types </s>
funcom_train/14588701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double kick(Play play) { int threshold = 65; // high avg kick int intendedDist = play.getDist(); double kick = Math.atan(Math.random() * getOffense().sumKickoff(play)) + .1; if (kick == 0) kick = 1e-10; double dist = intendedDist - Math.pow(1.1, (intendedDist - threshold) / kick); return dist; } COM: <s> handles kickoffs kicks </s>
funcom_train/46395011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addToOpen(int x, int y, Node parent) { Node openNode = new Node(x, y); openNode.setParent(parent); replacing: for (Iterator<Node> i = open.iterator(); i.hasNext();) { Node existing = i.next(); if (existing.x == x && existing.y == y) { if (existing.gcost > openNode.gcost) { i.remove(); break replacing; } else { return; } } } openNode.computeHeuristic(); open.add(openNode); } COM: <s> adds the node at </s>
funcom_train/11772238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpeedZone(DataSpeedZone speedZone, int index) { if (index < 0 || index > tabSpeedZones.length) { throw new IndexOutOfBoundsException("index=" + index); } if (speedZone == null) { throw new IllegalArgumentException("speedZone null"); } tabSpeedZones[index] = speedZone; } COM: <s> valorise une zone de vitesse </s>
funcom_train/15578408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void undeclareNamespace(int i, int j) throws SAXException, XmlPullParserException { for( j--; j>=i; j-- ) { String prefix = pp.getNamespacePrefix(j); if(prefix==null) prefix=""; handler.endPrefixMapping( prefix ); } } COM: <s> undeclares namespace bindings between indices i j </s>
funcom_train/50353447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getAccountPendingBalance(int accountId) throws Exception { Statement stmt = null; ResultSet rs = null; Float balance = null; Connection conn = null; try { conn = pm.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery("select sum(val) from t_entry, trans where trans.id=t_entry.tid and aid="+accountId +" and (trans.status = 'C' or trans.status= 'X')"); if (rs.next()) { balance = new Float(rs.getFloat(1)); } } finally { pm.close(rs); pm.close(stmt); pm.close(conn); } return balance; } COM: <s> method get account pending balance </s>
funcom_train/14229964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(net.sourceforge.gjtapi.raw.remote.corba.StringEntry[] propArray) throws net.sourceforge.gjtapi.raw.remote.corba.ProviderUnavailableEx { Properties props = new Properties(); int size = propArray.length; for (int i = 0; i < size; i++) { props.put(propArray[i].key, propArray[i].value); } this.getReal().initialize(props); } COM: <s> initialize method comment </s>
funcom_train/41382598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMarkers() throws CoreException { if (resource != null) { for (LPTask t : tasks) { IMarker marker = resource.createMarker(TODOMARKER_ID); marker.setAttribute(IMarker.LINE_NUMBER, t.getLine()); marker.setAttribute(IMarker.MESSAGE, t.getMessage()); marker.setAttribute(IMarker.PRIORITY, t.getPriority()); marker.setAttribute(IMarker.USER_EDITABLE, false); } } } COM: <s> create markers for the document from the task collection </s>
funcom_train/7661477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubmitCallable() { try { ExecutorService e = new DirectExecutorService(); Future<String> future = e.submit(new StringTask()); String result = future.get(); assertSame(TEST_STRING, result); } catch (ExecutionException ex) { unexpectedException(); } catch (InterruptedException ex) { unexpectedException(); } } COM: <s> completed submit callable returns result </s>
funcom_train/31493033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() throws SQLException { try { Class.forName("org.gjt.mm.mysql.Driver"); } catch (Exception e) { e.printStackTrace(); } Connection conn=null; Statement statement=null; ResultSet myResultSet=null; String SQLStr=new String(); SQLStr="delete from categoria where id="+id; try { conn = DriverManager.getConnection(sqlConnectionString); statement=conn.createStatement(); statement.executeUpdate(SQLStr); } catch (SQLException se) { throw se; } finally { if (statement!=null) statement.close(); if (conn!=null) conn.close(); } } COM: <s> delete the category from the db </s>
funcom_train/37048567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleToolTip(String tip) { if (lastToolTip == tip) { return; } lastToolTip = tip; if (layer != null) { if (lastToolTip != null) { layer.fireRequestToolTip(lastToolTip); } else { layer.fireHideToolTip(); } } } COM: <s> given a tool tip string use the layer to get it displayed </s>
funcom_train/11759512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AgentId lookupAgent(String name) throws AgentNotFoundException { boolean failed = false; AgentId id = null; SensorId sid = null; try { sid = linkDefaultSensor(); use(AGENT_REGISTRY,new Op("lookupAgent",name),sid,Integer.MAX_VALUE); Perception p = sense(sid,"lookup_succeeded|lookup_failed",Integer.MAX_VALUE); this.unlinkSensor(sid); if (p.getLabel().equals("lookup_succeeded")){ id = (AgentId)p.getContent(0); } else { failed = true; } } catch (Exception ex){ failed = true; } if (failed){ throw new AgentNotFoundException(); } else { return id; } } COM: <s> auxiliary action to lookup an existing agent </s>
funcom_train/32941369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ModelAndView processResumeAll(HttpServletRequest aReq, HttpServletResponse aResp, ManageHarvestAgentCommand aCmd, BindException aErrors) throws Exception { harvestCoordinator.resumeAll(); ModelAndView mav = new ModelAndView(); mav.addObject(ManageHarvestAgentCommand.MDL_HARVEST_AGENTS, harvestCoordinator.getHarvestAgents()); mav.setViewName(Constants.VIEW_MNG_AGENTS); return mav; } COM: <s> process the resume all paused harvests action </s>
funcom_train/9139434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { //final int length = getNumberOfDocuments(); for (int i = 0; i < numberOfDocumentIndexEntries; i++) { System.out.println( "" + (i * entryLength) + ", " + getDocumentId(docnos[i]) + ":"+i + ", " + doclen[i] + ", " + docnos[i] + ", " + byteOffset[i] + ", " + bitOffset[i]); } } COM: <s> prints to the standard error the document index </s>
funcom_train/49079815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getMidp1Path() { if (!this.midp1Path.exists()) { throw new BuildException("The default path to the MIDP/1.0-API [" + this.midp1Path.getAbsolutePath() + "] points to a non-existing file. Please specify it with the [midp1Path] attribute of the <build> element."); } return this.midp1Path; } COM: <s> gets the path to the midp 1 </s>
funcom_train/40458032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addItemElement(Element tdElem) { Element tr; if (vertical) { tr = DOM.createTR(); DOM.appendChild(body, tr); } else { tr = DOM.getChild(body, 0); } DOM.setStyleAttribute(tr, "padding", "0"); DOM.appendChild(tr, tdElem); } COM: <s> physically add the td element of a </s>
funcom_train/42772185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FilteredThreadTreeNode add(long order, boolean leaf) { int location = indexOf(order); if (location >= 0) { return children.get(location); } else { // location is (-(insertionpoint) - 1). FilteredThreadTreeNode child = new FilteredThreadTreeNode(this, order, leaf); int insertion = -(location + 1); if (insertion >= children.size()) { children.add(child); } else { children.add(insertion, child); } return child; } } COM: <s> adds a new child for the given order and returns it </s>
funcom_train/41384369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JEditorPane getJEditorPane() { if (jEditorPane == null) { jEditorPane = new JEditorPane(); jEditorPane.setEditable(false); jEditorPane.setText("All Url's : \n"); String conteudo=""; for(int i=0;i<H.Lurl.size();i++) conteudo = conteudo + H.Lurl.get(i).nome + "\n"; jEditorPane.setText(conteudo); } return jEditorPane; } COM: <s> this method initializes j editor pane </s>
funcom_train/18807335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoom(double percent) { if (percent > 0.0) { double radius = getMaxRadius(); double scaledRadius = radius * percent; this.radiusAxis.setUpperBound(scaledRadius); getRadialAxis().setAutoRange(false); } else { getRadialAxis().setAutoRange(true); } } COM: <s> zooms the axis ranges by the specified percentage about the anchor point </s>
funcom_train/18216076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TableConfiguration createComponentTableConfiguration() { final TableConfiguration configuration = new TableConfiguration( Components.TABLE_NAME); configuration.addMandatoryColumn(Components.ID); configuration.addSuffixValue(Components.NAME, "component ", Components.ID); configuration.addFixedValue(Components.PRODUCT_ID, "1"); configuration.addFixedValue(Components.INITIAL_OWNER, "1"); configuration.addFixedValue(Components.INITIAL_QA_CONTACT, "0"); configuration.addFixedValue(Components.DESCRIPTION, ""); return configuration; } COM: <s> creates the configuration for the components table </s>
funcom_train/43474563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessage(RouteMessage msg, Node node) { trivialNode = (TrivialNode)node; //it is necessary build a copy; the 'msg' is free at the end of its process trivialNode.dispatchDataMessage(trivialNode.buildMessage(msg),TrivialNode.REQUEST,TrivialNode.REFRESH); } COM: <s> this method treat any application level message the only available ones </s>
funcom_train/3640541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set probe(Set deviceDefs) { Set result = new TreeSet(); try { UsbServices usbServices = UsbHostManager.getUsbServices(); UsbHub virtualRootHub = usbServices.getRootUsbHub(); probe(deviceDefs, result, virtualRootHub); } catch (Throwable t) { logger.error("Failed to complete the probe:", t); } return result; } COM: <s> walk the usb device tree and find all the devices with a given </s>
funcom_train/39350043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int releaseDiscontiguousChunks(Address chunk) { if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(chunk.EQ(chunkAlign(chunk, true))); if (chunk.EQ(headDiscontiguousRegion)) { headDiscontiguousRegion = Map.getNextContiguousRegion(chunk); } return Map.freeContiguousChunks(chunk); } COM: <s> release one or more contiguous chunks associated with a discontiguous </s>
funcom_train/46759087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccountModel getAccount(final long accountId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), accountId, "Viewed Account", call); } return BillingData.getAccount(accountId, call); }}; return (AccountModel) call(method, call); } COM: <s> return the single account model for the primary key </s>
funcom_train/5721639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SessionFactory lookupSessionFactory() { if (logger.isDebugEnabled()) { logger.debug("Using SessionFactory '" + getSessionFactoryBeanName() + "' for HibernateSessionConversationFilter"); } WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); return (SessionFactory) wac.getBean(getSessionFactoryBeanName(), SessionFactory.class); } COM: <s> look up the session factory that this filter should use </s>
funcom_train/45038151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void entrezMenuItemActionPerformed(java.awt.event.ActionEvent evt) { EntrezQuery frame = new EntrezQuery(); frame.setVisible(true); desktopPane.add(frame); try { frame.setSelected(true); } catch (java.beans.PropertyVetoException e) { System.out.println(e); } } COM: <s> action for the open menu </s>
funcom_train/8690552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ExecTask createJarSigner() { final ExecTask cmd = new ExecTask(this); cmd.setExecutable(JavaEnvUtils.getJdkExecutable(JARSIGNER_COMMAND)); cmd.setTaskType(JARSIGNER_COMMAND); cmd.setFailonerror(true); cmd.addConfiguredRedirector(redirector); return cmd; } COM: <s> create the jarsigner executable task </s>
funcom_train/40927300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getConversionPenalty() { int penalty = 0; if (loader != null) { penalty += loader.getUsagePenalty(); } Iterator iter = converters.iterator(); while (iter.hasNext()) { ImageConverter converter = (ImageConverter)iter.next(); penalty += converter.getConversionPenalty(); } return penalty; } COM: <s> returns the overall conversion penalty for the pipeline </s>
funcom_train/7641252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean start() { InetSocketAddress socketAddr; try { InetAddress hostAddr = InetAddress.getByName(HOST); socketAddr = new InetSocketAddress(hostAddr, mPort); } catch (UnknownHostException e) { return false; } try { mSocketChannel = SocketChannel.open(socketAddr); } catch (IOException e1) { return false; } // read some stuff from it readLines(); return true; } COM: <s> starts the connection of the console </s>
funcom_train/36955849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postUpdateIcon(final IRubyElement element) { postRunnable(new Runnable() { public void run() { // 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window. Control ctrl= fViewer.getControl(); if (ctrl != null && !ctrl.isDisposed()) fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE}); } }); } COM: <s> updates the package icon </s>