__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1931787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRelative(File f) { try { String s = fd.getRootPath(); String t = f.getAbsolutePath(); int i = -1; // not find root path,so create it if ((i = t.indexOf(s)) < 0) { File fo = new File(t + s); fo.mkdir(); setRelative(fo); } else { fd.setRelativePath(t.substring(0, i)); } } catch (Exception e) { Logger.log("relative path set fail"); e.printStackTrace(); } } COM: <s> set root path compare to local file system </s>
funcom_train/3068570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPolicyTaggedMetaSlot(){ if(kb.getCls(DEFAULT_POLICY_TAGGED_META_SLOT_NAME)!=null){ return; } Cls stdCls=kb.getCls(Model.Cls.STANDARD_SLOT); Vector parents= new Vector(5); parents.add(stdCls); Cls policyCls=kb.createCls(DEFAULT_POLICY_TAGGED_META_SLOT_NAME,parents); //policyCls.addDirectTemplateSlot(createPolicySlot()); //policyCls.addDirectTemplateSlot(createPolicyTypeSlot()); policyCls.addDirectTemplateSlot(createClsPolicySlot()); this.policyTaggedMetaSlot=policyCls; return; } COM: <s> add the meta slot policy tagged meta slot to the model </s>
funcom_train/3416657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defaultWriteObject() throws IOException { if ( curContext == null ) { throw new NotActiveException("not in call to writeObject"); } Object curObj = curContext.getObj(); ObjectStreamClass curDesc = curContext.getDesc(); bout.setBlockDataMode(false); defaultWriteFields(curObj, curDesc); bout.setBlockDataMode(true); } COM: <s> write the non static and non transient fields of the current class to </s>
funcom_train/12194092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getPaths() { int limit = getNumberOfFragments(); List result = new ArrayList(limit); if (limit > 0) { for (int i = 1; i < limit; i++) { result.add(new Path(this, 0, i)); } } result.add(this); return result; } COM: <s> return a list of all directories upto and including the name of this </s>
funcom_train/927051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { StringBuffer sb = new StringBuffer(); sb.append("<value"); sb.append(" name=\"" + StringUtil.toXML(m_sName) + "\""); sb.append(" demand=\"" + m_dDemandPercent + "\""); if (m_Node != null) { sb.append(" node=\"" + m_Node.getId() + "\""); } sb.append("></value>"); return sb.toString(); } COM: <s> creates xml from this node </s>
funcom_train/2956495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteMatch(int i, int j) { assert (0 <= i && i < nbLeftVertices && 0 <= j && j < nbRightVertices); if (j == this.refMatch.get(i)) { this.refMatch.set(i, -1); this.decreaseMatchingSize(j); } } COM: <s> remove the assignment of j to the ith variable </s>
funcom_train/173796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { // Note: Any changes here should be reflected in // XMLOutputter.printQualifiedName() String prefix = namespace.getPrefix(); if ((prefix != null) && (!prefix.equals(""))) { return new StringBuffer(prefix) .append(':') .append(getName()) .toString(); } else { return getName(); } } COM: <s> this will retrieve the qualified name of the code attribute code </s>
funcom_train/21041861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void killAgent(ACLMessageInterface aclMessage) { CFAgentAction killAgent = (CFAgentAction) aclContent; agName = ((CFPrimitive) (killAgent .getContentFacilitator(ManagementOntology.KILLAGENT_AGENT))) .getString(); agLifeCycleManager.terminateAgent(agName); agCounter.addAgentKilled(); agCounter.removeAgentActive(); messageParser(aclContent); } COM: <s> this method accepts an aclmessage impl and kills the agent based on the </s>
funcom_train/8142278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws ServletException { String paths = getInitParameter("configFile"); String[] httpConfigPath = paths.split(";"); try { HttpDipper.initHttpDipper(getServletContext(), httpConfigPath); } catch (DipperParseException ex) { throw new ServletException("can't parse dipper config file " + paths, ex); } System.out.println("parsed dipper config"); } COM: <s> initialize web tier application environment </s>
funcom_train/42711723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonModifyCustomerBank() { if (jButtonModifyCustomerBank == null) { jButtonModifyCustomerBank = new JButton(); jButtonModifyCustomerBank.setBounds(new Rectangle(720, 240, 101, 21)); jButtonModifyCustomerBank.setText("Modify"); jButtonModifyCustomerBank.setActionCommand("DeleteCustomer"); } return jButtonModifyCustomerBank; } COM: <s> this method initializes j button modify customer bank </s>
funcom_train/12296983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResponse(EPPDocument d) { response = d; done = true; EPPControl.print("** Response set at transfer " + clTRID); svTRID = ParseList.searchForNode("svTRID", response.getDocument().getDocumentElement().getFirstChild()).getTextContent(); EPPControl.inform(this); } COM: <s> sets the reponse to the argument given and sets done to true </s>
funcom_train/20116662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringWriter getMailContent(Node item) throws MailException { Map<String,String> map = getAliases(appContext); MIMEFormatter formatter = new MIMEFormatter(getEncoding(),map); StringWriter mailContent = new StringWriter(); try { formatter.format(item,mailContent); } catch (InputOutputException e) { throw new MailException(MailException.MAIL_SENDER_FORMAT_ERROR, e.getMessage()); } return mailContent; } COM: <s> getter for real mime message as stream </s>
funcom_train/33671341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleEvent(HmeEvent event) { if (event instanceof ResolutionInfo) { ResolutionInfo resInfo = (ResolutionInfo) event; log(ILogger.LOG_INFO, "Received resolution event: " + resInfo); if (!initialized && desiredResolution != null && resInfo.getCurrentResolution().equals(desiredResolution)) { init(); } } return super.handleEvent(event); } COM: <s> this event handler snoops on resolution changes and reinitializes the </s>
funcom_train/42225990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand4() { if (backCommand4 == null) {//GEN-END:|69-getter|0|69-preInit // write pre-init user code here backCommand4 = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|69-getter|1|69-postInit // write post-init user code here }//GEN-BEGIN:|69-getter|2| return backCommand4; } COM: <s> returns an initiliazed instance of back command4 component </s>
funcom_train/50916914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void labelAtoms(String labelValue) { List<CMLAtom> atoms = this.getAtoms(); if (atoms.size() > 0) { for (int i = 0; i < atoms.size(); i++) { CMLAtom atom = atoms.get(i); CMLLabel label = new CMLLabel(); label.setCMLValue(labelValue); atom.addLabel(label); } } } COM: <s> applies label to all atoms in set </s>
funcom_train/13593485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveViewBox(double dx, double dy) { if(Math.abs(dx) > getWidth() || Math.abs(dy) > getHeight()) return; Coord origin = inverseTransform(new CoordImpl(0,0)); Coord moves = inverseTransform(new CoordImpl(dx, dy)); curX += (moves.getX()-origin.getX()); curY += (moves.getY()-origin.getY()); } COM: <s> moves the view box by some difference over x and y </s>
funcom_train/17596126
/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(new BorderLayout()); jContentPane.add(getJButton(), BorderLayout.WEST); jContentPane.add(getJButton1(), BorderLayout.CENTER); jContentPane.add(getJButton2(), BorderLayout.EAST); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/17857237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkBoundExclusive(int index) { // Implementation note: we do not check for negative ranges here, since // use of a negative index will cause an ArrayIndexOutOfBoundsException, // a subclass of the required exception, with no effort on our part. if (index >= size) throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); } COM: <s> checks that the index is in the range of existing elements exclusive </s>
funcom_train/20646322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getDLGGrading() { Iterator/*<Mergeator.DLG>*/ e = dlgs.iterator(); float result = 0f; Mergeator.DLG dlg ; while (e.hasNext()) { dlg = ((Mergeator.DLG)e.next()); // depth is bad it adds points result += dlg.d * WEIGTH_PARENT_TO_CHILDREN - dlg.l * (WEIGTH_PARENT_TO_CHILDREN - WEIGTH_CHILDREN_TO_PARENT); } return result; } COM: <s> get the dlg grading total of this node </s>
funcom_train/5028394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revertToDefaultAvailabilityForSaturday() { IElementWrapper iew = this.getParentWrapper(); if (iew instanceof PersonWrapper) { PersonWrapper personWrapper = (PersonWrapper) iew; getAvailabilityRecord().setSaturdayValue(-1); persisting(personWrapper); } if (iew instanceof OrganizationWrapper) { OrganizationWrapper organizationWrapper = (OrganizationWrapper) iew; getAvailabilityRecord().setSaturdayValue(-1); persisting(organizationWrapper); } } COM: <s> remove the availability on saturday so that it then defaults </s>
funcom_train/18352920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColAt(int c) { width++; List theRow; for (int r = 0; r < this.height(); r++) { theRow = (List) rows.get(r); if (c == -1) { theRow.add(null); } else { theRow.add(c, null); } } } COM: <s> inserts a column of code null code s at code c code </s>
funcom_train/18453082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BufferedImage writeScaledImage(BufferedImage image, final File file) throws IOException { if (image.getWidth() > MAX_WIDTH) image = (BufferedImage)UI.scaleImage(image, MAX_WIDTH, -1, UI.Quality.HIGH); ImageIO.write(image, "png", file); return image; } COM: <s> scale down large images for better performance </s>
funcom_train/16102133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Group createGroup(String name, Set principals) { Group roles = null; Iterator iter = principals.iterator(); while (iter.hasNext()) { Object next = iter.next(); if (!(next instanceof Group)) { continue; } Group grp = (Group) next; if (grp.getName().equals(name)) { roles = grp; break; } } // If we did not find a group create one if (roles == null) { roles = new SimpleGroup(name); principals.add(roles); } return roles; } COM: <s> find or create a group with the given name </s>
funcom_train/9714175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConfigurationContext initConfigContext(ServletConfig config) throws ServletException { try { ConfigurationContext configContext = ConfigurationContextFactory .createConfigurationContext(new WarBasedAxisConfigurator(config)); configContext.setProperty(Constants.CONTAINER_MANAGED, Constants.VALUE_TRUE); return configContext; } catch (Exception e) { log.info(e); throw new ServletException(e); } } COM: <s> initialize the axis configuration context </s>
funcom_train/2808892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEventPath(String uriStr) { Map uri = getRequestMapMap(uriStr); if (uri != null) return (String) uri.get(ConfigXMLReader.EVENT_PATH); else { Debug.logWarning("[RequestManager.getEventPath] Path of event for request \"" + uriStr + "\" not found", module); return null; } } COM: <s> gets the event class from the request map </s>
funcom_train/925709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getVendorAttributes(int vendorId) { LinkedList result = new LinkedList(); for (Iterator i = attributes.iterator(); i.hasNext();) { RadiusAttribute a = (RadiusAttribute)i.next(); if (a instanceof VendorSpecificAttribute) { VendorSpecificAttribute vsa = (VendorSpecificAttribute)a; if (vsa.getChildVendorId() == vendorId) result.add(vsa); } } return result; } COM: <s> returns the vendor specific attribute s for the given vendor id </s>
funcom_train/1937996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDayOfWeekInMonth(int date) { /* Calculate how many weeks into the month we are. The day * of the week is actually irrelevant. */ int dayOfWeekInMonth = date / 7; if (date % 7 != 0) { dayOfWeekInMonth++; } myInternalSet(DAY_OF_WEEK_IN_MONTH, dayOfWeekInMonth); } COM: <s> sets the d code ay of week in month code field </s>
funcom_train/34783275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String projectSourceList() throws CoreException { final SourceListBuilder builder = new SourceListBuilder(false); IProject[] ps = project.getReferencedProjects(); for (IProject p : ps) { p.accept(builder); } builder.setModulesOnly(false); project.accept(builder); return builder.xmlDescriptor(); } COM: <s> gets the xml source list descriptor for the project </s>
funcom_train/18801808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMondayNearest22Jan1970() { final SerialDate jan22Y1970 = SerialDate.createInstance(22, SerialDate.JANUARY, 1970); final SerialDate mondayNearest = SerialDate.getNearestDayOfWeek(SerialDate.MONDAY, jan22Y1970); assertEquals(19, mondayNearest.getDayOfMonth()); } COM: <s> the monday nearest to 22nd january 1970 falls on the 19th </s>
funcom_train/29712328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateOKStatus() { if (!fIsEmpty) { if (fValidator != null) { fCurrStatus = fValidator.validate(getResult()); updateStatus(fCurrStatus); } else { fCurrStatus = new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, "", //$NON-NLS-1$ null); } } else { fCurrStatus = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, fEmptyListMessage, null); } updateStatus(fCurrStatus); } COM: <s> validate the receiver and update the ok status </s>
funcom_train/27897412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertTextPresent(String text) { if (!(getTestingEngine().getPageText().contains(text))) fail("Expected text not found in current page: [" + text + "]\n Page content was: [" + getTestingEngine().getPageText() + "]"); } COM: <s> assert that supplied text is present </s>
funcom_train/12160079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAttributeWithNoNamespace() throws Exception { final String attrName = "myAttribute"; final String attrValue = "myValue"; LPDMODOMElement parent = new LPDMODOMElement("myElement"); parent.setAttribute(attrName, attrValue); assertNotNull(parent.getAttribute(attrName)); assertEquals("Attribute values should be the same", attrValue, parent.getAttributeValue(attrName)); } COM: <s> tests setting the attribute on an lpdmodomelement which has no </s>
funcom_train/43133049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeItem(int i) { items.remove(i); ListDataEvent event = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, i, i); fireIntervalRemovedEvent(event); TableModelEvent tableEvent = new TableModelEvent(this, i, i, TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE); fireTableChangedEvent(tableEvent); } COM: <s> remove an item from the list </s>
funcom_train/8964388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enter(WispMap map){ logger.log(Level.INFO, "{0} enters {1}", new Object[] {this, map}); this.setMap(map); this.setLastMapEntered(map.getMapCode()); this.setChannelManager(map.getChannelManager()); this.setObjectManager(map.getObjectManager()); } COM: <s> this method contains logic whenever player enters a map </s>
funcom_train/45622838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCleanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VCBuildType_clean_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VCBuildType_clean_feature", "_UI_VCBuildType_type"), MSBPackage.eINSTANCE.getVCBuildType_Clean(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the clean feature </s>
funcom_train/41381916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copyResources(IResource[] resources, IPath destinationPath) throws LPModelException { IProgressMonitor subProgressMonitor = getSubProgressMonitor(resources.length); IWorkspace workspace = resources[0].getWorkspace(); try { workspace.copy(resources, destinationPath, false, subProgressMonitor); //this.setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE); } catch (CoreException e) { throw new LPModelException(e); } } COM: <s> convenience method to copy resources </s>
funcom_train/22555889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void indexDocument(final Document doc) throws Exception { final String externalId = getKeyId(doc); final IndexWriter writer = getWriter(false); //final AsynchronousIndexWriter awriter = new AsynchronousIndexWriter(writer); final IndexSearcher searcher = new IndexSearcher(TENCProperties.getInstance().getIndexDir()); final Term keyTerm = new Term(TENC_KEY_ID, externalId); if (searcher.docFreq(keyTerm) > 0) writer.updateDocument(keyTerm, doc); else writer.addDocument(doc); writer.optimize(); writer.close(true); } COM: <s> add a lucene document to the index </s>
funcom_train/10793849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BitSet getExcludes(List<MetaDataContext> path) { if (_rawMappings == null) { return null; } resolve(); if (path.isEmpty()) { return _fetchInfo.excludes; } if (_eager == null) { return null; } FetchInfo info = _eager.get(path); return (info == null) ? null : info.excludes; } COM: <s> return the field indexes to exclude when loading data for the </s>
funcom_train/24097857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VariablePossibleRestriction createPossibleRestriction() { Element e = new Element("possible_restriction", getElement().getNamespace()); VariablePossibleRestriction ret = new VariablePossibleRestriction(getParentDocument()); ret.setElement(e); ret.setRoot(root); return ret; } COM: <s> create a possible restriction suitable for adding to this variable </s>
funcom_train/4358386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(String id) throws IOException { File file = file(id); if (file == null) { return; } if (manager.getContainer().getLogger().isDebugEnabled()) { manager.getContainer().getLogger().debug(sm.getString(getStoreName()+".removing", id, file.getAbsolutePath())); } file.delete(); } COM: <s> remove the session with the specified session identifier from </s>
funcom_train/26631588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildXMLData(XMLConvertorContext context, XMLData data, Object object) { if (context.getMetaData().getBasicTypeAsAttribute()) { buildAsAttribute(context, data, object); } else { buildAsElement(context, data, object); } } COM: <s> add the data propertys data to the beans xmldata passed in </s>
funcom_train/17626523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTag(String name, String contentType, int belongsTo, String dependancies) { this.put( name.toLowerCase(), new TagInfo(name, contentType, belongsTo, false, false, false, dependancies) ); } COM: <s> shortcut to creating tag info instance and storing it to the map </s>
funcom_train/40625428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeJSONMap(Map<?,?> map){ res.append('{'); // Open int finish = map.size()-1; int i = 0; for (Map.Entry<?,?> entry : map.entrySet()){ writeJSONMapEntry(entry); if (i!=finish){ res.append(", "); } i++; } res.append('}'); // Close } COM: <s> inner method for writing a map </s>
funcom_train/16580820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getBLagX() { if (bLagX == null) { bLagX = new JButton(); bLagX.setBounds(new java.awt.Rectangle(270,38,28,26)); bLagX.setIcon(iaddpoint); bLagX.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { operations.setAccepted(false); matrixCADTool.addOption("lagX"); } }); } return bLagX; } COM: <s> this method initializes b lag x </s>
funcom_train/39106329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSET_OPERATOR(List<QASHToken> leftSideExpr) { try { QASHToken leftSide = resolveName(leftSideExpr); leftSideExpr.clear(); List<QASHToken> rightSideExpr = getStatements(); QASHToken rightSide = resolveExpression(rightSideExpr); setProperty(leftSide.toString(),rightSide.toString()); } catch (Exception e) { printError(SET_OPERATOR,"Problem processing set statement command ("+e.toString()+") :",currToken); } } COM: <s> process an set command </s>
funcom_train/31028499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEntityID(EntityID entityID) { ActionType tempType; Vector v = new Vector(this.interceptors.keySet()); Iterator iter = ((Vector)v.clone()).iterator(); while (iter.hasNext()) { tempType = (ActionType)iter.next(); this.removeEntityID(entityID, tempType); } } COM: <s> removes all references of the entity id from the store </s>
funcom_train/15740709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getErrorLogSubmissionStatus() { int status = saros.getConfigPrefs().getInt( PreferenceConstants.ERROR_LOG_ALLOW_SUBMISSION, UNDEFINED); if (status == UNDEFINED) status = saros.getPreferenceStore().getInt( PreferenceConstants.ERROR_LOG_ALLOW_SUBMISSION); return status; } COM: <s> returns whether the submission of the error log is allowed forbidden or </s>
funcom_train/26200833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graphics create() { closeBlock(); PDFGraphics g = createGraphic(page,pw); // The new instance inherits a few items g.media = new Rectangle(media); g.trax = trax; g.tray = tray; g.clipRectangle = new Rectangle(clipRectangle); return (Graphics) g; } // end create() COM: <s> p this returns a child instance of this graphics object </s>
funcom_train/44770480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUniquePrefix(String uriHint) { // @todo smarter unique prefix generation /* int number; if (uriHint == null || uriHint.length() == 0) { number = prefixToURI.size() + 1; } else { number = uriHint.hashCode(); } return "_pre" + number; */ return "_pre" + (prefixToURI.size() + 1); } COM: <s> returns a prefix that is unique among the already registered prefixes </s>
funcom_train/48630668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetProchaineVille() { System.out.println("setProchaineVille"); String val = ""; Itineraire instance = new Itineraire(); instance.setProchaineVille(val); // 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 prochaine ville method of class itineraire </s>
funcom_train/21481985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void editAreaKeyPressed(KeyEvent evt) { String teclasOmitidas = "" + KeyEvent.VK_DOWN + KeyEvent.VK_UP + KeyEvent.VK_LEFT + KeyEvent.VK_RIGHT; if (!teclasOmitidas.contains("" + evt.getKeyCode())) { isSaved = false; } } COM: <s> edits the area key pressed </s>
funcom_train/44508465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cacheValidSession(Session session, Serializable sessionId) { if (session == null || sessionId == null) { return; } Cache cache = getActiveSessionsCacheLazy(); if (cache == null) { return; } if (session instanceof ValidatingSession && !((ValidatingSession) session).isValid()) { uncache(session); } else { cache(session, sessionId, cache); } } COM: <s> caches the specified session under the key code session id code </s>
funcom_train/16317211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ableMenuOptions(boolean value) { fileSaveItem.setEnabled(value); fileCompileItem.setEnabled(value); editMenu.setEnabled(value); gotoMenu.setEnabled(value); viewMenu.setEnabled(value); insertMenu.setEnabled(value); toolsMenu.setEnabled(value); optionsMenu.setEnabled(value); } COM: <s> sets the menu and toolbar items value which is only applicable when in </s>
funcom_train/45257572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean verifySelectionCount(int count) { if (count > 0 && mode == NONE) { return false; } if (count == 0 && mode == ONE_OR_MORE) { return false; } if (count > 1 && mode == NONE_OR_ONE) { return false; } if (count < 2 && mode == MULTIPLE) { return false; } if (mode > 0 && count != mode) { return false; } return true; } COM: <s> compare selection count with requirements </s>
funcom_train/37449015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextAvailableShortLabel(Class<? extends AnnotatedObject> clazz, String label) { try { return doGetNextAvailableShortLabel(clazz, label); } catch (IntactException ie) { log.error("", ie); // Error in searching, just return the original name for user to // decide. } return label; } COM: <s> returns the next available short label from the persistent system </s>
funcom_train/2902205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuItem findMenuItemByNameKey(String nameKey) { Iterator items = getMenuItems().iterator(); while (items.hasNext()) { MenuItem element = (MenuItem) items.next(); if (nameKey.equals(element.getNameKey())) return element; } return null; } COM: <s> returns menu item with a given name key of a menus first sublevel </s>
funcom_train/6434018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startup(DownloadRequest dr) throws InterruptedException { Debug.logSync("-> DownloadGroup.startup()", this); synchronized(this) { currentDownloadRequest = dr; dr.setThread(new DownloadThread(dr)); dr.getThread().start(); while(currentDownloadRequest != null) { Debug.logSync(".. DownloadGroup.startup()", this); wait(); } } Debug.logSync("<- DownloadGroup.startup()", this); } COM: <s> start a new download thread for code dr code and ensure </s>
funcom_train/42380106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean acquireLock() { lockFile = new File(RLM_Parameters.getApplicationDataFolderName(), lockFileName); try { if ( !lockFile.exists() ) { lockFile.createNewFile(); } lock = new FileOutputStream(lockFile).getChannel().tryLock(); if (lock == null) { return false; } } catch (IOException ioe) { ioe.printStackTrace(); } return true; } COM: <s> this methos creates rlm folder in user home folder and stores lock </s>
funcom_train/25331428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSOTerm() { VariationType instance = new VariationType(); assertNull(instance.getSOTerm()); instance.setSOTerm(bob); assertTrue(instance.getSOTerm().equals(bob)); assertFalse(instance.getSOTerm().equals(bill)); } COM: <s> test of get soterm method of class variation type </s>
funcom_train/40927829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtendedStretchy() { final String retVal; final Attr attr = this.getAttributeNodeNS(Constants.NS_JEUCLID_EXT, Mo.ATTR_STRETCHY); if (attr == null) { retVal = this.getMathAttribute(Mo.ATTR_STRETCHY); } else { retVal = attr.getValue().trim(); } return retVal; } COM: <s> retrieves the jeuclid specific extension of the stretch attribute </s>
funcom_train/27694254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldReferenceList getReferences(Field f) { Debug.assert(f); updateModel(); MutableSet references = (MutableSet) element2references.get(f); if (references == null) { return FieldReferenceList.EMPTY_LIST; } int s = references.size(); if (s == 0) { return FieldReferenceList.EMPTY_LIST; } FieldReferenceMutableList result = new FieldReferenceArrayList(s); for (Enumeration e = references.elements(); s > 0; s -= 1) { result.add((FieldReference) e.nextElement()); } return result; } COM: <s> retrieves the list of references to a given field </s>
funcom_train/9274552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getStream(int length) { Reader src = new LoopingAlphabetReader(length, CharAlphabet.modernLatinLowercase()); InputStream is = new ReaderToUTF8Stream( src, length, 0, "CLOB", new ClobStreamHeaderGenerator(false)); assertTrue("The stream doesn't support mark/reset", is.markSupported()); return is; } COM: <s> returns a stream to test loaded with the repeating modern latin </s>
funcom_train/42367819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCase2(){ try { setUp(); InstanceBridge.FindLate(null, (Dr)Persons[0], 0); InstanceBridge.FindLate(Items[0], null, 0); try { InstanceBridge.FindLate(Items[0],(Dr)Persons[0],-1); assertTrue(false);//should not reach here } catch (Exception e) { assertTrue(true);//must reach here } InstanceBridge.FindLate(null, null, 3); tearDown(); } catch (Exception e) { e.printStackTrace(); } } COM: <s> test the finding late returners for books library abusers by the data inserted </s>
funcom_train/1904298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAvailableFor(Object nativeItem) { boolean isAvailable = false; HashMap recordMap = (HashMap) nativeItem; String doctype = (String) recordMap.get("doctype"); if (doctype.equals("eml://ecoinformatics.org/eml-2.1.0")) { isAvailable = true; } return isAvailable; } COM: <s> can this native item be represented in eml 2 </s>
funcom_train/26624895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Reset() { // TODO: find out when this would be called, maybe do more here // don't accept any messages until we receive a TOTAL_NEW_VIEW message from the sequencer next_seq_id = -1; // clear (i.e. delete) any messages that did not get propagated up queued_messages.ClearMessages(); // reset the retransmission thread state retrans_thread.Reset(); } COM: <s> just remove if you dont need to reset any state </s>
funcom_train/20044684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _createReplaceDescriptor() { log.println("testing createReplaceDescriptor() ... "); Rdesc = oObj.createReplaceDescriptor(); Rdesc.setSearchString(mSearchString); Rdesc.setReplaceString(mReplaceString); tRes.tested("createReplaceDescriptor()", Rdesc != null); } COM: <s> creates the descriptor for replacing string x text doc </s>
funcom_train/48963017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawSquare(Square s){ stroke(0); fill(0); textFont(font, userFontHeight); pushMatrix(); translate(s.position[0],s.position[1]); rotate(s.rotation); rect(-0.5f * s.width, -0.5f * s.heigth, s.width, s.heigth); if(pictures){ if(s.image != null){ scale(0.6f); line(0,0,s.imageOffset,0); image(s.image, s.imageOffset, -24); } } else{ if (s.highlight){ fill(255); text(s.userName, 10, userFontHeight/3); } else{ text(s.userName, 10, userFontHeight/3); } } popMatrix(); } COM: <s> draw one square </s>
funcom_train/19538746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableDataComponents() { int selected = formPanel.getComboBox(TYPE).getSelectedIndex(); for (int i = 0; i < DATA_ENTRY_COMPONENTS.length; i++) { formPanel.getComponentByName(DATA_ENTRY_COMPONENTS[i]).setEnabled(NEEDED_COMPONENTS[selected][i]); if (i < DATA_ENTRY_COMPONENT_LABELS.length) formPanel.getComponentByName(DATA_ENTRY_COMPONENT_LABELS[i]).setEnabled(NEEDED_COMPONENTS[selected][i]); } // endfor } COM: <s> enable the data components needed by the selected type of overlay </s>
funcom_train/28975211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBinMassSpec(int binID, Connection connection) throws BinBaseException { String result = null; try { PreparedStatement bin = connection.prepareStatement("SELECT spectra FROM BIN where bin_id = ?"); bin.setInt(1, binID); ResultSet set = bin.executeQuery(); if (set.next()) { result = set.getString(1); } set.close(); bin.close(); return result; } catch (Exception e) { throw new BinBaseException(e.getMessage(), e); } } COM: <s> returns the mass spec for the given bin id </s>
funcom_train/37807506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object deserialize(String s) throws Exception { if ((byte)s.charAt(s.length()-1) == (byte)0) { s = s.substring(0, s.length()-1); } InputSource inSource = new InputSource(new StringReader(s)); Object o = deserializer.deserialize(inSource); return o; } COM: <s> the string is deserialized into a com </s>
funcom_train/46703925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Company loadCompany() { if (dataFile.isFile()) try { return UjoManagerXML.getInstance().parseXML(dataFile, Company.class, "Load company"); } catch (Throwable e) { e.printStackTrace(); } return new Company(); } COM: <s> load company from file </s>
funcom_train/43188542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProtocol(int protocol){ this.protocol=protocol; Connector[] connectors= inputConnectors.getConnectors(); for (int i=0; i<connectors.length; i++) connectors[i].setProtocol(protocol); connectors= outputConnectors.getConnectors(); for (int i=0; i<connectors.length ; i++) connectors[i].setProtocol(protocol); } COM: <s> sets the protocol for all the connectors </s>
funcom_train/3835903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JDialog getJDialogHelp() { if (jDialogHelp == null) { jDialogHelp = new JDialog(); jDialogHelp.setSize(new java.awt.Dimension(260, 136)); jDialogHelp.setTitle("Help ?"); jDialogHelp.setLocation(new java.awt.Point(200, 200)); jDialogHelp.setContentPane(getJCPHelp()); } return jDialogHelp; } COM: <s> this method initializes j dialog help </s>
funcom_train/16791999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event getEvent(Date time) { StationList list = this.getContext(); int index; PVRState state; if (list == null) return null; index = list.getStations().indexOf(this); if (index < 0) return null; state = list.getContext(); if (state == null) return null; return state.findEvent(list.getType(), index, time); } COM: <s> get the event that corresponds to this time on this station </s>
funcom_train/34061104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawBody(Graphics2D g, Body body) { if (body.getShape() instanceof Box) { drawBoxBody(g,body,(Box) body.getShape()); } if (body.getShape() instanceof Circle) { drawCircleBody(g,body,(Circle) body.getShape()); } if (body.getShape() instanceof Line) { drawLineBody(g,body,(Line) body.getShape()); } } COM: <s> draw a body </s>
funcom_train/3308257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Entry getEntryFromPool(Object key, Object obj, long expirationTime, long lifespan) { int last = _entryPool.size() - 1; if(last >= 0) { Entry ent = (Entry)_entryPool.remove(last); ent.set(key,obj,expirationTime,lifespan); return ent; } return new Entry(key,obj,expirationTime,lifespan); } COM: <s> get an entry from the free entry pool and set the values </s>
funcom_train/3704654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matchesUrl(String strUrl) { Iterator it = listUrls.iterator(); String strKey; while (it.hasNext()) { strKey = (String) it.next(); if (strKey.equals(strUrl)) { return (true); } } return (false); } // of method COM: <s> see if the url matches a url we accept </s>
funcom_train/16189623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String replaceAll(String input, String match, String replacement) { StringBuffer buffer = new StringBuffer(input.length()); int from = 0; int start = -1; while ((start = input.indexOf(match, from)) > -1) { // append the begin buffer.append(input.substring(from, start)); // append the replacement buffer.append(replacement); // change the pointer in the input from = start + match.length(); } // append the end buffer.append(input.substring(from)); return buffer.toString(); } COM: <s> replaces all occurrences of a string </s>
funcom_train/31902538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MozillaMenuItem copyMenuItem() { MozillaMenuItem menuItem = new MozillaMenuItem("menu.copy"); menuItem.setMnemonic('C'); menuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { copy(); } }); return menuItem; } COM: <s> copy menu item </s>
funcom_train/28644882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createObjects() throws Throwable { Classification classif1 = new Classification("ETAM", "1.1", "210"); classificationService.saveClassification(classif1); Classification classif2 = new Classification("IC", "1.2", "230"); classificationService.saveClassification(classif2); Classification classif3 = new Classification("ETAM", "1.2", "220"); classificationService.saveClassification(classif3); } COM: <s> create some objets usefull for others methods </s>
funcom_train/5421234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkGetManifestEntries(final Class<?> clazz) { String[] entries = cpMon.getManifestEntries(clazz); log.info("Manifest entries for " + clazz); for (int i = 0; i < entries.length; i++) { log.info(entries[i]); } assertTrue("no Manifest entries found for " + clazz, entries.length > 0); } COM: <s> check get manifest entries </s>
funcom_train/14093046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculateCustom() { MyTestClass myClass = new MyTestClass(); myClass.setPosition(CUSTOM); myClass.setReferencePoint(new Point(6, 6)); Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7)); Point v = new Point(6, 6); assertEquals("Custom:", v, l); } COM: <s> test calculation of custom position </s>
funcom_train/50478899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringProperty(String propertyName) { // search different levels to find property String result = null; // The project result = getProjectPoperty(propertyName); // global Preferences if (result == null) { result = getGlobalPreference(propertyName); } // Third level: default if (result == null && fDefaults.contains(propertyName)) { result = fDefaults.getString(propertyName); } return result; } COM: <s> retrieves the string property for the given project </s>
funcom_train/37518196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String qualifiedName() { String str = getName(); if (prefix == null) { return str; } else if (prefix instanceof JNameExpression) { return ((JNameExpression)prefix).qualifiedName() + "." + str; } else if (prefix instanceof JTypeNameExpression) { return ((JTypeNameExpression)prefix) + "." + str; } else { return str; } // WMD what should be done with the universe modifier? } COM: <s> returns the longest name available </s>
funcom_train/44790242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void marshall(String fileName) { try { this.marshall(new FileOutputStream(fileName)); } catch (FileNotFoundException e) { StyleLibrary.logger .error("File " + fileName + " could not be written to"); //$NON-NLS-1$//$NON-NLS-2$ } } COM: <s> save the library in the given file </s>
funcom_train/51186269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AlarmEntry createAlarm(final String bus, final int delayMinutes, final boolean isRepeating) throws BusException { AlarmEntry entry = null; try { entry = new AlarmEntry(bus, delayMinutes, isRepeating, getListener(bus)); } catch (final PastDateException e) { log.error("Alarm entry registered past the date", e); throw new BusException(e); } return entry; } COM: <s> creates an alarm in minutes </s>
funcom_train/263810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private UddfFileTankdata getTankContainingMix(List<UddfFileTankdata> tanksdata, String mixId) throws UddfException { Iterator<UddfFileTankdata> it = tanksdata.iterator(); while (it.hasNext()) { UddfFileTankdata tankdata = it.next(); if (tankdata.getMixref().equals(mixId)) { return tankdata; } } return null; } COM: <s> returns the tank data matching mixref mix id </s>
funcom_train/12163939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateElementFromStringBadXML() { String xml = "not well formed xml"; VoiceXMLRoot protocol = (VoiceXMLRoot) createTestableProtocol( internalDevice); try { protocol.createElementFromString(xml); fail("Expected a ProtocolException."); } catch (ProtocolException e) { // If we are here then the test has passed. } } COM: <s> negative test for create element from string should throw an exception </s>
funcom_train/37434546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws BuildException { try { process(); } catch (Exception e) { if (failonerror) { if (e instanceof BuildException) { throw (BuildException) e; } throw new BuildException(e); } log(e.getMessage(), Project.MSG_WARN); } } COM: <s> execute xsddoc task </s>
funcom_train/2488594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUpdateWhereCondition(Table tableMetadata) { StringBuffer whereCond = new StringBuffer(""); for (Field field : tableMetadata.getFields()) { if (tableMetadata.getPrimaryKeys().contains(field.getName())) { if (whereCond.length() != 0) whereCond.append(" AND "); whereCond.append(field.getName()).append("=").append("? "); } } return whereCond.toString(); } COM: <s> gets the update where condition </s>
funcom_train/34339699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSiguiente() { if (Siguiente == null) {//GEN-END:|35-getter|0|35-preInit // write pre-init user code here Siguiente = new Command("Siguiente", Command.OK, 0);//GEN-LINE:|35-getter|1|35-postInit // write post-init user code here }//GEN-BEGIN:|35-getter|2| return Siguiente; } COM: <s> returns an initiliazed instance of siguiente component </s>
funcom_train/20630260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTable() throws SQLException { if (SQL.checkTableExists(targetConn, this.MATCH_SPEC_TABLE)) { return; } Categories.dataXml().info("-- Creating new table (in target database) " + this.MATCH_SPEC_TABLE); String query = ""; String statement = dao.getStatement(MATCH_SPEC_TABLE, "CREATE"); dao.executeUpdate(targetConn, statement); } COM: <s> creates a match spec table in teh target database </s>
funcom_train/48189767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PosUserRole entity) { LogUtil.log("deleting PosUserRole instance", Level.INFO, null); try { entity = entityManager.getReference(PosUserRole.class, entity .getId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent pos user role entity </s>
funcom_train/29034173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTTPResponse request(HTTPRequest in) { HTTPResponse result = new HTTPResponse(); result.setStatus(HTTPResponse.RC_OK); result.addHeader("Connection: close"); Attributes requestAttribs = createAttributes(in); SOAPProcessor handler = server.newSOAPProcessor( in.getMessageBody().toString(), in.getRequestURI(), requestAttribs); new AsyncSOAPCall(handler).start(); return result; } COM: <s> pass the incoming request to the soapprocessor </s>
funcom_train/1345359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConstants(String var) throws IllegalArgumentException { if (var.length() == 0) throw new IllegalArgumentException("no constants given"); SymbolSet s = new SymbolSet(var); if (!s.validate()) throw new IllegalArgumentException("invalid constants"); if (s.hasDuplicates()) throw new IllegalArgumentException("invalid constants"); constants = s; } COM: <s> sets elements that remain fixed </s>
funcom_train/49608809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReceptionType updateReceptionType(String username,EntityManager em,ReceptionType vo) throws Throwable { try { return (ReceptionType)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } finally { em.flush(); } } COM: <s> update a reception type </s>
funcom_train/3640661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String validate() { if ( getContextValues("unit.").isEmpty() ) { return "At least one unit must be defined"; } if ( isVisible() ) { deleteButton.setEnabled(!getContextValues("unit.").isEmpty() && unitList.getSelectedValue() != null); } return ""; } COM: <s> validate the panel state </s>
funcom_train/12638994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(OutputStream out) throws IOException { DerOutputStream tmp = new DerOutputStream(); if (this.extensionValue == null) { this.extensionId = PKIXExtensions.CRLNumber_Id; this.critical = true; encodeThis(); } super.encode(tmp); out.write(tmp.toByteArray()); } COM: <s> write the extension to the der output stream </s>
funcom_train/549969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(IAttribute attribute) { if (exists(attribute)) return; addToRefresher(attribute); panel.addEntity(attribute); adapters.add(new AttributeAdapter(attribute, adapters.size())); fireTableRowsInserted(adapters.size() - 1, adapters.size() - 1); } COM: <s> adds an attribute in the table if it is not already present </s>
funcom_train/2948128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { // close resources and return connection to the pool try { if (psQuery != null) { psQuery.close(); } if (connQuery != null) { connQuery.close(); } } catch (Exception e) { logger.error("Error", e); } } COM: <s> release resources mainly return the connection to the target database for this query </s>