__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32720561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSyncButton() { if (syncButton == null) { syncButton = new JButton(); syncButton.setText("Sync"); syncButton.setPreferredSize(new java.awt.Dimension(100,40)); syncButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Sync Button Pressed"); // TODO Auto-generated Event stub actionPerformed() client.sync(); } }); } return syncButton; } COM: <s> this method initializes j button </s>
funcom_train/11376234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createInputFile(Configuration conf) throws IOException { FileSystem localFs = FileSystem.getLocal(conf); Path file = new Path(inputDir, "test.txt"); Writer writer = new OutputStreamWriter(localFs.create(file)); writer.write("abc\ndef\t\nghi\njkl"); writer.close(); } COM: <s> writes the input test file </s>
funcom_train/42472592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextArea setupWidget() { parser = new WeatherDataParser(); setWeatherText(); weatherInfo = new JTextArea(); weatherInfo.setBounds(3, 3, 300, 200); weatherInfo.setLineWrap(rootPaneCheckingEnabled); weatherInfo.setWrapStyleWord(true); weatherInfo.setText(weatherString); return weatherInfo; } COM: <s> this sets up the weather widget interface elements </s>
funcom_train/37448597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveOptions(HttpServletRequest aRequest, HttpSession aSession) { IntactUserI user = (IntactUserI) aSession .getAttribute( Constants.USER_KEY ); String[] result = aRequest .getParameterValues( ATTRIBUTE_OPTION_CHILDREN ); if ( result != null ) user.addHighlightOption( ATTRIBUTE_OPTION_CHILDREN, result[0] ); } // saveOptions COM: <s> allows to update the session object with parameters request </s>
funcom_train/25289957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPosition(float x, float y, float z) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_POSITION_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("PointSound0")); ((PointSoundRetained)this.retained).setPosition(x,y,z); } COM: <s> sets this sounds position from the three values provided </s>
funcom_train/39183924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExploreFrame (ExpFile expMain, Project p, Frame parentFrame) { this.project=p; this.expMain = expMain; this.parentFrame=parentFrame; groupBox = new FileComboBox(project, Project.GRP, expMain.getName()); try { jbInit(); addKeyListenerRecursively(this); } catch (Exception e) { e.printStackTrace(); } } COM: <s> initializes the explore frame or throws an exception </s>
funcom_train/8079670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Instances labelIgnoreLow(Instances instances, Instances used) throws Exception { Instance curr; double []probs; int label; double highestProb; for(int i=0; i<instances.numInstances(); i++){ curr = instances.instance(i); //compute the class membership probs predicted by the current ensemble probs = distributionForInstance(curr); label = (int) classifyInstance(curr); highestProb = probs[label]; if(highestProb >= m_Threshold){ curr.setClassValue(label); used.add(curr); } } return used; } COM: <s> label high confidence examples with the ensembles prediction </s>
funcom_train/44011417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetZip() { System.out.println("getZip"); StoreBO instance = new StoreBO(); String expResult = ""; String result = instance.getZip(); 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 zip method of class edu </s>
funcom_train/50140015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() throws PersistenceException { try { log.debug("Rolling back transaction..."); if (transaction != null) { transaction.rollback(); } log.debug("Done. Rolled back transaction."); } catch (TransactionException e) { throw new PersistenceException("Rollback error.", e); } } COM: <s> rollback the current transaction throwing all changes away </s>
funcom_train/12803147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void decouple(String type) { int lastDot = type.lastIndexOf('.'); if (lastDot == -1) { this.packageName = null; this.typeName = type; } else { this.packageName = type.substring(0, lastDot); this.typeName = type.substring(lastDot+1); } } COM: <s> parse out the package and type names from a fully qualified type string </s>
funcom_train/4745451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkAuthorization(AuthorizedAction action, CloudUserGroup group) { boolean result = false; if (!action.isAuthParamValid(0)) { result = checkAuth0Param(action, group); } else if (!action.isAuthParamValid(1)) { result = checkAuth1Param(action, group); } else if (!action.isAuthParamValid(2)) { result = checkAuth2Param(action, group); } else { result = checkAuth3Param(action, group); } return result; } COM: <s> checks if an authorized action is authorized for a given cloud user group </s>
funcom_train/45061888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnOK() { if (btnOK == null) { btnOK = new JButton(); btnOK.setText("OK"); btnOK.setBounds(202, 8, 73, 26); btnOK.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { result = OK; NodeTableOptionDialog.this.dispose(); } }); } return btnOK; } COM: <s> this method initializes j button3 </s>
funcom_train/32057085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPos() { System.out.println("testSetPos"); GPBarEntry be = new GPBarEntry( "barkey", 10, "barvalue" ); be.setPos( 12 ); int num = be.getPos(); assertEquals( num, 12 ); } COM: <s> test of set pos method of class gpbar entry </s>
funcom_train/41150495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { Instance i1 = (Instance) o1; Instance i2 = (Instance) o2; if (i1.value(m_Index) < i2.value(m_Index)) { return -1 * m_Reverse; } else if (i1.value(m_Index) > i2.value(m_Index)) { return 1 * m_Reverse; } return 0; } COM: <s> compares two objects instances with respect to the attribute </s>
funcom_train/46451396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadExtendedModules(OpModule module, OpModuleLoader moduleLoader) { OpModule startModule = module; while (startModule.getExtendedModule() != null) { String extendedModulePath = module.getExtendedModule(); extendedModulePath = OpProjectConstants.PROJECT_PACKAGE + extendedModulePath; OpModule parentModule = moduleLoader.loadModule(extendedModulePath); module.extend(parentModule); startModule = parentModule; } } COM: <s> tries to load a hierarchy of modules starting with the given module </s>
funcom_train/9794276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void takeIt(){ if(currentlyScanningToken) currentSpelling.append(currentChar); try{ currentChar = source.getChar(); }catch(Exception e){ System.out.println("Unable to read char from input"); } pos++; if(currentChar == '\n') pos = 0; } COM: <s> take it appends the current character to the current token </s>
funcom_train/43893181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PropertyIsEqualTo buildPropertyExists() throws CQLException { PropertyName property = resultStack.popPropertyName(); org.opengis.filter.expression.Expression[] args = new org.opengis.filter.expression.Expression[1]; args[0] = filterFactory.literal(property); Function function = filterFactory.function("PropertyExists", args); Literal literalTrue = filterFactory.literal(Boolean.TRUE); PropertyIsEqualTo propExistsFilter = filterFactory.equals(function, literalTrue); return propExistsFilter; } COM: <s> creates property is equal to with property exists predicate </s>
funcom_train/27944592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AllocThreadTraceRef getAllocThreadTrace(ThreadRef peer) { ListIterator itr = getAllocThreadTraces().listIterator(); AllocThreadTraceRef obj; while (itr.hasNext()) { obj = (AllocThreadTraceRef) itr.next(); if ( obj.getThread().equals( peer ) ) return obj; } return null; } COM: <s> returns statistic data for given thread which this trace appeared in </s>
funcom_train/26509454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toShortString() { String result = "["; Iterator i=stack.iterator(); i.next(); while (i.hasNext()) result+=((Entry)i.next()).getIndex()+(i.hasNext()?",":""); result+="]"; return result; } COM: <s> creates a short string representation by omitting the objects in the entries </s>
funcom_train/28212021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTFlanName() { if (jTFlanName == null) { jTFlanName = new JTextField(); jTFlanName.setPreferredSize(new Dimension(221, 19)); jTFlanName.setBounds(new Rectangle(183, 2, 221, 15)); } return jTFlanName; } COM: <s> this method initializes j tflan name </s>
funcom_train/11104196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StringBuffer describeRelationships(Stack heritage) { StringBuffer msg = new StringBuffer(); for (int i = 0; i < heritage.size(); i++) { ComponentBean node = (ComponentBean) heritage.get(i); if (i > 0) { msg.insert(0, "/"); } msg.insert(0, node.getJsfid()); } return msg; } COM: <s> p returns a string buffer with an xpath like expression of </s>
funcom_train/953861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect () { try { DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); conn = DriverManager.getConnection ("jdbc:oracle:thin:@" + dbHost + ":" + dbPort + ":" + dbSid, dbUser, dbPass); } catch (SQLException sql) { System.out.println(sql); } } COM: <s> method to connect to the database with the supplied information from the </s>
funcom_train/21349526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean CommitTransaction() throws SQLException { boolean bFlag = false; try { if (this.connection == null) { return bFlag; } this.connection.commit(); bFlag = true; } catch (SQLException ex) { this.bInTranscation = false; throw ex; } finally { if (!this.bKeepConnection && !this.bInTranscation) { this.Close(); } } return bFlag; } COM: <s> commits a transaction </s>
funcom_train/45817126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NHINDAddressCollection getRecipients() { if (recipients == null) { recipients = new NHINDAddressCollection(); try { for (Address addr : getAllRecipients()) { recipients.add(new NHINDAddress((InternetAddress)addr)); } } catch (MessagingException e) { throw new ProtocolException(ProtocolError.InvalidHeader, e); } } return recipients; } COM: <s> gets a collection of all recipients as nhindaddresses </s>
funcom_train/48588028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (name != null) { Scanner nameScanner = new Scanner(name).useDelimiter("\\s* \\s*"); String givenName = null; String familyName = null; int count = 0; while (nameScanner.hasNext()) { String s = nameScanner.next(); if (count == 0) { givenName = s; count++; } else { if (familyName == null) familyName = s; else familyName += " " + s; } } this.setGivenName(givenName); this.setFamilyName(familyName); } } COM: <s> sets the name of this person vo </s>
funcom_train/46695450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMode() { System.out.println("getMode"); BasicUser instance = new BasicUser("A"); instance.setMode("Artist"); String expResult = "Artist"; String result = instance.getMode(); assertEquals(expResult, result); } COM: <s> test of get mode method of class nz </s>
funcom_train/41318479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean append (String entry, boolean close) { if (!isOpen && !openForAppend ()) return false; try { writer.write (entry); writer.write (EOL); return true; } catch (Exception e) { if (storedException == null) storedException = e; return false; } finally { if (close) close (); } } COM: <s> implicitly opens for appending if file is not open and writes to file </s>
funcom_train/7243465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConnectedTo(InetAddress host) { UDPSocketChannel[] array = _channels; if (_lastConnectionID == 0) return false; for (int i = 0; i < array.length; i++) { UDPSocketChannel channel = array[i]; if (channel != null && host.equals(channel.getRemoteSocketAddress().getAddress())) { return true; } } return false; } COM: <s> determines if were connected to the given host </s>
funcom_train/2609708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAudioPayloadTypes(final List pts) { synchronized (payloads) { Iterator ptIter = pts.iterator(); while (ptIter.hasNext()) { PayloadType.Audio pt = (PayloadType.Audio) ptIter.next(); addJinglePayloadType(new JinglePayloadType.Audio(pt)); } } } COM: <s> adds a list of payloads to the packet </s>
funcom_train/28328966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Thread newThread(final Runnable r) { final StringBuilder name = new StringBuilder(prefix); name.append("-").append(threadNumber.getAndIncrement()); final Thread t = new Thread(r, name.toString());//new thread to be created t.setPriority(getThreadPriority()); t.setDaemon(this.isDaemon()); if (this.handler!=null) {//be sure that it is different from null t.setUncaughtExceptionHandler(handler); } return t; } COM: <s> p method factory which creates a </s>
funcom_train/21965777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getFrameLength() { long lLengthInFrames = 0; Iterator streamIterator = audioInputStreamList.iterator(); while (streamIterator.hasNext()) { AudioInputStream stream = (AudioInputStream) streamIterator.next(); long lLength = stream.getFrameLength(); if (lLength == AudioSystem.NOT_SPECIFIED) { return AudioSystem.NOT_SPECIFIED; } else { lLengthInFrames = Math.max(lLengthInFrames, lLength); } } return lLengthInFrames; } COM: <s> the maximum of the frame length of the input stream is calculated and </s>
funcom_train/24130532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSource(Source s) throws ElementExistsException { boolean sourceExists=false; for(int i=0;i<_vActiveSources.size();i++){ if(_vActiveSources.elementAt(i)._sourceId==s._sourceId){ sourceExists=true; break; } } if(sourceExists) throw new ElementExistsException("Source "+s._sourceId+" already exists."); else _vActiveSources.add(s); } COM: <s> add a source to the nodes source manager </s>
funcom_train/15718587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(String type) { if(type.equalsIgnoreCase("daily")) mType = DAILY; else if(type.equalsIgnoreCase("weekly")) mType = WEEKLY; else mType = ONCE; setEndDate(mEndDateString); setMostRecentEndDate(mMostRecentEndDateString); } COM: <s> sets the type of the task from the given string </s>
funcom_train/49339543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMap() { setContentView(mv); isMapDisplayed = true; // fake a location update locationUpdateDelay = 0; // do it now (is reset by locationUpdate) if (currentLocation != null) { // if we have one yet... locationUpdate(currentLocation); } cv.setEnabled(false); // this stops stops the blink thread and magnetic compass in cv } COM: <s> shows the map interface </s>
funcom_train/12186940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addValue(double value) { if (Double.isInfinite(value) || Double.isNaN(value)) { sumOrInfiniteAndNotNumberValues = sumOrInfiniteAndNotNumberValues + value; } else { if (sumOrInfiniteAndNotNumberValues == 0) { sumOfFiniteValues = sumOfFiniteValues.add( new BigDecimal(Double.toString(value))); } } } COM: <s> adds double to the sum </s>
funcom_train/18744627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GrooveFileChooser getFileChooser() { if (this.fileChooser == null) { this.fileChooser = GrooveFileChooser.getFileChooser(this.getFilters()); this.fileChooser.setFileFilter(this.getDefaultFormat().getFilter()); } return this.fileChooser; } COM: <s> returns a file chooser for exporting lazily creating it first </s>
funcom_train/17892649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAddObject(final Object obj, final Point point) { final BeanWrapper wrapper = new BeanWrapper(obj); wrapper.setLocation(point); // The glass pane should listen to mouse events for control. wrapper.addMouseListener(this); wrapper.addMouseMotionListener(this); // Add the wrapper to the glass pane this.add(wrapper); validate(); wrappers.put(obj, wrapper); } COM: <s> adds the non visual bean to the design panel </s>
funcom_train/24516147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readMetaFile(String s){ try{ BufferedReader in = new BufferedReader(new StringReader(s)); while ((s = in.readLine()) != null) { if(parseHeader(s)){ break; } } in.close(); } catch (IOException e) { System.out.println("IO problem in metafile header reading"); } } COM: <s> method reads metafile from string and reads </s>
funcom_train/22049573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWastedGBCost() { int cost_done = 0; GenericDataManager speed_manager = BirMail.getDatabase().GetManager( GenericDataManager.TYPE_BUILD_SPEED_DATA); BuildSpeedData speed_inf = (BuildSpeedData)speed_manager.FindByID(iSpeed_GB); if (speed_inf != null) { cost_done = speed_inf.GetWasted(); } return cost_done; } COM: <s> get gb wasted from action </s>
funcom_train/22131414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addArgAttrs(List<Attribute> next) { int i; int max; Attribute attr; max = getArgCount(); for (i = 0; i < max; i++) { attr = getArgAttribute(i); if (next.indexOf(attr) == -1) { next.add(attr); } } } COM: <s> add all argument attributes to next if not already contained in next </s>
funcom_train/47696124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLAttribute findAttribute(String fullName) { Enumeration enume = this.attributes.elements(); while (enume.hasMoreElements()) { XMLAttribute attr = (XMLAttribute) enume.nextElement(); if (attr.getFullName().equals(fullName)) { return attr; } } return null; } COM: <s> searches an attribute </s>
funcom_train/19911349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSongHelper(Song song) { this.song = song; reset(); Logger.out("set song"); try { setDataSource(song.path); prepareAsync(); } catch (IllegalArgumentException e) { Logger.debug(e); } catch (IllegalStateException e) { Logger.debug(e); } catch (IOException e) { Logger.debug(e); } } COM: <s> internal method used to actually set a song because the public interface </s>
funcom_train/28425970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disconnectUser() { boolean bConf = GuiUtils.getConfirmation(this, "Do you want to close the connection?"); if(bConf) { IConnectionManager manager = fconfig.getConnectionManager(); if (manager != null) { manager.closeConnection(connection); } connection.setObserver(null); } } COM: <s> disconnected user connection </s>
funcom_train/25290755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAngularAttenuationLength() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_ANGULAR_ATTENUATION_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("ConeSound9")); return (((ConeSoundRetained)this.retained).getAngularAttenuationLength()); } COM: <s> retrieves angular attenuation array length </s>
funcom_train/25645630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doTranslate(String[] classpath, String testFolder, String[] files, String expected, boolean includePathRoot){ setCurrentTestFilesFolder(testFolder); for(String s : classpath) { appendToClassPath(s); } try{ clearClassFiles(); }catch(IOException ioexception){ fail("IO Exception clearing class files"); } translateFiles(files, expected, includePathRoot); } COM: <s> show the translation of the listed files </s>
funcom_train/10985740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int optInt(String key, int defaultValue) { Object o = opt(key); if (o != null) { if (o instanceof Number) { return ((Number)o).intValue(); } try { return Integer.parseInt((String)o); } catch (Exception e) { } } return defaultValue; } COM: <s> get an optional int value associated with a key </s>
funcom_train/7518289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Proposta entity) { EntityManagerHelper.log("saving Proposta instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved proposta entity </s>
funcom_train/2369375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setLayout(new OverlayLayout(this)); add(this.framePanel); add(this.mainPanel); this.setLayer(this.mainPanel, 0); this.setLayer(this.framePanel, 1); this.framePanel.setVisible(false); } COM: <s> adds the layers to this panel </s>
funcom_train/43373354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseActions(String actions) { mask = 0; if(actions != null) { StringTokenizer tokenizer = new StringTokenizer(actions, ",\t "); while(tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); if(token.equals(READ_ACTION)) mask |= READ; else if(token.equals(WRITE_ACTION)) mask |= WRITE; else if(token.equals(EXECUTE_ACTION)) mask |= EXECUTE; else if(token.equals(CREATE_ACTION)) mask |= CREATE; else if(token.equals(DELETE_ACTION)) mask |= DELETE; else if(token.equals(DEPLOY_ACTION)) mask |= DEPLOY; else if(token.equals(CONFIRM_ACTION)) mask |= CONFIRM; else throw new IllegalArgumentException("Unknown action: " + token); } } } COM: <s> p parses the actions string </s>
funcom_train/1653729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHTMLNode_nullAttributeName() { try { new HTMLNode(SAMPLE_OKAY_NODE_NAME, null,SAMPLE_ATTRIBUTE_VALUE, SAMPLE_NODE_CONTENT); fail("Expected Exception Error Not Thrown!"); } catch (IllegalArgumentException anException) { assertNotNull(anException); } try { new HTMLNode(SAMPLE_OKAY_NODE_NAME, null,SAMPLE_ATTRIBUTE_VALUE); fail("Expected Exception Error Not Thrown!"); } catch (IllegalArgumentException anException) { assertNotNull(anException); } } COM: <s> tests htmlnode string string string string and </s>
funcom_train/46760730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final InvoiceModel invoice, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long invoiceId = store(invoice, chain, call); chain.execute(); // return primary key return invoiceId; } catch (Exception ex) { Log.exception(ex); Log.error(invoice); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the invoice model model creating a new invoice or updating existing rows </s>
funcom_train/35233374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getCapacity( OmniArea area) throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException { // Capacity for sensors is the same for zones. It's just about the types. // (Querying for sensors will result in an error). if (area == OmniArea.Sensor) area = OmniArea.Zone; return omni.reqObjectTypeCapacities(area.get_objtype_msg()).getCapacity(); } COM: <s> get the capacity of an omni area </s>
funcom_train/12182640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderEncoding(Encoding encoding) { if (encoding != null) { String encodingName = encoding.getName().replaceAll(" ", ""); String encodingDisplay = EditorMessages.getString("Encoding." + encodingName + ".label"); appendText(encodingDisplay); } } COM: <s> render the encoding </s>
funcom_train/47027604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doSetActiveEditor(IEditorPart part) { super.setActiveEditor(part); ITextEditor editor= null; if (part instanceof ITextEditor) editor= (ITextEditor) part; fContentAssistProposal.setAction(getAction(editor, "ContentAssistProposal")); //$NON-NLS-1$ fContentAssistTip.setAction(getAction(editor, "ContentAssistTip")); //$NON-NLS-1$ format.setAction(getAction(editor, "Format")); } COM: <s> sets the active editor to this contributor </s>
funcom_train/2904514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML(){ int id = getTaskID(); if(id == LinuxSupportedTask.FORK_EXEC){ return generateXML(arg, null, "native"); } else if(id == LinuxSupportedTask.EXEC_JAR){ return generateXML(arg, jvmOpt, "jar"); } else if(id == LinuxSupportedTask.EXEC_CLASS){ return generateXML(fqc, jvmOpt, "class"); } XMLTag tags = getXML(); if(tags != null){ return tags.toString(); } return null; } COM: <s> an xml string representation of this object </s>
funcom_train/41157209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isExtremeValue(Instance inst) { boolean result; int i; result = false; for (i = 0; i < m_AttributeIndices.length; i++) { // non-numeric attribute? if (m_AttributeIndices[i] == NON_NUMERIC) continue; result = isExtremeValue(inst, m_AttributeIndices[i]); if (result) break; } return result; } COM: <s> returns whether the instance is an extreme value or not </s>
funcom_train/33775997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTfDelay () { if (tfDelay == null) {//GEN-END:|82-getter|0|82-preInit tfDelay = new TextField ("Diff\u00E9r\u00E9 (<5s)", String.valueOf(cfg.DELAY), 1, TextField.NUMERIC);//GEN-LINE:|82-getter|1|82-postInit // write post-init user code here }//GEN-BEGIN:|82-getter|2| return tfDelay; } COM: <s> returns an initiliazed instance of tf delay component </s>
funcom_train/19398165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_splitRootLeaf_decreasingKeySequence() { int[] branchingFactors = new int[]{3,4,5};// 6,7,8,20,55,79,256,512,1024,4097}; COM: <s> a stress test for sequential decreasing key insertions that runs with a </s>
funcom_train/19976551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(PropertyStore store) { List<String[]> po = store.getList(); for (int i = 0; i < po.size(); i++) { String[] strings = po.get(i); changeProperty(String.valueOf(strings[0]), String.valueOf(strings[1])); } setChanged(true); } COM: <s> adds changes all </s>
funcom_train/33368679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTables() throws SQLException { dbm.exec("insert into Document " + "(id, name, des, mime, type, origName) " + "values ('" + getID() + "', '[no name]', '', 'undefined', " + "'undefined', 'undefined')"); setType(Document.class.getName()); } COM: <s> initializes document table entry in the database </s>
funcom_train/2422187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RootFolder getRootFolder() { // No need to check if this instance is a RootFolder, because this // method is overriden in the RootFolder class. IntegrationEntity parent = getParent(); while (parent != null) { if (parent instanceof RootFolder) { return (RootFolder) parent; } parent = parent.getParent(); } return null; } COM: <s> retrieves the code root folder code that is the ancestor of this entity </s>
funcom_train/15677703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double position(Point2D point) { double pos = this.positionOnLine(point); // compute a threshold depending on line slope double eps = Math.hypot(dx, dy) * Shape2D.ACCURACY; // return either pos or NaN if (pos < this.getT0() - eps) return Double.NaN; if (pos > this.getT1() + eps) return Double.NaN; return pos; } COM: <s> gets the position of the point on the line arc </s>
funcom_train/33839799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void info() { System.out.println(" Unhandled/Undefined/Unknown Type"); System.out.println(" XTENSION="+myHeader.getStringValue("XTENSION").trim()); System.out.println(" Apparent size:"+myData.getTrueSize()); } COM: <s> print out some information about this hdu </s>
funcom_train/8309182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_return(Study param){ if (local_return == null){ local_return = new Study[]{}; } //update the setting tracker local_returnTracker = true; java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(local_return); list.add(param); this.local_return = (Study[])list.toArray( new Study[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/550288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshEntity() { int[] rows = getSelectedRows(); for (int i = 0; i < rows.length; i++) { IAttribute attribute = (IAttribute) model.getEntityAt(rows[i]); attribute.refresh(); attribute.getDevice().refresh(); } } COM: <s> refreshes informations like value about the selected attribute in the </s>
funcom_train/41262245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_tooManyGrants() { Acp acp = new Acp(); for (int i = 0; i < 100; i++) { acp.grant(AllUsersGroup.getInstance(), "read"); } try { acp.grant(AuthenticatedUsersGroup.getInstance(), "write"); fail("Should have thrown an exception"); } catch (IndexOutOfBoundsException e) { // expected } } COM: <s> test the limit on the number of grants </s>
funcom_train/8012160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumn(String table, String column, String caption, int type, int flags, String href, String format) throws Exception { addColumn(table, column, caption, type, flags, href, format, null, null, null); } COM: <s> creates a datastore column and corresponding display components for the search and list </s>
funcom_train/8352490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyRmdir(final FtpIoSession session, final FtpFile file) { StatisticsObserver observer = this.observer; if (observer != null) { observer.notifyRmdir(); } FileObserver fileObserver = this.fileObserver; if (fileObserver != null) { fileObserver.notifyRmdir(session, file); } } COM: <s> observer remove directory notification </s>
funcom_train/19435187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doesExist(String strSerial){ try{ PreparedStatement ppstExist = conn.prepareStatement("SELECT * FROM " + table + " WHERE CDSERIAL = ?"); ppstExist.setString(1, strSerial); ResultSet rsExist = ppstExist.executeQuery(); return rsExist.next(); }catch (SQLException se){ se.printStackTrace(); return false; } } COM: <s> check for the cd serial number </s>
funcom_train/10618755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void grabMouse() { manualGrabActive = true; grabWindow = this; x11.XGrabPointer(display, windowID, X11Defs.True, MOUSE_GRAB_MASK, X11Defs.GrabModeAsync, X11Defs.GrabModeAsync, X11Defs.None, X11Defs.None, X11Defs.CurrentTime); x11.XFlush(display); } COM: <s> start manual mouse grab </s>
funcom_train/13515440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(Key key) throws ChaiDBException { switch (type) { case IBTreeConst.BTREE: return ((ISingleKeyBTree) btree).delete(key, kc); case IBTreeConst.HYPER_BTREE: return ((IDuplicatedKeyBTree) btree).delete(key, kc); default: break; } throw new ChaiDBException(ErrorCode.INVALID_INDEX_TYPE); } COM: <s> delete a key value pair from btree </s>
funcom_train/51110794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { // Make an array copy to avoid modifying while iterating BasicController[] c = (BasicController[]) getChildren().toArray(new BasicController[0]); for (int i = 0; i < c.length; ++i) { c[i].shutdown(); } ((CMPanel) getView()).hidePanel(); setParent(null); } COM: <s> performs shutdown of the panel that is the part og the main frame </s>
funcom_train/30009198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNoOfRoots() { System.out.println("getNoOfRoots"); RootList instance = new RootList(); int expResult = 0; int result = instance.getNoOfRoots(); 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 no of roots method of class papyrus </s>
funcom_train/51139125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "com.ledruide.druidedb.test.dao.Job { " + "[id = '" + id + "'] *** " + "[description = '" + description + "'] *** " + "[salary = '" + salary + "'] *** " + "}"; } COM: <s> returns a human readable string representation of the content </s>
funcom_train/12188732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateContext() throws Exception { // ensure the correct object is created // @todo fix parameters ExpressionContext context = factory.createExpressionContext(null, null); assertTrue("JXPathExpressionFactory createContext() should create " + "JXPathExpressionContext instance", (context instanceof JXPathExpressionContext)); } COM: <s> tests the create context method </s>
funcom_train/8343459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendDefaultPopupItems() { JMenuItem currentItem; if (menu.getSubElements().length > 0) { menu.addSeparator(); } currentItem = new JMenuItem(EXPAND_ENTIRE_TREE); currentItem.addActionListener(sTreePaneMenuActionListener); menu.add(currentItem); currentItem = new JMenuItem(COLLAPSE_ENTIRE_TREE); currentItem.addActionListener(sTreePaneMenuActionListener); menu.add(currentItem); currentItem = new JMenuItem(PRINT_TREE); currentItem.addActionListener(sTreePaneMenuActionListener); menu.add(currentItem); } COM: <s> appends the deafult popupmenu items to the end of the developer created </s>
funcom_train/21721805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBubbleSceneProperties(int numBubbles, boolean displayScore) { rePrx .setWorldProperty("numBubbles", new Integer(numBubbles) .toString()); if (displayScore) { rePrx.setWorldProperty("DisplayScore", "True"); } else { rePrx.setWorldProperty("DisplayScore", "False"); } } COM: <s> sets all the properties in the bubble scene </s>
funcom_train/39305247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifyChecksum(String nmeaString) { returnValue = false; if (nmeaString.indexOf("$") == 0) { starIndex = nmeaString.indexOf("*"); if (starIndex > 0) { temp = 0; for (index = 1; index < starIndex; index++) { temp = temp ^ nmeaString.charAt(index); } returnValue = (Integer.parseInt(nmeaString.substring( starIndex + 1, starIndex + 3), 16) == temp); } } return returnValue; } COM: <s> verify the checksum </s>
funcom_train/50396336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setACL(String path, boolean clearAll, ChangeACLEntryType[] aces, boolean recursive) throws BaseFault { ChangePermissionsDocument reqDoc = ChangePermissionsDocument.Factory.newInstance(); ChangePermissions req = reqDoc.addNewChangePermissions(); req.setPath(path); ChangeACLType acl = ChangeACLType.Factory.newInstance(); if (aces != null){ acl.setChangeACLEntryArray(aces); } acl.setClearACL(clearAll); req.setACL(acl); req.setRecursive(recursive); sms.ChangePermissions(reqDoc); } COM: <s> modifies acl for the given file </s>
funcom_train/23216760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImportParentOntologyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DomainOntology_importParentOntology_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DomainOntology_importParentOntology_feature", "_UI_DomainOntology_type"), ContractPackage.Literals.DOMAIN_ONTOLOGY__IMPORT_PARENT_ONTOLOGY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the import parent ontology feature </s>
funcom_train/7518224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(UsuarioFiltro entity) { EntityManagerHelper.log("deleting UsuarioFiltro instance", Level.INFO, null); try { entity = getEntityManager().getReference(UsuarioFiltro.class, entity.getId()); 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 usuario filtro entity </s>
funcom_train/10628498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstrDouble01() { double a = 1.E-1; int aScale = 55; BigInteger bA = new BigInteger("1000000000000000055511151231257827021181583404541015625"); BigDecimal aNumber = new BigDecimal(a); assertEquals("incorrect value", bA, aNumber.unscaledValue()); assertEquals("incorrect scale", aScale, aNumber.scale()); } COM: <s> new big decimal 0 </s>
funcom_train/15666413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClient(String sphere) { /* * String system_name = client.verifyAuth.getSystemName(sphere); * //System.out.println("setting messages pane to : "+sphere+ " : * "+system_name); client = (DialogsMainCli) dialog_clis.get(system_name); */ } COM: <s> sets the client attribute of the messages pane object </s>
funcom_train/23239733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getOnlySymbol(int addr){ Symbol sym; String s; int l = symboltable.size(); for (int i = 0; i < l; i++) { sym = symboltable.elementAt(i); if (sym.match(addr)) return sym.getSymbolName(); } return null; } COM: <s> returns the first if any symbol for an address null otherwise </s>
funcom_train/22782591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToCache(ImageKey key, BufferedImage img, ImageQuality quality) { // get store ImageStore store = cache.get(key); // if there is no such store, create it if (store == null) { store = new ImageStore(); cache.put(key, store); } // add image to store store.addImage(img, quality); } COM: <s> add a new value to the image cache </s>
funcom_train/22742112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startApp() { if (control == null) { initApplication(); eManager.enqueue(new Event(this, Event.TYPE_APP, Event.SUB_APP_STARTUP)); } else { eManager.enqueue(new Event(this, Event.TYPE_APP, Event.SUB_APP_RESTART)); } } COM: <s> called at application startup </s>
funcom_train/21301270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQueryResult(EntriesType queryResult) { if (queryResult == null && !encoreQueryComplete) { encoreQueryComplete = false; molCount = 0; expCount = 0; } else { encoreQueryComplete = true; if (queryResult != null) { doExperimentCount(queryResult); doMoleculeCount(queryResult); } } this.queryResult = queryResult; } COM: <s> sets the query result for this dataset </s>
funcom_train/45602113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Reward readExpReward(String input) throws ParseException { Reward reward = null; String[] parts = input.split("\\s+"); if (parts.length >= 2) { String amount = parts[1]; int expAmount = 0; try { expAmount = Integer.parseInt(amount); } catch (NumberFormatException e) { throw new ParseException("Expected a number: " + amount); } reward = new Experience(expAmount); } else { throw new ParseException("Incomplete instruction: " + input); } return reward; } COM: <s> read an experience reward </s>
funcom_train/50698244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getPilots(){ if( pilotCache != null ) return pilotCache; this.pilotCache = new ArrayList(); for (Iterator iterator = clientSessions.iterator(); iterator.hasNext();) { ClientSession session = (ClientSession) iterator.next(); if( session.getClientType() == ClientSession.CLIENT_TYPE_PILOT ) pilotCache.add(session); } return pilotCache; } COM: <s> get all pilots on the network </s>
funcom_train/21656058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtcrear() { if (btcrear == null) { btcrear = new JButton(); btcrear.setBounds(new Rectangle(240, 65, 140, 30)); btcrear.setMnemonic('p'); btcrear.setText("Nuevo Proyecto"); btcrear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarNuevoRegistro(); } }); } return btcrear; } COM: <s> this method initializes btcrear </s>
funcom_train/22580760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void listenSocket() throws Exception { try { server = new ServerSocket(port); } catch (IOException e) { System.out.println("Could not listen on port " + port); System.exit(-1); } while (true) { Listener w; try { w = new Listener(server.accept(), passToMethods); Thread t = new Thread(w); t.start(); } catch (IOException e) { System.out.println("Accept failed: " + port); System.exit(-1); } } } COM: <s> this method listens to the socket port to connect clients </s>
funcom_train/41856945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean _loadGaSnippet(String gaUaNumber, String gaDomainName, String gaDir) { String original = _loadResource(GA_JS); if ( original == null ) { return false; } gaSnippet = original .replace("${ga.uanumber}", gaUaNumber) .replace("${ga.domainName}", gaDomainName) .replace("${ga.dir}", gaDir) ; log.info(GA_JS+ ": " +gaSnippet); return true; } COM: <s> loads the ga snippet </s>
funcom_train/33725965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSample(int index, String filename, float location, float delay, float noiseLevelBefore, float noiseLevelAfter) { setSample(index, filename, interpolate(SoundManager.params3D, location, 0), interpolate(SoundManager.params3D, location, 1), interpolate(SoundManager.params3D, location, 2) + delay, interpolate(SoundManager.params3D, location, 3) + delay, noiseLevelBefore, noiseLevelAfter); } COM: <s> adds a stereo sample </s>
funcom_train/22641109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeed(String seed) { if (!seed.equals("")) { try { this.seed = Long.parseLong(seed); } catch (NumberFormatException ex) { System.err.println("Unable to parse " + seed + " as a long number"); throw (ex); } } } COM: <s> set the random seed when creating compact code </s>
funcom_train/1006217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAngle(double angle) { double angExt = getAngleExtent(); boolean backwards = (angExt < 0.0); if (backwards) { angExt = -angExt; } if (angExt >= 360.0) { return true; } angle = normalizeDegrees(angle) - normalizeDegrees(getAngleStart()); if (backwards) { angle = -angle; } if (angle < 0.0) { angle += 360.0; } return (angle >= 0.0) && (angle < angExt); } COM: <s> determines whether or not the specified angle is within the </s>
funcom_train/18788089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MetaPackage getContext(MetaView view) { if(view.getContext() == null && getModel().getParent() != null) { ExplorerNode parent = ((ExplorerNode)getModel().getParent()); if(parent.getDataObject() instanceof MetaPackage) { return ((MetaPackage)parent.getDataObject()); } } return (MetaPackage)view.getContext(); } COM: <s> helper member to obtain the enclosing meta package of a view </s>
funcom_train/29538553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeChatMessage(String s) { StyledDocument doc = this.textPane.getStyledDocument(); try { doc.insertString(doc.getLength(), s, null); } catch (BadLocationException e) { System.out.println("Exception ignored..."); e.printStackTrace(); } chatOutDimension = textPane.getSize(chatOutDimension); chatOutRectangle.y = chatOutDimension.height; chatOutput.getViewport().scrollRectToVisible(chatOutRectangle); } COM: <s> write an incoming chat message to the screen </s>
funcom_train/18457997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void acquire() throws InterruptedException { // when any events (usually window close events) try to call System.exit, // we need to trap the exception here synchronized (m_lock) { try { if (m_pausingAWT) { m_lock.wait(); } else { m_lock.wait(m_lockWait); } } catch (ExitException exe) { ; // don't do anything here } } } COM: <s> acquire awt thread control </s>
funcom_train/51413291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshInfoColumnPanel() { //only enable the change of datatype to new columns Row selColRow = cmlColumns.getSelectedRow(); if(selColRow != null && selColRow.isNewCreated()) cmpColumnDataType.setEnabled(true); else cmpColumnDataType.setEnabled(false); //refresh the CMPanel-objects of the locColumns cmpColumnDataType.refresh(); cmpColumnComment.refresh(); cmpColumnDescription.refresh(); cmpColumnLastChange.refresh(); cmpColumnName.refresh(); } COM: <s> refreshes the info panel sub panel for the column details </s>
funcom_train/8347483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer2() { if (spacer2 == null) {//GEN-END:|88-getter|0|88-preInit // write pre-init user code here spacer2 = new Spacer(16, 1);//GEN-LINE:|88-getter|1|88-postInit // write post-init user code here }//GEN-BEGIN:|88-getter|2| return spacer2; } COM: <s> returns an initiliazed instance of spacer2 component </s>