__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16538430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPanel() { if (jContentPanel == null) { jContentPanel = new JPanel(); jContentPanel.setLayout(new BorderLayout()); jContentPanel.add(getJToolBar(), BorderLayout.NORTH); jContentPanel.add(getImagePanel(), BorderLayout.CENTER); //jContentPanel.add(getScrollPane(), BorderLayout.CENTER); jContentPanel.setToolTipText("White==Recovered, Black==Susceptible, Red==Infective"); } return jContentPanel; } COM: <s> this method initializes j content panel </s>
funcom_train/50242508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Object o) { /* * formally, returns <tt>true</tt> if and only if this set contains an * element <code>e</code> such that <code>(o==null ? e==null : * o.equals(e))</code>. */ return this.data.contains(o); } COM: <s> returns tt true tt if this set contains the specified element </s>
funcom_train/34519533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void emit(edu.arizona.cs.mbel.ByteBuffer buffer, edu.arizona.cs.mbel.emit.ClassEmitter emitter){ buffer.put(LOCAL_SIG); buffer.put(encodeInteger(localVars.size())); for (int i=0;i<localVars.size();i++){ ((LocalVar)localVars.get(i)).emit(buffer, emitter); } } COM: <s> write out this signature to a buffer in raw binary form </s>
funcom_train/8687072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void expandResource(Resource srcR, File dir) { InputStream i = null; try { i = srcR.getInputStream(); expandStream(srcR.getName(), i, dir); } catch (IOException ioe) { throw new BuildException("Error while expanding " + srcR.getName(), ioe, getLocation()); } finally { FileUtils.close(i); } } COM: <s> this method is to be overridden by extending unarchival tasks </s>
funcom_train/8558019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPerm(String name, Object def) { try { Object val = permStorage.get(name); return (val == null ? def : val); } catch (Exception e) { logger.error("getPerm(" + name + "): " + e.getMessage(), e); return def; } } COM: <s> get an object from permanent storage return default if value is null </s>
funcom_train/5079956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invert() { source.outgoing.remove(this); target.incoming.remove(this); Node oldTarget = target; target = source; source = oldTarget; int temp = offsetSource; offsetSource = offsetTarget; offsetTarget = temp; target.incoming.add(this); source.outgoing.add(this); if (points != null) points.reverse(); if (vNodes != null) { NodeList newVNodes = new NodeList(); for (int j = vNodes.size() - 1; j >= 0; j--) { newVNodes.add(vNodes.getNode(j)); } vNodes = newVNodes; } if (start != null) { Point pt = start; start = end; end = pt; } } COM: <s> swaps the source and target nodes </s>
funcom_train/5793059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPolicyNamePkgMap() { m_pkgPolicyMap = new HashMap<Package, PolicyManage>(); if (hasPolicies()) { for (PolicyManage pm: policies() ) { m_pkgPolicyMap.put(pm.getPackage(),pm); } } } COM: <s> go throw the rancid configuration and find a map from </s>
funcom_train/5806752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateFromFile() throws IOException, MarshalException, ValidationException { if (m_loadedFromFile) { File surveillanceViewsFile = ConfigFileConstants.getFile(ConfigFileConstants.HTTP_COLLECTION_CONFIG_FILE_NAME); if (m_lastModified != surveillanceViewsFile.lastModified()) { this.reload(); } } } COM: <s> reload the http datacollection config </s>
funcom_train/11011709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNestedFunctionIf() { Ptg[] ptgs = parseFormula("IF(A1=B1,AVERAGE(A1:B1),AVERAGE(A2:B2))"); assertEquals(11, ptgs.length); assertTrue("IF Attr set correctly", (ptgs[3] instanceof AttrPtg)); AttrPtg ifFunc = (AttrPtg)ptgs[3]; assertTrue("It is not an if", ifFunc.isOptimizedIf()); assertTrue("Average Function set correctly", (ptgs[5] instanceof FuncVarPtg)); } COM: <s> make sure the ptgs are generated properly with two functions embedded </s>
funcom_train/15607953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenomeVersion latestGenomeForSpecies(String speciesName) /*throws java.rmi.RemoteException*/ { Object[] aggregates=getAggregates(); GenomeVersion genomeVersion; for (int i=0;i<aggregates.length;i++) { genomeVersion=((GenomeLocatorFacade)aggregates[i]).latestGenomeForSpecies(speciesName); if (genomeVersion!=null) return genomeVersion; } return null; } COM: <s> returns the latest genome version for the registered species </s>
funcom_train/12194288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMoreThan3DotsPathFragment() throws Exception { doTest("...", "...", false); doTest(".....", ".....", false); doTest(".a.", ".a.", false); doTest("...b", "...b", false); } COM: <s> three dots is a file or directory name </s>
funcom_train/1028708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSPNoParams() throws Exception { if (versionMeetsMinimum(5, 0)) { CallableStatement storedProc = null; try { this.stmt .executeUpdate("DROP PROCEDURE IF EXISTS testSPNoParams"); this.stmt.executeUpdate("CREATE PROCEDURE testSPNoParams()\n" + "BEGIN\n" + "SELECT 1;\n" + "end\n"); storedProc = this.conn.prepareCall("{call testSPNoParams()}"); storedProc.execute(); } finally { this.stmt .executeUpdate("DROP PROCEDURE IF EXISTS testSPNoParams"); } } } COM: <s> tests parsing execution of stored procedures with no parameters </s>
funcom_train/49200628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRelativeAdditionalFilePathsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Player_relativeAdditionalFilePaths_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Player_relativeAdditionalFilePaths_feature", "_UI_Player_type"), TransformedPackage.Literals.PLAYER__RELATIVE_ADDITIONAL_FILE_PATHS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the relative additional file paths feature </s>
funcom_train/20534355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(MyVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/44079939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getCellBounds(Object[] cells) { if (cells != null && cells.length > 0) { Rectangle2D ret = GraphConstants.createRect(getCellBounds(cells[0])); for (int i = 1; i < cells.length; i++) { Rectangle2D r = getCellBounds(cells[i]); Rectangle2D.union(ret, r, ret); } return ret; } return null; } COM: <s> returns the bounding rectangle of the specified cells </s>
funcom_train/34340218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCantidad5() { if (cantidad5 == null) {//GEN-END:|43-getter|0|43-preInit // write pre-init user code here cantidad5 = new TextField("CANTIDAD", null, 6, TextField.ANY);//GEN-LINE:|43-getter|1|43-postInit // write post-init user code here }//GEN-BEGIN:|43-getter|2| return cantidad5; } COM: <s> returns an initiliazed instance of cantidad5 component </s>
funcom_train/5463183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule instantiate(BindingEnvironment env) { HashMap<Variable, Value> vmap = new HashMap<Variable, Value>(); return new Rule(name, cloneClauseArray(head, vmap, env), cloneClauseArray(body, vmap, env)); } COM: <s> instantiate a rule given a variable binding environment </s>
funcom_train/14089333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replaceTOC() { java.util.regex.Matcher m = Constants.Tags.regexToc.matcher(content); if (m.find()) { // Replace TOC Heading String s = toc.toString().replace(Constants.Placeholder.toc, (m.group(1) != null && m.group(1).length() > 0 ? m.group(1) : ConstantTexts.toc)); content.replace(m.start(), m.end(), s); } } COM: <s> inserts the toc only once </s>
funcom_train/46625905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameter () throws BuildException { if (name == null || name.equals("")) { throw new BuildException ("No name specified for custom tag."); } if (description != null) { return name + ":" + (enabled ? "" : "X") + scope + ":" + description; } else { return name; } } COM: <s> returns the tag parameter this argument represented </s>
funcom_train/21087580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_SNI_Element_date_feature"), getString("_UI_SNI_Element_date_description"), SNI_Package.Literals.SNI_ELEMENT__DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_ElementPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the date feature </s>
funcom_train/190297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyHeaderMask(ByteBuffer buffer) { // de/re-obfuscate the header byte[] headerMask = _format.HEADER_MASK; for(int idx = 0; idx < headerMask.length; ++idx) { int pos = idx + _format.OFFSET_MASKED_HEADER; byte b = (byte)(buffer.get(pos) ^ headerMask[idx]); buffer.put(pos, b); } } COM: <s> applies the xor mask to the database header in the given buffer </s>
funcom_train/50095686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testNewSaturate_withHAdded() throws CDKException { // O=C([H])[C+]([H])[C-]([H])[H] SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IMolecule mol = sp.parseSmiles("O=C([H])[C+]([H])[C-]([H])[H]"); lpcheck.saturate(mol); Assert.assertEquals(2, mol.getConnectedLonePairsCount(mol.getAtom(0))); Assert.assertEquals(0, mol.getConnectedLonePairsCount(mol.getAtom(3))); Assert.assertEquals(1, mol.getConnectedLonePairsCount(mol.getAtom(5))); } COM: <s> a unit test for junit o c h c h c h h </s>
funcom_train/42180329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLanguage(String language) { if (!language.equals(this.language)) { String oldLanguage = this.language; this.language = language; Locale.setDefault(new Locale(language, Locale.getDefault().getCountry())); this.propertyChangeSupport.firePropertyChange(Property.LANGUAGE.toString(), oldLanguage, language); } } COM: <s> sets the preferred language to display information changes current default locale accordingly </s>
funcom_train/7269776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long seekLocation(long value) { if( !(playerState == UNKNOWN || playerState == STOPPED) ) { if( playerState == PAUSED || playerState == SEEKING_PAUSED ) playerState = SEEKING_PAUSED; else playerState = SEEKING_PLAY; synchronized (seekLock) { seekValue = value; } notifyEvent(SEEKING,value); } return value; } COM: <s> seeks to a new location in the current song </s>
funcom_train/3292196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToCache(MMObjectNode node) { Integer rnumber=(Integer)node.getValue("number"); relCache.put(node.getStringValue("sname"),rnumber); relCache.put(node.getStringValue("sname")+"/"+node.getStringValue("dname"),rnumber); } COM: <s> puts a role in the reldef cache </s>
funcom_train/48145854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFreeChart getYIntervalChart(String title, String xLabel, String yLabel, JTable table, int numberOfSeries, int[][] pairs, String other){ dataTable = table; columnModel = dataTable.getColumnModel(); no_series = numberOfSeries; setOtherCondition(other); setArrayFromTable(numberOfSeries, pairs); IntervalXYDataset dataset = createIntervalXYDataset(); JFreeChart chart = createYIntervalChart(title, xLabel, yLabel, dataset); return chart; } COM: <s> given xy data this method will generate a yinterval chart </s>
funcom_train/7511682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemDefectClasses() { if (jMenuItemDefectClasses == null) { jMenuItemDefectClasses = new JMenuItem(); jMenuItemDefectClasses.setMnemonic(KeyEvent.VK_UNDEFINED); jMenuItemDefectClasses.setText(Messages.getString("MainFrame.menu.defectClasses")); //$NON-NLS-1$ registerAction(jMenuItemDefectClasses, Actions.DEFECT_CLASSES); } return jMenuItemDefectClasses; } COM: <s> this method initializes j menu item defect classes </s>
funcom_train/2450380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableComparisonOperators() { enableOperator(new EqualsOperator(operations)); enableOperator(new NotEqualsOperator(operations)); enableOperator(new LessThanOperator(operations)); enableOperator(new LessThanEqualsOperator(operations)); enableOperator(new GreaterThanOperator(operations)); enableOperator(new GreaterThanEqualsOperator(operations)); } COM: <s> convenience function which enables operators </s>
funcom_train/4205313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeTrim(Rectangle area, Scrollable scrollable, int currentWidth) { int trim; if (currentWidth > 1) { trim = currentWidth - scrollable.getClientArea().width; } else { // initially, the table has no extend and no client area - use the // border with // plus some padding as educated guess trim = 2 * scrollable.getBorderWidth() + 1; } return trim; } COM: <s> compute the area required for trim </s>
funcom_train/856764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String trim(String s){ switch (s.substring(s.length() - 1, s.length())) { case "/": s = s.substring(0, s.length() - 1); break; case "\\": s = s.substring(0, s.length() - 1); break; } return s; } COM: <s> trim removes trailing slashes or </s>
funcom_train/33312427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { if( _rec != null ) { // If multi-line description, then only return the first line String description = _rec.getDescription(); if( description.indexOf( '\n' ) >= 0 ) { description = description.substring( 0, description.indexOf( '\n' ) ); } return description; } return super.getText(); } COM: <s> if the record is set then return its description </s>
funcom_train/11008181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContentTypeValidation() throws InvalidFormatException { String[] contentTypesToTest = new String[] { "text/xml", "application/pgp-key", "application/vnd.hp-PCLXL", "application/vnd.lotus-1-2-3" }; for (int i = 0; i < contentTypesToTest.length; ++i) { new ContentType(contentTypesToTest[i]); } } COM: <s> check rule m1 </s>
funcom_train/10532377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean needsGui() { BeanContextChild bcc = getPeer(); if (bcc != this && bcc instanceof Visibility) { return ((Visibility) bcc).needsGui(); } // check children for (Object o : _children.keySet()) { if (o instanceof Visibility) { if (((Visibility) o).needsGui()) { return true; } } } return false; } COM: <s> determines whether this bean needs a gui </s>
funcom_train/20989025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editStream() { if(getTabel().isTHSelected()) { //If its currently recording -> show waring if(table.getSelectedStream().getStatus()) { JOptionPane.showMessageDialog(getMe() ,trans.getString("noEditRecord")); } new Gui_StreamOptions(table.getSelectedStream(), getMe(), false, true,false); } else { JOptionPane.showMessageDialog(getMe() ,trans.getString("select")); } } COM: <s> edit selcted stream </s>
funcom_train/45076684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addProfile() { profile_vec.addElement(user); // cat.debug("name: "+user.getUserName()+", email: "+user.getUserId()+", passwd: "+user.getPassword()); user = new User(); } COM: <s> add the user profile </s>
funcom_train/15637305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeSection(ETest et, Section s) { boolean b; System.out.println("rS in EE"); try{ b = et.getSections().remove(s); } catch(Exception e){ return e.getMessage(); } if (!b){ return ""; } return null; } COM: <s> removes a section from a given test </s>
funcom_train/32137834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MenuManager createFakeHelpMenu() { LogManager.logDebug("Start createFakeHelpMenu:", this); MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Help"), IWorkbenchActionConstants.M_HELP); menu.setVisible(false); LogManager.logDebug("End createFakeHelpMenu:", this); return menu; } COM: <s> creates the help menu different from the standard eclipe edition </s>
funcom_train/11673193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addANewTab(String name, JComponent component, Icon icon) { super.insertTab(name, icon, component, null, getTabCount()); super.fireStateChanged(); if (!"chainsaw-log".equals(name)) { EventQueue.invokeLater(new Runnable() { public void run() { setSelectedTab(getTabCount() - 1); } }); } } COM: <s> our custom implementation of inserting a new tab </s>
funcom_train/41163450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoGroupFormat entity) { EntityManagerHelper.log("saving CoGroupFormat 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 co group format entity </s>
funcom_train/21612164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testComplexParsing() throws MUParserException { ParseTree pt = parser.parse("D(x,y) : a=1, b=2, r=P1(x,a), P2(y,r,b);"); System.out.println("pt: " + pt); } COM: <s> tests a complex parsing expression </s>
funcom_train/50139991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkpoint() throws PersistenceException { try { log.debug("Checkpointing..."); if (transaction != null) { transaction.checkpoint(); } log.debug("Done. Checkpoint."); } catch (TransactionException e) { throw new PersistenceException("Checkpoint error.", e); } } COM: <s> call this for making all actions since the last checkpoint begin </s>
funcom_train/33368227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeWriter(int writerID) throws SQLException { dbm.exec("delete from ACLWriters where aclID = '" + getID() + "' and writerID = '" + writerID + "'"); if (isOwner(writerID)) { removeOwner(writerID); addReader(writerID); } } COM: <s> removes the specified group or user from the write list </s>
funcom_train/51830090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSuitcaseButton() { if (suitcaseButton == null) { suitcaseButton = new JButton(); suitcaseButton.setText(localization .getProperty("loc-RemoteControlTab-suitcaseButton")); suitcaseButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { suitcase.start(); } }); } return suitcaseButton; } COM: <s> this method initializes suitcase button </s>
funcom_train/22548830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countConnectionsWithNMessages(int messageThreshold) { int count = 0; int msgs; // Count the messages on initialized connections for(ManagedConnection c : getInitializedConnections()) { msgs = c.getNumMessagesSent(); msgs += c.getNumMessagesReceived(); if ( msgs > messageThreshold ) count++; } return count; } COM: <s> count how many connections have already received n messages </s>
funcom_train/24513597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findWholeWords(int start) { while( (start > 0) && ((!isSeparator(searchText.charAt(start-1))) || (!isSeparator(searchText.charAt(start + phrase.length()))))) { lastPos = start; start = findNext(); } return start; } COM: <s> find the next whole word occurrence of the searched phrase from </s>
funcom_train/8405436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Collection convertToCollection(Class type, Object value) { if (value instanceof Collection) { return (Collection)value; } if (value instanceof Number || value instanceof Boolean || value instanceof java.util.Date) { List list = new ArrayList(1); list.add(value); return list; } return parseElements(type, value.toString()); } COM: <s> converts non array values to a collection prior </s>
funcom_train/16915280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean groupHasChanged() { NeuronGroup group = getCurrentNeuronGroup(); boolean groupHasChanged; if (type == WindowType.Input) { groupHasChanged = (group != trainer.getInputLayer()); } else { groupHasChanged = (group != trainer.getOutputLayer()); } return groupHasChanged; } COM: <s> compares the current object in the group selection box with the </s>
funcom_train/42472863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeSockets() { if (udpConnection != null) { try { udpConnection.close(); } catch (IOException e) { e.printStackTrace(); } } if (secureConnection != null) { try { secureConnection.close(); } catch (IOException e) { e.printStackTrace(); } } } COM: <s> close all open connections </s>
funcom_train/3313009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getValues( VideoData data ){ data.setTitle(title.getText()); data.setFormat(format.getText()); data.setSubtitle(subtitle.getText()); data.setDescription(description.getText()); SimpleDateFormat f=new SimpleDateFormat("H:m"); String s=hrs.getValue()+":"+min.getValue(); try{ data.setLength(f.parse(s)); }catch(ParseException pe){ // won't happen } } COM: <s> fills the current values in this dialog into the data </s>
funcom_train/34673758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHTMLRequest() throws Exception{ // get html form String form = requestWSRPForm(registrationHandle, urlNxt, htmlContentType, productToRequest); boolean successProduct = form.contains(productContentTest); boolean successMime = form.contains(htmlContentType); assertTrue("\""+productContentTest+"\" Form content missing", successProduct); assertTrue("Mime type not "+htmlContentType, successMime); } COM: <s> test the html mime type form request </s>
funcom_train/31013484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pushFlowElement(Subflow aSubflow, HttpSession aSession) throws Exception { if (aSubflow.getLink() != null) { Linkable flowElement = aSubflow.getLink().getLinkElement(); if (flowElement != null) { Stack flowStack = (Stack) aSession.getAttribute(FLOW_STACK); if (flowStack == null) { flowStack = new Stack(); aSession.setAttribute(FLOW_STACK, flowStack); } flowStack.push(flowElement); } } } COM: <s> push flow element that comes after finishing the subflow </s>
funcom_train/33281954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTMLCollection jsxGet_all() { if (all_ == null) { all_ = new HTMLCollectionTags(getDomNodeOrDie(), "HTMLDocument.all") { @Override protected boolean isMatching(final DomNode node) { return true; } }; all_.setAvoidObjectDetection( !getBrowserVersion().hasFeature(BrowserVersionFeatures.HTMLCOLLECTION_OBJECT_DETECTION)); } return all_; } COM: <s> returns the value of the all property </s>
funcom_train/43903457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getOptionalBoolean(final String name) { final String value = getOptionalString(name); if (value != null) { if (value.equalsIgnoreCase("true")) { return Boolean.TRUE; } if (value.equalsIgnoreCase("false")) { return Boolean.FALSE; } illegalArgument(new IllegalArgumentException(value)); } return null; } COM: <s> returns an optional boolean value from the command line </s>
funcom_train/18593061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMnemonic(Action action) { action.putValue(Action.NAME, text); if (keycode != KeyEvent.VK_UNDEFINED) action.putValue(Action.MNEMONIC_KEY, new Integer(keycode)); // Don't think buttons listen for mnemonic index changes anyway... //if (index != -1) //action.putValue(Action.MNEMONIC_INDEX, new Integer(index)); } COM: <s> apply this mnemonic to the given action </s>
funcom_train/28312952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(TrackRule otherRule) { int comp = otherRule.getCategory().compareTo(getCategory()); if (comp != 0) { return -comp; } long dPrice = this.properties.getPrice().getAmount() - otherRule.getPrice().getAmount(); return (int) dPrice; } COM: <s> if the specified object is a track rule comparison is by category then </s>
funcom_train/10267081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeYAWLService(String serviceURI, String sessionHandle) throws IOException { Map queryMap = new HashMap(); queryMap.put("sessionHandle", sessionHandle); queryMap.put("action", "removeYAWLService"); queryMap.put("serviceURI", serviceURI); return executePost(_backEndURIStr, queryMap); } COM: <s> removes a yawl service from the engine </s>
funcom_train/28151658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimTuple getTuple() throws ErrorAPI { if (tuples.size()>0) return tuples.get(0); if (min>=max) throw new ErrorAPI("This tupleset is empty"); SimAtom a = SimAtom.make(min); if (next) return SimTuple.make(a, SimAtom.make(min+1)); else return SimTuple.make(a); } COM: <s> returns an arbitrary tuple </s>
funcom_train/3423812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPrefix(int index) { if (index < 0 || index >= fLength) { return null; } String prefix = fAttributes[index].name.prefix; // REVISIT: The empty string is not entered in the symbol table! return prefix != null ? prefix : ""; } // getPrefix(int):String COM: <s> returns the prefix of the attribute at the specified index </s>
funcom_train/47135664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStopLossPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Position_stopLoss_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Position_stopLoss_feature", "_UI_Position_type"), TradingPackage.Literals.POSITION__STOP_LOSS, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the stop loss feature </s>
funcom_train/51299705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResultSet getSoldGoodsResultSet(int skuId, boolean delete) { String sql = "SELECT id, count, sold_count FROM storage_in " + "WHERE sku_id = " + skuId + " ORDER BY id" + (delete ? " DESC" : ""); try { return DBAccessor.getInstance().makeSelect(sql); } catch (SQLException e) { e.printStackTrace(); return null; } } COM: <s> returns result set of sql query providing sold items info </s>
funcom_train/49870163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopMatchRecording() { _matchRunning = false; try { synchronized (_dbLock) { Statement stat = _connection.createStatement(); stat.executeUpdate("UPDATE Match SET end_time = " + System.currentTimeMillis() + " WHERE id = " + _currentMatchDB + ""); stat.close(); System.out.println("Stopped match"); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> stop a match recording </s>
funcom_train/29805275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence getMessage(final int index) throws IOException { long position = getMessagePosition(index); long size; if (index < messagePositions.length - 1) { size = messagePositions[index + 1] - position; } else { size = getChannel().size() - position; } return decoder.decode(getChannel().map(FileChannel.MapMode.READ_ONLY, position, size)); } COM: <s> returns a char sequence containing the data for </s>
funcom_train/7232874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleDisconnect(Figure start, Figure end) { //remove the arc object from the nets it might be part of. if (this.arc != null) { this.placeToConnectToWhenRecreatedInSubnet = this.arc.getPlace(); //in case we cancel disconnect this.netDrawing.getNet().remove (this.arc); //null after synchronization this.arc.release(); this.arc = null; } this.setAttribute("ArcType", new Integer(CPNArcFigure.UNDEFINED_ARC)); } COM: <s> handles the disconnection of a connection </s>
funcom_train/43143634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUpdateScript(DbType dbType) { NodeList rootNode = (NodeList) read("/unikey/update/db", XPathConstants.NODESET); String nodeValue = getNodeValue(rootNode, dbType.getName()); if (nodeValue == null) { throw new UnsupportedDbException(dbType.getName() + " is not supported."); } return nodeValue; } COM: <s> to retrive the sql script for inserting records in to the table </s>
funcom_train/9492069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void declareRule(int aPrecedence, ConsPointer aPredicate, ConsPointer aBody) throws Exception { // New branching rule. RuleBranch newRule = new RuleBranch(aPrecedence, aPredicate, aBody); LispError.check(newRule != null, LispError.CREATING_RULE); insertRule(aPrecedence, newRule); } COM: <s> add a rule branch to the list of rules </s>
funcom_train/25801074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAmbientColor() { this.tempColor[0] = this.light.getDiffuse().r; this.tempColor[1] = this.light.getDiffuse().g; this.tempColor[2] = this.light.getDiffuse().b; this.tempColor[3] = 1; this.setColor(this.tempAmbient); this.light.setAmbient(this.tempAmbient); this.state.setGlobalAmbient(this.tempAmbient); } COM: <s> update the ambient light color based on the sunlight and moonlight colors </s>
funcom_train/50091591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testToString() { ISingleElectron radical = (ISingleElectron)newChemObject(); String description = radical.toString(); for (int i=0; i< description.length(); i++) { Assert.assertTrue(description.charAt(i) != '\n'); Assert.assertTrue(description.charAt(i) != '\r'); } } COM: <s> test for rfc 9 </s>
funcom_train/42262759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void catchOutBall(int robotNumber) { double a = turnToBall(robotNumber); Point2d ballPosition = Camera.getInstance().getBallPosition(); if (isTurnedToAngle(robotNumber, a, 0.2)) { robot[robotNumber-firstRobot].setNewTarget(ballPosition, 0); } else keepPosition(robotNumber); } COM: <s> moves robot to catch ball which is out of play </s>
funcom_train/11655695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(SampleResult res) { model.addSample(res); try { collector.recordStats(this.model.getLastSample().cloneMonitorStats()); } catch (Exception e) { // for now just swallow the exception log.debug("StatsModel was null", e); } } COM: <s> because of the unique requirements of a monitor we have to handle the </s>
funcom_train/1505816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection(String db, String user, String passwd) { try{ connection = DriverManager.getConnection("jdbc:odbc:"+db, user, passwd); statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); }catch (SQLException se){System.out.println("Failed to connect");} return connection; } COM: <s> will return a connection object or null otherwise </s>
funcom_train/10099729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeResources(IResource[] resources) throws CoreException { for (int i = 0; i < resources.length; i++) { if (resources[i] instanceof IFile) removeIFileFromDSE((IFile) resources[i]); if (resources[i] instanceof IFolder) removeResources(((IFolder) resources[i]).members()); } } COM: <s> removes the provided resources from the data source explorer </s>
funcom_train/34040040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComp(Comparator<E> comp) { this.comp = comp; if (comp != null) Collections.sort(v, comp); final int s = getSize(); if (!SwingUtilities.isEventDispatchThread()) SwingUtilities.invokeLater(new Runnable() { @SuppressWarnings("synthetic-access") public void run() { fireIntervalRemoved(this, 0, s); } }); else fireIntervalRemoved(this, 0, s); } COM: <s> sets the comparator for the list and sorts </s>
funcom_train/41848622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MwImpl () { if (Common.DEBUG) CfgLogging.logEvent(CfgLogging.LOG_MCALL, "MW_Core", CfgLogging.SEV_DEBUG, "MwImpl()"); /*NOTE: Not used //Add a shutdown hook to be able to have a controlled shutdown (will call 'run()' at exit) Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { stopMiddleware(); } }); */ } COM: <s> constructor initiate local variables </s>
funcom_train/25637139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Content getNavLinkPrevious() { if (prev == null) { return getNavLinkPrevious(null); } else { String path = DirectoryManager.getRelativePath(packagedoc.name(), prev.name()); return getNavLinkPrevious(path + "package-tree.html"); } } COM: <s> get link for the previous package tree file </s>
funcom_train/46336314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUnMappedParams() { System.out.println("getUnMappedParams"); PlsqlCall instance = new PlsqlCall(); List<PlsqlCallParameter> expResult = new ArrayList<PlsqlCallParameter>(); List<PlsqlCallParameter> result = instance.getUnMappedParams(); assertEquals(expResult, result); } COM: <s> test of get un mapped params method of class plsql call </s>
funcom_train/2621233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Long getCurrentUserId() { String currentUserName = SecurityContextHolder.getContext().getAuthentication().getName(); SimpleUserFilter filter = new SimpleUserFilter(); filter.setUniqueId(currentUserName); FilterResults<Match> results = userDao.findFiltered(filter, null, null, null); if ( results.getReturnedResultCount() < 1 ) { return null; } return results.getResults().iterator().next().getId(); } COM: <s> get the id of the acting user </s>
funcom_train/37019900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void firePreferenceChange(String key, String newValue) { PreferenceChangeEvent event = new PreferenceChangeEvent(this, key, newValue); Iterator listenerIter = listeners.iterator(); while (listenerIter.hasNext()) { PreferenceChangeListener listener = (PreferenceChangeListener) listenerIter.next(); listener.preferenceChange(event); } } COM: <s> sends a preference change event to all listeners </s>
funcom_train/38868685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void toLongString() { DateTime dateTime = new DateTime(2005, 3, 1, 0, 0, 5); String dateFormatString = dateTime.toLongString(); String expectedDateFormatString = "March 1, 2005 12:00:05 AM GMT"; Assert.assertEquals(expectedDateFormatString, dateFormatString); } COM: <s> tests to long string method of date time class </s>
funcom_train/7524239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fetchState(long timeout) throws ChannelClosedException, ChannelNotConnectedException { boolean rc=channel.getState(null, timeout); if(log.isInfoEnabled()) { if(rc) log.info("state was retrieved successfully"); else log.info("state could not be retrieved (first member)"); } } COM: <s> fetch the group state from the current coordinator </s>
funcom_train/48403963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDragRepositionStopHandler(com.smartgwt.client.widgets.events.DragRepositionStopHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DragRepositionStopEvent.getType()) == 0) setupDragRepositionStopEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DragRepositionStopEvent.getType()); } COM: <s> add a drag reposition stop handler </s>
funcom_train/1437296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTickLabelFontColor(String cssColor) { chartDecorationsChanged = true; Curve c = getSystemCurve(ticksId); int nPoints = c.getNPoints(); for (int i = 0; i < nPoints; i++) c.getPoint(i).setAnnotationFontColor(cssColor); tickLabelFontColor = cssColor; } COM: <s> specifies the color of the font used to render tick labels </s>
funcom_train/48646194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getKernelTextArea() { if (kernelTextArea == null) { kernelTextArea = new JTextArea(); kernelTextArea .setText("-1 -1 -1 -1 -1\n-1 -1 -1 -1 -1\n-1 -1 24 -1 -1\n-1 -1 -1 -1 -1\n-1 -1 -1 -1 -1"); kernelTextArea.setEditable(false); } return kernelTextArea; } COM: <s> this method initializes kernel text area </s>
funcom_train/2853938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Holder () { super (); nodes = new NodeList(); // might want to be lazy nodes.setHolder(this); // SILLY OVERKILL // ns2pf = new HashMap(); // namespace --> prefix map pf2ns = new HashMap(); // prefix --> namespace map nsUris = new ArrayList(); cycleChecker = new CycleChecker(); docSetter = new DocSetter(); } COM: <s> create a holder associated data structures and a pair of </s>
funcom_train/19402625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long hash( final long[] a, final int l, final int k ) { final int[] w = weight[ k ]; long h = init[ k ]; int i = l; while( i-- != 0 ) h ^= ( h << 5 ) + a[ i ] * w[ i % NUMBER_OF_WEIGHTS ] + ( h >>> 2 ); return ( h & 0x7FFFFFFFFFFFFFFFL ) % m; } COM: <s> hashes the given long array with the given hash function </s>
funcom_train/29272099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long updateCard(long rowId, String category, String front, String back) { ContentValues updateValues = new ContentValues(); updateValues.put(KEY_CATEGORY, category); updateValues.put(KEY_FRONT, front); updateValues.put(KEY_BACK, back); return mDb.update(CARD_TABLE, updateValues, KEY_ROWID + " = " + rowId, null); } COM: <s> updates a card </s>
funcom_train/47116942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFieldsFrom(IsoMessage src, int...idx) { for (int i : idx) { IsoValue<Object> v = src.getField(i); if (v != null) { setValue(i, v.getValue(), v.getEncoder(), v.getType(), v.getLength()); } } } COM: <s> copies the specified fields from the other message into the recipient </s>
funcom_train/51115848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String submit(WebRequest request) { String message = null; try { WebResponse r = conversation.getResponse(request); message = r.getDOM().toString(); } catch (Exception e) { Logger.error( "SMSMessage.submit: failed to send " + e ); } return message; } COM: <s> submits the request to the sms service provider </s>
funcom_train/1382319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlPlanningGiornaliero1() { if (pnlPlanningGiornaliero1 == null) { try { pnlPlanningGiornaliero1 = new JPanel(); pnlPlanningGiornaliero1.setLayout(new BorderLayout()); // Generated pnlPlanningGiornaliero1.add(getJScrollPane(), BorderLayout.CENTER); } catch (java.lang.Throwable e) { // TODO: Something } } return pnlPlanningGiornaliero1; } COM: <s> this method initializes pnl planning giornaliero1 </s>
funcom_train/33671002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BHighlight createHighlight(String name, Object action, int x, int y, int flags) { BHighlight h; if ((flags & FLAG_DISABLED) != 0) { h = new BDisabledHighlight(name, action, x, y); } else { h = new BHighlightPlus(name, action, x, y); } return h; } COM: <s> create a highlight with the given info </s>
funcom_train/26024625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putRectangleProperty(String name, String key, Rectangle rect) { Properties props = getProperties(name); if (props != null && rect != null) { props.put(key + ".x", String.valueOf(rect.x)); props.put(key + ".y", String.valueOf(rect.y)); props.put(key + ".width", String.valueOf(rect.width)); props.put(key + ".height", String.valueOf(rect.height)); } } COM: <s> puts the rectangle as 4 entries for the code key code property plus </s>
funcom_train/26401286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginLogoff(org.apache.cactus.WebRequest request) throws Exception { WebConversation wc = new WebConversation(); // first we login WebResponse resp = loginPage(wc, request, "index.jsp", true); copyCookies(resp, request); // and now we log off again... logoffPage(wc, request, "index.jsp"); copyCookies(resp, request); } COM: <s> logoff from bug base using httpunit </s>
funcom_train/39167807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getMinors() { Set result = new HashSet(); for ( int i = 0 ; i < nodes.size() ; i++ ) { String min = ((LinearNode)nodes.get(i)).getMinorType(); if (null!=min) result.add(min); } result.add(""); return result; } // getMinors() COM: <s> gets the set of all minor types in this definition </s>
funcom_train/28983715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackDigestTest () { if (backDigestTest == null) {//GEN-END:|126-getter|0|126-preInit // write pre-init user code here backDigestTest = new Command ("Back", Command.BACK, 0);//GEN-LINE:|126-getter|1|126-postInit // write post-init user code here }//GEN-BEGIN:|126-getter|2| return backDigestTest; } COM: <s> returns an initiliazed instance of back digest test component </s>
funcom_train/40866392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compare(CreditCard c1, CreditCard c2) { if(c1.isDefaultCreditCard() || c2.isDefaultCreditCard()) { return c1.isDefaultCreditCard() ? -1 : 1; } // if neither is default, just pick based on id return c1.getId().compareTo(c2.getId()); } COM: <s> compares the two credit cards sorting a default credit card to </s>
funcom_train/49687253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFieldOfPsiClass(PsiClass psiClass, String[] path) { PsiClass referenceClass = psiClass; for (String item : path) { referenceClass = FieldAccessMethodReferenceProvider.findGetterMethodReturnType(referenceClass, "get" + StringUtil.capitalize(item)); if (referenceClass == null) return false; } return true; } COM: <s> validate the psi class contains sub field </s>
funcom_train/30008270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void regStringChanged(RegWizardEventArgs e){ if(e.getExpressionState() == RegWizardEventArgs.RegStringState.inValid) // The regular expression is invalid // so tell the user. this.lblStatus.setText( this.regWizard.getParser().getErrorDescription() + " at index: " + this.regWizard.getParser().getErrorIndex()); else this.lblStatus.setText("ok"); } COM: <s> fires when the regular expression object changes state </s>
funcom_train/21217755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadApplicationClasses() throws Exception { if(getApplicationJarPath()!=null && getClassLoader()==null) { setClassLoader( ClassUtil.getClassLoader(getApplicationJarPath())); //update qsadmin to use the same if(adminServer!=null) { adminServer.getServer().setClassLoader(getClassLoader()); } } } COM: <s> if application jar path was set load the jars </s>
funcom_train/18042785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendInvitations(final String room, final List<String> jids, final String message) { if (this.chatList.containsKey(room)) { final MultiUserChat muc = this.chatList.get(room); for (final String listJid : jids) { muc.invite(listJid, message); } } } COM: <s> this method is used to send invitations to users </s>
funcom_train/43902591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTransform() throws TransformException { double[] dst = new double[6]; new NewZealandMapGrid().transform(GEOGRAPHIC, 0, dst, 0, 3); for (int i = 0; i < PROJECTED.length; i++) { assertEquals(PROJECTED[i], dst[i], 0.1); // 10 cm precision } } COM: <s> computes the forward transform and compares against the expected result </s>
funcom_train/13646752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean executeScript( Connection connection, File resource ){ InputStream is = null; try{ is = new FileInputStream( resource ); return( this.executeScript( connection, is )); } catch( Exception e ){ this.logger.severe( e.getMessage() ); return( false ); } finally{ try{ is.close(); } catch( Exception ignore ){ //nop } } } COM: <s> executes a sql script to make changes to the database </s>