__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1866215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFreeChart createChart() { return ChartFactory.createXYLineChart("Equation Graph", // chart title "X", // x axis label "Y", // y axis label null, // data PlotOrientation.VERTICAL, true, // include legend true, // tooltips false // urls ); } COM: <s> method for creating xy line graph </s>
funcom_train/18352960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RowPairList swapRows(int r1, int r2) { RowPairList rpl = new RowPairList(); // Return if there is nothing to do if (r2 == r1) { return rpl; } // Construct row pair list rpl.addRowPair(new RowPair(r1, r2)); rpl.addRowPair(new RowPair(r2, r1)); // Use the row pair list this.apply(rpl); return rpl; } COM: <s> swaps row code r1 code s with code r2 code </s>
funcom_train/19456658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getDirectory() { List list = new ArrayList(); byte[] directory = readDirectory(); int count = AppleUtil.getWordValue(directory, 16); int offset = 0; for (int i = 0; i <= count; i++) { byte[] entry = new byte[ENTRY_SIZE]; System.arraycopy(directory, offset, entry, 0, entry.length); list.add(new PascalFileEntry(entry, this)); offset += ENTRY_SIZE; } return list; } COM: <s> retrieve the entire directory </s>
funcom_train/37557676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; g2d.setColor(new Color(0, 150, 150, 128)); g2d.fill3DRect(0, 0, (int) this.getWidth(), (int) this.getHeight(), true); } COM: <s> handles the actual graphics operations on this object </s>
funcom_train/9680260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefault() { cat.info("Testing Ca for default package"); assertDependants( "", Arrays.asList( new String[] {"a.Test", "a.Test2", "a.Test3", "a.Test4"})); cat.info("SUCCESS"); } COM: <s> tests ca for default package </s>
funcom_train/34356598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Closure build(Model baseModel, String modelURI, int degree) { int hierarchyDegree; try { hierarchyDegree = Integer.parseInt(Config.get().getProperty(Config.MAX_HIERARCHY_CLOSURE_DEGREE_KEY, Config.MAX_HIERARCHY_CLOSURE_DEGREE_DEFAULT)); } catch (NumberFormatException e) { hierarchyDegree = Integer.parseInt(Config.MAX_HIERARCHY_CLOSURE_DEGREE_DEFAULT); } return build(baseModel, modelURI, degree, hierarchyDegree); } COM: <s> build closure for the given model </s>
funcom_train/5600641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getInput() throws IOException { if (tiles != null) { return tiles; } final File file = series.file(filename); if (file.isAbsolute()) { return file; } try { return series.uri(filename); } catch (URISyntaxException e) { throw new IIOException(e.getLocalizedMessage(), e); } } COM: <s> returns the source as a </s>
funcom_train/32061337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Taskforce getFirstFriendlyTaskforce(Game game, Player player) { argcheckNull(game, "game"); argcheckNull(player, "player"); Taskforce firstfriendlytf = null; Vector<Taskforce> friendlytfs = getFriendlyTaskforces(game, player); if (!(friendlytfs.isEmpty())) { firstfriendlytf = friendlytfs.firstElement(); } return firstfriendlytf; } COM: <s> returns the first taskforce in the system which belongs to the specified </s>
funcom_train/26525019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doNextTask() { if( ssi == null ) ssi = new SubSumInstance(props); SHC shc = new SHC( props, ssi ); shc.run(); // --- logging result StringWriter sw = new StringWriter(); boolean[] b = shc.best(); for(int j=0; j<b.length; ++j) sw.write( b[j] ? "1 " : "0 " ); log(""+shc.bestVal()+"\t"+sw.toString()); } COM: <s> this methods performs the tasks </s>
funcom_train/18220294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TableConfiguration createSCMRevisionActivitiyHistoryTableConfiguration() { final TableConfiguration configuration = new TableConfiguration( SCMRevisionActivityHistory.TABLE_NAME); configuration.addMandatoryColumn(SCMRevisionActivityHistory.ID); configuration .addMandatoryColumn(SCMRevisionActivityHistory.ACTIVITY_ID); configuration .addMandatoryColumn(SCMRevisionActivityHistory.ACTIVITY_TYPE_ID); configuration.addMandatoryColumn(SCMRevisionActivityHistory.BUG_ID); configuration .addMandatoryColumn(SCMRevisionActivityHistory.DEVELOPER_ID); configuration .addMandatoryColumn(SCMRevisionActivityHistory.LOG_COMMENT); configuration .addMandatoryColumn(SCMRevisionActivityHistory.REVISION_ID); configuration.addMandatoryColumn(SCMRevisionActivityHistory.TIMESTAMP); return configuration; } COM: <s> creates the configuration for the scmrevision activitiy history table </s>
funcom_train/38224765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { JMenuItem source = (JMenuItem)(e.getSource()); String text = source.getText(); if (text.compareTo("Details...") == 0) ue.showDetails(jlist); if (text.compareTo("OBEX Put...") == 0) ue.putOBEX(jlist); } COM: <s> pop up menu element selected event handler calls specified action </s>
funcom_train/45257406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void firePropertyChange(IWorkingSet newWorkingSet, IWorkingSet oldWorkingSet) { // Update viewer if (workingSetUpdater != null) { workingSetUpdater.propertyChange(new PropertyChangeEvent(this, WorkingSetFilterActionGroup.CHANGE_WORKING_SET, oldWorkingSet, newWorkingSet)); } } COM: <s> fire the property change to the updater if there is one available </s>
funcom_train/13588853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireQueueSimulationInitializedEvent() { MobsimInitializedEvent<Mobsim> event = new MobsimInitializedEventImpl<Mobsim>(sim); MobsimInitializedListener[] listener = this.listenerList.getListeners(MobsimInitializedListener.class); for (int i = 0; i < listener.length; i++) { listener[i].notifyMobsimInitialized(event); } } COM: <s> creates the event and notifies all listeners </s>
funcom_train/13333185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTerms(Collection<T> collection) { this.allTermsMap.clear(); this.allTermsidList.clear(); this.ticked.clear(); this.visible.clear(); this.visibleThroughSynonymMap.clear(); for (T term : collection) { this.allTermsMap.put(getTermId(term), term); this.allTermsidList.add(getTermId(term)); } this.visible.addAll(this.allTermsidList); sortingNeeded = true; fireTableDataChanged(); } COM: <s> sets the collection of </s>
funcom_train/3420939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocationPath buildLocationPath( Vector stepsVector ) throws XPathException { int size = stepsVector.size(); check(size!=0); Step[] steps = new Step[size]; stepsVector.copyInto(steps); stepsVector.removeAllElements(); return new LocationPath(steps); } COM: <s> used by the </s>
funcom_train/12306100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCharDev2() throws Exception { FileInfo f5 = new FileInfo("crw-rw-rw- 1 root 3, 24 Apr 14 2001 ttyq8"); assertEquals(true, f5.isDevice()); assertEquals(FileInfo.UNKNOWN_STRING,f5.getName()); assertEquals(FileInfo.UNKNOWN_STRING,f5.getDate()); assertEquals(FileInfo.UNKNOWN_STRING,f5.getTime()); assertEquals(FileInfo.UNKNOWN_NUMBER,f5.getSize()); } COM: <s> suppose that group is missing in dev directory entry </s>
funcom_train/38396194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double filterSpline(double x) { double xx; if (x < 0) x = -x; if (x < 1) { xx = x*x; return (.5*xx*x) - xx + (2./3.); } else if (x < 2) { x = 2.-x; return (1./6.)*(x*x*x); } return 0; } COM: <s> spline filter used in interpolation </s>
funcom_train/22155104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initNodes() { for (int i = 0; i < this.nodeList.length; i++) { this.nodeList[i].initExtraProperties(); this.nodeList[i].addExtraProperty("Known", new Boolean(false)); this.nodeList[i].addExtraProperty("Distance", new Short(Short.MAX_VALUE)); } } COM: <s> helping method of dijkstra algorithm that prepare all nodes in the graph </s>
funcom_train/1245145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { this.sanitizeKeys = true; this.primitiveAsString = false; this.compressEnable = true; this.compressThreshold = COMPRESS_THRESH; this.defaultEncoding = "UTF-8"; this.poolName = ( this.poolName == null ) ? "default" : this.poolName; // get a pool instance to work with for the life of this instance this.pool = SockIOPool.getInstance( poolName ); } COM: <s> initializes client object to defaults </s>
funcom_train/1444217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getPointWithXValue(double x, Vektor v) { if (this.point1.x == this.point2.x) { v.setEmpty(); return; } double m = (this.point1.y - this.point2.y) / (this.point1.x - this.point2.x); double n = this.point1.y - this.point1.x * m; v.x = x; v.y = m * x + n; } COM: <s> calculates the point on the line with desired x value </s>
funcom_train/29831932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(String descriptionString, DescriptionList elementDescriptionList){ //calculate rating and maxRating int rating = 0; int maxRating = 0; for( DescriptionEntry entry : elementDescriptionList ){ rating += entry.rating; if( entry.rating > maxRating ){ maxRating = entry.rating; } } //add a new entry return this.add( new DescriptionEntry( descriptionString, rating, maxRating, elementDescriptionList ) ); } COM: <s> add method for descriptions of replacement groups </s>
funcom_train/18186968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCSSClass() { StringBuilder builder = new StringBuilder(); if (odd) { builder.append("odd"); } if (message.isSticky()) { builder.append(" sticky"); } final ForumUser messageAuthor = message.getAuthor(); final ForumUser topicCreator = topic.getCreator(); if (messageAuthor.equals(topicCreator)) { builder.append(" topicauthor"); } odd = !odd; return builder.toString(); } COM: <s> returns the css class for a given message </s>
funcom_train/7965364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void maybeTimeout(final int timeout, final long startTime) { if (timeout < 0) { return; } final long currentTime = clock.getCurrentTimeMillis(); // MagicNumber off if (currentTime - startTime >= timeout * 1000) { throw new IllegalStateException("Slave registration timed out."); } // MagicNumber on } COM: <s> triggers timeout mechanism iff the timeout expired </s>
funcom_train/1482326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFile(String file) { if (merged) throw new IllegalStateException( "Can't add extensions after merge has been called"); if (file == null) throw new NullPointerException( "file cannot be null"); if (! ids.add(file)) throw new IllegalArgumentException( "File " + file + " already added"); FileEntry entry = new FileEntry(); entry.file = file; entries.add(entry); } COM: <s> add a source stream </s>
funcom_train/20321328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexNearest(int red, int green, int blue) { return mapBuf[((red << (2 * bits - truncationBits)) & redQuantizationMask) + ((green << (1 * bits - truncationBits)) & greenQuantizationMask) + ((blue >> (truncationBits)) & blueQuantizationMask)] & 0xFF; } COM: <s> this method is responsible for doing the actual lookup that given an rgb </s>
funcom_train/36185743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load(String propsFile) throws IOException { if (this.log.isDebugEnabled()) this.log.debug("Reading configuration from " + propsFile); FileInputStream fis = null; try { fis = new FileInputStream(propsFile); this.props.load(fis); } finally { if (fis != null) fis.close(); } } COM: <s> loads saved properties from </s>
funcom_train/26530175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAutoTaskList() { // check and see whether there is exactly one preferred task list for // the prefix in question. List taskLists = EVTaskList.getPreferredTaskListsForPath(data, prefix); if (taskLists != null && taskLists.size() == 1) return (String) taskLists.get(0); // we can't guess. Give up. return null; } COM: <s> attempt to automatically determine the task list to use for a </s>
funcom_train/20342107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getPrevNoteCommand() { if (prevNoteCommand == null) {//GEN-END:|14-getter|0|14-preInit // write pre-init user code here prevNoteCommand = new Command("Prev note", Command.OK, 1);//GEN-LINE:|14-getter|1|14-postInit // write post-init user code here }//GEN-BEGIN:|14-getter|2| return prevNoteCommand; } COM: <s> returns an initiliazed instance of prev note command component </s>
funcom_train/44684318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVertexForm(String form) { // select the right item in the JCombobox int count = vertexStyleComboBox.getItemCount(); for (int i = 0; i < count; i++) { String[] item = (String[]) vertexStyleComboBox.getItemAt(i); if (item[1].equals(form)) { vertexStyleComboBox.setSelectedIndex(i); break; } } } COM: <s> sets the vertex form </s>
funcom_train/40879636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConceptualRentBO create() { String id = null; try { id = GUID.generate(); } catch (Exception ex) { //Re-write this catch later. It was auto-generated ex.printStackTrace(); } ConceptualRentBO bo = new ConceptualRentBO(id); Cache c = Cache.getInstance(); c.put(bo.getId(), bo); return bo; } COM: <s> theres no need for two creates because we dont need </s>
funcom_train/24939555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inspect(Object o, String fileName) { if (visible) { try { oi.output(o, new FileWriter(fileName)); } catch (Exception e) { System.err.println("Could not write " + fileName + " to inspect " + o.getClass().getName() + ": error: " + e); } } } COM: <s> write out a html page describing an object </s>
funcom_train/40675217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logMethodCalls() { Logger logger = Logger.getLogger(RemoteApiDelegate.class.getName()); logger.setLevel(Level.FINE); if (!Arrays.asList(logger.getHandlers()).contains(getStreamHandler())) { logger.addHandler(getStreamHandler()); } } COM: <s> starts logging remote api method calls to the console </s>
funcom_train/26382204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { SimpleDateFormat df=new SimpleDateFormat("MM-dd-yy hh:mmaa"); return ""+df.format(timeStamp.getTime())+ " "+(isDir()?"<DIR>":" ")+" "+(isFile()?""+size:" ")+" "+name; } COM: <s> convert object to string representation </s>
funcom_train/29805083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteItemFromCollection(rKiveItem item, rKiveCollection collection) { // calls the database to delete the item from the collection database.deleteItemFromCollection(item, collection); // update the formats menu and tree and update selected item menus selectedCollectionsHaveChanged(item, false); } COM: <s> deletes an item from a collection </s>
funcom_train/34311853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object fetchReceiver() { Object receiver = null; if (!producers().isEmpty()) receiver = producers().first().returnValue().getTestCaseInstance(); if (!method.getActualClass().isInstance(receiver)) receiver = null; if (receiver == null) receiver = Reflection.newInstance(method.getActualClass()); assert receiver != null; return receiver; } COM: <s> returns cached receiver of first producer or creates a new receiver instance </s>
funcom_train/27757606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocal(int index, Object val) throws MachineException { int pos = local + index; //(index < 0 || pos >= stack.length) // throw new MachineException("local index out of range"); local(index); if(Opcode.MTRACE) System.out.println("L[" + index + "] = " + val); set(pos,val); } COM: <s> sets a local to the specified value </s>
funcom_train/5380769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ToolBar createControl(Composite parent) { if (!toolBarExist() && parent != null) { toolBar = new ToolBar(parent, itemStyle); toolBar.setMenu(getContextMenuControl()); update(false); if (toolBar.getAccessible() != null) toolBar.getAccessible().addAccessibleListener(getAccessibleListener()); } return toolBar; } COM: <s> creates and returns this managers tool bar control </s>
funcom_train/33552800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKeyBinding(KeyStroke keyBinding, ActionListener action) { // If there is nothing bound to this key, add a new list // Otherwise add this action to the existing list List<ActionListener> list = this.keyBindings.get(keyBinding); if ( list == null ) { list = new LinkedList<ActionListener>(); list.add(action); this.keyBindings.put(keyBinding, list); } else { list.add(action); } } COM: <s> creates an association between key binding and action </s>
funcom_train/46726800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() throws Exception { getMedItem().validateDataModel(); long medItemId = MedService.store(getMedItem()); if (getMedItem().isNew()) { MedItemModel tableRow = MedService.getMedItem(medItemId); insertTableRow(ContextReference.MEDICATIONINVENTORYSEARCHRESULTSTABLE, tableRow); } getMedItem().setId(medItemId); } COM: <s> save the medication item </s>
funcom_train/15456559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveFails() { EasyMock.expect(mRepo.loadAllCapabilities(mCategory)).andReturn( new ArrayList<Capability>()); mRepo.delete(mCategory); HibernateException exDelete = new HibernateException("test"); EasyMock.expectLastCall().andThrow( new TalosHibernateException("remove failed", exDelete)); mRepo.rollback(); replay(); try { tested.remove(); fail("should raise TalosHibernateException"); } catch (TalosHibernateException e) { assertSame("cause", exDelete, e.getCause()); } } COM: <s> should work once tal 72 is complete </s>
funcom_train/41725339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransactionList apply(TransactionList list) { if (state == CURRENT_DAY) { setDayInterval(new Date()); } else if (state == CURRENT_WEEK) { setWeekInterval(new Date()); } else if (state == CURRENT_MONTH) { setMonthInterval(new Date()); } else if (state == CURRENT_YEAR) { setYearInterval(new Date()); } else if (state == ALL_TIME) { return list.getPicking(tags); } return list.getPicking(startDate, finishDate, tags); } COM: <s> applies current filter to </s>
funcom_train/3714052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public String getYUnits() { // if (YUnits.IsValidUnits (sp.getUnits())) { // Units units = new YUnits (display_yunits); // if (YUnits.IsValidUnits (units)) { // return display_yunits; // } else { // return sp.getUnits().getOriginalSpelling(); // } // } else { // return sp.getUnits().getOriginalSpelling(); // } // } COM: <s> returns the current display units from the selected </s>
funcom_train/3902830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCompletionThresholdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_completionThreshold_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_completionThreshold_feature", "_UI_DocumentRoot_type"), AdlcpV1p3Package.Literals.DOCUMENT_ROOT__COMPLETION_THRESHOLD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the completion threshold feature </s>
funcom_train/17729850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireNewConnection(MonitoredOutputStream mis, MonitoredOutputStream mos) { logger_.debug("fireNewConnection: " + listeners_); for (Iterator i = listeners_.iterator(); i.hasNext();) ((TcpTunnelListener) i.next()).newConnection(mis, mos); } COM: <s> fires notification that a new connection has been accepted by the </s>
funcom_train/21437362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ResidueType createAttachPoint() { ResidueType ret = new ResidueType(); ret.name = "#attach"; ret.description = "Attach Point"; ret.composition = "0"; ret.nlinkages = 2; ret.can_parent = true; ret.can_redend = false; ret.updateMolecule(); return ret; } COM: <s> create an attach point type used only for drawing purposes </s>
funcom_train/13618817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRemoveIdsForms() { FacesContext facesContext = FacesContext.getCurrentInstance(); Iterator messages = facesContext.getMessages(); List<String> idsForm = new ArrayList<String>(); if (messages.hasNext()) { idsForm = getUIFormsIds(); } while (messages.hasNext()) { FacesMessage message = (FacesMessage) messages.next(); processFacesMessage(message, idsForm); } return false; } COM: <s> remove the forms id from the faces messages </s>
funcom_train/31651080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActivityListMeta getActivityListMeta(String id) throws Exception{ if(!activityLists.containsKey(id)){ SM.warning("Failed lookup: "+id+" in " + activityLists); throw new InternalError("No ActivityList found for id: '"+id+"'"); } return (ActivityListMeta) activityLists.get(id); } COM: <s> get an activity list meta object by its activity lists id </s>
funcom_train/18035720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Item getItem(String itemId) throws GustoException { String sql = "select * from " + itemTable; sql += " where " + itemIdColumn + "=?"; Object[] params = new Object[] { itemId }; List list = jdbcTemplate.query(sql, params, new RowMapperResultReader(new ItemRowMapper())); if (list.size()>0) { return (Item)list.get(0); } else { throw new GustoException(); } } COM: <s> get an item by its id </s>
funcom_train/9202744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRatio(double ratio) { if (ratio <= 0.0) throw new IllegalArgumentException("The pulley ratio must be greater than zero."); // make sure the ratio changed if (ratio != this.ratio) { // set the new ratio this.ratio = ratio; // compute the new length this.length = this.length1 + this.ratio * this.length2; // wake up both bodies this.body1.setAsleep(false); this.body2.setAsleep(false); } } COM: <s> sets the pulley ratio </s>
funcom_train/12264770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long transferTo(WritableByteChannel target) throws IOException, BufferUnderflowException, SocketTimeoutException { long written = 0; while (true) { long w = new TransferToTask(target).read(); if (w == -1) { return written; } else { written += w; } } } COM: <s> transfers the content to the given channel </s>
funcom_train/4913991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String composeFilename() { final StringBuffer stringBuffer = new StringBuffer(128); if (beforeComposite != null) { stringBuffer.append(beforeComposite.composeFilename()); } stringBuffer.append(delimiter); stringBuffer.append(' '); if (afterComposite != null) { stringBuffer.append(afterComposite.composeFilename()); } return stringBuffer.toString(); } COM: <s> create the filename that this composite represents </s>
funcom_train/13804474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLabelStatus( String s ) { if ( s == null ) { return NO_LABELS; } if ( s.equalsIgnoreCase( Keys.ALL_LABELS_STR ) ) { return ALL_LABELS; } if ( s.equalsIgnoreCase( Keys.CLICK_LABELS_STR ) ) { return CLICK_LABELS; } return NO_LABELS; } COM: <s> helper function to convert props file entry into the appropriate </s>
funcom_train/29538370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); gridBagConstraints2.gridx = -1; gridBagConstraints2.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints2.anchor = GridBagConstraints.CENTER; gridBagConstraints2.gridy = -1; jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.add(jLabel, gridBagConstraints2); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/8088325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildAssociations(Instances data) throws Exception { // can associator handle the data? getCapabilities().testWithFail(data); m_AllSequentialPatterns = new FastVector(); m_Cycles = 0; m_FilterAttrVector = new FastVector(); m_AlgorithmStart = getTimeAndDate(); m_OriginalDataSet = new Instances(data); extractFilterAttributes(m_FilterAttributes); findFrequentSequences(); } COM: <s> extracts all sequential patterns out of a given sequential data set and </s>
funcom_train/12177597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map createPropertiesMap(MCSDatabaseConfiguration config) { Map properties = new HashMap(); properties.put(JDBCRepository.SOURCE_PROPERTY, config.getSource()); properties.put(JDBCRepository.HOST_PROPERTY, config.getHost()); properties.put(JDBCRepository.VENDOR_PROPERTY, config.getVendor()); properties.put(JDBCRepository.PORT_PROPERTY, config.getPort()); return properties; } COM: <s> create a properties map that may be used by the creation of the </s>
funcom_train/49798424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWhitespace() throws Exception { String inputText = DefaultIACleaner.readFile(getWhitespaceInputFile()); assertNotNull(inputText); String outputText = DefaultIACleaner.readFile(getExpectedFile()); assertNotNull(outputText); // replace \r\n with \n outputText = outputText.replace("\r\n", "\n"); IACleaner c = AllTests.getCleaner(); String result = c.cleanScript(getWhitespaceInputFile()); assertStringEquals(outputText, result); // no warnings assertNoWarnings(c); } COM: <s> this is the same file except all whitespace has been removed </s>
funcom_train/28750865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBlock(Long newVal) { if ((newVal != null && this.block != null && (newVal.compareTo(this.block) == 0)) || (newVal == null && this.block == null && block_is_initialized)) { return; } this.block = newVal; block_is_modified = true; block_is_initialized = true; } COM: <s> setter method for block </s>
funcom_train/17788189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTileHeaderDataBinLength(long inClassIdentifier) { ExplicitBinDescriptor dataBin = tileHeaderDataBin.get(inClassIdentifier); if (dataBin == null) { return 0; } if (dataBin.isWildcard()) { return Integer.MAX_VALUE; } return dataBin.numberOfBytes; } COM: <s> returns the length of tile header data bin </s>
funcom_train/21472973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenericFile getVariableInputFile(String name, String label) { Iterator it = variableInputSets.iterator(); while (it.hasNext()) { List variableInputList = (List) it.next(); Iterator ite = variableInputList.iterator(); while (ite.hasNext()) { GenericFile f = (GenericFile) ite.next(); if (f.getName().equals(name) && f.getLabel().equals(label)) { return f; }// if }// while }// while return null; } COM: <s> returns an variable input file with a given name and label </s>
funcom_train/42268168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { PlotRunList newObject = null; try { // Make a shallow copy of this object. newObject = (PlotRunList) super.clone(); // Now clone the runs attached to this list. newObject.data = new ArrayList(); int size = this.data.size(); for (int i=0; i < size; ++i) { Object run = ((PlotRun)this.data.get(i)).clone(); newObject.data.add(run); } } catch (CloneNotSupportedException e) { // Can't happen. e.printStackTrace(); } // Output the newly cloned object. return newObject; } COM: <s> make a copy of this plot run list object </s>
funcom_train/32056663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMousePressed() { System.out.println("testMousePressed"); Button b = new Button(); MouseEvent e = new MouseEvent(new JGraph(), 1, 1, 1, 1, 1, 1,false); BasicMarqueeHandler bm = new BasicMarqueeHandler(); bm.mousePressed(e); } COM: <s> this function tests mouse pressed function of vertex view class </s>
funcom_train/19745101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String filename) throws IOException { BufferedWriter out = new BufferedWriter(new FileWriter(filename)); for (Iterator itr = books.iterator(); itr.hasNext();) { Book book = (Book) itr.next(); out.write(book.getTitle()); out.write('|'); out.write(book.getCheckedOutTo() == null ? "" : book.getCheckedOutTo()); out.write('\r'); } out.close(); this.filename = filename; dirty = false; } COM: <s> saves the library to a file </s>
funcom_train/11023257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidDefault() { Object defaultvalue = numbers[0]; NumberConverter converter = makeConverter(defaultvalue); // Default String --> Number conversion assertEquals("Invalid null ", defaultvalue, converter.convert(getExpectedType(), null)); assertEquals("Default XXXX ", defaultvalue, converter.convert(getExpectedType(), "XXXX")); } COM: <s> convert number string using default and specified locales </s>
funcom_train/40018319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(String message, Severity severity) { if (message.startsWith(LOCALIZED_PREFIX)) { log(strings.get(message.substring(LOCALIZED_PREFIX.length())), severity); return; } switch (severity) { case NONE: break; case WARNING: warnings.add(message); break; case ERROR: errors.add(message); break; } } COM: <s> log an error or warning message </s>
funcom_train/28293571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequiredForIncomplete() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "getRequiredForIncomplete"); System.out.println(" :: SeqActivity --> END - " + "getRequiredForIncomplete"); } return mRequiredForIncomplete; } COM: <s> retrieves incomplete rollup rule consideration sequencing model element </s>
funcom_train/40701894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void eventsCancel(Long eid, String cancelMessage, AsyncCallback<Boolean> callback) { Json j = new Json ().put ( "eid", eid ).put ( "cancel_message", cancelMessage ); callMethodRetBoolean ( "events.cancel", j.getJavaScriptObject (), callback ); } COM: <s> cancels an event </s>
funcom_train/28125821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String trim(String line) { String str = line.replaceAll(COMMENT + ".*$", "").replaceAll(ASSIGNMENT + ".*$", "").trim(); if ( str.equals("") || str.matches("^\\w+$") ) { return str; } else { log("String '" + str + "' rejected because of illegal characters."); return ""; } } COM: <s> the trim function removes all comments and assignments property like and returns either </s>
funcom_train/39876941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Request addRequestHeader(String header, String value) { if (header == null) { throw new NullPointerException("header cannot be null"); } if (header.contains(":")) { throw new IllegalArgumentException("header may not contain ':'"); } if (value == null) { value = ""; } mRequestHeaders.add(Pair.create(header, value)); return this; } COM: <s> add an http header to be included with the download request </s>
funcom_train/37541879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFundamentalLowerFraction() { int fundamental = -1; boolean isFound = false; for (int i = 0; i < cells.length && !isFound; i++) { if (cells[i].isActive() && !cells[i].isFreezed() && cells[i].getLowerState() == TableCell.FRACTION) { fundamental = i; isFound = true; } } return fundamental; } COM: <s> return the index of the the first lower cell that is a fraction </s>
funcom_train/7972522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adderUpdate(final String id, final List<ASExpression> singleCard, final List<String> cardGroup, final PublicKey publicKey){ if(_pureMode) throw new RuntimeException("Cannot mix Adder and VoteBox style ballots"); _adderMode = true; Runnable r = new Runnable(){ public void run(){ adderUpdateImpl(id, new ListExpression(singleCard), cardGroup, publicKey); } }; synchronized(_pendingActions){ _pendingActions.add(r); _pendingActions.notify(); } } COM: <s> updates a piecemeal encryption of a ballot if were using adder style ballots </s>
funcom_train/9429039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void aggregateContact(SQLiteDatabase db, long rawContactId, long currentContactId) { if (!mEnabled) { return; } MatchCandidateList candidates = new MatchCandidateList(); ContactMatcher matcher = new ContactMatcher(); ContentValues values = new ContentValues(); aggregateContact(db, rawContactId, currentContactId, candidates, matcher, values); } COM: <s> synchronously aggregate the specified contact assuming an open transaction </s>
funcom_train/47075345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createComboTestTable() { GridData gridData20 = new GridData(); gridData20.horizontalAlignment = GridData.FILL; gridData20.verticalAlignment = GridData.CENTER; comboTestInputTable = new Combo(groupMatlab, SWT.READ_ONLY); comboTestInputTable.setLayoutData(gridData20); comboTestInputTable.setBounds(new Rectangle(33, 294, 136, 24)); } COM: <s> this method initializes combo test table </s>
funcom_train/25471461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected char decodeShift (char ch, int k) throws Exception{ if (!cipherAlphabet.isInAlphabet(ch)) return ch; while (k < 0) k += cipherAlphabet.getSize(); return alphabet.intToChar((cipherAlphabet.charToInt(ch) + k) % cipherAlphabet.getSize()); } // decodeShift COM: <s> this method shifts a character in the alphabet ahead the specified </s>
funcom_train/5451398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void CheckForInheritedEvents() { IdeEventsListItem CrntListItem; CrntListItem = EventsList; while (CrntListItem != null) { if (CrntListItem.TheListener != null) { if (CrntListItem.TheListener.isChildEventsListener()) { setInheritedEvents(true); return; } } CrntListItem = CrntListItem.getNext(); } setInheritedEvents(false); } COM: <s> checks if there is at least one listener which will handle inherited events </s>
funcom_train/3787070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSpotPairList() { /* clearSpotPairList */ maxSpotPairs= 0; nTopSpotPair= 0; spotPairList= null; firstSpotPair= null; lastSpotPair= null; countPairG= 0; listPairG= null; nPairCCread= 0; } /* clearSpotPairList */ COM: <s> clear spot pair list clear spot list </s>
funcom_train/24535709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireMoved() { feedbackController.addTransaction(this, Common.CL_MOVED, getLocation(), true); if (extensions != null) { ComponentManagerExtension[] lcl = extensions; // In case it changes to a new array while we are walking it. for (int i = 0; i < lcl.length; i++) { lcl[i].componentMoved(); } } } COM: <s> fire component moved </s>
funcom_train/34053261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importLibrary(final ServerConnection server) { dialog.show(); new Thread(new Runnable() { public void run() { try { SongList songs = loadSongs(server); storeSongs(songs); finish(); } catch (Exception e) { Log.e(getClass().getSimpleName(), e.getMessage(), e); exception = e; } } }).start(); } COM: <s> imports a music library from a server into the database </s>
funcom_train/36644004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateLogLikelihood() { // make intervals StructuredIntervalList list = new ColouredTreeIntervals(treeModel, colourSamplerModel.getTreeColouring()); ColourChangeMatrix mm = migrationModel.getMigrationMatrix(); StructuredCoalescent sc = new StructuredCoalescent(); double logL = sc.calculateLogLikelihood(colourSamplerModel.getTreeColouring(), list, mm, metaPopulationModel); return logL; } COM: <s> calculates the log likelihood of this set of coalescent intervals </s>
funcom_train/28349063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processChannels(List channelTables) { _channelRefs = new ArrayList(channelTables.size()); for ( Iterator iter = channelTables.iterator() ; iter.hasNext() ; ) { Map channelTable = (Map)iter.next(); String pv = (String)channelTable.get(LoggerPortal.CHANNEL_SIGNAL); Boolean connected = (Boolean)channelTable.get(LoggerPortal.CHANNEL_CONNECTED); _channelRefs.add( new ChannelRef(pv, connected) ); } _postProxy.channelsChanged(this, _channelRefs); } COM: <s> process the channel information </s>
funcom_train/15490913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextString() { String theText; if (stringField==null) return ""; TextField tf = (TextField)(stringField.elementAt(sfIndex)); theText = tf.getText(); if (macro) { String label = (String)labels.get((Object)tf); theText = Macro.getValue(macroOptions, label, theText); //IJ.write("getNextString: "+label+" "+theText); } if (Recorder.record) recordOption(tf, theText); sfIndex++; return theText; } COM: <s> returns the contents of the next text field </s>
funcom_train/41413985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteCurrentProfile() { int index=profilesList.getSelectedIndex(); String currentProfileName=profilesList.getString(index); try { ProfileManager.getInstance().deleteProfile(currentProfileName); profilesList.delete(index); } catch (Exception e) { displayError(getMessage("message.cantDeleteProfile")+currentProfileName); } } COM: <s> delete the selected profile </s>
funcom_train/36684293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node createPositionNode(GameItem item) { Element positionNode = myDocument.createElement(POSITION_TAG); positionNode.appendChild(createNode(X_TAG, "" + item.getPosition().getX())); positionNode.appendChild(createNode(Y_TAG, "" + item.getPosition().getY())); return positionNode; } COM: <s> creates the node representing the objects position </s>
funcom_train/28366892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected void applyBeanPropertiesTo( final Object object, final List<? extends DataAdaptor> beanAdaptors ) { final Map<String,PropertyDescriptor>descriptorTable = getProperyDescriptorTable( object ); for ( final DataAdaptor beanAdaptor : beanAdaptors ) { applyBeanPropertyTo( object, beanAdaptor, descriptorTable ); } } COM: <s> apply property settings to the bean object </s>
funcom_train/35622184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, null, isSelected, hasFocus, row, column); if(value != null) { String prettyDate = dateFormat.format((Date)value); setText(prettyDate); } else { setText(""); } return this; } COM: <s> returns the component used for drawing the cell </s>
funcom_train/12568469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView edit(HttpServletRequest req, HttpServletResponse resp){ int id = Integer.parseInt(req.getParameter("id")); Room room = (Room) manager.get(id); Structure structure = room.getStructure(); int hotel_id_for_room = structure.getId(); req.setAttribute("typologies", typologyManager.getTypologiesFromStructure(hotel_id_for_room)); req.setAttribute("hotel", structure); return new ModelAndView("hotel.room.new", "room", room); } COM: <s> produce a edit form for a room </s>
funcom_train/33492373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shuffle() { for (int i = 0; i < cards.size(); i++) { Card temp = cards.get(i); int shuffledIndex = (int) (Math.random() * cards.size()); Card shuffled = cards.get(shuffledIndex); cards.set(i, shuffled); cards.set(shuffledIndex, temp); } } COM: <s> command to shuffle this deck </s>
funcom_train/40358829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyConfigureResponse() { String expectedResult = "<CmResponse>\n" + " <StatusId>0</StatusId>\n" + " <ConfigureResponse>\n" + " </ConfigureResponse>\n" + "</CmResponse>\n"; String message = null; String formSnippet = null; ConfigureResponse configResponse = new ConfigureResponse(message, formSnippet); doTest(configResponse, expectedResult); } COM: <s> test configure response with no message form snippet map or xml </s>
funcom_train/39309350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCorrectlyConstructed() { assertEquals("There is more then One Measurement recorded", 1, pmi.getMeasurementCount()); assertEquals("Max is not Correct", 123, pmi.getMax()); assertEquals("Min is not Correct", 123, pmi.getMin()); assertEquals("Avg is not Correct", 123, pmi.getAvg()); } COM: <s> test method test correct instantination </s>
funcom_train/22050200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get_all_level_string() { String tTemp = ""; for (int i = 0; i < iClass.get_size(); i++) { if (i > 0) { tTemp += "/"; } tTemp += "" + get_level(i); } return tTemp; } COM: <s> returns a string of class levels </s>
funcom_train/35414917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if(logService != null && !logService.isStarted()){ logService.start(); if(!logService.isStarted()){ reportError("Unable to start JMX Log Handler, you will not get logg messages.", null, ErrorManager.OPEN_FAILURE); } } } COM: <s> life cycle method </s>
funcom_train/22396429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addIdentity() { IdentityConfig identityConfig = new IdentityConfig(); IdentityConfigScreen identityConfigScreen = new IdentityConfigScreen(identityConfig); UiApplication.getUiApplication().pushModalScreen(identityConfigScreen); if(identityConfigScreen.configSaved()) { mailSettings.addIdentityConfig(identityConfig); mailSettings.saveSettings(); } } COM: <s> adds a new identity </s>
funcom_train/17920962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkParameter(String pn, String pv) { if (parameters != null) { for (int i = 0; i < parameters.length; i++) { if (pn.equals(parameters[i].name)) { return parameters[i].checkValue(pv); } } } return false; } COM: <s> perform a check if the parameter name and value of the property </s>
funcom_train/16481144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stosw() throws MemoryException { Address address = m_machine.newAddress(m_state.getES(), m_state.getDI()); m_memory.writeWord(address, (short) m_state.getAX()); byte diff = (m_state.getDirectionFlag() ? (byte)-2 : (byte)2); m_state.setDI((short)(m_state.getDI() + diff)); } COM: <s> implements the stosw opcode </s>
funcom_train/10237767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public plugin () { JMenu menu, submenu; JMenuItem item; menu = Cytoscape.getDesktop().getCyMenus().getOperationsMenu(); submenu = new JMenu("Cytoprophet"); item = new JMenuItem("Start"); item.addActionListener(new addToControlPanel()); submenu.add(item); menu.add(submenu); } COM: <s> default constructor of the plugin class </s>
funcom_train/12835076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void okConfirm() throws IOException { //final PrintWriter out = new PrintWriter(this.socket.getOutputStream()); String confirm = "HTTP/1.1 200 OK\n"; confirm += "Content-Type: text/plain\n"; confirm += "Cache-Control: no-cache\n"; confirm += "Connection: close\n"; confirm += "\n"; OutputStream out = socket.openOutputStream(); out.write(confirm.getBytes()); } COM: <s> sends back successfull confirmation </s>
funcom_train/39314678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testonlyIfExistsActionPerformed() { System.out.println("testonlyIfExistsActionPerformed"); preferences myPrefs=new preferences(ff, true); String s=new String("l"); ActionEvent myEvent=new ActionEvent(s, 1, "hello"); myPrefs.onlyIfExistsActionPerformed(myEvent); //empty code } COM: <s> test of only if exists action performed method of class preferences </s>
funcom_train/6289923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Date date) { if (year < date.year) return -1; if (year > date.year) return 1; if (month < date.month) return -1; if (month > date.month) return 1; if (day < date.day) return -1; if (day > date.day) return 1; return 0; } COM: <s> compares this object with with the specified date object for order </s>
funcom_train/7522455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Object sender, long seqno) { Vector seqnos=(Vector)msgs.get(sender); Long val=new Long(seqno); if(seqnos == null) { seqnos=new Vector(); seqnos.addElement(val); msgs.put(sender, seqnos); return true; } if(seqnos.contains(val)) return false; seqnos.addElement(val); return true; } COM: <s> records the sender seqno pair in the message table </s>
funcom_train/45762601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cleanup( TestParameters Param, PrintWriter log) { log.println( " disposing xSheetDoc " ); try { XCloseable oComp = (XCloseable) UnoRuntime.queryInterface (XCloseable.class, xSpreadsheetDoc) ; oComp.close(true); }catch(com.sun.star.util.CloseVetoException e) { log.println("Couldn't close document: "+e.getMessage()); } } COM: <s> called while disposing a code test environment code </s>
funcom_train/44853588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryResult getPublished(String inQuestionID) throws VException, SQLException { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(KEY_QUESTION_ID, new Integer(inQuestionID)); lKey.setValue(BOMHelper.getKeyPublished(KEY_STATE)); OrderObject lOrder = new OrderObjectImpl(); lOrder.setValue(KEY_ID, 0); return select(lKey, lOrder); } COM: <s> returns a set of published completions belonging to the question with </s>