__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46746861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAppointmentStatusRef(DisplayModel appointmentStatusRef) { if (Converter.isDifferent(this.appointmentStatusRef, appointmentStatusRef)) { DisplayModel oldappointmentStatusRef= new DisplayModel(this); oldappointmentStatusRef.copyAllFrom(this.appointmentStatusRef); this.appointmentStatusRef.copyAllFrom(appointmentStatusRef); setModified("appointmentStatusRef"); firePropertyChange(String.valueOf(APPOINTMENTSTATUSES_APPOINTMENTSTATUSREFID), oldappointmentStatusRef, appointmentStatusRef); } } COM: <s> type of appointment </s>
funcom_train/30239973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConfFile(String file) throws BadConfigurationException { if(file.charAt(0) == SEP.charAt(0)){ return file; } else { for(String path : getSearchDirs(searchDirProps)) { String test = mkAbsolute(path+SEP+file); File f = new File(test); if(f.exists()){ return test; } } return null; } } COM: <s> p return the path to a file in the conf directory </s>
funcom_train/495159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (context != null) { return String.format("%s:%s:%s", label, extension, context); } else if (extension != null) { return String.format("%s:%s", label, extension); } return label; } COM: <s> returns the string representation of the label which is </s>
funcom_train/6347632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFloat() throws IOException { PropertyStorageFactory f = PropertyStorageFactoryCreator.createXMLPropertyStorageFactory(); PropertyStorageExtended store = f.createPropertyStorage(TESTFILE); store.storeFloat("floatkey", TEST_FLOATS[0]); assertEquals(store.getFloat("floatkey"), TEST_FLOATS[0], TOLERANCE); } COM: <s> tests storing and loading of float values </s>
funcom_train/43245024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCounty() { System.out.println("getCounty"); ZipCodeObject instance = new ZipCodeObject(); String expResult = ""; String result = instance.getCounty(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get county method of class org </s>
funcom_train/8606151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeFromBagByItemId(int itemId, long count) { if (count < 1) return false; List<Item> items = storage.getItemsFromStorageByItemId(itemId); for (Item item : items) { count = decreaseItemCount(item, count); if (count == 0) break; } boolean result = count >= 0; if (result) setPersistentState(PersistentState.UPDATE_REQUIRED); return result; } COM: <s> used to reduce item count in bag or completely remove by itemid </s>
funcom_train/24533374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (fexpressions == null) return null ; StringBuffer sb = new StringBuffer() ; punchLine(sb,LBRACE) ; for (int i=0; i<fexpressions.length; i++) { fexpressions[i].setIndent(fexpIndet) ; punchLine(sb,fexpressions[i]) ; } punchLine(sb,RBRACE) ; return sb.toString() ; } COM: <s> this assumes that statement was generated by this template </s>
funcom_train/38156337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private void extractResourceID() { // String tempString = whereClause; if (whereClause != null && !whereClause.equals("EMPTY")) { //tempString = tempString.substring(tempString.lastIndexOf("=")+1); //ResourceID = Integer.parseInt(tempString.trim()); } }*/ COM: <s> gets the resouce id from the where clause </s>
funcom_train/49660461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDateAt(int row, int column) { Calendar c = Calendar.getInstance(); c.setTime(getDate()); int day = (row * 7 + column) - firstDay + 1; c.set(year, month, 1); // reset calendar to first day in month c.set(Calendar.DAY_OF_MONTH, day); //System.out.println(c.getTime()); return c.getTime(); } COM: <s> returns a java </s>
funcom_train/19380845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetOptions() { String OS = System.getProperty("os.name").toLowerCase(); // System.out.println(OS); if (OS.indexOf("windows") > -1) { resetWindowsOptions(); } else { resetLinuxOptions(); } } COM: <s> this method resets options to their original value </s>
funcom_train/10748398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test3_java5() { try { Constructor<Integer> c = Integer.class .getConstructor(new Class[] {String.class}); assertNotNull("Unexpected null", c); assertSame("Objects differ", String.class, c.getParameterTypes()[0]); } catch (Exception e) { fail(e.toString()); } } COM: <s> verify parametrized type </s>
funcom_train/1152094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand24() { if (itemCommand24 == null) {//GEN-END:|423-getter|0|423-preInit // write pre-init user code here itemCommand24 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|423-getter|1|423-postInit // write post-init user code here }//GEN-BEGIN:|423-getter|2| return itemCommand24; } COM: <s> returns an initiliazed instance of item command24 component </s>
funcom_train/25807899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadProperties() { this.properyFilePath = this.getProperyFilePath(); Properties props = PropertiesUtils.getPropertiesFile( this.properyFilePath ); this.clientXmlPath = props.getProperty( CLIENT_XML_PROP ); this.serverXmlPath = props.getProperty( SERVER_XML_PROP ); this.baseUrl = props.getProperty( BASE_URL_PROP ); } COM: <s> load properties for properties file </s>
funcom_train/13222661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseTrailerHeaders() throws IOException { try { this.footers = HeaderUtils.parseHeaders(in); } catch (HttpException e) { IOException ioe = new MalformedChunkCodingException("Invalid footer: " + e.getMessage()); ExceptionUtils.initCause(ioe, e); throw ioe; } } COM: <s> reads and stores the trailer headers </s>
funcom_train/37652917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFunctionNodeParameter() { if (jjtGetParent() instanceof ASTFunctionNode) { ASTFunctionNode functionNode = (ASTFunctionNode) jjtGetParent(); for (int i = 0; i < functionNode.getNumParams(); i++) { if (functionNode.getParam(i) == this) { return true; } } } return false; } COM: <s> returns whether this name node is the name of a function declaration parameter </s>
funcom_train/3290176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsTask(MMObjectNode node) { int number = node.getIntValue("number"); Enumeration e = tasks.elements(); if (!e.hasMoreElements()) { log.info("Task nodes vector is empty."); return false; } for (MMObjectNode nodeFromTasksVec=null; e.hasMoreElements();) { nodeFromTasksVec = (MMObjectNode)e.nextElement(); if (number==nodeFromTasksVec.getIntValue("number")) return true; } return false; } COM: <s> checks if a task node already exists in the task nodes vector </s>
funcom_train/46621010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Menu getHelpMenu() { if (iHelpMenu == null) { try { iHelpMenu = new Menu(); iHelpMenu.setLabel("Help"); iHelpMenu.add(getAboutMenuItem()); } catch (Throwable iExc) { handleException(iExc); } } return iHelpMenu; } COM: <s> return the help menu property value </s>
funcom_train/36930492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeOutput(int theOutputNumber){ try{ CCMidiOutDevice outDevice = (CCMidiOutDevice) _myMidiOutDevices.get(theOutputNumber); outDevice.close(); }catch (ArrayIndexOutOfBoundsException e){ throw new UnavailablePortException("You wanted to close the unavailable output " + theOutputNumber + ". The available outputs are 0 - " + (_myMidiOutDevices.size() - 1) + "."); } } COM: <s> use this method to close an output </s>
funcom_train/20478684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAfter(int row, AudioTrack track) { // Add the new row at the bottom audioTracks.add(track); if(audioTracks.size() == 1) { fireTableDataChanged(); return; } // Swap it up to its position for(int i=audioTracks.size()-1; (i-1) < row; i--) { swapRows(i,i-1); } fireTableDataChanged(); } COM: <s> adds a row after the indicated row </s>
funcom_train/18654705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String clean(String str) { char chr; StringBuffer buffer = null; if(str != null) { buffer = new StringBuffer(); for (int i = 0; i < str.length(); i++) { chr = str.charAt(i); if(chr >= 32 && chr <= 127) { buffer.append(chr); } } } if(buffer != null) { return buffer.toString(); } else { return null; } } COM: <s> removes non ascii chars </s>
funcom_train/50189103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireEndResultCDATA() { if (hasTraceListeners()) { // count of registered tracelisteners int countListener = traceListeners.size(); for (int i = 0; i < countListener; i++) { TraceListener currentListener = (TraceListener) traceListeners.elementAt(i); // call the according method on tracelistener currentListener.endResultCDATA(); } } } COM: <s> indicates the end cdata event of the result document </s>
funcom_train/49196874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAdditionalFilesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenFile_additionalFiles_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenFile_additionalFiles_feature", "_UI_GenFile_type"), GenmodelPackage.Literals.GEN_FILE__ADDITIONAL_FILES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the additional files feature </s>
funcom_train/39202040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUids(Collection<Long> uids) { if (uid != -1L) { throw new IllegalArgumentException("Cannot call both setUid() and " + "setUids(), use one or the other"); } usedField(UID, uids); this.uids = uids; } COM: <s> set a collection of unique ids for a collection of objects that should </s>
funcom_train/6261071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddFreeBinding2Class() { cls.getSetRole().clear(); listenerCls.colCopy = new ArrayList( cls.getSetRole() ); cls.getSetRole().add( bindFree ); assert( compare2Collections( listenerCls.colCopy, cls.getSetRole() ) ); assertCorrectCollection( listenerCls.colCopy, cls, "getListRole" ); } COM: <s> tests undo redo operations addition of participant1 to participant2 </s>
funcom_train/8967787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getSize() { Label label = new Label(); label.setFont(getLabelFont()); label.setText(getLabelText()); // return size.getCopy(); Dimension size = label.getPreferredSize(); size.height += 15; //margins size.width += 15; size.width = Math.min(size.width, getMaxLabelWidth()); size.height = Math.min(size.height, getMaxLabelHeight()); return size; } COM: <s> return the size of this shape </s>
funcom_train/15488444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doAssignOp(IndentedWriter w, Variable left, Variable right, String op) { if(ZUtils.DEBUG) { ZUtils.assert_(w != null); ZUtils.assert_(left != null); ZUtils.assert_(right != null); ZUtils.assert_(w != null); } w.print(convertId(left.getName()) + " " + op + " "); w.print(convertId(right.getName())); w.println(";"); } COM: <s> process an assignment operator </s>
funcom_train/50336295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Memory getMemory(String name) { Memory m = InstanceManager.memoryManagerInstance().getMemory(name); if (m==null) { String sName = name.toUpperCase().trim(); m = InstanceManager.memoryManagerInstance().getMemory(sName); } return m; } COM: <s> for backward compatibility with config files having system names in lower case </s>
funcom_train/43098683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContainer(Object handle, Object compositeState) { if (handle instanceof MStateVertex && (compositeState == null || compositeState instanceof MCompositeState)) { ((MStateVertex) handle).setContainer( (MCompositeState) compositeState); return; } throw new IllegalArgumentException("handle: " + handle + " or compositeState: " + compositeState); } COM: <s> set the container of a statevertex </s>
funcom_train/39880552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String peekLine() throws IOException { if (!mNextLineIsValid) { long start = System.currentTimeMillis(); final String line = super.readLine(); long end = System.currentTimeMillis(); mTime += end - start; mNextLine = line; mNextLineIsValid = true; } return mNextLine; } COM: <s> read one line but make this object store it in its queue </s>
funcom_train/18365835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeReviewer() throws STException, Exception { STUserData newUser = new STUserData( (String) cbUsers.getSelectedItem()); newUser.retrieveData(); if (checkSecurity(newUser) == false) { throw new STException(STGlobal.strError( "USR_REVIEWER_REPLACE_INSUFFICIENT_RIGHTS")); } replacementUser = newUser.getUserName(); } COM: <s> replace the current reviewer with the newly selected user </s>
funcom_train/7772967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnVendita() { if (btnVendita == null) { try { btnVendita = new JButton(); btnVendita.setText("Vendita"); // Generated btnVendita.setPreferredSize(new Dimension(100, 30)); // Generated btnVendita.addActionListener(myActionListener); } catch (java.lang.Throwable e) { // TODO: Something } } return btnVendita; } COM: <s> this method initializes btn vendita </s>
funcom_train/32740068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawl(String path) { if (path.endsWith(".jsp")) { this.JSPRelationMiner.crawl(path); this.JSPCrawlCount++; } else if (path.endsWith(".mdd")) { this.MDDRelationMiner.crawl(path); } else if (path.endsWith(".java")) { this.JavaRelationMiner.crawl(path); } } COM: <s> crawls through a file using the relation miners </s>
funcom_train/3976182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commandAction(Command c, Displayable d) { if (c == cmdExit) { try { // Do MIDLet resource cleanup (see above). destroyApp(false); // Tell the JVM that the user wants to terminate this midlet. notifyDestroyed(); } catch (MIDletStateChangeException e) { } } else if (c == cmdPause) { pauseApp(); } else if (c == cmdGetRoute) { screen.setDirections("Contacting server..."); fetcher.fetchDirections(); } else if (c == cmdRestart) { restartApp(); } } COM: <s> responds to button taps </s>
funcom_train/44921292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Colony alternativeColony() { if (!isIsolated()) { final int colonies = getPopulation().getColonies().size(); if (colonies != 2) LOG.info("Only one population for sexual reproduction in non-isolated population"); //$NON-NLS-1$ final int otherPopIndex = colonies - 1 - getIndex(); Colony result = null; if (otherPopIndex >= 0 && otherPopIndex != getIndex()) result = getPopulation().getColony(otherPopIndex); return result; } return null; } COM: <s> get the other colony based on the index of this colony </s>
funcom_train/4231093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void link(Node y, Node x) { // remove y from root list of heap y.left.right = y.right; y.right.left = y.left; // make y a child of x y.parent = x; if (x.child == null) { x.child = y; y.right = y; y.left = y; } else { y.left = x.child; y.right = x.child.right; x.child.right = y; y.right.left = y; } // increase degree[x] x.degree++; // set mark[y] false y.mark = false; } COM: <s> make node y a child of node x </s>
funcom_train/34038679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObject(int num, Object obj) { assert num>0 && num<getObjCnt(): num; assert obj!=null && !(obj instanceof IRef): obj; //if (num >= getObjCnt()) setObjCnt(num+1); => NO, consider this an error objCache_[num] = obj; renum_[num] = num; } COM: <s> set an object to null to take from base pdfreader </s>
funcom_train/19972914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAbout() { // Create the dialog the first time. if (messageDialog == null) createMessageBox(); messageDialog.setLinkButton(1, homeButton, homeLink); if (licButton != 0 && licLink != 0) messageDialog.setLinkButton(2, licButton, licLink); messageDialog.show(aboutText); } COM: <s> show an about dialog </s>
funcom_train/43988563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVendsSameModel() { PresentationModel<TestBean> model = new PresentationModel<TestBean>(new TestBean()); Object model1 = model.getModel("readWriteObjectProperty"); Object model2 = model.getModel("readWriteObjectProperty"); assertSame("The factory method vends the same instance.", model1, model2); } COM: <s> verifies that the factory method vends the same instance of the </s>
funcom_train/19824813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext bc) { // Register framework commands CommandGroup cg = new FrameworkCommandGroup(bc); Hashtable props = new Hashtable(); props.put("groupName", cg.getGroupName()); bc.registerService(COMMAND_GROUP, cg, props); } COM: <s> called by the framework when this bundle is started </s>
funcom_train/31689099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setup() { this.m_contexts.put(ContextType.CONTEXT_ALL, new Context(ContextType.CONTEXT_ALL)); this.m_contexts.put(ContextType.CONTEXT_TABS, new Context(ContextType.CONTEXT_TABS)); this.m_contexts.put(ContextType.CONTEXT_FILES, new Context(ContextType.CONTEXT_FILES)); this.m_contexts.put(ContextType.CONTEXT_DIRS, new Context(ContextType.CONTEXT_DIRS)); } COM: <s> configures the context handler </s>
funcom_train/42273325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Debug debug("Missed our heartbeat for: " + m_nodeHandle.getId().toStringFull() ); debug("Stopping Sending our thumps to it"); synchronized (m_sendingThumpsTo) { m_sendingThumpsTo.remove( m_nodeHandle ); } // Delegate the rest of the process to the RaidsApp m_app.handleNodeDeath(m_nodeHandle); } COM: <s> handle the missed heartbeat </s>
funcom_train/38388758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasExportableExtension(String resourceName) { if (selectedTypes == null) // ie.- all extensions are acceptable return true; int separatorIndex = resourceName.lastIndexOf("."); //$NON-NLS-1$ if (separatorIndex == -1) return false; String extension = resourceName.substring(separatorIndex + 1); Iterator enum = selectedTypes.iterator(); while (enum.hasNext()) { if (extension.equalsIgnoreCase((String) enum.next())) return true; } return false; } COM: <s> returns whether the extension of the given resource name is an extension </s>
funcom_train/51604711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFile(File f) { Precond.validateArg(f, "file"); //$NON-NLS-1$ synchronized(this._lock) { this.entries.remove(f); } logger.finest("Removed " + f.getPath()); //$NON-NLS-1$ } COM: <s> removes a file from polling if present </s>
funcom_train/23704341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanLogs() { boolean anyCleaned = false; try { while (env.cleanLog() > 0) { anyCleaned = true; } } catch (DatabaseException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (anyCleaned) { CheckpointConfig force = new CheckpointConfig(); force.setForce(true); try { env.checkpoint(force); } catch (DatabaseException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } COM: <s> db env log cleaning </s>
funcom_train/10748429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAnonymousLocal() { Class[] cs = this.getClass().getDeclaredClasses(); for (Class c: cs) { assertFalse("anonymous " + c, c.isAnonymousClass()); assertFalse("local " + c.toString(), c.isLocalClass()); } } COM: <s> should not include non member inner classes </s>
funcom_train/3337628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseFilesStdin() { LineNumberReader reader = new LineNumberReader(stdinReader); String line; File file; try { while ((line = reader.readLine()) != null) { file = new File(line); if (file.exists()) { addFile(file); } } } catch (IOException e) { fatal(fatal_read_stdin, 1); } } COM: <s> parses files from stdin one file per line </s>
funcom_train/44799195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reEval(final String expression) throws Exception { LOG.debug("expression " + expression); LOG.debug(getFieldDescriptor().getAttribute("name") + " " + CalcHelper.eval(this,expression)); ((JFormattedTextField)getComponent()).setValue(new Double( CalcHelper.eval(this,expression) )); triggerModelChange(); } COM: <s> re evaluates arithmetic expression and show obtained result </s>
funcom_train/25394650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeLightSource(JLight aLight) { // set iterator Iterator<JLight> nextLight = lights.iterator(); while (nextLight.hasNext()) { if ((nextLight.next()) == aLight) { // remove object from list lights.remove(nextLight); // return success return (true); } } // operation failed return (false); } COM: <s> remove a light source from world </s>
funcom_train/7713932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long parseRemainder(long now){ long deferTill = -1; try { String line; while(deferTill == -1 && (line = this.reader.readLine()) != null) { deferTill = parseLine(line, now); } }catch(IOException e) { System.err.println("IOException occured while trying to read file: " + filename + "\nException: " + e); } return deferTill; } COM: <s> parse the rest of a command file </s>
funcom_train/9928547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doInit(RenderFormEvent event) { RenderRequest req = event.getRenderRequest(); this.appletSizes = SZGAppletSizes.getInstance(getUserID(req)); this.betweenPages(req, "Press a button.", this .getInitedPGradeSettingsBean(req)); req.setAttribute("infoSysListBoxBean", this.getListBoxBean(this .getISComboValues(ISDescriptorFacade.getISNames()))); req.setAttribute("username", getUserID(req)); setNextState(req, "settings/settings.jsp"); } COM: <s> create the initial screen and if service is not initialized then </s>
funcom_train/2884028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object sfResolveHere(Object name) throws SmartFrogResolutionException { Object obj = super.sfResolveHere(name); if( obj instanceof RComponentImpl ) { try { ((RComponentImpl)obj).loadLazy(); } catch (StorageDeploymentAccessException e) { throw (SmartFrogResolutionException)SmartFrogResolutionException.forward(e); } } return obj; } COM: <s> rcomponents may perform lazy loading </s>
funcom_train/51272442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNodeIdFromTokenId(int minNodeId, int tokenId) throws MXQueryException { // Makes sure, that the position is materialized get(tokenId); if (endOfStr && (tokenId >= tokenI)) { return nodeI; } int i = (minNodeId + 1) - nodesDel; if (i < 0) i = 1; while (i < ( nodeI-nodesDel ) && nodeIndex[i] <= tokenId ) { i++; } return i - 1; } COM: <s> like get node id from position int position but we give a additional </s>
funcom_train/20574951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAvatar( Avatar a) { Avatar oldavatar = avatar; avatar = a; setMover(a); if (currentMap != null && avatar.getMap() == null) { avatar.setMap(currentMap); currentMap.placeRandomly(avatar); } if (oldavatar != null || currentMap != null) currentMap.removeCoordinate(oldavatar); currentMap = avatar.getMap(); currentMap.updateVisibility(avatar, avatar.getStat(StatEnum.VisibilityRadius.getName())); } COM: <s> this method sets the avatar for this game world </s>
funcom_train/136544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unitComboBoxActionPerformed() { unit = (String) unitComboBox.getSelectedItem(); double newWidth = ((Double) widthSpinner.getValue()).doubleValue(); if (unit.equals(UNIT[0])) { newWidth *= imageInfo.getResolution(); } else { newWidth /= imageInfo.getResolution(); } widthSpinner.setValue(newWidth); } COM: <s> update width and height spinners value when unit combo box action </s>
funcom_train/3945763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateHrefType_MaxLength(String hrefType, DiagnosticChain diagnostics, Map context) { int length = hrefType.length(); boolean result = length <= 2000; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getHrefType(), hrefType, length, 2000, diagnostics, context); return result; } COM: <s> validates the max length constraint of em href type em </s>
funcom_train/43909541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isQueryable() { if (queryable == null) { Layer parent = this.getParent(); while (parent != null) { Boolean q = parent.getQueryable(); if (q != null) { return q.booleanValue(); } else { parent = parent.getParent(); } } // At this point a attribute was not found so return default return false; } return queryable.booleanValue(); } COM: <s> determines if this layer is queryable </s>
funcom_train/34858811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Task task) { if ( outer.log.isDebug() ) outer.log.debug("Removing "+task); if ( !children.remove(task) ) outer.log.warn("Unable to remove child "+task+" from "+this); //if it is the last child, remove recursively if ( children.size() == 0 && parent != null ) { parent.remove(this); parent = null; } } COM: <s> this method assumes the lock has been acquired already </s>
funcom_train/8629537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void recreateSessionState() throws SQLException { if (sessionState != null && sessionState.size() > 0) { sessionStateUpdating = true; try { for (String sql : sessionState) { CommandInterface ci = prepareCommand(sql, Integer.MAX_VALUE); ci.executeUpdate(); } } finally { sessionStateUpdating = false; sessionStateChanged = false; } } } COM: <s> re create the session state using the stored session state list </s>
funcom_train/49199795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTemplateFilePathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SlideTemplate_templateFilePath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SlideTemplate_templateFilePath_feature", "_UI_SlideTemplate_type"), ExhibitionPackage.Literals.SLIDE_TEMPLATE__TEMPLATE_FILE_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the template file path feature </s>
funcom_train/2585315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() { boolean pass = false; try { /*Quarter q =*/ new Quarter(0, 2005); } catch (IllegalArgumentException e) { pass = true; } assertTrue(pass); pass = false; try { /*Quarter q =*/ new Quarter(5, 2005); } catch (IllegalArgumentException e) { pass = true; } assertTrue(pass); } COM: <s> some tests for the constructor with int int arguments </s>
funcom_train/13997321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFilePathToHistoryWithoutSaving(String fileName) { if (!StringUtils.isEmpty(fileName)) { currentHistory.remove(fileName); currentHistory.addLast(fileName); if (currentHistory.size() > HISTORY_ELEMENTS_COUNT) { currentHistory.removeLast(); } } } COM: <s> add file path to history as first in queue </s>
funcom_train/4476535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean optBoolean(int index, boolean defaultValue) { Object o = opt(index); if (o != null) { if (o == Boolean.FALSE || o.equals("false")) { return false; } else if (o == Boolean.TRUE || o.equals("true")) { return true; } } return defaultValue; } COM: <s> get the optional boolean value associated with an index </s>
funcom_train/23707509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMniOpen() { if (mniOpen == null) { mniOpen = new JMenuItem(); mniOpen.setText("Abrir"); mniOpen.setMnemonic('A'); mniOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK)); mniOpen.addActionListener(openAction); } return mniOpen; } COM: <s> this method initializes mni copy </s>
funcom_train/18846023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBusinessProcessDiagramList(ArrayList respObj) { ResponseMessageDisassembler rmd = new ResponseMessageDisassembler(); XStream xstream; String serBPDL = null; String resourceID = "BusinessProcessDiagramList"; serBPDL = rmd.extractDoc(respObj, resourceID); if (! (serBPDL == null)) { // Deserialize PCVL xstream = new XStream(); this.bpdl = (BusinessProcessDiagramList) xstream.fromXML(serBPDL); } } COM: <s> set business process diagram list </s>
funcom_train/18483256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PolyColl transform(Matrix4 m) throws ZeroLengthException { Poly[] pcoll = new Poly[polys.length] ; for (int j = 0; j < polys.length; j++) { Poly t = polys[j]; Poly p = t.transform(m); pcoll[j] = p ; } return new PolyColl(p.transform(m), evenodd, pcoll); } COM: <s> returns the poly coll that is the collection of polys that are </s>
funcom_train/41716981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocation(double x, double y) { double currentX = getX(); double currentY = getY(); double xDiff = x - currentX; double yDiff = y - currentY; // could do this neater. Make params of this method DoubleValues. line.translate(new DoubleValue(xDiff), new DoubleValue(yDiff)); } COM: <s> set the location of this midpoint </s>
funcom_train/16595907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFFrame openFFrameDialog(IFFrame fframe) { fframedialog=fframe.getPropertyDialog(); if (fframedialog != null) { fframedialog.setRectangle(fframe.getBoundingBox(layoutControl.getAT())); PluginServices.getMDIManager().addWindow(fframedialog); } return fframedialog.getFFrame(); } COM: <s> the dialogs are created here each time that are needed </s>
funcom_train/15518376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean dataValid () { boolean valid = true; String field = (String) nav_chooser.getSelectedItem (); if (field == null || field.length () == 0) { nav_chooser.grabFocus (); valid = false; } else { String choice = input.getText (); if (choice == null || choice.length () == 0) { input.grabFocus (); valid = false; } } if (!valid) navigator.makeConstraintVisible (this); return valid; } COM: <s> checks if the user has entered valid information to search by </s>
funcom_train/15420115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean apply(Query<?> query) { boolean changed = false; if (pathProperties != null) { pathProperties.apply(query); changed = true; } if (idList != null) { query.where().idIn(idList); changed = true; } if (sort != null) { query.order(sort); changed = true; } return changed; } COM: <s> apply any options such as path properties sort order or id list </s>
funcom_train/50531359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(NodeHandle nodehandle, boolean joined) { if (joined) { Logger.infoMessage("--> Node "+nodehandle.getId()+" joins neighborhood"); } else { Logger.infoMessage("<-- Node "+nodehandle.getId()+" leaves neighborhood"); } if (updatehandler!=null) { updatehandler.updatedNeighborhood(nodehandle,joined); } } COM: <s> callback method called whenever the neighborhood set is updated </s>
funcom_train/45237146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonSalvar() { if (jButtonSalvar == null) { jButtonSalvar = new JButton(); jButtonSalvar.setPreferredSize(new Dimension(30, 29)); jButtonSalvar.setOpaque(false); jButtonSalvar.setName("jButtonSalvar"); jButtonSalvar.setIcon(new ImageIcon(getClass().getResource("/br/uesc/computacao/estagio/apresentacao/figuras/salvar.gif"))); } return jButtonSalvar; } COM: <s> this method initializes j button salvar </s>
funcom_train/7978847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Refinement getRefinement(String reference) { if (hasRefinements()) { for(Iterator it = refinements.iterator(); it.hasNext();) { Refinement tmp = (Refinement) it.next(); if (tmp.getReference().equals(reference)) { return tmp; } } } return null; } COM: <s> get a refinement with a given reference </s>
funcom_train/28476613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUrl(String name) { Util.throwIfNull(name, "name"); String connName = name; if (connName.equals("")) { connName = properties.getProperty(DATABASE_DEFAULT, ""); } String url = properties.getProperty(DATABASE_URL); if (!connName.equals("")) { url = properties.getProperty(DATABASE_URL + "." + connName); } return url; } COM: <s> get the specified connection string </s>
funcom_train/17848168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLength(int length) { int startTime = getTimeField(ProgramFieldType.START_TIME_TYPE); int endTime = startTime + length; if (endTime >= (24 * 60)) { endTime -= (24 * 60); } setTimeField(ProgramFieldType.END_TIME_TYPE, endTime); } COM: <s> sets the length of this program in minutes </s>
funcom_train/33416652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TableCellRenderer getCellRenderer(final Class type) { // try to create one from the factory TableCellRenderer renderer = getRendererFactory().createTableCellRenderer(type); // if that fails, recursively try again with the superclass if (renderer == null && type != null) renderer = getCellRenderer(type.getSuperclass()); // if that fails, just use the default Object renderer if (renderer == null) renderer = super.getDefaultRenderer(Object.class); return renderer; } COM: <s> helper method to lookup a cell renderer based on type </s>
funcom_train/14400791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTree() { int selIndex = iPropertyGroupList.getSelectionIndex(); IPropertyGroup group = (IPropertyGroup) iPropertyGroupList .getData(iPropertyGroupList.getItem(selIndex)); java.util.List<IProperty> propertyList = iSource.getProperties(group); if (propertyList != null /* && !propertyList.isEmpty() */) { iViewer.setInput(propertyList); } } COM: <s> always when the user selects another property group by selecting an item </s>
funcom_train/22791664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeAppl(boolean closeWindow) { createExitEvent(); saveData(true); if (closeWindow) { getTopFrame().setVisible(false); getTopFrame().dispose(); } // Unlock the application: final File lock = new File(getConfigDir(), FILE_LOCK); if (lock.exists()) { lock.delete(); } fireModuleEvent(); } COM: <s> close the application no exit </s>
funcom_train/23777122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void draw3dSquare(Graphics g, int x, int y) { Color oldColor = g.getColor(); //cache the old color g.setColor(THREE_D_EFFECT_COLOR); //set the white color g.fillRect(x, y, 2, 2); //draw the square g.setColor(oldColor); //reset the old color } COM: <s> painting 3d square </s>
funcom_train/9993098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItems (String [] items) { checkWidget (); this.table.removeAll(); for (int i = 0, n = items.length; i < n; i++) { add(items[i],null); } if (!text.getEditable ()) text.setText (""); //$NON-NLS-1$ } COM: <s> sets the receivers list to be the given array of items </s>
funcom_train/11642502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertLocaleLookupList(Locale locale, Locale defaultLocale, Locale[] expected) { List<Locale> localeList = defaultLocale == null ? LocaleUtils.localeLookupList(locale) : LocaleUtils.localeLookupList(locale, defaultLocale); assertEquals(expected.length, localeList.size()); assertEquals(Arrays.asList(expected), localeList); assertUnmodifiableCollection(localeList); } COM: <s> helper method for local lookups </s>
funcom_train/2627087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test08( ) { LinkedList<GWindowFilter> l_wfilter = m_ripper.lWindowFilter; m_ripper.lWindowFilter = null; try { m_ripper.removeWindowFilter( null ); fail( "Expected exception." ); } catch( Exception e ) { } m_ripper.lWindowFilter = l_wfilter; assertEquals(( m_ripper.lWindowFilter != null), true ); } COM: <s> this function tests the ripper remove window filter function in the </s>
funcom_train/7494502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void RecursiveDelete(File TheFile) { File[] SubFiles = TheFile.listFiles(); if (SubFiles!=null) { for(int i=0;i<SubFiles.length;i++) { //System.out.println("deleting..." + TheFile.toString() ); if (SubFiles[i].isDirectory()) { RecursiveDelete(SubFiles[i]); } SubFiles[i].delete(); } TheFile.delete(); } } COM: <s> this code is from practical jxta book </s>
funcom_train/1522364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupVendorsTab() { final TabHost host = getTabHost(); final Intent intent = new Intent(Intent.ACTION_VIEW, Vendors.CONTENT_STARRED_URI); intent.addCategory(Intent.CATEGORY_TAB); // Vendors content comes from reused activity host.addTab(host.newTabSpec(TAG_VENDORS) .setIndicator(buildIndicator(R.string.starred_vendors)) .setContent(intent)); } COM: <s> build and add vendors tab </s>
funcom_train/8741764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNoMatchReturnValue() { if (noMatchReturnValue == ACCEPT) { return "accept"; } else if (noMatchReturnValue == DENY) { return "deny"; } else if (noMatchReturnValue == NEUTRAL) { return "neutral"; } else { return "unknown"; // this one should never happen } } COM: <s> gets the value that will be returned upon an unsuccessful </s>
funcom_train/26019493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendIsComposingStatus(boolean status) { String content = IsComposingInfo.buildIsComposingInfo(status); String from = ImsModule.IMS_USER_PROFILE.getPublicUri(); String to = getImSessionIdentity(); String cpim = ChatUtils.buildCpimMessage(from, to, content, IsComposingInfo.MIME_TYPE); sendDataChunks(cpim, CpimMessage.MIME_TYPE, null); } COM: <s> send is composing status </s>
funcom_train/41164170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoHability entity) { EntityManagerHelper.log("deleting CoHability instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoHability.class, entity.getHabilityId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co hability entity </s>
funcom_train/26626680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDone(OperationID opid) { // XXX should throw some sort of exception (e.g. UnknownOperation) if // opid is not known. IsDoneHandler idh = (IsDoneHandler)isDoneHandlers.get(opid); if (idh != null) { return idh.isDone(opid); } // XXX some error Debug.sprintln("opman.isDone() error can't get handler"); return true; } COM: <s> checks if a given operation is completed </s>
funcom_train/45469340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forgetObject(final TransactionContext tx, final OID oid) { TypeInfo typeInfo; typeInfo = (TypeInfo) _typeInfo.get(oid.getName()); //lock = typeInfo.locks.aquire( oid, tx ); typeInfo.assure(oid, tx, true); typeInfo.delete(oid, tx); typeInfo.release(oid, tx); } COM: <s> called at transaction commit or rollback to forget an object </s>
funcom_train/13581023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFile(int number, String extention){ for(int i = 0; i < number; i++){ try { BufferedWriter output = new BufferedWriter(new FileWriter(new File(textInputFolder + "/File" + String.valueOf(i) + extention))); try{ output.write("File number "); output.write(String.valueOf(i)); } finally{ output.close(); } } catch (IOException e) { e.printStackTrace(); } } } COM: <s> this private method just creates a number of files with a specific extension </s>
funcom_train/31980418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getExtent(HttpServletRequest request) { int extent = HttpParams.UP2P_SEARCH_ALL; String extentStr = request.getParameter(HttpParams.UP2P_SEARCH_EXTENT); if (extentStr == null) return extent; try { extent = Integer.parseInt(extentStr); } catch (NumberFormatException e) { extent = HttpParams.UP2P_SEARCH_ALL; } return extent; } COM: <s> returns the extent of the search local network or both for the current </s>
funcom_train/42850286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LexToken getToken(SymbolString source) throws LexException { try { if (this.definition.getNFA().execute(source)) { return new LexToken(this.name, source, this.relevant); } } catch (Exception e) { throw new LexException(e.getMessage()); } return null; } COM: <s> process the token according to the definition </s>
funcom_train/37086147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration enumerateAttributeNames() { Vector result = new Vector(); Enumeration enm = this.attributes.elements(); while (enm.hasMoreElements()) { XMLAttribute attr = (XMLAttribute) enm.nextElement(); result.addElement(attr.getFullName()); } return result.elements(); } COM: <s> returns an enumeration of all attribute names </s>
funcom_train/31208294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDefinitelyWritable(int column) throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId(),column); // checkColumnIndex already calls checkClosed rs.checkColumnIndex(column); return false; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> checks whether a write on this column will definitely succeed </s>
funcom_train/4991281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createUIButtonOK() { // Create the button fButtonOK = new Button(fCompositeLogin, SWT.PUSH); fButtonOK.setText("OK"); //$NON-NLS-1$ // Configure layout data GridData data = new GridData(SWT.NONE, SWT.NONE, false, false); data.widthHint = F_BUTTON_WIDTH_HINT; data.verticalIndent = 10; fButtonOK.setLayoutData(data); } COM: <s> creates the ui button ok </s>
funcom_train/37861765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkOrderSpecs(Sequence in) { if (orderSpecs == null) return false; if (!Type.subTypeOf(in.getItemType(), Type.NODE)) return false; for (int i = 0; i < orderSpecs.length; i++) { Expression expr = orderSpecs[i].getSortExpression(); if(!Type.subTypeOf(expr.returnsType(), Type.NODE) || Dependency.dependsOn(expr, Dependency.CONTEXT_ITEM )) return false; } return true; } COM: <s> check all order specs to see if we can process them in </s>
funcom_train/21973588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkClassloadersNameMatchExactly(final String className) { return checkClassloaders(new Predicate() { public boolean matches(ClassLoader classloader) { log.debug("Testing match "+className+" "+(classloader.getClass().getName().equals(className))); return classloader.getClass().getName().equals(className); } }); } COM: <s> utility method to help match environments for exact class loader names </s>
funcom_train/28258118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postManagedControllerErrorEvent() { String message = "Managing Player " + getClass().getName() + " received ControllerErrorEvent from " + controllerError.getSourceController().getClass().getName(); postEvent( new ManagedControllerErrorEvent( this, controllerError, message ) ); resetControllerError(); } COM: <s> post a managed controller error event to the media event </s>
funcom_train/40536581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTimer() { // Setup an asynchronous event handler. Timer timer = new Timer() { public void run() { // do some validation logic // tell the test system the test is now done finishTest(); } }; // Set a delay period significantly longer than the // event is expected to take. delayTestFinish(500); // Schedule the event and return control to the test system. timer.schedule(100); } COM: <s> tests the timer class asynchronously </s>
funcom_train/10679250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getArraySize(Random r) { double logMin = Math.log(minBytes); return Math.round((float) Math.round((float) Math.exp(r.nextDouble() * (Math.log(maxBytes + 1) - logMin) + logMin) - 0.5f)); } COM: <s> generates a logarithmically distributed size of the array </s>
funcom_train/3388133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TCPChannel getChannel(Endpoint ep) { TCPChannel ch = null; if (ep instanceof TCPEndpoint) { synchronized (channelTable) { Reference<TCPChannel> ref = channelTable.get(ep); if (ref != null) { ch = ref.get(); } if (ch == null) { TCPEndpoint tcpEndpoint = (TCPEndpoint) ep; ch = new TCPChannel(this, tcpEndpoint); channelTable.put(tcpEndpoint, new WeakReference<TCPChannel>(ch)); } } } return ch; } COM: <s> returns a i channel i that generates connections to the </s>