__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/42589404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initalizeOntologyCache() throws OntologyServiceException { if (ontologyCache == null) { ontologyCache = new HashMap<String, Ontology>(); OntologyService os = CompositeDecorator.getService(new OlsOntologyService(), new BioportalOntologyService()); for (Ontology o : os.getOntologies()) { ontologyCache.put(o.getOntologyAccession(), o); } } } COM: <s> initalize ontology cache </s>
funcom_train/18659606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNamePrefix(int t) { //System.out.println("nodeBase.setNamePrefix("+t+") in="+this); if (t < 0)return; name.add(0, new Integer(t)); // System.out.println("nodeBase.setNamePrefix "+t+" not expected parent="+parent); } COM: <s> many node types have a name such as my class </s>
funcom_train/25331944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAndSetSource() { DAHomologyPairRelationship instance = new DAHomologyPairRelationship(); assertNull(instance.getSource()); DAGene expResult = new DAGene(); instance.setSource(expResult); DAGene result = instance.getSource(); assertEquals(expResult, result); } COM: <s> test of get source method of class dahomology pair relationship </s>
funcom_train/3617424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportValidationError(InvalidConfigException e) { String[] errors = e.getErrors(); Class datatype = e.getDatatype(); // report individual errors for(int i=0; i<errors.length; i++) reportError(datatype, errors[i]); // report global error Notifier.runflow.display("Warning: Unable to create accessor for " + YagoClassname.stripBase(datatype) + " (see errors above)" ); } COM: <s> reports a validation exception error </s>
funcom_train/34873686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntIntNode successor() { IntIntNode n = this; if (n.right != null) { return n.right.min(); } IntIntNode y = n.parent; while (( y != null) && (n == y.right)) { n = y; y = y.parent; } return y; } COM: <s> return successor node to this one </s>
funcom_train/39817289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void entityIsTransient(PersistEvent event, Map createCache) throws HibernateException { log.trace("saving transient instance"); final SessionImplementor source = event.getSession(); final Object entity = source.getPersistenceContext().unproxy( event.getObject() ); if ( createCache.put(entity, entity)==null ) { saveWithGeneratedId( entity, event.getEntityName(), createCache, source ); } } COM: <s> handle the given create event </s>
funcom_train/39369471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean init(Object commGroup) { try { intracomm = (Intracomm) commGroup; size = intracomm.Size(); rank = intracomm.Rank(); } catch (MPIException ex) { return false; } /* Power of 2 greater than number of tasks */ powerOf2 = 1; while (powerOf2 < size) { powerOf2 = 2 * powerOf2; } return true; } COM: <s> initialize the parallel context using intracomm rather than calling </s>
funcom_train/31928588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer(); java.util.Iterator it = this.iterator(); while(it.hasNext()){ Object o = it.next(); if(o instanceof JbAction) { result.append(((JbAction)o).toString()); result.append("\n"); } } return result.toString(); } COM: <s> returns a string representation of the jb action history object </s>
funcom_train/35728842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushBase64() throws java.io.IOException { if( position > 0 ) { if( encode ) { out.write( encode3to4( b4, buffer, position, options ) ); position = 0; } // end if: encoding else { throw new java.io.IOException( "Base64Util input not properly padded." ); } // end else: decoding } // end if: buffer partially full } // end flush COM: <s> method added by phil </s>
funcom_train/22098261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check() { try { Socket s = new Socket(); s.bind(new InetSocketAddress(0)); s.connect(new InetSocketAddress(host, port), timeout); s.close(); return true; } catch (IOException e) { return false; } } COM: <s> pings the remote host </s>
funcom_train/45934634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = FileFilterUtils.getExtension(f); if (extension != null) { if (extension.equals(FileFilterUtils.txt) || extension.equals(FileFilterUtils.TXT)) { return true; } else { return false; } } return false; } COM: <s> accept all directories </s>
funcom_train/29672553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void threadStartEvent(ThreadStartEvent event) { OutputStream out = monitor.outputStream(event.thread()); StringBuffer sb = new StringBuffer(); sb.append("Thread "); sb.append(event.thread().name()); sb.append(" have been started."); RecordWriter.write(out, sb.toString()); } COM: <s> handle thread start event </s>
funcom_train/35934261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void backupDatabase() { try { GregorianCalendar now = new GregorianCalendar(); String backupFilename = databaseFile+"-"+now.get(Calendar.YEAR)+"-"+now.get(Calendar.MONTH)+"-"+now.get(Calendar.DAY_OF_MONTH)+"_"+now.get(Calendar.HOUR_OF_DAY)+"-"+now.get(Calendar.MINUTE)+".zip"; dbHandle.createStatement().execute("SCRIPT DROP TO "+backupFilename+" COMPRESSION ZIP"); System.out.println("Backed up database to "+backupFilename); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> backup database to sql script file </s>
funcom_train/22278901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ScrollBar createScrollBar(boolean horizontal) { ScrollBar aBar; if (horizontal) { aBar = new ScrollBar(0, 0, bounds.width, 1, Scrollable.HORIZONTAL); } else { aBar = new ScrollBar(0, 0, 1, bounds.height, Scrollable.VERTICAL); } return aBar; } COM: <s> creates a new scroll bar with the correct orientation </s>
funcom_train/40363429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteComponent() { if (component == null) { return; } component.removePropertyChangeListener(weakPropertyListener); Model model = component.getModel(); try { model.startTransaction(); model.remove(component); postDeleteComponent(model); } finally { try { model.endTransaction(); } catch (IOException ioe) { ErrorManager.getDefault().notify(ioe); } } } COM: <s> deletes the model component </s>
funcom_train/1149922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand19() { if (okCommand19 == null) {//GEN-END:|248-getter|0|248-preInit // write pre-init user code here okCommand19 = new Command("Ok", Command.OK, 0);//GEN-LINE:|248-getter|1|248-postInit // write post-init user code here }//GEN-BEGIN:|248-getter|2| return okCommand19; } COM: <s> returns an initiliazed instance of ok command19 component </s>
funcom_train/3077431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws BuildException { if (change != null) { P4CmdOpts = "-c " + change; } if (P4View == null) { throw new BuildException("No view specified to delete"); } execP4Command("-s delete " + P4CmdOpts + " " + P4View, new SimpleP4OutputHandler(this)); } COM: <s> executes the p4 delete task </s>
funcom_train/279484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected abstract class ChangeElementCommand { private Element element; public ChangeElementCommand(Element element) { this.element = element; } public void run() throws JavaModelException { getEditingDomain().getCommandStack().execute( new ChangeCommand(getEditingDomain(), new Runnable() { public void run() { try { doChanges(); } catch (JavaModelException e) { throw new RuntimeException(e); } } }, "")); save(element); } /** * Do the work inside a transaction. * * @throws JavaModelException */ abstract protected void doChanges() throws JavaModelException; } COM: <s> call this in synchronize to handle transactions </s>
funcom_train/17705718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recordRotateCCW(char leftMotor, char rightMotor, int speed){ this.nxcCode.append(" // Rotate Counter-clockwise\n"); this.nxcCode.append(" OnRev(OUT_" + leftMotor + ", " + Math.abs(speed) + ");\n"); this.nxcCode.append(" OnFwd(OUT_" + rightMotor + ", " + Math.abs(speed) + ");\n"); } COM: <s> records the counter clockwise rotation for nxt </s>
funcom_train/46415533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record createOutputRecord(Record inputRecord) { Record out = new Record(new Text[desc.getOutTable().getFields().size()]); TableSchema inTable = desc.getInTable(); int outIndex = 0; for(String fieldName : getOutputFieldList()) { int inIndex = inTable.getFieldIndex(fieldName); if(inIndex >= 0) { out.getData()[outIndex] = inputRecord.getData()[inIndex]; } outIndex ++; } return out; } COM: <s> copy the field value which same filed name from input record </s>
funcom_train/8046547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllGestureEventListeners(Class<? extends IInputProcessor> gestureEvtSender) { IGestureEventListener[] l = this.getGestureListeners(); for (int j = 0; j < l.length; j++) { IGestureEventListener gestureEventListener = l[j]; this.removeGestureEventListener(gestureEvtSender, gestureEventListener); } } COM: <s> removes the all gesture event listeners who listen to the specified input processor </s>
funcom_train/23710612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VMatrix addRow(double[] list) { double[][] d2 = new double[numRows+1][numCols]; for (int i=0; i < numRows; i++) for (int j=0; j < numCols; j++) d2[i][j]=mData[i][j]; for (int i=0; i < numCols; i++) d2[numRows][i]=list[i]; return new VMatrix(d2); } COM: <s> adds a row to the matrix </s>
funcom_train/7274750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HeadPing (HeadPing original) { super(F_LIME_VENDOR_ID,F_UDP_HEAD_PING,original.getVersion(),original.getPayload()); _features = original.getFeatures(); _urn = original.getUrn(); _clientGUID = original.getClientGuid(); setGUID(new GUID(original.getGUID())); } COM: <s> creates a duplicate ping with ttl and hops appropriate for a new </s>
funcom_train/31300597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void collectAll(Cloud cloud, IndexHelper writer) { NodeManager nm = cloud.getNodeManager(tableName); NodeQuery q = nm.createQuery(); // use this iterator because we can have many data to process HugeNodeListIterator iterator = new HugeNodeListIterator(q); while (iterator.hasNext()) { Node currentNode = iterator.nextNode(); collectOne(currentNode, writer); } } COM: <s> collect all nodes in the table this object represents </s>
funcom_train/30351603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBPInfoWithWrongArg() throws Exception { try{ this.bpManager.getBPInfo(null); fail("Application INFO is got for null bpxid!"); } catch(BPManagerException e){ } catch(Exception ex){ fail("WRONG exception is THROWED in case of null arg"); } try{ this.bpManager.getBPInfo(CommonConfig.BPX_ID); fail("Application INFO is getted for wrong bpxid!"); } catch(BPManagerException e){ } catch(Exception e){ fail("WRONG exception is THROWED in case of wrong bpxid"); } } COM: <s> test of the getting business process info with illegal argument </s>
funcom_train/46824718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean executeMove (int x1, int y1, int x2, int y2) { boolean move = false; if (checkersPieceMover.isPossibleMove (x1, y1, x2, y2)) { move = checkersPieceMover.executeMove(x1, y1, x2, y2); refreshObservers(); } return move; } COM: <s> try and move a checkers piece from one co ordinate to another </s>
funcom_train/11009560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDateCellValue() { int cellType = getCellType(); if (cellType == CELL_TYPE_BLANK) { return null; } double value = getNumericCellValue(); boolean date1904 = getSheet().getWorkbook().isDate1904(); return DateUtil.getJavaDate(value, date1904); } COM: <s> get the value of the cell as a date </s>
funcom_train/37122131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection readDOM (Reader reader) { Collection collection = new java.util.ArrayList (); DOMParser parser = new DOMParser (); try { parser.setErrorHandler(new MyErrorListener (_output)); parser.parse (new InputSource(reader)); Document doc = parser.getDocument(); collection.add(doc.getDocumentElement()); } catch (Exception ex) { System.out.println ("XMLUtility::readDOM - " + ex); } return collection; } COM: <s> read dom a platform specific implementation of xml reader </s>
funcom_train/45770438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(InputStream input) throws IOException { int numOfBytesRead = input.read(rw); numOfBytesRead++; col += input.read(); numOfBytesRead += input.read(ixfe); Debug.log(Debug.TRACE, "\tRow : "+ EndianConverter.readShort(rw) + " Column : " + col + " ixfe : " + EndianConverter.readShort(ixfe)); return numOfBytesRead; } COM: <s> reads a blank cell code input stream code </s>
funcom_train/44846651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getTime() { Calendar c = Calendar.getInstance(getLocale()); c.set(Calendar.HOUR_OF_DAY, getHour()); c.set(Calendar.MINUTE, getMinute()); c.set(Calendar.SECOND, getSecond()); return c.getTime(); } COM: <s> gets the chosen time in the form of a date </s>
funcom_train/26227175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("JConditionalExpression["); buffer.append(cond.toString()); buffer.append(", "); buffer.append(left.toString()); buffer.append(", "); buffer.append(right.toString()); buffer.append("]"); return buffer.toString(); } COM: <s> returns a string representation of this literal </s>
funcom_train/37410651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertySet(PropertySet propertySet) { ModelItem modelItem=(this.currentTabIsAdvanced) ? this.advancedDisplayedObject : this.basicDisplayedObject; if (modelItem instanceof DisplayProperties) { model.updateModelItem((DisplayProperties)modelItem, propertySet); } else { log.debug("Do not know how to setPropertySet for " + modelItem); } refreshView(); } COM: <s> set the properties of the model item that provided the current property set </s>
funcom_train/44712949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logQuery(String type, String sql, long time) throws SQLException { try { int conn_id = m_stmt.getConnection().hashCode(); DeveloperSupport.logQuery(conn_id, type, sql, null, time, null); } catch (SQLException e) { throw m_conn.wrap(e); } } COM: <s> this one just hits ds not the log file </s>
funcom_train/16908778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void killPreview() { if (previewThread == null) return; //IJ.log("killPreview"); synchronized (this) { previewThread.interrupt(); //ask for premature finishing (interrupt first -> no keepPreview) bgPreviewOn = false; //tell a possible background thread to terminate when it has finished } waitForPreviewDone(); } COM: <s> stop the background process responsible for preview as fast as possible </s>
funcom_train/23013871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fail(String currentname, int currentpic, long totalprogress) { setSuccessful(false); setActive(false); setChanged(); notifyObservers(new UploadStatus(currentname, currentpic, totalpics, 0, 0, totalprogress, totalsize, UploadStates.Error)); listener.uploadComplete(this); } COM: <s> declares that weve finished and failed miserably </s>
funcom_train/18032384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuEditImageRotate() { if (m_menuEditImageRotate == null) { m_menuEditImageRotate = new JMenuItem(); m_menuEditImageRotate.setText(Messages.getString("FBMenu.30")); //$NON-NLS-1$ m_menuEditImageRotate.setMnemonic(Messages.getString("FBMenu.31").charAt(0)); //$NON-NLS-1$ } return m_menuEditImageRotate; } COM: <s> returns the edit image rotate item </s>
funcom_train/31740197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addGlue(int x, int y) { // Add Glue Components, so the trick gets centered. GridBagConstraints glueConstraints = new GridBagConstraints(); glueConstraints.fill = GridBagConstraints.BOTH; glueConstraints.weightx = 0.5; glueConstraints.weighty = 0.5; glueConstraints.gridx = x; glueConstraints.gridy = y; this.add(Box.createGlue(), glueConstraints); } COM: <s> adds a glue component to this card pane </s>
funcom_train/2800532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAvailable(String pProperty) throws RaccoonException { try { /** Try to retrieve the value of the property */ mProperties.getString(pProperty); /** No exception, the property exists */ return true; } catch (java.util.MissingResourceException e) { /** Property not found, the property doesn't exist */ return false; } } COM: <s> convenience method to check if a specific property is defined </s>
funcom_train/29386816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( ActionEvent e ) { if ( e.getSource() == sysZoomBtn ) { int newState = RESTORE; if ( isZoomed()) newState = ZOOM; setZoomState( newState ); zoomPanel(); } else dockable.dockedContainer.removeDockable( dockable, ( e.getSource() == sysMinimizeBtn )); } COM: <s> respond to the minimize button and dock this panel </s>
funcom_train/47980506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void vibrateOnChatMessage(){ Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE); // start and duration of vibrations // {start in 0ms, vibrate for 500ms, pause for 300ms, vibrate for 500ms} long[] vibrate = {0, 500, 300, 500 }; // -1 prevent vibration from repeating the pattern vibrator.vibrate(vibrate, -1); } COM: <s> helper function to force the mobile device to vibrate </s>
funcom_train/19164715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testArrayConstruction() { try { // wir schmeissen hier mal ein Array rein und hoffen auf eine exception new DefaultObjectFactory((new Class[0]).getClass()); fail("exception expected - how do you think an array is to be instantiated?"); } catch (IllegalArgumentException e) { //fail("aischokey"); } catch (Exception e) { fail("unexpected exception occured: " + e.getMessage()); } } COM: <s> test array construction </s>
funcom_train/38301312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanExpiredRegistrations(){ ResultSet rs = null; long currTime = System.currentTimeMillis(); try{ PreparedStatements pss = getPreparedStatements(); pss.stm_selExpiredDescr.setString(1, String.valueOf(currTime)); rs = pss.stm_selExpiredDescr.executeQuery(); while(rs.next()){ remove(rs.getString("aid")); } } catch(SQLException se){ if(logger.isLoggable(Logger.WARNING)) logger.log(Logger.WARNING, "Error cleaning expired DF registrations", se); } finally { closeResultSet(rs); } } COM: <s> removes df registrations whose lease time has expired </s>
funcom_train/27960017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(int newSize) { if (newSize<elementCount) { modCount++; elementCount=newSize; } Object[] newArray = new Object[newSize]; System.arraycopy(elementData, 0, newArray, 0, Math.min(newSize, elementData.length)); elementData=newArray; } COM: <s> explicitly sets the size of the internal data array copying the </s>
funcom_train/8405567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(String name, String key) { if (name == null) { throw new IllegalArgumentException("No property name specified"); } Object value = values.get(name); if (value == null) { return false; } if (value instanceof Map) { return (((Map) value).containsKey(key)); } return false; } COM: <s> does the specified mapped property contain a value for the specified </s>
funcom_train/1778942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void declareLabel(final Label l) { String name = (String) labelNames.get(l); if (name == null) { name = "l" + labelNames.size(); labelNames.put(l, name); buf.append("Label ").append(name).append(" = new Label();\n"); } } COM: <s> appends a declaration of the given label to </s>
funcom_train/45108048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int moveCheckedToScenarioTree(int amount) throws Exception { jemmySupport.setSpinnerValue(mainFrame, jmap.getNumOfTestToAddSpinner(), new Integer(amount)); jemmySupport.pushButton(mainFrame, jmap.getAddTestsButton()); jemmySupport.WaitForDialogToClose(jmap.getAddTestsDialog()); return ((Long) TestTreePanel.getCurrentSelectedTests()).intValue(); } COM: <s> moves checked tests to the scenario tree </s>
funcom_train/18116010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task createTask() { Category[] cats = getCategories(); Category none = null; for (int i = 0; i < cats.length; i++) { try { DBCategory cat = (DBCategory) cats[i]; if (cat.getID() == 1) { none = cat; break; } } catch (ClassCastException f) { } } if (none != null) { return createTask(none); } else { return null; } } COM: <s> creates a task in the default category </s>
funcom_train/3881870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VocabularyList getVocabularyList(SchemaNode schemaNode) { if(schemaNode == null) return null; VocabularyList vList = null; // Check for Helper list first Vocabulary vocab = getVocabulary(); if(vocab != null) { vList = vocab.getVocabularyList(schemaNode); } // Now check for internal Schema if(vList == null) { vList = schemaNode.getVocabularyList(); } return vList; } COM: <s> get the vocabulary list for a given element or attribute </s>
funcom_train/19325581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean traitAutoRestore(final FObj fobj, final FoContext context) { final PdAutoRestore property = (PdAutoRestore) getProperty( FoProperty.AUTO_RESTORE); if (property != null) { return property.getValue(context, fobj); } return PdAutoRestore.getValueNoInstance(context, fobj); } COM: <s> returns the auto restore property </s>
funcom_train/18052209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getSvJMenuBar() { if (svMenuBar == null) { svMenuBar = new JMenuBar(); svMenuBar.setBackground(new Color(228, 229, 230)); svMenuBar.add(getSvFileMenu()); svMenuBar.add(getSvEditMenu()); svMenuBar.add(getSvManageMenu()); svMenuBar.add(getSvWindowMenu()); svMenuBar.add(getSvHelpMenu()); } return svMenuBar; } COM: <s> this method initializes svjmenu bar </s>
funcom_train/39912119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEh7() { System.out.println("setEh7"); TextField tf = null; Page1 instance = new Page1(); instance.setEh7(tf); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set eh7 method of class timesheetmanagement </s>
funcom_train/23172631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startGeneration(IProgressMonitor monitor) throws IllegalArgumentException { try{ //Start Loading the intern Graph-Representation if(xml_Flag){ monitor.worked(1); monitor.setTaskName("Loading intern Graph Modell..."); mgr.load(path_XML, filename_XML); } else{ monitor.worked(1); monitor.setTaskName("Loading intern Graph Modell..."); mgr.load(); } //Start Transforming intern Graph-Representation into another monitor.worked(2); monitor.setTaskName("Transforming Graphstructure..."); mgr.transform(); //Start Generating Code monitor.worked(3); monitor.setTaskName("Creating BPEL code..."); mgr.generate(); this.BPELcode = mgr.getCode1(); } catch(WorkflowException e){ System.out.println(e.getMessage()); } } COM: <s> starts the generation and has two main steps </s>
funcom_train/22396576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAddressMode(int addressMode) { this.addressMode = addressMode; switch(addressMode) { case MODE_ADDRESS: super.setText(this.address); super.setEditable(true); break; case MODE_NAME: super.setText(this.name); super.setEditable(false); break; } this.invalidate(); } COM: <s> sets the address mode </s>
funcom_train/7641647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkFileContainsRegexp(File file, String regexp) { Pattern p = Pattern.compile(regexp); try { BufferedReader in = new BufferedReader(new FileReader(file)); String line; while ((line = in.readLine()) != null) { if (p.matcher(line).find()) { return true; } } in.close(); } catch (Exception e) { // ignore } return false; } COM: <s> returns true if any line of the input file contains the requested regexp </s>
funcom_train/25766770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logSentenceSignificance(int[] scores, double significance, Sentence sentence) { if (LOG.isLevelEnabled(LogLevel.DEBUG)) { StringBuilder sb = new StringBuilder(); sb.append(sentence.getText()).append("\n"); for (int i : scores) { sb.append(i == 1 ? "* " : "- "); } sb.append(String.format(" | Significance: %.1f\n" , significance)); LOG.debug(sb.toString()); } } COM: <s> log the scoring processing </s>
funcom_train/32101002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getShowHintCellValue() { int value = 0; for (int i = 1; i < showHintCellValues.length - 1; i++) { if (showHintCellValues[i]) { if (value == 0) { value = i; } else { // more than one value return 0; } } } return value; } COM: <s> checks the array </s>
funcom_train/40099057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = -1; gridBagConstraints.gridy = -1; jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); jPanel.setBorder(BorderFactory.createLineBorder(Color.gray, 1)); jPanel.add(getJButton(), gridBagConstraints); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/31110470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element storeItemIntoElement(final Item item) { Element element; if (item == null) { throw new IllegalArgumentException("Argument item is null."); } element = new Element("item"); element.setAttribute("name", item.getName()); element.setAttribute("description", item.getDescription()); element.setAttribute("weight", Double.toString(item.getWeight())); return element; } COM: <s> stores an item into a xml element </s>
funcom_train/28994186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection findAllUserIdsOnPortal(Portal aPortal) { Collection answer = null; try { String[] userids = prs.findAllPrincipals(); answer = Arrays.asList(userids); answer.remove(DEFAULT_USER_ID); } catch (RemoteException e) { PortalSystem.getTrace().log(TraceCapable.EXCEPTION, getClass() + "[findAllUserIdsOnPortal(Portal aPortal)]" + "Attempt to findAllPrincipals() failed."); } return answer; } COM: <s> return a collection of userids for each user in the system </s>
funcom_train/16738359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchNodeService(final SearchParameter initialSearchParameter) { SearchParameter searchParameter = ( initialSearchParameter == null ) ? new SearchParameter() : initialSearchParameter; QName serviceType = new QName(NodeService.class.getSimpleName(), NodeService.NAMESPACE); searchParameter.setServiceTypes(new QNameSet(serviceType)); this.detectedServices.clear(); this.searchService(searchParameter); } COM: <s> search for available node services with an optional initial search </s>
funcom_train/18788311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetaView findView(String qualifiedName) { int idx = qualifiedName.lastIndexOf("."); MetaView metaView = null; MetaPackage metaPackage = null; if (idx >= 0) { metaPackage = findPackage(qualifiedName.substring(0, idx)); } if (metaPackage == null) { metaView = super.findView(qualifiedName); } else { metaView = metaPackage.findView(qualifiedName); } return metaView; } COM: <s> returns the view with given qualified name </s>
funcom_train/13966130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ERXRestRequestNode cloneNode() { ERXRestRequestNode cloneNode = new ERXRestRequestNode(_name, _rootNode); cloneNode._attributes.addEntriesFromDictionary(_attributes); cloneNode._children.addObjectsFromArray(_children); cloneNode._value = _value; cloneNode._associatedObject = _associatedObject; cloneNode._array = _array; cloneNode._type = _type; cloneNode._id = _id; cloneNode._null = _null; return cloneNode; } COM: <s> clones this node </s>
funcom_train/48713478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calcPos(){ // Calculate position of generator double crot = worksWithCvy.getRot() * MathX.DEGTORAD; double cx = worksWithCvy.getX(); double cy = worksWithCvy.getY(); double clength = worksWithCvy.getWidth(); double ex = cx + Math.cos(crot) * clength; double ey = cy + Math.sin(crot) * clength; x = cx + p_factor * (ex - cx); y = cy + p_factor * (ey - cy); rot += worksWithCvy.getRot(); } COM: <s> calculate the position of the grabpoint based on </s>
funcom_train/48792205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sleep(long millis) { long end = System.currentTimeMillis() + millis; for (;;) try { Thread.sleep(end - System.currentTimeMillis()); break; } catch (InterruptedException e) { } catch (IllegalArgumentException e) { break; // If sleep value goes below 0 } } COM: <s> method sleep provides accurate sleeping services without interruption </s>
funcom_train/20774507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEmissionProbability(double[][] prob){ for(int i = 0; i<states.size(); i++) if(!isSilentState(states.get(i))) for(int j = 0; j<observationSet.size(); j++) setEmissionProbability(states.get(i), observationSet.get(j), prob[i][j]); calDepthSilentStates(); } COM: <s> set all emission probabilities n to m mapping </s>
funcom_train/8156081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToRotation(double theta) { m00 = Math.cos(theta); m01 = -Math.sin(theta); m02 = 0.0; m10 = - m01; // Math.sin(theta); m11 = m00; // Math.cos(theta); m12 = 0.0; m20 = 0.0; m21 = 0.0; m22 = 1.0; } COM: <s> sets this transform to a rotation transformation </s>
funcom_train/34511021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxcolumns(int maxcols) { if (maxcols < 1) { throw new UiException("maxcolumn must be greater than 0: " + maxcols); } if(_maxColumns != maxcols) { _maxColumns = maxcols; JSONObj result = new JSONObj(); if(_colFreeze>=_maxColumns){ _colFreeze=_maxColumns-1; } result.setData("maxcol", _maxColumns); result.setData("colfreeze", _colFreeze); smartUpdate("maxcol", result.toString()); } } COM: <s> sets the maximum column number of this spread sheet </s>
funcom_train/49049723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int boolCount(Hashtable inTable, boolean inVal) { int count = 0; Boolean val = new Boolean(inVal); Enumeration e = inTable.keys(); while (e.hasMoreElements()) { if (((Boolean)inTable.get(e.nextElement())).equals(val)) { count++; } } return count; } COM: <s> count the number of hashtable entries with a particular </s>
funcom_train/12079158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int argbColor) { drawPolygon(new int[] { x1, x2, x3 }, 0, new int[] { y1, y2, y3 }, 0, 3, argbColor); } COM: <s> draws a closed triangle defined by coordinates </s>
funcom_train/17900709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { DatabaseConnection dc = getSelectedConnection(); if (dc == null) { GUIUtilities.displayErrorMessage( "No database connection is available."); return; } GUIUtils.startWorker(new Runnable() { public void run() { try { setInProcess(true); createTable(); } finally { setInProcess(false); } } }); } COM: <s> action listener implementation </s>
funcom_train/6444772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void build(JcaMetaData data, ClassLoader loader) throws OpenEJBException { ManagedConnectionFactory[] factories = createRAFactories(data, loader); for(int i=0; i<factories.length; i++) { system.deployConnector(data.getDeployments()[i].getName(), factories[i]); } } COM: <s> given a container system and a set of metadata deploys the beans </s>
funcom_train/3117099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String dialogsToString(final DeviceType deviceType) { final StringBuffer sb = new StringBuffer(); for (Iterator i = getDialogs(deviceType).iterator(); i.hasNext(); ) { final Dialog d = (Dialog)i.next(); sb.append(d.toLongString(1, deviceType)); sb.append("\n"); } return sb.toString(); } COM: <s> returns a string representation of all the pages in this graph for the </s>
funcom_train/18049669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addXqueryColumn(Xquery xq, boolean overwrite) { d.method("addXqueryColumn(Xquery xq="+xq+", boolean overwrite="+overwrite+")"); Element qNode = getXqueryNode(xq.getColumnId()); d.out("node with ID='"+xq.getColumnId()+"' = "+qNode); if (qNode != null){ if (!overwrite){ return false; } //detach and create from scratch! d.out("detach xquery node !"); //qNode.detach(); } createXqueryNode(xq); setDirty(true); return true; } COM: <s> add a column entry in the jdx config file </s>
funcom_train/17771342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMainNodeId(int docNumber, IndexSearcher search) throws IOException{ Document foundDoc = search.search(new TermQuery(new Term("m_id", db.getDoc(docNumber).getDocId()))).doc(0); String foundDocID = foundDoc.getField("m_main_node_id").stringValue(); return foundDocID; } COM: <s> given the document number this method returns the value </s>
funcom_train/9408097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(E e) { final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; Object[] newElements = Java6Arrays.copyOf(elements, len + 1); newElements[len] = e; setArray(newElements); return true; } finally { lock.unlock(); } } COM: <s> appends the specified element to the end of this list </s>
funcom_train/49048278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean applyMenuChoice(MenuItem item) { switch (item.getItemId()) { case Menu1: if (webPopout.canGoBack()) { webPopout.goBack(); } return true; case Menu2: if (webPopout.canGoForward()) { webPopout.goForward(); } return true; case Menu3: webPopout.reload(); return true; case Menu4: webPopout.closeWebView(); return true; case Menu5: mPreview.closeCamListener(); return true; case Menu6: mPreview.takeCamPicture(); return true; case Menu7: mPreview.camHand.retake(); return true; case Menu8: mPreview.camHand.upload(); return true; } return false; } COM: <s> respond to menu item selection </s>
funcom_train/28346902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllForShowBPMs_DiffX() { Vector v = new Vector(); for(int i = 0, n = bpmV.size(); i < n; i++) { RingBPM rbpm = (RingBPM) bpmV.get(i); RingBPMtbtAvg rbpmPV = rbpm.getBPM_X(); if(rbpmPV.show()) { v.add(rbpmPV.getRingBPMtsDiff()); } } return v; } COM: <s> returns all ring bpms pvs with show true for x position difference </s>
funcom_train/1575996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoElement Minimize(String label, GeoElement dep, GeoNumeric indep) { AlgoMinimize algo=new AlgoMinimize(cons,label,dep,indep); // true: minimize /*GeoElement geo=algo.getMaximized(); //All variants return array... * */ return algo.getResult(); }//Minimize(lbl,dep,indep,minimize); COM: <s> trying to minimize dependent variable with respect to independen variable </s>
funcom_train/37071637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PubConnection getReadWriteConnection() { try { PubConnection conn = new PubConnection(new LoggedConnection(instance() .getConnection()), this); Log.debug(this, "ReadWriteConnection " + conn + " allocated"); return conn; } catch (SQLException e) { throw new RuntimeException(e); } } COM: <s> returns a new logged connection that can be used for reading and </s>
funcom_train/4008438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void use(int object, String hunter, int p_X, int p_Y, Parser pars) { Hunter hunt = m_Game.getHunter(hunter); Position pos = new Position(p_X, p_Y); hunt.setPos(pos); if(m_Game.use(object, hunt)) { pars.success(); } else { pars.add(new ObjectNotFoundException()); } } COM: <s> uses the given object in the game </s>
funcom_train/17007497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReceiveSecurely(int secTemplateId) throws ServiceException { // TODO: IS template Id required ? if (templateId != 0) { if (templateId != secTemplateId) { throw new ServiceException(moduleName + "Specified templateId [" + secTemplateId + "] different from previously " + "specified templateId of " + templateId); } receiveSecurely = true; } templateId = secTemplateId; receiveSecurely = true; } COM: <s> enable secure delivery of events corresponding to this template </s>
funcom_train/13391870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { /* Will throw a ClassCastException if the obj is not the right type */ TimeBoundary that = (TimeBoundary)o; if(this.getBoundary() == that.getBoundary()) return (0); if(this.getBoundary() < that.getBoundary()) return (-1); return (1); } COM: <s> compares this time boundary object with another time boundary object </s>
funcom_train/43239492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIntention(String keyDes, List<String> keyDesNeg) { CogCDesire desc = this.cdesires.get(keyDes); List<CogCDesire> aux = new ArrayList<CogCDesire>(); for(int i=0;i<keyDesNeg.size();i++) { aux.add(this.cdesires.get(keyDesNeg.get(i))); } CogIntention p = new CogIntention(desc,aux,gr); this.global.addIntention(p); } COM: <s> add a new intention </s>
funcom_train/43889695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String indexOutOfBounds(final int index, final int lower, final int upper) { return getErrorResources() .getString(ErrorKeys.VALUE_OUT_OF_BOUNDS_$3, new Integer(index), new Integer(lower), new Integer(upper - 1)); } COM: <s> formats an error message for an index out of bounds </s>
funcom_train/24537613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddToResource() { Resource res = new ResourceImpl(); res.eAdapters().add(new ResourceInverseMaintenanceAdapter()); EReference ref1 = EcoreFactory.eINSTANCE.createEReference(); res.getContents().add(ref1); // Do the tests. InverseMaintenanceAdapter ia = (InverseMaintenanceAdapter) EcoreUtil.getExistingAdapter(ref1, InverseMaintenanceAdapter.ADAPTER_KEY); assertNotNull(ia); assertTrue(ia.isPropagated()); } COM: <s> test adding a single to resource </s>
funcom_train/3990176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUzebieniePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_uzebienie_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_uzebienie_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__UZEBIENIE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the uzebienie feature </s>
funcom_train/14401294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static interface RecordingStateChangeListener { /** * Gets called when a session has started message recording. * * @param session * the session that has started message recording. */ public void notifyRecordingStarted(SessionController session); /** * Gets called when a session has paused message recording. * * @param session * the session that has paused message recording. */ public void notifyRecordingPaused(SessionController session); /** * Gets called when a session has stopped message recording. * * @param session * the session that has stopped message recording. */ public void notifyRecordingStopped(SessionController session); } COM: <s> recording state change listeners mit implement this interface </s>
funcom_train/8539771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawChar(final Graphics g, final char character, final int x, final int y, final int anchor) { int clipX = g.getClipX(); int clipY = g.getClipY(); int clipW = g.getClipWidth(); int clipH = g.getClipHeight(); drawCharInternal(g, character, x, y, anchor); g.setClip(clipX, clipY, clipW, clipH); } COM: <s> paints the specified character at the specified coordinates on the </s>
funcom_train/3913491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void complete(Collection firedActions) throws PropertyException { if (performComplete()) { // Start of Alfanet Specific Software Tracker.trackEngine(uol, user, getIdentifier(), getPropertyDef().getDataType(), "complete", null); EventDispatcher.getEventDispatcher().postMessage(getUol(), getRun(), getUser(), this, EventDispatcher.COMPLETION_EVENT, firedActions); } } COM: <s> completes implementating component as result of processing an </s>
funcom_train/13345015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = 17; result = 37 * result + (this.getId() == null ? 0 : getId().hashCode()); result = 37 * result + (this.getCls() == null ? 0 : getCls().hashCode()); result = 37 * result + (this.getRelation() == null ? 0 : getRelation().hashCode()); return result; } COM: <s> this method generates unique hashcode used by hibernate </s>
funcom_train/36113276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOptimal(final SimplexTableau tableau) { if (tableau.getNumArtificialVariables() > 0) { return false; } for (int i = tableau.getNumObjectiveFunctions(); i < tableau.getWidth() - 1; i++) { if (tableau.getEntry(0, i) < 0) { return false; } } return true; } COM: <s> returns whether the problem is at an optimal state </s>
funcom_train/42382357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Interpreter getInterpreter(StateProvider context) { if(sharedInterpreter==null && context.get(this, ISOLATE_THREADS)) { // initialize sharedInterpreter = newInterpreter(context); } if(sharedInterpreter!=null) { return sharedInterpreter; } Interpreter interpreter = threadInterpreter.get(); if(interpreter==null) { interpreter = newInterpreter(context); threadInterpreter.set(interpreter); } return interpreter; } COM: <s> get the proper interpreter instance either shared or local </s>
funcom_train/6206617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleFormValidatorAdded(IFile file) { IContainer container = file.getParent(); IGaijinResourceElement parentElement = GaijinCore.getModel().findElement(container); if (parentElement != null) { IGaijinWebFlowGroup group = (IGaijinWebFlowGroup) parentElement; try { group.addFormValidator(file); addWebFlowGroupToUpdate(group); } catch (GaijinModelException e) { asyncSetErrorMarkerForResource(file, e.getMessage()); } } } COM: <s> handle the addition of a file that represents a form validator </s>
funcom_train/1502205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { final String title = "Description of the colors used"; if (colorLegend == null) colorLegend = new ColorLegend(null, title, false); if (!dialogShowing) { dialogShowing = true; colorLegend.setVisible(true); dialogShowing = false; } } COM: <s> launches the color legend dialog </s>
funcom_train/16465026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentContainer(Container container) { // don't need to do anything if the main component hasn't changed if (container == this.contentContainer) { return; } // remove the main component if (this.contentContainer != null) { remove(this.contentContainer); } // replace the main component this.contentContainer = container; add(container, BorderLayout.CENTER); // repaint main component revalidate(); } COM: <s> sets the main content container for this container </s>
funcom_train/11042432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File createOutFile(String fileName, String extension, String prefix) throws Exception { return org.apache.axis2.util.FileWriter.createClassFile(this.rootDir, "", (prefix == null ? AXIS2_PREFIX : prefix) + fileName, extension); } COM: <s> creates the output file </s>
funcom_train/39380250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Page createPage(Class pageClass, HttpServletRequest request) { String path = getConfigService().getPagePath(pageClass); if (path == null) { String msg = "No path configured for Page class: " + pageClass.getName(); throw new IllegalArgumentException(msg); } return initPage(path, pageClass, request); } COM: <s> return a new page instance for the page class </s>
funcom_train/23293914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IService wrapWithProxy(Object original) { Class [] interfaces; int numberOfInterface; ServiceAspectProxy proxy=new ServiceAspectProxy(original); ClassLoader cl=original.getClass().getClassLoader(); Class[] proxyInterfaces = analyseServiceInterfaceList(original); IService wrappedService=(IService)Proxy.newProxyInstance(cl, proxyInterfaces, proxy); return wrappedService; } COM: <s> creates a proxy and wrap it around of the original service object </s>
funcom_train/13581589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void countPlans() { this.scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig()); this.population = scenario.getPopulation(); MatsimRandom.reset(123); new MatsimNetworkReader(scenario).readFile(this.networkFile); NetworkImpl network = (NetworkImpl) scenario.getNetwork(); new MatsimPopulationReader(scenario).readFile(this.plansFile); final PopulationImpl plans = (PopulationImpl) scenario.getPopulation(); plans.printPlansCount(); System.out.println("done."); } COM: <s> starts the assignment of links to activities </s>
funcom_train/10532826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetterByProgram() throws Exception { PropertyControlBean sbean = (PropertyControlBean) Beans.instantiate( Thread.currentThread().getContextClassLoader(), "org.apache.beehive.controls.test.controls.property.PropertyControlBean"); assertEquals(PropertyControl.DEFAULT_ATTRIBUTE_VALUE1, sbean.getAttribute1()); assertEquals(PropertyControl.DEFAULT_ATTRIBUTE_VALUE3, sbean.getPropertyTwoAttribute3()); } COM: <s> accesses property value by getter og control bean instance </s>