__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27768751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cachedObjectExpired(CacheableEntryEvent event) { CacheableEntry entry = event.getEntry(); Object key = entry.getKey(); synchronized(lock){ Long tstamp = (Long)reverseTimeMap.get(key); timeMap.remove(tstamp); reverseTimeMap.remove(key); } } COM: <s> repond to an expired entry in this cache </s>
funcom_train/19748579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean processTilesDefinition(String definitionName, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { request.setAttribute(DEFINITION_NAME, definitionName); boolean result = super.processTilesDefinition(definitionName, request, response); if ( !result ) { request.removeAttribute(DEFINITION_NAME); } return result; } COM: <s> processes a tile definition name </s>
funcom_train/7630372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStreamType(int streamType) { mStreamType = streamType; if (mAudio != null) { /* * The stream type has to be set before the media player is * prepared. Re-initialize it. */ try { openMediaPlayer(); } catch (IOException e) { Log.w(TAG, "Couldn't set the stream type", e); } } } COM: <s> sets the stream type where this ringtone will be played </s>
funcom_train/132532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char getResidue (int n) { char c = '\000'; try { c = residues.charAt( n - this.start ); } catch ( RuntimeException e ) { //System.err.println( "getting residue " + n ); //System.err.println( "start is at " + this.start ); //System.err.println( "end is at " + this.end ); //System.err.println( "length is " + this.length ); } return c; } COM: <s> gets a residue at a given position </s>
funcom_train/43826217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveToFile(String file, Boolean layouting, String layouter) { if (layouting) { for (Page p : cpnet.getPageArray()) { if (!p.getId().equals("PAGE_GENERATOR")) { try { doLayouting(p, layouter); } catch (Exception e) { System.err.println("LAYOUTING FAILED!"); } } } } try { File convertedCPNFile = new File(file); cpnWorkspace.save(convertedCPNFile); } catch (IOException e) { e.printStackTrace(); } } COM: <s> saves the cpnet to an output file </s>
funcom_train/37048467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean leftClickOff(OMGraphic omg, MouseEvent me) { if (DEBUG) { Debug.output("leftClickOff(" + omg.getClass().getName() + ") at " + me.getX() + ", " + me.getY()); } deselect(omg); return false; } COM: <s> notification that the user clicked on something else other than </s>
funcom_train/2894402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals (Object o) { if (o instanceof Entry) { Entry other = (Entry) o; if (other.field == field && other.type == type) { if (other.custom == null) { if (custom == null) return true; } else if (other.custom.equals (custom)) { return true; } } } return false; } COM: <s> two of these are equal iff they reference the same field and type </s>
funcom_train/1907358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(Properties properties) { for (String property : properties.keySet()) { this.properties.put(property,properties.get(property)); } try { initialize(); } catch (Exception e) { log.error("Error re-initializing: ",e); } } COM: <s> overrides default properties with those given </s>
funcom_train/15814437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write_file_data(String str_file_name,String str_file_content) { try { FileOutputStream out = new FileOutputStream(str_file_name); PrintStream p = new PrintStream( out ); p.println(str_file_content); p.close(); out.close(); } catch (Exception e) { logger.error("Exception On CreateXML: "+e); } } COM: <s> write a file </s>
funcom_train/40312361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCurrency_InvalidColumn1() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isCurrency(-1); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isCurrency method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is currency with negative column index </s>
funcom_train/11770709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu getJPopupMenuDate() { if (jPopupMenuDate == null) { jPopupMenuDate = new JPopupMenu(); jPopupMenuDate.add(getJMenuDateExport()); jPopupMenuDate.add(getJMenuItemDateDelete()); } return jPopupMenuDate; } COM: <s> this method initializes j panel run summary </s>
funcom_train/45466025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() throws IOException { // -- get default parser from Configuration _schemaContext = new SchemaContextImpl(); Parser parser = _schemaContext.getParser(); if (parser == null) { String message = "fatal error: unable to create SAX parser."; LOG.warn(message); throw new IOException(message); } _parser = parser; } // -- SchemaReader COM: <s> old fashion style to create a schema reader instance </s>
funcom_train/50136547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createMenus(JMenuBar mb) { mb.add(createFileMenu()); mb.add(createEditMenu()); mb.add(createAlignmentMenu()); mb.add(createAttributesMenu()); mb.add(createNetMenu()); mb.add(createWindowMenu()); mb.add(createHelpMenu()); } COM: <s> create the menues for a given menu bar </s>
funcom_train/19763715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String resolve(String relativeURI) throws BeanNameResolutionException { if(relativeURI.indexOf('-') == -1) { throw new BeanNameResolutionException("Unable to resolve bean name (beanName-service.gwt) from URI: " + relativeURI + " you shoul provide anothere implemenation of IBeanNameResolver"); } return relativeURI.substring(0, relativeURI.indexOf('-')); } COM: <s> resolve a bean name from an uri </s>
funcom_train/38477801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void searchJarFiles(File javaRoot) throws IOException { File[] files = javaRoot.listFiles(); for (File file : files) { String name = file.getName(); if (file.isDirectory()) { if (name.equals("demo") || name.equals("sample") || name.equals("visualvm")) { continue; } searchJarFiles(file); } else { if (name.endsWith(".jar") && !isSkipFile(file)) { scanJarFile(file); } } } } COM: <s> search for avaialable jar files in the java home directory and scan it </s>
funcom_train/14500396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setProperties(final File file) throws IOException, CertificateException { InputStream in = null; try { in = new FileInputStream(file); Properties properties = new Properties(); properties.load(in); setProperties(properties); } finally { if (in != null) { in.close(); } } } COM: <s> load worker global properties from file </s>
funcom_train/41302080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void view(double lat, double lon, String name, String desc) { Vector waypoints = new Vector(); waypoints.addElement(new Waypoint(lat, lon, name, desc, null)); mapItemManager.addItem(name, new PointMapItem(waypoints), MapItem.PRIORITY_MEDIUM); centerMap(new Location4D(lat, lon, 0f), false); view(); } COM: <s> views point with specified atributes </s>
funcom_train/9914711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void end(String name, String namespace) { ElementDescriptor descriptor = (ElementDescriptor) digester.pop(); final Object peek = digester.peek(); if (peek instanceof ElementDescriptor) { ElementDescriptor parent = (ElementDescriptor) digester.peek(); // check for element suppression if (getXMLIntrospector().getConfiguration().getElementSuppressionStrategy().suppress(descriptor)) { parent.removeElementDescriptor(descriptor); } } } COM: <s> process the end of this element </s>
funcom_train/4154716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreDefaultWindowPositions() { setNewBounds( DEFAULT_LOCATION, gameSceen.DEFAULT_DIMENSION ); for ( int windowIndex = 0; windowIndex < windows.length; windowIndex++ ) // Forward direction: locating can be relative to a previous window windows[ windowIndex ].restoreDefaultBounds(); packWindows(); } COM: <s> restores the default positions of all windows </s>
funcom_train/25707607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBoards_Bchoose() { if( boards_Bchoose == null ) { boards_Bchoose = new JButton(); boards_Bchoose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(final java.awt.event.ActionEvent e) { chooseBoards(); } }); } return boards_Bchoose; } COM: <s> this method initializes j button1 </s>
funcom_train/16297244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPlayCount() { try { return (Integer)nativeComponent.getOleProperty(new String[] {"settings", "playCount"}); } catch(IllegalStateException e) { // Invalid UI thread is an illegal state throw e; } catch(Exception e) { return -1; } } COM: <s> get the play count as a value strictly greater than 0 </s>
funcom_train/18112122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWifeInPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Person_WifeIn_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Person_WifeIn_feature", "_UI_Person_type"), BioDBPackage.Literals.PERSON__WIFE_IN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the wife in feature </s>
funcom_train/13275117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRightSidePaint(WallPaint rightSidePaint) { if (rightSidePaint != this.rightSidePaint) { WallPaint oldRightSidePaint = this.rightSidePaint; this.rightSidePaint = rightSidePaint; this.propertyChangeSupport.firePropertyChange(Property.RIGHT_SIDE_PAINT.name(), oldRightSidePaint, rightSidePaint); } } COM: <s> sets whether the right side is colored textured or unknown painted </s>
funcom_train/48336200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getChild(int i) { Vector v = getValue(); Vector r = new Vector (); // result if (v.elementAt(i).getClass().getName().equals("context.arch.comm.DataObject")) { r.addElement (v.elementAt(i)); } return r; } COM: <s> returns the specified child of the current data object </s>
funcom_train/317371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closePort(){ if (this.outputStream != null){ try{ this.outputStream.close(); }catch (IOException ie){} outputStream = null; } if (serialPort != null){ serialPort.close(); serialPort = null; //System.out.println("Port closed."); } } COM: <s> closing opened serial port </s>
funcom_train/50154469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CloneableAction createAction(CloneableAction prototype) { CloneableAction newAction = null; try { newAction = (CloneableAction)prototype.clone(); actions.put(newAction.getClass(), newAction); } catch (Exception e) { /** @todo shouldn't ever happen, but we should probably handle this better */ e.printStackTrace(); } return newAction; } COM: <s> method create action </s>
funcom_train/33958427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRuleUris(List<String> ruleUris) { // here we create an unmodifiable map because these properties should never be modified. We are also creating a // defensive copy first so that the properties cannot be modified out from underneath us by the calling class. this.ruleUris = Collections.unmodifiableList(new ArrayList<String>(ruleUris)); } COM: <s> sets the rule uris list </s>
funcom_train/40737405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EmployeeBO create() throws DataException{ EmployeeBO emp; try{ String guid = GUID.generate(); emp = new EmployeeBO(guid); emp.setObjectAlreadyInDB(false); Cache.getInstance().put(guid, emp); }catch(Exception e){ throw new DataException("Exception caught Creating a EmployeeBO"); } return emp; }// end create COM: <s> create a new employee </s>
funcom_train/14583660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) { this.viewer = (TreeViewer) viewer; if ( oldInput != null ) { removeListenerFrom( (CertItem) oldInput ); } if ( newInput != null ) { addListenerTo( (CertItem) newInput ); } } COM: <s> notifies this content provider that the given viewers input has been </s>
funcom_train/36770594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_SamplingProfiler() throws Exception { ThreadSet threadSet = SamplingProfiler.newArrayThreadSet(Thread.currentThread()); SamplingProfiler profiler = new SamplingProfiler(12, threadSet); profiler.start(100); toBeMeasured(); profiler.stop(); profiler.shutdown(); test_HprofData(profiler.getHprofData(), true); } COM: <s> run the sampling profiler to gather some data on an actual </s>
funcom_train/38308267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeAttribute(Writer out, String name, int type, boolean required) throws IOException { out.write(" " + name + " " + attributeTypeToDtdType(type)); out.write(" #"); if (required) { out.write("REQUIRED"); } else { out.write("IMPLIED"); } out.write("\n"); } COM: <s> writes a single attribute to the dtd </s>
funcom_train/21125508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyObjectReceived(InetAddress oSenderAddress, InetAddress oReceiveAddress) { // iterate through list for(Iterator it = this.m_oSynchronizationListeners.iterator(); it.hasNext(); ){ // call method in listener ((ISynchronizeListener) it.next()).receivedObject(oSenderAddress, oReceiveAddress); } } COM: <s> notifies all registered listeners </s>
funcom_train/36240751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton getJButton_Clean() { if (jButton_Clean == null) { jButton_Clean = new JButton(); jButton_Clean.setText("Clean Fields"); jButton_Clean.setToolTipText("Clean Fields"); jButton_Clean .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { } }); } return jButton_Clean; } COM: <s> this method initializes j button limpar </s>
funcom_train/268419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAutoCommit() throws java.sql.SQLException { if (Driver.TRACE) { Object[] args = new Object[0]; Debug.methodCall(this, "getAutoCommit", args); Debug.returnValue(this, "getAutoCommit", new Boolean(this.autoCommit)); } return this.autoCommit; } COM: <s> gets the current auto commit state </s>
funcom_train/1444546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean inOpponentsPenalty(double x, double y, double size) { if ( (y + size) < (SConf.getInstance().half_length - SConf.getInstance().penalty_length) || (Math.abs(x) + size > SConf.getInstance().half_penalty_width) || (y + size > SConf.getInstance().half_length) ) return false; return true; } COM: <s> checks whether an object is in opponents penalty area </s>
funcom_train/13996486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindProperty1() throws Exception { Key[] result = manager.find(new HashMap(), "property1"); assertEquals("invalid result object count", 10, result.length); for (int i = 0; i < result.length; i++) { assertEquals( "invalid object id (wrong position)", objects[i].getID(), result[i]); } } COM: <s> tests find behavior for sort by property1 </s>
funcom_train/37827834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLongUpdateCount() { if (Driver.TRACE) { Object[] args = new Object[0]; Debug.methodCall(this, "getLongUpdateCount", args); } if (results == null) { return -1; } if (results.reallyResult()) { return -1; } return updateCount; } COM: <s> get long update count returns the current result as an update count </s>
funcom_train/5276949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { log4j.debug("saving preferences"); Preference p = new Preference(); p.setKeyValue("Warn on exit"); p.setBooleanValue(getWarnOnExit()); log4j.debug("pref = " + p.toString()); try { PreferenceDelegate.savePreference(p); } catch (FileNotFoundException e) { log4j.error("ERROR: " + toString()); } catch (DatabaseException e) { log4j.error("ERROR: " + toString()); } } COM: <s> saves the preferences records if there are changes </s>
funcom_train/51187530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSettingMenu() { if (settingMenu == null) { settingMenu = new JMenuItem(); settingMenu.setText("Setting"); settingMenu.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent e) { new SettingPage(thePageManager).setVisible(true); } }); } return settingMenu; } COM: <s> this method initializes setting menu </s>
funcom_train/43473775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(String status, String awayMessage) { try { Status s = twitterApi.updateStatus(awayMessage); System.out.println("Wrote to twitter: " + s.getText()); } catch(Exception ex) { System.out.println(ex.getMessage()); } } COM: <s> set away available status for the bot </s>
funcom_train/24590566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJNumberOfTasksTextField() { if (jNumberOfTasksTextField == null) { jNumberOfTasksTextField = new JTextField(); jNumberOfTasksTextField.setName("product_numberoftasks_textfield"); jNumberOfTasksTextField.setBounds(new Rectangle(310, 45, 100, 20)); jNumberOfTasksTextField.setEditable(false); } return jNumberOfTasksTextField; } COM: <s> this method initializes j number of tasks text field </s>
funcom_train/48455711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapDirection(double latitude, double longitude, String status, boolean polyLine) { add("p.addDirection({location:'" + latitude + ", " + longitude + "', status:'" + status + "', poly: " + polyLine + "});"); } COM: <s> adds a point to the directions on the map </s>
funcom_train/7623582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bindBlob(int index, byte[] value) { if (value == null) { throw new IllegalArgumentException("the bind value at index " + index + " is null"); } acquireReference(); try { native_bind_blob(index, value); } finally { releaseReference(); } } COM: <s> bind a byte array value to this statement </s>
funcom_train/40842412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue( byte[] value ) { if( value != null && value.length > 0 ) { byte[] temp = ArrayFunctions.serialize( value ); this.value = new BigInteger( 1, temp ); this.mpi = ArrayFunctions.addBigEndianLengthHeader( INT_BYTE_LENGTH, temp ); } else { this.value = BigInteger.ZERO; this.mpi = new byte[] { 0x00, 0x00, 0x00, 0x01, 0x00 }; } } COM: <s> sets the mpi with a mpi value </s>
funcom_train/2496921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setApplicationView(String path, String type) { this.type = type.toLowerCase(); String output = new StringBuilder("setting app view to '/WEB-INF/apps/") .append(page) .append("'") .toString(); log.debug(output); log.debug("app type is: {0}", type); if(type.equals("html")) page = "/WEB-INF/apps/" + path; else if(type.equals("php")) page = "scripts/php-bin/" + path; else if(type.equals("python")) page = "scripts/python-bin/" + path; } COM: <s> loads the specified app url into the template </s>
funcom_train/40350071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DialogBaseUnits computeGlobalDialogBaseUnits() { final FontMetrics metrics = new FontMetrics(); DOM.setStyleAttribute(metrics.getElement(), "whiteSpace", "nowrap"); final com.extjs.gxt.ui.client.util.Size boxSize = metrics.stringBoxSize(averageCharWidthTestString); return new DialogBaseUnits(boxSize.width / averageCharWidthTestString.length(), boxSize.height); } COM: <s> computes and returns the horizontal dialog base units </s>
funcom_train/22545839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doRefresh() { boolean inactivePresent = ((Boolean)DATA_MODEL.refresh()).booleanValue(); setButtonEnabled(UploadButtons.CLEAR_BUTTON, inactivePresent); MAIN_PANEL.setTitle(UPLOAD_TITLE + " (" + RouterService.getNumUploads() + " " + ACTIVE + ", " + RouterService.getNumQueuedUploads() + " " + QUEUED + ")"); } COM: <s> override the default refresh so we can set the clear button </s>
funcom_train/40567218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings("unchecked") public DailyProjectDataClient getDailyProjectDataClient() { //NOPMD Map<String, DailyProjectDataClient> userClientMap = (Map<String, DailyProjectDataClient>) this.server.getContext().getAttributes().get(AUTHENTICATOR_DPDCLIENTS_KEY); return userClientMap.get(this.authUser); } COM: <s> returns a daily project data client instance associated with the user in this </s>
funcom_train/10628644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPosNegSameLength() { String numA = "283746278342837476784564875684767"; String numB = "-293478573489347658763745839457637"; String res = "-71412358434940908477702819237628"; BigInteger aNumber = new BigInteger(numA); BigInteger bNumber = new BigInteger(numB); BigInteger result = aNumber.xor(bNumber); assertTrue(res.equals(result.toString())); } COM: <s> xor for two numbers of different signs and the same length </s>
funcom_train/10238355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getApplyjButton() { if (applyjButton == null) { applyjButton = new JButton(); applyjButton.setBounds(new Rectangle(449, 332, 125, 25)); applyjButton.setText("Close"); applyjButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); // close the Preference Frame without save anything; } }); } return applyjButton; } COM: <s> this method initializes close buton </s>
funcom_train/4921365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recordCopyProperties(String... propertyNameValues) { for (int i = 0; i < propertyNameValues.length; i += 2) { String name = propertyNameValues[i]; String value = propertyNameValues[i + 1]; // Record obtaining the property this.recordReturn(this.source, this.source.getProperty(name, null), value); // Record copying property (only if value) if (value != null) { this.target.addProperty(name, value); } } } COM: <s> records copying the </s>
funcom_train/50040025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reduceToDifference(GenomicAnnotation other) { if(overlaps(other)) { //System.out.println("Reduced annotation! " + this); if(getStart() < other.getStart()) { setEnd(Math.min(getEnd(), other.getStart() - 1)); } else { setStart(Math.max(getStart(), other.getEnd() + 1)); } } } COM: <s> change the current instance to represent the difference </s>
funcom_train/6270148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFromAddress(String dialDomain) { if (fromAddressList == null) { return null; } for (int cnt = 0; cnt < fromAddressList.length; cnt++) { if (dialDomain.equals(fromAddressList[cnt].getDialDomain())) { return fromAddressList[cnt].getFromAddress(); } } return null; } COM: <s> gets an address connected to the given dial domain </s>
funcom_train/24060428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close ( ) { if ( ! this.isOpen ) return; // OK - it is already closed this.secretsManager.close(); // make secret self-consistent reconcile(); // make pocket self-consistent this.isOpen = false; this.pocket = null; // TODO: should obliterate it this.identifier = null; // TODO: should obliterate it this.secretsManager = null; // TODO: should obliterate it } COM: <s> close the object safely and remove it from further use </s>
funcom_train/19810790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resolution delete() { if (this.myIsern.remove(this.getName())) { this.message = "Organization: " + this.getName() + "was successfully deleted"; } else { this.message = "Organization: " + this.getName() + "not found. Maybe delete by other users"; } return new ForwardResolution("/organizationsList.jsp"); } COM: <s> deletes the organization specified by name </s>
funcom_train/32069127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addBankAccount(BankAccount bankAccount) { boolean addOk = getBankAccounts().add(bankAccount); if (addOk) { bankAccount.setBankAgency((BankAgency)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed bank account to the bank agency collection </s>
funcom_train/50479728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJStateNameTextField() { if (jStateNameTextField == null) { jStateNameTextField = new JTextField(); jStateNameTextField.setBounds(new Rectangle(415, 90, 125, 20)); jStateNameTextField.setNextFocusableComponent(getJZipCodeTextField()); } return jStateNameTextField; } COM: <s> this method initializes j state name text field </s>
funcom_train/37196718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle textToBounds(String text) throws NumberFormatException, IndexOutOfBoundsException { String[] words = text.split(","); return new Rectangle(new Integer(words[0]).intValue(), new Integer(words[1]).intValue(), new Integer(words[2]).intValue(), new Integer(words[3]).intValue()); } COM: <s> converts to text description to a rectangle bounds object </s>
funcom_train/8088149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void SWAP(int a, int b, Stack<d_node>cover_set) { d_node tmp = cover_set.element(a); cover_set.set(a, cover_set.element(b)); cover_set.set(b, tmp); } COM: <s> swap two nodes in a cover set </s>
funcom_train/23267801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCliente_id() { System.out.println("setCliente_id"); int cliente_id = 0; Cliente instance = new Cliente(); instance.setCliente_id(cliente_id); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set cliente id method of class capa negocios </s>
funcom_train/37503808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isHitBy(Mob enemy) { boolean retValue = super.isHitBy(enemy); if (retValue && Math.random() < 0.2) { try { ((CombatMap)HeroLocation.getHeroLocation().getMap()) .fireCombatMessage(this, "Eeeek!"); } catch (Exception ex) { // ignore } } return retValue; } COM: <s> are we hit by ememy </s>
funcom_train/23717975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getXPath(RecordTree node) throws MetadataRecordException { if (node == null) { node = rootNode; } Node domNode = node.getDomNode(); if (domNode == null) { throw new UnsupportedOperationException("no DOM node for " + node); } else { return getXPath(domNode); } } COM: <s> determine an unambiguous absolute xpath for a node </s>
funcom_train/18335560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // Convert to a long sequence of hex chars. StringBuffer rv = new StringBuffer(); for(int i = 0; i < bitVector.length; ++i) rv.append(String.format("%08x",bitVector[i])); return rv.toString(); } COM: <s> convert to string </s>
funcom_train/7645332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReceiveBufferSize(int size) throws SocketException { checkClosedAndCreate(true); if (size < 1) { throw new IllegalArgumentException(Msg.getString("K0035")); //$NON-NLS-1$ } impl.setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size)); } COM: <s> sets the server socket receive buffer size </s>
funcom_train/4785837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IMenuManager createHelpMenu(IWorkbenchWindow window) { IMenuManager menu = new MenuManager("Help", IWorkbenchActionConstants.M_HELP); // Welcome or intro page would go here // Help contents would go here // Tips and tricks page would go here menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START)); menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END)); menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); return menu; } COM: <s> creates the help menu </s>
funcom_train/1212736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String key, Object value) throws CajuScriptException { if (key.startsWith(CAJU_VARS_STATIC_STRING)) { context.setStaticString(key, value.toString()); } else { setVar(key.trim(), toValue(value)); } } COM: <s> defining new variable and setting value from a java object </s>
funcom_train/40500556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasFinishedPredecessor(GridletInfo gridletInfo) { if(gridletInfo.getPredecessorId() == -1) return true; for (GridletInfo element : finishedGridletInfos) { if(element.getUserId() == gridletInfo.getUserId() && element.getGridletId() == gridletInfo.getPredecessorId()) return true; } return false; } COM: <s> return true if gridlet infos predecessor is among finished gridlet </s>
funcom_train/45774214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateUI() { Object data = getFromData(); Object ui = getFromUI(); if (!equals(data, ui)) try { setToUI(data); } catch (Exception ex) { ex.printStackTrace(); //TODO tell user... } enableControls(data); } COM: <s> updates the ui control according to the </s>
funcom_train/31041036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getChildren(IPropertySheetEntry entry) { // if the entry is the root and we are showing categories, and we have more than the // defualt category, return the categories if (entry == rootEntry && isShowingCategories) { if (categories.length > 1 || (categories.length == 1 && !categories[0].getCategoryName().equals(MISCELLANEOUS_CATEGORY_NAME))) return Arrays.asList(categories); } // return the filtered child entries return getFilteredEntries(entry.getChildEntries()); } COM: <s> returns the child entries of the given entry </s>
funcom_train/24317858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WfActivityInternal getAny(WMSessionHandle shandle,String procId, String actId) throws Exception { WfActivityInternal act = get(actId); if (act == null && !allLoaded) { loadAny(shandle,procId, actId); act = get(actId); } return act; } COM: <s> returns the activity for the given id </s>
funcom_train/36399537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFileStructure(byte[] fs) throws CardServiceException { CommandAPDU c = new CommandAPDU(0, INS_PUTDATA, 0x69, 0x00, fs); ResponseAPDU r = service.transmit(c); checkSW(r, "createFileStructure failed: "); } COM: <s> creates the file structure in the applet </s>
funcom_train/1847281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getMutableDocument(final VFSPath uri) throws IOException { try { final DocumentBuilderFactory factory = DocumentBuilderFactory .newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); try { return builder.parse(new InputSource(getReader(uri))); } catch (final SAXException sax) { throw new VFSException("XML Parse failed", sax); } } catch (final ParserConfigurationException unlikely) { throw new RuntimeException("Bad XML Parser configuration", unlikely); } } COM: <s> this method returns a freshly parsed unique read write document object </s>
funcom_train/49626611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resume(final Bundle b) { try { for (String jobletName : this.scheduler.getJobNames(this .prepareBundleName(b))) { @SuppressWarnings("unchecked") Class<? extends AbstractJoblet> j = (Class<? extends AbstractJoblet>) Class .forName(jobletName); this.resume(b, j); } } catch (SchedulerException exception) { throw new JobletSchedulerException(exception); } catch (ClassNotFoundException exception) { throw new JobletSchedulerException(exception); } } COM: <s> resumes all the </s>
funcom_train/2878274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ComponentDescription parse(String description, String language) throws SmartFrogException { long start,finish; start=System.currentTimeMillis(); ComponentDescription report= parseFile(description,language); finish = System.currentTimeMillis(); report.sfAddAttribute("time",new Long(finish-start)); return report; } COM: <s> parse a description </s>
funcom_train/36234380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public D createEditDialog() { Class<D> dialogType = (Class<D>) ((ParameterizedType) getClass() .getGenericSuperclass()).getActualTypeArguments()[1]; D dialog = null; try { dialog = dialogType.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return dialog; } COM: <s> creates an instance of the dialog for add and edit operations </s>
funcom_train/48406851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCategorizedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Category_categorizedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Category_categorizedElement_feature", "_UI_Category_type"), SpemxtcompletePackage.eINSTANCE.getCategory_CategorizedElement(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the categorized element feature </s>
funcom_train/21405604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { isClosed = true; // finalize notifier work if (notifier != null) { try { notifier.close(); } catch (IOException e) { } // ignore } // wait for acceptor thread is done try { accepterThread.join(); } catch (InterruptedException e) { } // ignore // finalize processor if (processor != null) { processor.stop(true); } processor = null; } COM: <s> stop a work with bluetooth exits the accepting </s>
funcom_train/32945097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteTargetGroup(TargetGroup aTargetGroup) { if(authMgr.hasPrivilege(aTargetGroup, Privilege.MANAGE_GROUP)) { // Delete the target itself. return targetDao.deleteGroup(aTargetGroup); } else { log.error("Delete not permitted, no action taken"); throw new WCTRuntimeException("You do not have the appropriate privileges to delete this group"); } } COM: <s> deletes a target group by oid </s>
funcom_train/21606057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object instantiate(Constructor ctor, Object[] args) { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(this.beanDefinition.getBeanClass()); enhancer.setCallbackFilter(new CallbackFilterImpl()); enhancer.setCallbacks(new Callback[] { NoOp.INSTANCE, new LookupOverrideMethodInterceptor(), new ReplaceOverrideMethodInterceptor() }); return (ctor == null) ? enhancer.create() : enhancer.create(ctor.getParameterTypes(), args); } COM: <s> create a new instance of a dynamically generated subclasses implementing the </s>
funcom_train/3561326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DbResult getFileTypesByExtension(String extension) throws DbException { XTable table; NVPair[] formData; InputStream is; table = new XTable(); formData = new NVPair[1]; formData[0] = new NVPair("extension", extension); is = processQueryPost(GET_FILE_TYPE_BY_EXTENSION_PAGE, formData); table.setSource(is); return table; } COM: <s> retunrs a list of file types which accept the specified extension </s>
funcom_train/33281321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FrameWindow getFrameByName(final String name) throws ElementNotFoundException { for (final FrameWindow frame : getFrames()) { if (frame.getName().equals(name)) { return frame; } } throw new ElementNotFoundException("frame or iframe", "name", name); } COM: <s> returns the first frame contained in this page with the specified name </s>
funcom_train/5404315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void discard(final byte[] discards) { final int end = buffered_lines; int j = 0; for (int i = 0; i < end; ++i) if (no_discards || discards[i] == 0) { undiscarded[j] = equivs[i]; realindexes[j++] = i; } else changed_flag[1 + i] = true; nondiscarded_lines = j; } COM: <s> actually discard the lines </s>
funcom_train/37504226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showException(Throwable failure) { failure.printStackTrace(); String message = failure.getMessage(); if (message == null || message.length() == 0) { message = failure.toString(); } JOptionPane.showMessageDialog(this, message, failure.getClass().getName(), JOptionPane.ERROR_MESSAGE); } COM: <s> show a message dialog complaining about var failure var </s>
funcom_train/39531314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void callMethod(Object actualTarget) throws SecurityException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { Class cls = actualTarget.getClass(); Class[] argsClasses; argsClasses = new Class[this.methodArguments.length]; Arrays.fill(argsClasses, String.class); Method m = cls.getMethod(methodName, argsClasses); m.invoke(actualTarget, methodArguments); } COM: <s> perform the actual call of the method on the real target </s>
funcom_train/45483573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createButton() { GridData buttonGridData = new GridData(); buttonGridData.grabExcessHorizontalSpace = false; buttonGridData.verticalAlignment = GridData.CENTER; buttonGridData.grabExcessVerticalSpace = false; buttonGridData.horizontalIndent = 0; buttonGridData.horizontalAlignment = GridData.BEGINNING; Button button = new Button(shell, SWT.NONE); button.setText("OK"); button.setLayoutData(buttonGridData); button.addSelectionListener(new CloseDialogListener(this.shell)); } COM: <s> this method initializes the button </s>
funcom_train/5662571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leave(PeerId peerId) { final String METHOD = "leave(PeerId)"; logger.entering(CLASS, METHOD, peerId); try { Collection failedPeers = null; try { failedPeers = hostAgent.sendLeave(peerIds, peerId); } catch(RemoteException ex) { throw new RuntimeException(ex.getMessage()); } if(failedPeers != null && !failedPeers.isEmpty()) { peerIds.removeAll(failedPeers); peer.failed(failedPeers); } } finally { logger.exiting(CLASS, METHOD); } } COM: <s> propagates the leave message to the host agent </s>
funcom_train/40611771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String request(final RequestMethod method, final String resource, Collection<RequestParameter> params) throws RateLimitExceededException, GowallaRequestException { rateLimitPreRequest(); try { if(method == RequestMethod.GET) { return handler.getResource(resource, authentication, params); } else { return handler.postResource(resource, authentication, params); } } finally { rateLimitPostRequest(); } } COM: <s> encapsulate request handler and rate limitation call </s>
funcom_train/49044833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTitlePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_JasimModel_Title_feature"), getString("_UI_PropertyDescriptor_description", "_UI_JasimModel_Title_feature", "_UI_JasimModel_type"), ModelPackage.Literals.JASIM_MODEL__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the title feature </s>
funcom_train/23235743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performPlayerMoved() { //SoundSystem sys; // operation control //sys = SoundSystem.get(); if (soundPos == null) { return; } // if not yet playing, start playing if (isPlaying) { // decide on stopping to play (when sound object has moved out // of range) if (canPlay()) { updateVolume(); } else { stop(); } } else { play(); } } // performPlayerPosition COM: <s> informs this ambient sound about the actual players position and hearing </s>
funcom_train/45601529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFile() { String result = dialog.getFile() == null ? null : dialog.getDirectory() + dialog.getFile(); String extension = Configuration.getInstance().getAreaExtension(); if (result != null && !result.endsWith(extension) && dialog.getMode() == FileDialog.SAVE) { result += extension; } return result; } COM: <s> get the selected file name </s>
funcom_train/25315434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StaffObject createStart(String[] lineParts) throws NumberFormatException { StaffObject object; if (lineParts.length == 3) { // Try to create a Start object from the given strings. int top = Integer.parseInt(lineParts[1]); int bot = Integer.parseInt(lineParts[2]); object = new Start(top, bot); } else { // Default Start object object = new Start(); } return object; } COM: <s> creates a new start object from the given line parts </s>
funcom_train/7751778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { // Stop watching the cluster clusterWatcherExec.shutdownNow(); // Shutdown the cluster node contexts Collection<NodeContext> nodeContexts = pool.values(); for (NodeContext nodeContext : nodeContexts) nodeContext.shutdown(); for (NodeContext nodeContext : nodeContexts) nodeContext.waitShutdown(); try { clusterWatcherExec.awaitTermination(5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } COM: <s> cleanly shutdown this pool and associated thrift connections and operations </s>
funcom_train/9225747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DXSVector3f cross(DXSVector3f v2){ float resX = ((y * v2.z) - (z * v2.y)); float resY = ((z * v2.x) - (x * v2.z)); float resZ = ((x * v2.y) - (y * v2.x)); return new DXSVector3f(resX,resY,resZ); } COM: <s> apply the cross product with the input vector </s>
funcom_train/33148551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPortNumber(String portNumber)throws IllegalPortNumberException{ try{ Integer temp = new Integer(portNumber); int temp2 = temp.intValue(); if(temp2 <= 9999 && temp2 >= 1000){ this.portNumber = portNumber; }else throw new IllegalPortNumberException("The provided port number is not inside the valid range"); }catch (NumberFormatException nfex){ throw new IllegalPortNumberException("The input isn`t a valid number"); } } COM: <s> set the port to be used by jade </s>
funcom_train/325982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeSymbol(Frame guiFrame, ManagedSymbol managedSymbol) { // pop up the symbol dialog... PamSymbol newSymbol = PamSymbolDialog.show(guiFrame, managedSymbol .getPamSymbol()); if (newSymbol != null) { managedSymbol.setPamSymbol(newSymbol); PamController.getInstance().notifyModelChanged( PamControllerInterface.CHANGED_DISPLAY_SETTINGS); updateManagedSymbol(managedSymbol); } } COM: <s> called by the menu actionlistener </s>
funcom_train/21999242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { StockHolding holding = (StockHolding) object; return (holding.getSymbol().equals(getSymbol()) && holding.getShares() == getShares() && holding.getCost() == getCost() && holding.getRelatedCounter() == getRelatedCounter() && holding.getDateTime() .equals(getDateTime())); } COM: <s> compares this stock holding to another </s>
funcom_train/34477677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNativeSchema(ESchema_definition schema_def) throws SdaiException { // synchronized (syncObject) { if (repository == null) { throw new SdaiException(SdaiException.SI_NEXS); } if (!repository.active) { throw new SdaiException(SdaiException.RP_NOPN, repository); } if (schema_def == null) { throw new SdaiException(SdaiException.SD_NDEF); } native_schema = (CSchema_definition)schema_def; change_date = System.currentTimeMillis(); // } // syncObject } COM: <s> puts definition of the schema upon which this schema instance will be based </s>
funcom_train/19064262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTeleTyper() { // get current attributes Enumeration enumeration = getCharAttr().getAttributeNames(); // search for tele typer attribute while (enumeration.hasMoreElements()) { Object name = enumeration.nextElement(); if ((name instanceof HTML.Tag) && (name.toString().equals(HTML.Tag.TT.toString()))) { // found tele typer return true; } } // nothing found return false; } COM: <s> convenience method to determine whether current text is tele typer </s>
funcom_train/37776867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(File o1, File o2) { if (o1 == o2) return 0; else if (o1.isDirectory() && o2.isFile()) return -1; else if (o1.isFile() && o2.isDirectory()) return 1; else return m_collator.compare(o1.getName(), o2.getName()); } COM: <s> compares its two arguments for order </s>
funcom_train/25792065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToolInstance(ToolInstance toolInstance) { int toolId = ToolbusUtil.getToolIdFromKey(toolInstance.getToolKey()); String toolName = toolInstance.getToolName(); Entity.Type type = Entity.Type.TOOL; Entity toolEntity = new Entity(toolId, toolName, type, true, m_latestTick); m_mscData.addEntity(toolEntity); refreshVisualization(); } COM: <s> add a new tool instance to the message sequence chart </s>