__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45770733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTokenString() throws FormulaParsingException { if(!isAlpha(look) && look!='$') throw new FormulaParsingException("Expected Cell Reference" + makeErrorString()); else { String cell = new String(); boolean status; do { cell += look; status = getChar(); } while(isCellRefChar(look) && status); skipWhite(); return cell; } } COM: <s> keeps pulling characters from the statement until we get an </s>
funcom_train/48728665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(PersistentImage image) { try { //TODO: Almacenar aqui en un archivo de texto Session session = HibernateUtil.currentSession(); Transaction tx = session.beginTransaction(); session.save(image); image.loadPersistentFeatures(); Set feat = image.getPersistentFeatures(); Iterator it = feat.iterator(); while(it.hasNext()) { PersistentFeature pf = (PersistentFeature)it.next(); session.save(pf); } tx.commit(); session.flush(); session.clear(); image.freePersistentFeatures(); } catch (HibernateException e) { e.printStackTrace(); } } COM: <s> storing procedure for images </s>
funcom_train/42709687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getRepetirCommand() { if (repetirCommand == null) {//GEN-END:|72-getter|0|72-preInit // write pre-init user code here repetirCommand = new Command("Repetir", Command.ITEM, 0);//GEN-LINE:|72-getter|1|72-postInit // write post-init user code here }//GEN-BEGIN:|72-getter|2| return repetirCommand; } COM: <s> returns an initiliazed instance of repetir command component </s>
funcom_train/4713999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String chooseFile(int dlgType) { FileDialog dlg = new FileDialog(getShell(), dlgType); dlg.setFilterNames(new String [] {"Task Files (*.dat)", "All Files (*.*)"}); dlg.setFilterExtensions(new String [] { "*.dat", "*.*"}); if(taskFile != null) dlg.setFileName(taskFile.getPath()); return dlg.open(); } COM: <s> prompts the user to select a file </s>
funcom_train/3143568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWtkHomePath() throws BuildException { String result = project.getProperty("wtk.home"); if (result == null) { throw new BuildException("Property wtk.home needs to point to Wireless Toolkit"); } if (!new File(result).exists()) { throw new BuildException("Property wtk.home points to non-existing directory"); } return result; } COM: <s> returns the wireless toolkit base path </s>
funcom_train/46980413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object buildAssociation(Object c1, boolean nav1, Object c2, boolean nav2, String name) { MAssociation assoc = buildAssociation((MClassifier)c1, nav1, MAggregationKind.NONE, (MClassifier)c2, nav2, MAggregationKind.NONE); if (assoc != null) assoc.setName(name); return assoc; } COM: <s> builds a binary association with a direction aggregation </s>
funcom_train/44539667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelectedIndex( Object component ) { String classname = getClass( component ); if ( classname == "tabbedpane" || classname == "combobox" ) { return getInteger( component, "selected" ); } Object item = get( component, ":comp" ); for ( int i = 0; item != null; i++ ) { if ( getBoolean( item, "selected", false ) ) { return i; } item = get( item, ":next" ); } return -1; } COM: <s> gets the index of the first selected item in the given component </s>
funcom_train/5165906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCommandOfClass(int a_chromosomeNum, Class a_class) { for (int i = a_chromosomeNum; i < m_chromosomes.length; i++) { int j = m_chromosomes[i].getCommandOfClass(0, a_class); if (j >= 0) { return j; } } return -1; } COM: <s> searches for a chromosome that has the given class and returns its index </s>
funcom_train/31690087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getHREFValue(Element hrefParentEl) { String sVal = null; Element hrefEl = XMLUtils.getFirstNamedChild(hrefParentEl, HarmonisePropertiesManager.TAG_HREF); if(hrefEl != null && hrefEl.getChildNodes().getLength() > 0) { sVal = hrefEl.getFirstChild().getNodeValue(); } return sVal; } COM: <s> returns the value contained in the href element </s>
funcom_train/11643850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearShort() { assertEquals(bf_multi.clearShort((short) - 1), (short) 0xC07F); assertEquals(bf_single.clearShort((short) - 1), (short) 0xBFFF); assertEquals(bf_zero.clearShort((short) -1), (short) 0xFFFF); } COM: <s> test the clear short method </s>
funcom_train/24523720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initPuzzle() { String[] parameters = null; if(this.parameters.length() != 0) { //Remove the trailing ',' from the parameters. this.parameters = this.parameters.substring(0, this.parameters.length() - 1); //Split the parameters into an array. parameters = this.parameters.split(","); } else { //We create an empty array. parameters = new String[0]; } //Finally initialise the puzzle. puzzle.initPuzzle(parameters); } COM: <s> this method initialises the puzzle </s>
funcom_train/29376061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getAttributes() { Properties result = new Properties(); Enumeration e = this.attributes.elements(); while (e.hasMoreElements()) { XMLAttribute attr = (XMLAttribute) e.nextElement(); result.put(attr.getFullName(), attr.getValue()); } return result; } COM: <s> returns all attributes as a properties object </s>
funcom_train/44343036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean partialContract(CG G1, Concept E1, Object bindInf1, CG G2, Concept E2, Object bindInf2) { if (match(PARTIAL_SUBSUME, G1, E1, bindInf1, G2, E2, bindInf2) != null) { contract(bindInf1, G2, bindInf2); return true; } else return false; } COM: <s> unlike complete contract which checks first that g1 subsumes g2 </s>
funcom_train/11774401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newsim(){ if(isDirty){ try { System.out.println("WARNING. This will delete all object within the current simulation"); System.out.print("Are you sure you want to continue(y/N)?"); response = userInterface.readLine(); } catch (IOException e) { System.out.println("IO Exception encountered."); } if(response.equalsIgnoreCase("Y")){ sim.removeAllObjects(); System.out.println("New Simulation created\n"); isDirty = false; } }else{ System.out.println(); } } COM: <s> this method will clean out the current simulation object after asking the user </s>
funcom_train/14625775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFailedRetrieveUser() { HeraclesAuthenticationProvider acegi = new HeraclesAuthenticationProvider(); try { UsernamePasswordAuthenticationToken userNamePasswdAuthToken = new UsernamePasswordAuthenticationToken("heracles", ""); UserDetails user = acegi.retrieveUser("heracles", userNamePasswdAuthToken); fail("Here should be thrown a AuthenticationServiceException"); } catch (AuthenticationServiceException ex) { } } COM: <s> testing of the exception </s>
funcom_train/40674660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForError() throws IOException, ReportException { if (headerLine != null && headerLine.trim().startsWith("<?xml")) { StringBuffer xml = new StringBuffer(); String line = headerLine; while (line != null) { xml.append(line); line = getNextLine(); } throw ReportException.fromXml(xml.toString()); } } COM: <s> check for an error response in the header line </s>
funcom_train/43245375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAlternateSSN() { System.out.println("setAlternateSSN"); String alternateSSN = ""; PatientDemographicsDG2Object instance = new PatientDemographicsDG2Object(); instance.setAlternateSSN(alternateSSN); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set alternate ssn method of class org </s>
funcom_train/10948301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTempFileError() { String prefix = null; String suffix = ".out"; File tempDir = new File("."); try { new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir); fail("Expected IllegalArgumentException "); } catch (IllegalArgumentException e) { // expected } } COM: <s> test specifying a temporary file and the threshold is reached </s>
funcom_train/29937481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String normalise(String sig) { String ret = sig.replace('\b', ' '); ret = ret.replace('\t', ' '); ret = ret.replace('\n', ' '); ret = ret.replace('\f', ' '); ret = ret.replace('\r', ' '); while (ret.indexOf(" ") > -1) { ret = ret.replace(" ", " "); } return ret.trim(); } COM: <s> collapses all whitespace into a single space and removes leadint and </s>
funcom_train/44136577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyVidMediaSet(OSMElement elt) { for(int i = 0;i < m_ClientList.size();i++) { OSMElementEventListener lster = (OSMElementEventListener)m_ClientList.get(i); lster.onVidMediaSet(new OSMElementEvent(elt)); } } COM: <s> to notify the set of a video media </s>
funcom_train/7271303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shareProtect(boolean state) { String[] disabled = SharingSettings.getDefaultDisabledExtensions(); Set<String> totalDisabled = new HashSet<String>(); for( String item : disabled ) { totalDisabled.add(item); } for ( CheckBoxList<String> panel : this.panels.values() ) { panel.setItemsEnabled(totalDisabled, state); } this.refreshSidePanel(); } COM: <s> turn on or off sensitive file protection on the given subset of files </s>
funcom_train/21483774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPutFromConfigZeroMemoryStore() throws Exception { createMemoryStore(AbstractCacheTest.TEST_CONFIG_DIR + "ehcache-policy-test.xml", "sampleLFUCache2"); Element element = new Element("1", "value"); store.put(element); assertNull(store.get("1")); } COM: <s> tests the put by reading the config file </s>
funcom_train/10532836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddDuplicateService() { org.apache.beehive.controls.runtime.webcontext.ControlBeanContextServicesSupport cbcss = getContext(); TestBCServiceProviderImpl sp = new TestBCServiceProviderImpl(); assertTrue(cbcss.addService(TestService.class, sp)); assertTrue(cbcss.hasService(TestService.class)); assertFalse(cbcss.addService(TestService.class, sp)); } COM: <s> add a service which already exists in services support </s>
funcom_train/3990278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKregoslupPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_kregoslup_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_kregoslup_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__KREGOSLUP, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the kregoslup feature </s>
funcom_train/5471484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putProfile(String pname, String tag, String value) throws IOException { iniParagraph para = (iniParagraph)paragraphs.get (pname); if (para == null) { para = new iniParagraph(pname); paragraphs.put (pname, para); } para.addElement (tag, value); putParagraphs(fullpath); //rewrite entire ini-file } COM: <s> puts a profile entry into the ini file </s>
funcom_train/34320807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RBTuple extract(int[] toExtract, RBTuple from) { RBTerm[] extracted = new RBTerm[toExtract.length]; for (int i = 0; i < extracted.length; i++) { extracted[i] = from.getSubterm(toExtract[i]); } return FrontEnd.makeTuple(extracted); } COM: <s> extracts a subset of an rbtuple into a new rbtuple </s>
funcom_train/29914945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new AdminMainView(); // this one later //jContentPane = new AdminTabbedPane(); //jContentPane = new EditAdminsPanel(true); /* jContentPane.setLayout(new BorderLayout()); jContentPane.add(new JScrollPane(new AllCAInfoPanel()),BorderLayout.CENTER);*/ } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/32380429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddPrivilegeForFailure() { System.out.println("testAddPrivilegeForFailure"); ResourcePrivileges privilege = null; ResourcePrivilegeManager resPrivManager = new ResourcePrivilegeManager(); int expResult = IdentityMgmtConstants.ACTION_FAILED; int result = resPrivManager.addPrivilege(privilege); assertEquals(expResult, result); } COM: <s> test of add privilege method of class com </s>
funcom_train/50937788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid() { boolean list = getAttribute("list") != null; boolean value = getAttribute("value") != null; boolean pattern = getAttribute("pattern") != null; boolean valueof = getChild("value-of", FPLNodeFactory.fplNS) != null; return pattern ^ list ^ (value | valueof); // only one can be true, XOR } COM: <s> must have only one of value list or value of child </s>
funcom_train/8343382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void enableMenusByColumnCount() { if (theTable.getColumnCount() > 1) { removeThisColumn.setEnabled(true); for (int i = 0; i < subMenu.getMenuComponentCount(); i++) { subMenu.getMenuComponent(i).setEnabled(true); } } else { removeThisColumn.setEnabled(false); int modelIndex = theTable.getColumn(0).getModelIndex(); subMenu.getMenuComponent(modelIndex).setEnabled(false); } } COM: <s> set the popup menus current allowed functionality based on how many </s>
funcom_train/13848561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean filterPassFail(ServiceItem item, ServiceItemFilter filter){ if( (item == null) || (item.service == null) ) return false; if(filter == null) return true; boolean pass = filter.check(item); if( pass && (item.service != null) ) return true; return false; }//end filterPassFail COM: <s> applies the given code filter code to the given code item code </s>
funcom_train/19810780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String semanticCheck(Researcher researcher) { String errorMessage = ""; String id = toUniqueId(researcher.getOrganization()); if (id == null || !this.uniqueId.contains(id) || !this.uniqueIdOrganization.containsKey(id)) { errorMessage += "Researcher " + researcher.getName() + " does not have an valid Organization\n"; } return errorMessage; } COM: <s> check that the researcher should belong to an organization </s>
funcom_train/45828197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int bitIndex) { if (bitIndex < 0) throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); int wordIndex = wordIndex(bitIndex); expandTo(wordIndex); long word = this.getWord(wordIndex); // Handle last word word |= (1L << bitIndex); this.setWord(wordIndex, word); checkInvariants(); } COM: <s> sets the bit at the specified index to </s>
funcom_train/46837147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuAdjustItemForDate() { if (jMenuAdjustItemForDate == null) { jMenuAdjustItemForDate = new JMenuItem(); jMenuAdjustItemForDate.setText(EBIPGFactory.getLANG("EBI_LANG_ARRANGE_DOWN")); jMenuAdjustItemForDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateDesktopComponent(); orderWorkstationSymbol(true); } }); } return jMenuAdjustItemForDate; } COM: <s> this method initializes j menu adjust item for date </s>
funcom_train/22686892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComboBox addInput(String label, String name, Object defaultValue, Object[] choices, boolean customValue) { JComboBox cmbbox = new JComboBox(choices); cmbbox.setSelectedItem(defaultValue); cmbbox.setEditable(customValue); return addInput(label, name, cmbbox, false); } COM: <s> this will be represented with a combo box which is editable depending on </s>
funcom_train/17592497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readLine() throws IOException { String s; for (;;) { s = current.readLine(); if (s != null) return s; if (readerStack.isEmpty()) return null; current = (LineNumberReader) readerStack.remove(readerStack.size() - 1); } } COM: <s> read a line </s>
funcom_train/47021164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMoveUp() { if (moveUp == null) {//GEN-END:|117-getter|0|117-preInit // write pre-init user code here moveUp = new Command(getLocalizedString("up"), Command.ITEM, 10);//GEN-LINE:|117-getter|1|117-postInit // write post-init user code here }//GEN-BEGIN:|117-getter|2| return moveUp; } COM: <s> returns an initiliazed instance of move up component </s>
funcom_train/22527495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CCombo createCCombo(Composite parent, int comboStyle) { CCombo combo = new CCombo(parent, comboStyle); adapt(combo, true, false); // Bugzilla 145837 - workaround for no borders on Windows XP if (getBorderStyle() == SWT.BORDER) { combo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); } return combo; } COM: <s> creates a combo box as a part of the form </s>
funcom_train/14397965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List<UMLClass> getAllClasses(ClassFilter aFilter) { List<UMLClass> classes = new ArrayList<UMLClass>(); UMLFile thePackage = (UMLFile) this.getBufferInputFacade().getRootCategory(); getAllClasses(aFilter, classes, thePackage); return classes; } COM: <s> collects all the classes of a model uml buffer according to the filter </s>
funcom_train/50864176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Person determineResearcher() { Person result = null; Collection<Person> researchers = getBestResearchers(person); if (researchers.size() > 0) { int rand = RandomUtil.getRandomInt(researchers.size() - 1); result = (Person) researchers.toArray()[rand]; } return result; } COM: <s> determines a researcher to assist </s>
funcom_train/3122717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object removeProperty(String strPropertyName) { //// 1. Get the old value. Object oldVal = mapProperties.get(strPropertyName); //// 2. Return it. if (oldVal != null) { setPropertyRegression(true, strPropertyName, null); } return (oldVal); } // of method COM: <s> remove a property </s>
funcom_train/38270800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveChannelCategory(ChannelCategory category) throws GroupsException { IEntityGroup categoryGroup = GroupService.findGroup(category.getId()); categoryGroup.setName(category.getName()); categoryGroup.setDescription(category.getDescription()); categoryGroup.setCreatorID(category.getCreatorId()); categoryGroup.update(); } COM: <s> persists a channel category </s>
funcom_train/49994580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image getIcon(IType type) throws JavaModelException { Image icon = type.isInterface() ? Activator.getDefault().getImageRegistry().get(IdeWikiConstants.INTERFACE_ICON) : Activator.getDefault().getImageRegistry().get(IdeWikiConstants.CLASS_ICON); return icon; } COM: <s> gets the icon </s>
funcom_train/37221287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasOpposite(PlaceConnector pc, Corridor corridor) { if (!(graph().connected(corridor, pc))) { throw new IllegalArgumentException( "Place connector is not connected with corridor"); } Iterator it = graph().edges(corridor); while (it.hasNext()) { PlaceConnector pcTemp = (PlaceConnector) it.next(); if (pcTemp != pc) { return true; } } return false; } COM: <s> returns true if the corridor has an opposite place connector </s>
funcom_train/29576178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String loadClassURL(String sURL) { String classDef = ""; try { /// Build XMLPlayground Command FileToStringLoader f = new FileToStringLoader(sURL); classDef = f.getString(); } catch (Exception ex) { //System.err.println("Caught an exception." +ex); ex.printStackTrace(); } return classDef; } COM: <s> load a class file and in a string </s>
funcom_train/2267413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object run (TransactionRunnable transactionRunnable) { Transaction t = null; Session s = null; try { s = getSession(); t = beginTransaction(s); Object obj = transactionRunnable.run(s); commitTransaction(t); return obj; } catch (Throwable throwable) { if (null != t) { try { t.rollback(); } catch (HibernateException e) {handleError(e);} } if (transactionRunnable instanceof TransactionFailHandler) { try { ((TransactionFailHandler) transactionRunnable).onFail(s); } catch (Throwable e) {handleError(e);} } throwException(throwable); return null; } finally { closeSession(s); } } COM: <s> execute the given transaction runnable </s>
funcom_train/41266320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Mngcco entity) { EntityManagerHelper.log("deleting Mngcco instance", Level.INFO, null); try { entity = getEntityManager().getReference(Mngcco.class, entity.getCcocodigo()); 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 mngcco entity </s>
funcom_train/27896379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testGetLocalizedFormattedMessage() { final Double amount = new Double(1234.56); NumberFormat numberFormat = NumberFormat.getCurrencyInstance(Locale.FRANCE); final String expectedValue = numberFormat.format(amount); getTestContext().setLocale(Locale.FRANCE); assertEquals(expectedValue, getTester() .getMessage("currency.with.args", new Object[] { amount })); } COM: <s> verify test uses the locale specified by framework </s>
funcom_train/2576716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveCursor(double units, RectangleEdge edge) { if (edge == RectangleEdge.TOP) { cursorUp(units); } else if (edge == RectangleEdge.BOTTOM) { cursorDown(units); } else if (edge == RectangleEdge.LEFT) { cursorLeft(units); } else if (edge == RectangleEdge.RIGHT) { cursorRight(units); } } COM: <s> moves the cursor outwards by the specified number of units </s>
funcom_train/14400416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXmlTraceStream(OutputStream pStream) { if ((this.iXmlTraceStream != null) && (!this.iXmlTraceStream.equals(System.out)) && (!this.iXmlTraceStream.equals(System.err))) { try { this.iXmlTraceStream.close(); } catch (IOException e) { // just ignore it } } this.iXmlTraceStream = pStream; } COM: <s> sets an output stream to which all cim xml traffic outgoing amp </s>
funcom_train/40653628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRoadSegment(RoadSegment segment) { // remove segment: segments.remove(segment.getId()); // remove segment from junctions, and also remove unconnected junctions: for (int i = 0; i < 2; i++) { RoadJunction junction = segment.getEndJunction(i); junction.removeRoad(segment); if (junction.getDegree() == 0) { junctions.remove(junction); } } } COM: <s> remove a road segment ensuring that the end junctions are also correctly removed </s>
funcom_train/39946862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getJbtnGuardar(), null); jContentPane.add(getJbtnCerrar(), null); jContentPane.add(getJScrollPane(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/33974199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doStartService () throws ServiceException { super.doStartService(); mApiKey = mFbConfig.getApiKey(); mCookiePrefix = mApiKey + '_'; mCookieUser = mCookiePrefix + FacebookConnectContext.USER_ID; mCookieLogout = mCookiePrefix + "logout"; } COM: <s> initializes the service and sets the properties </s>
funcom_train/23348147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toBase(long num,int base) { if(base < Character.MIN_RADIX || base > Character.MAX_RADIX) throw new IllegalArgumentException("base must be between "+Character.MIN_RADIX+" and "+Character.MIN_RADIX); if(num<0) return '-' + prefix + Long.toString(num,base); return prefix + Long.toString(num,base); } COM: <s> converts a number to a give base </s>
funcom_train/28552644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char lookAheadChar(int characterIndexAfterCurrent) { for (; curChIndex < chArrSize; curChIndex++) if ((chArr[curChIndex] != '(') && (chArr[curChIndex] != ' ') && (chArr[curChIndex] != ')')) break; return chArr[curChIndex + characterIndexAfterCurrent]; } COM: <s> we can get the n th next character from current position without moving </s>
funcom_train/33078919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSelectedColumnObjects() { List result = new ArrayList(); int[] indexies = super.getSelectedColumns(); for (int i = 0; i < indexies.length; i++) { result.add(((ObjectViewAdapter) super.getModel()).getColumn(indexies[i])); } return result; } COM: <s> gets the selected columns </s>
funcom_train/18142248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Property getPropertyFor(Property prop, String tag, Class type) { // check children for (int i=0, j=prop.getNoOfProperties(); i<j; i++) { Property child = prop.getProperty(i); if (is(child,tag,type)) return child; } return null; } COM: <s> find a sub property by tag and type </s>
funcom_train/26024609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreSplitPane(String name, String key) { Properties props = getProperties(name); Object obj = getObject(key); if (obj instanceof JSplitPane && props != null) { JSplitPane split = (JSplitPane) obj; try { Integer value = new Integer(props.getProperty(key)); split.setDividerLocation(value.intValue()); } catch (Exception e) { // ignore } } } COM: <s> restores the divider location for the split pane found in objects under </s>
funcom_train/51573341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void decoder_flush() throws IOException { final CoderResult coderResult = decoder.flush(cbfr); if (coderResult == CoderResult.UNDERFLOW) { // NOPMD success } else if (coderResult == CoderResult.OVERFLOW) { throw new IOException("buffer overflow on flush"); } else { throw new AssertionError("unexpected decoder result on flush: " + coderResult); } } COM: <s> final step of the decoding operation </s>
funcom_train/21762271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextArea getJTextAreaIPList() { if (jTextAreaIPList == null) { jTextAreaIPList = new JTextArea(); jTextAreaIPList.setBackground(Color.black); jTextAreaIPList.setForeground(Color.green); } return jTextAreaIPList; } COM: <s> this method initializes j text area iplist </s>
funcom_train/11688492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { if (log.isDebugEnabled()) { log.debug("Clearing datasource repositories "); } if (inMemoryDataSourceRepository.isInitialized()) { inMemoryDataSourceRepository.clear(); } if (jndiBasedDataSourceRepository.isInitialized()) { jndiBasedDataSourceRepository.clear(); } } COM: <s> clear all data source repositories </s>
funcom_train/45146078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element computeHighlightRangeIDLElement() { ISourceViewer sourceViewer = getSourceViewer(); if (sourceViewer == null) { return null; } StyledText styledText = sourceViewer.getTextWidget(); if ((styledText == null) || styledText.isDisposed()) { return null; } int offset = sourceViewer.getVisibleRegion().getOffset(); int caret = offset + styledText.getCaretOffset(); return getIDLElementAt(caret); } COM: <s> computes and returns the idlelement that includes the caret and serves as </s>
funcom_train/25599699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSensor(PhSensor sensor) { SensorMenu myMenu = new SensorMenu(this, (Acc3DSensor) sensor, sensor.getCounter()); sensors.add(sensor); sensorMenus.add(myMenu); sensor.setNewDefaultDataRow(); mainFrame.getPanelMote().add(myMenu, null); mainFrame.getPanelMote().updateUI(); } COM: <s> add a real sensor to running phy mote program and gui </s>
funcom_train/21014537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KnotworkNode findNonGhostNode(Point2D point) { KnotworkNode closestNode = null; double distance, minDist = Double.POSITIVE_INFINITY; // check all nodes to find the closest one. for (KnotworkNode node : getVertices()) { // avoid ghost nodes if (isGhostNode(node)) continue; distance = node.getPosition().distance(point); if (distance < minDist) { closestNode = node; minDist = distance; } } return closestNode; } COM: <s> returns the closest knotwork node of the point x y </s>
funcom_train/20888848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RoutingEntry getClosest(EktaId dest, EktaId me, Collection<RoutingEntry> list) { EktaId actualCandidate = me; RoutingEntry ret = null; if (list == null || list.size() == 0) { return null; } for (RoutingEntry re : list) { if (re == null) { continue; } if (dest.closer(actualCandidate, re.getDestId())) { actualCandidate = re.getDestId(); ret = re; } } return ret; } COM: <s> return the closest entry which is the one who is numerically </s>
funcom_train/2888132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProfile(ActiveProfileType profile) throws DatabaseAccessException{ try{ String profileId = profile.getHostId(); ActiveProfileDocument acdoc = ActiveProfileDocument.Factory.newInstance(); acdoc.setActiveProfile(profile); DatabaseEntry key = new DatabaseEntry(profileId.getBytes()); DatabaseEntry value = new DatabaseEntry(); binding.objectToEntry(acdoc, value); database.put(null, key, value); }catch(DatabaseException e){ throw new DatabaseAccessException(e); } } COM: <s> overwrites existing value of active profile </s>
funcom_train/4439893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasContent() { if (this.implicitItems.size() > 0) { return true; } if (this.explicitItems.size() > 0) { return true; } if (this.children.isEmpty()) { return false; } Iterator keyIt = this.children.keySet().iterator(); while (keyIt.hasNext()) { Object key = keyIt.next(); if (((RelationTreeRepresentation) (this.children.get(key))) .hasContent()) { return true; } } // no content found: return false; } COM: <s> recursively looks if there are any items in this tree </s>
funcom_train/20882627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Item addDaughter(Item item) { Item newItem; ItemContents contents; Item p = getLastDaughter(); if (p != null) { newItem = p.appendItem(item); } else { if (item == null) { contents = new ItemContents(); } else { contents = item.getSharedContents(); } newItem = new Item(getOwnerRelation(), contents); newItem.parent = this; daughter = newItem; } return newItem; } COM: <s> adds the given item as a daughter to this item </s>
funcom_train/49328976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAOA(double aoa) { aoa = MathUtil.clamp(aoa, 0, Math.PI); if (MathUtil.equals(this.aoa, aoa)) return; this.aoa = aoa; if (aoa < 0.001) { this.sinAOA = aoa; this.sincAOA = 1.0; } else { this.sinAOA = Math.sin(aoa); this.sincAOA = sinAOA / aoa; } fireChangeEvent(); } COM: <s> sets the angle of attack </s>
funcom_train/35020349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataObject getDataObject(String url) { try { FileObject fo = URLMapper.findFileObject(new URL(url)); if (fo != null) { return DataObject.find(fo); } } catch (DataObjectNotFoundException donfe) { } catch (MalformedURLException mue) { } return null; } COM: <s> retrieves the data object representing the file identified by the url </s>
funcom_train/26624728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Add(long seqno, Message msg, Vector receivers) { Entry e; if (waiting) return; if (receivers.size() == 0) return; synchronized(msgs) { if (msgs.get(new Long(seqno)) != null) return; e = new Entry(seqno, msg, receivers, retransmit_intervals); msgs.put(new Long(seqno), e); retransmitter.add(e); } } COM: <s> adds a new message to the hash table </s>
funcom_train/22029280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object cloneButType(MathType type) throws VisADException { Linear1DSet[] sets = {(Linear1DSet) X.clone(), (Linear1DSet) Y.clone(), (Linear1DSet) Z.clone()}; return new Linear3DSet(type, sets, DomainCoordinateSystem, SetUnits, SetErrors, cacheSamples); } COM: <s> return a clone of this object with a new math type </s>
funcom_train/12652309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTreatmentProcedureCriterion() { BreastCancerConverter converter = new BreastCancerConverter(); try { // Test surgery TreatmentProcedureCriterion criterion = new TreatmentProcedureCriterion(); criterion.setParent(SURGERY); assert converter.convert(criterion) instanceof TreatmentSurgeryProcedureMatchable : "Surgery not converted"; // Test radiation criterion = new TreatmentProcedureCriterion(); criterion.setParent(RADIATION); assert converter.convert(criterion) instanceof TreatmentRadiationProcedureMatchable : "Radiation not converted"; } catch (UnsupportedCriterionException unsupportedCriterionException) { throw new AssertionError(unsupportedCriterionException); } } COM: <s> test treatment procedure criterion </s>
funcom_train/17426440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startTLS() throws MessagingException { issueCommand("STARTTLS", 220); // it worked, now switch the socket into TLS mode try { serverSocket = SocketFetcher.startTLS(serverSocket, host, session.getProperties(), "mail." + name); initStreams(); } catch (IOException ioex) { closeConnection(); throw new MessagingException("Could not convert socket to TLS", ioex); } } COM: <s> issue the code starttls code command and switch the socket to </s>
funcom_train/11650412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initReceiveClient() throws NamingException, JMSException { SUBSCRIBER = new ReceiveSubscriber(getUseJNDIPropertiesAsBoolean(), getJNDIInitialContextFactory(), getProviderUrl(), getConnectionFactory(), getDestination(), getDurableSubscriptionId(), isUseAuth(), getUsername(), getPassword()); log.debug("SubscriberSampler.initReceiveClient called"); } COM: <s> create the receive subscriber client for the sampler </s>
funcom_train/9139601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishedInvertedIndexBuild() { if (Boolean.parseBoolean(ApplicationSetup.getProperty("lexicon.use.hash","true"))) { String lexiconFilename = indexPath + ApplicationSetup.FILE_SEPARATOR + indexPrefix + ApplicationSetup.LEXICONSUFFIX; LexiconInputStream lexStream = getLexInputStream(lexiconFilename); this.createLexiconHash(lexStream); } if (index != null) { index.addIndexStructure("lexicon", "uk.ac.gla.terrier.structure.Lexicon"); } } COM: <s> processing the lexicon after finished creating the </s>
funcom_train/14329814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int invoke_calculateBufferSize(int tdsVersion, int packetSize) { Class[] classes = new Class[]{int.class, int.class}; Object[] objects = new Object[]{new Integer(tdsVersion), new Integer(packetSize)}; return ((Integer) invokeStaticMethod(Support.class, "calculateNamedPipeBufferSize", classes, objects)).intValue(); } COM: <s> helper method to invoke </s>
funcom_train/41747663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTotalIncomeBudgetAmount() { long total = 0; for (Iterator iterator = categories.iterator(); iterator.hasNext();) { Account account = (Account) iterator.next(); Integer accNum = new Integer(account.getAccountNum()); DetailedBudgetItem item = (DetailedBudgetItem)detIncomeItems.get(accNum); if (item != null) total += item.budgetAmount; } return total; } COM: <s> total budget amount for income accounts </s>
funcom_train/19053668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popupMenuWillBecomeVisible(PopupMenuEvent e) { toolBox.setSelected( mainWindow.getToolBox().isVisible() ); projectExplorer.setSelected( mainWindow.getProjectExplorer().isVisible() ); workSpace.setSelected( mainWindow.getWorkspace().isVisible() ); componentInspector.setSelected( mainWindow.getComponentInspector().isVisible() ); } COM: <s> defined by interface popup menu listener </s>
funcom_train/3022397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SegmentedLine find(String panel1, String panel2) { UMLType first = find(panel1); UMLType second = find(panel2); if ((first == null) || (second == null)) { return null; } Iterator iter = getLineIterator(); while (iter.hasNext()) { SegmentedLine line = (SegmentedLine)iter.next(); if (line.match(first, second)) { return line; } } return null; } COM: <s> find the type based on a id code </s>
funcom_train/7410516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int covered(int line) { int ret = 0; for (int j = 0, ln = blocks.length; j < ln; j++) if (line >= blocks[j].start && line <= blocks[j].end && covBlocks.get(j)) ret++; return ret; } COM: <s> return the number of fragment of given line that has been covered </s>
funcom_train/3596444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addForcedResource(NResource resource) throws NOMException { if (resource==null) { return; } if (isLoaded(resource)) { return; } List forced = (List)forcedResources.get(resource.getCoding()); if (forced==null) { forced = new ArrayList(); } forced.add(resource); forcedResources.put(resource.getCoding(), forced); preferDependencies(resource); noteChangedDependencies(resource); } COM: <s> add a resource to the list of forced resources for a </s>
funcom_train/13505211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accepts(String type) { if (m_acceptsAll) { return true; } String[] parts = type.split("/"); if (parts.length != 2) { return false; } for (String element : m_types) { if (element.equals(parts[0] + "/*") || element.equals(type)) { return true; } } return false; } COM: <s> does this rule allow the given type </s>
funcom_train/45697940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixNamespace(final Element element, final boolean dc) { if (element.getNamespace() == null) { if (!dc) { element.setNamespace(Namespace.getNamespace(OEB_NAMESPACE)); } else { element.setNamespace(Namespace.getNamespace(DC_NAMESPACE)); } } if (dc) { element.addNamespaceDeclaration(Namespace.getNamespace("dc", DC_NAMESPACE)); element.addNamespaceDeclaration(Namespace.getNamespace("oebpackage", OEB_NAMESPACE)); } } COM: <s> set the namespace on this element </s>
funcom_train/25855403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexWriter initLucene(String indexpath) throws IOException { File indexDir = new File(indexpath); //dataDir is the directory that hosts the text files that to be indexed Analyzer luceneAnalyzer = new StandardAnalyzer(); IndexWriter indexWriter = new IndexWriter(indexDir,luceneAnalyzer,true); return indexWriter; } COM: <s> init the lucene to create index </s>
funcom_train/18021853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String checkActionTrigger(String surl) { for ( String s: actionTriggers.keySet() ) { if ( surl.matches(s) ) { int i= s.indexOf(":"); if ( i>-1 ) { String tr= s.substring(0,i); if ( Ops.safeName(tr).equals(tr) ) { return tr; } } } } return null; } COM: <s> see if script can be removed </s>
funcom_train/31956246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNaxes(int val) { iter.setKey(BITPIX); if (iter.hasNext()) { iter.next(); } try { iter.add(NAXIS, new HeaderCard(NAXIS, val, "Dimensionality")); } catch (HeaderCardException e) { System.err.println("Impossible exception at setNaxes " + e); } } COM: <s> set the value of the naxis keyword </s>
funcom_train/2586606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuffer b = new StringBuffer(); b.append(this.text); if (b.length() < this.length) { final char[] pad = new char[this.length - b.length()]; Arrays.fill(pad, ' '); b.append(pad); } return b.toString(); } COM: <s> returns a string representation of the message </s>
funcom_train/29800575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { apikeyFieldEditor = new StringFieldEditor( PreferenceConstants.P_SNIPPLR_APIKEY, Messages.Snipplr4ePreferencePage_snipplr_apikey, getFieldEditorParent()); addField(apikeyFieldEditor); addField(new CheckApikeyButton(apikeyFieldEditor, getFieldEditorParent())); StringFieldEditor snipplrUrlFieldEditor = new StringFieldEditor( PreferenceConstants.P_SNIPPLR_URL, Messages.Snipplr4ePreferencePage_url_to_snipplrs_xmlrpcservice, getFieldEditorParent()); addField(snipplrUrlFieldEditor); } COM: <s> creates the field editors </s>
funcom_train/20622639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Iterator classIterator() { try { IntClassFinder interfaceFinder = new IntClassFinder (getModulePackage(), getInterfaceName()); return interfaceFinder.getClasses(); } catch (IOException ex) { Categories.ui().error ( "!!!m cat.classLoad: can't make a class iterator.", ex); } return (new Vector()).iterator(); } COM: <s> attempts to get a list of class names from the file system </s>
funcom_train/143279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setViewportToLinkTarget(final String internal) { Box box = textContentPane.getSharedContext().getBoxById(internal); if (box == null) box = GUIUtils.searchForName(internal, textContentPane.getRootBox()); if (box != null) textContentPane.scrollTo(new Point(box.getAbsX(), box.getAbsY())); } COM: <s> sets the viewport to display a links target </s>
funcom_train/22208538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMergeMapsForExternallyReferencedTopics(boolean newVal) { boolean oldVal = isMergingMapsForExternallyReferencedTopics(); mergeMapsForExternallyReferencedTopics = newVal; try { fireVetoableChange("mergeMapsForExternallyReferencedTopics", oldVal, newVal); } catch (PropertyVetoException e) { mergeMapsForExternallyReferencedTopics = oldVal; logVetoedChange(e); } } COM: <s> configures the instance to load the topic maps associated with </s>
funcom_train/20109717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExec_DelegatesToSakaiSiteService() { MockSakaiSiteService delegate = new MockSakaiSiteService(); GetMembershipToolPageURLInvoker cmd = new GetMembershipToolPageURLInvoker(delegate, context); cmd.exec(); assertTrue(delegate.calledGetMembershipToolPageURL()); assertEquals(delegate.getLastGetMembershipToolPageURLCall_SessionIDArg(), context.getSakaiSessionID()); } COM: <s> verifies a search for a page containing the membership tool </s>
funcom_train/48390985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addFolderClosedHandler(com.smartgwt.client.widgets.tree.events.FolderClosedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tree.events.FolderClosedEvent.getType()) == 0) setupFolderClosedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tree.events.FolderClosedEvent.getType()); } COM: <s> add a folder closed handler </s>
funcom_train/28726765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveTestResultStorage(final Text txt) { try { project.setPersistentProperty(new QualifiedName( "ca.ucalgary.cpsc.ebe.fitClipse", "project.testResultStorage"), txt.getText()); } catch (final CoreException e) { MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", "Error in saving project properties for TestResultStorage"); e.printStackTrace(); } } COM: <s> save test result storage </s>
funcom_train/50142441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getObjects() { if (debugging) { log.debug(getClass().getName() + ": Get objects"); } Enumeration entries = objects.elements(); Vector result = new Vector(); while (entries.hasMoreElements()) { result.add(((CacheEntry) entries.nextElement()).object); } return result.elements(); } COM: <s> returns an enumeration of the currently object in the cache </s>
funcom_train/23971061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIsolation(int level) { if (isInMidTransaction()) { throw Error.error(ErrorCode.X_25001); } if (level == SessionInterface.TX_READ_UNCOMMITTED) { level = SessionInterface.TX_READ_COMMITTED; } if (isolationLevel != level) { isolationLevel = level; isReadOnlyIsolation = level == SessionInterface.TX_READ_UNCOMMITTED; } } COM: <s> sets isolation for the next transaction only </s>
funcom_train/4293708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertChildAt(int index, Node<T> child) throws IndexOutOfBoundsException { if (index == getNumberOfChildren()) { // this is really an append addChild(child); return; } else { children.get(index); //just to throw the exception, and stop here children.add(index, child); } } COM: <s> inserts a node t at the specified position in the child list </s>
funcom_train/8357390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.setModel(this.getCompatableTestSets(this.currentTest)); if (jComboBox.getModel().getSize() == 0) { this.jTestButton.setEnabled(false); } } return jComboBox; } COM: <s> this method initializes j combo box </s>
funcom_train/16678074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToContact(Contact c) { String toAdd = c.getLastName( ) + ", " + c.getFirstName( ) + " - " //$NON-NLS-1$ //$NON-NLS-2$ + c.getMail( ); boolean b = true; for (String s : tos.getItems( )) { if (s.equals(toAdd)) { b = false; } } if (b) { tos.add(toAdd); toContactList.add(c); } } COM: <s> adds the given </s>