__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24050419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkEndPtVertexIntersections() { for (Iterator i = segStrings.iterator(); i.hasNext();) { SegmentString ss = (SegmentString) i.next(); Coordinate[] pts = ss.getCoordinates(); checkEndPtVertexIntersections(pts[0], segStrings); checkEndPtVertexIntersections(pts[pts.length - 1], segStrings); } } COM: <s> checks for intersections between an endpoint of a segment string and an </s>
funcom_train/49643216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCountryISO(String pais) { ResultSet rs = DataBaseManager.makeQuery( "select * from country_name where name= '" + DataBaseManager.correctStringToQuery(pais) + "'", conx); try { if (rs.next()) { String cadena = rs.getString("iso_country_code"); rs.getStatement().close(); rs.close(); return cadena; } } catch (SQLException e) { e.printStackTrace(); } return null; } COM: <s> gets the iso code from a country name </s>
funcom_train/13995558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPresentationChangeSuccess() throws Exception { servlet.handleRequest(request, new MockHttpServletResponse()); ValueObjectModel model = getPresentationFromRequest().getModel(); Key id = (Key) model.getKeys().get(0); String newValue = "changed"; testPresentationChange(model, id, getPropertyName(model), newValue); } COM: <s> assumes successful save operation </s>
funcom_train/2881281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, RemoteException { if (!isActive) { throw new RemoteException("RmiConnectorServer is not active"); } return rmiConnectorServer.getMBeanServer().setAttributes(name, attributes); } COM: <s> sets the attributes attribute of the rmi connector proxy object </s>
funcom_train/29314226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNames() { String optionInfo = ""; boolean hasOneWordAlias = false; for (OptionName ndesc : optionNames) { if (ndesc.oneWord) { hasOneWordAlias = true; break; } } for (OptionName ndesc : optionNames) { if (!optionInfo.equals("")) optionInfo += ","; optionInfo += ndesc.name; if (hasOneWordAlias && !ndesc.oneWord) { optionInfo += " "; } } if (!hasOneWordAlias) { optionInfo += " "; } return optionInfo; } COM: <s> get the different option names </s>
funcom_train/9806006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDriverPortRef() { if (isTopLevelPortRef() && _refSingleBitPort.getParent().isInput()) return true; if (!isTopLevelPortRef() && _refSingleBitPort.getParent().isOutput()) return true; return false; } COM: <s> indicate whether the port ref is a driver connection rather than a sink </s>
funcom_train/34907955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDotazyPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_BazeZnalosti_dotazy_feature"), getString("_UI_BazeZnalosti_dotazy_description"), GebzPackage.Literals.BAZE_ZNALOSTI__DOTAZY, false, false, false, null, getString("_UI_PopisPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the dotazy feature </s>
funcom_train/18729273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(float r, float g, float b) { if (this.diffuseColor == null) { this.diffuseColor = new float[3]; } this.diffuseColor[0] = r; this.diffuseColor[1] = g; this.diffuseColor[2] = b; } COM: <s> set the color array to the given floats </s>
funcom_train/42876060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void engineUpdate(byte[] data, int off, int len) { Debug.println("MSSHARSASignFactoryImpl: engineUpdate: entered"); try { if (signOpInProgress) { md.update(data, off, len); } else if (verifyOpInProgress) { jsse.update(data, off, len); } } catch (Exception e) { throw (RuntimeException) new IllegalStateException().initCause(e); } } COM: <s> updates the data to be signed or verified using the specified array </s>
funcom_train/26492848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocalDate(Date date, Locale lc){ String dat = "01/00/00"; try{ DateFormat datef = DateFormat.getDateInstance(DateFormat.SHORT, lc); dat = datef.format(date); }catch(Exception e){ e.printStackTrace(); } return dat; } COM: <s> method used to get the local date </s>
funcom_train/41837902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUDPPing() { String result = "No Return"; EchoService echoService = getEchoService(); if (echoService != null) { if (!echoService.getNoReturnUDP()) result = formatter.format(echoService.getUDPPingLatency()) + " ms"; } return result; } COM: <s> gets the udp ping latency string </s>
funcom_train/13314690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(THE_OpInv n, A argu) { n.tHE_OpName.accept(this, argu); n.nodeToken.accept(this, argu); n.scalarExp.accept(this, argu); n.nodeToken1.accept(this, argu); } COM: <s> t he op name the op name </s>
funcom_train/3078295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAssociatedBuilders() { List associatedBuilders = new ArrayList(); Iterator it = associatedBuilderNames.iterator(); while (it.hasNext()) { String name = (String) it.next(); Builder builder = getProject().getBuilderByName(name); if (builder != null) associatedBuilders.add(builder); } return associatedBuilders; } COM: <s> get list associated builders </s>
funcom_train/25120265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntersectSegment getSegment(IntersectPoint pt){ if(this.dynamicCompare(pt)==0)//can't decide. throw new GeomException("IntersectPoint.getSegment: require different points"); Iterator<IntersectSegment> iter = getAllSegments().iterator(); while(iter.hasNext()){ IntersectSegment seg = iter.next(); if(seg.hasPoint(pt)){ return seg; } } return null;//did not find } COM: <s> return the segment determined by this point and pt </s>
funcom_train/174024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List removeContent(Filter filter) { List old = new ArrayList(); Iterator itr = content.getView(filter).iterator(); while (itr.hasNext()) { Content child = (Content) itr.next(); old.add(child); itr.remove(); } return old; } COM: <s> remove all child content from this parent matching the supplied filter </s>
funcom_train/25740341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPLIExpPeakList basePeakTransform(JPLIExpPeakList spectrum) { double[] intensities = spectrum.getIntensities(); double basePeakInt = 0.0; for (int i=0;i<intensities.length;i++){ basePeakInt = Math.max(intensities[i],basePeakInt); } // divide by highest intensity for (int i=0;i<intensities.length;i++){ intensities[i] = intensities[i]/basePeakInt; } // update spectrum spectrum.setIntensities(intensities); return spectrum; } COM: <s> divide all intensities by the highest intensity </s>
funcom_train/43590490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getPreferencesMenuItem() { if (preferencesMenuItem == null) { preferencesMenuItem = new JMenuItem(); preferencesMenuItem.setText("Preferences"); preferencesMenuItem.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent e) { ZensesApplication.getApplication().getZenses().getViewHandler().showPreferencesView(); } }); } return preferencesMenuItem; } COM: <s> this method initializes preferences menu item </s>
funcom_train/32056658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMouseReleased() { System.out.println("testMouseReleased"); Button b = new Button(); MouseEvent e = new MouseEvent(b, 1, 1, 1, 1, 1, 1,false); BasicMarqueeHandler bm = new BasicMarqueeHandler(); bm.mouseReleased(e); } COM: <s> this function tests mouse released function of vertex view class </s>
funcom_train/31683973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void inheritParentDeepLocks() throws WebDAVException { CollectionImpl parent = (CollectionImpl) getParentCollection(); Enumeration parentLocks = parent.getLocks().elements(); while (parentLocks.hasMoreElements()) { ActiveLock parentLock = (ActiveLock) parentLocks.nextElement(); if (parentLock.getDepth().equals(Collection.deep)) { if (!hasLock(parentLock.getLockToken())) { lock(parentLock); } } } } COM: <s> inherit all deep locks on the parent of this resource </s>
funcom_train/5358575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readEvalWriteLoop() { Object x; for(;;) { try { output.print("> "); output.flush(); if (input.isEOF(x = input.read())) return; write(eval(x), output, true); output.println(); output.flush(); } catch (RuntimeException e) { ; } } } COM: <s> prompt read eval and write the result </s>
funcom_train/14354279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtFilter() { if (txtFilter == null) { txtFilter = new JTextField(); txtFilter.setBounds(new Rectangle(45, 6, 193, 20)); txtFilter.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { myController.reloadSrcList(txtFilter.getText()); } }); } return txtFilter; } COM: <s> this method initializes txt filter </s>
funcom_train/49638500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteSuggestions() throws Exception { storage.addSuggestion("foo", 1, 1); SuggestResponse resp = storage.getSuggestion("f", 10); String xml = resp.toXML(); assertTrue(xml.contains("foo")); storage.deleteSuggestion("foo"); resp = storage.getSuggestion("f", 10); xml = resp.toXML(); assertFalse(xml.contains("foo")); } COM: <s> test deletion of suggestion in storage </s>
funcom_train/39965560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rotateActor() { if (activePlayers.size() > 0) { do { actorPosition = (actorPosition + 1) % players.size(); actor = players.get(actorPosition); } while (!activePlayers.contains(actor)); } else { // Should never happen. throw new IllegalStateException("No active players left"); } } COM: <s> rotates the position of the player in turn the actor </s>
funcom_train/44851580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo( Object inObj ) { if ( inObj instanceof AbstractCode ) { AbstractCode lToCompare = (AbstractCode)inObj; int lCompareToCodeID = getCodeID().compareTo(lToCompare.getCodeID()); if ( lCompareToCodeID == 0 ) { return getElementID().compareTo(lToCompare.getElementID()); } else { return lCompareToCodeID; } } else { throw new ClassCastException(); } } COM: <s> compares two code list elements for the same code id </s>
funcom_train/22029686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws VisADException, RemoteException { synchronized (lock) { cell_rbl.addReference(ref_rbl); Gridded2DSet dummy_set = new Gridded2DSet(xy, null, 1); ref_rbl.setData(dummy_set); rblr.toggle(true); } } COM: <s> enable user to draw move vectors with optional deltas </s>
funcom_train/51482704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertFigures(Vector figures, int dx, int dy) { FigureEnumeration e = new FigureEnumerator(figures); while (e.hasMoreElements()) { Figure figure = e.nextFigure(); figure = fView.add(figure); fView.addToSelection(figure); } fView.moveSelection(dx,dy); } COM: <s> inserts a vector of figures and translates them by the </s>
funcom_train/10980035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void replaceProperties(Properties orig, Properties props, Map vars) { Map.Entry entry = null; for (Iterator i = orig.entrySet().iterator(); i.hasNext();) { entry = (Map.Entry) i.next(); props.setProperty((String) entry.getKey(), convertParam((String) entry.getValue(), vars)); } } COM: <s> p replaces placeholders from one properties values set to another </s>
funcom_train/43467147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncrypt() throws Exception { assertEquals("", PasswordService.getInstance().encrypt(null)); assertEquals("2jmj7l5rSw0yVb/vlWAYkK/YBwk=", PasswordService.getInstance().encrypt("")); assertEquals("qUqP5cyxm6YcTAhz05Hph5gvu9M=", PasswordService.getInstance().encrypt("test")); } COM: <s> tests the encypt method </s>
funcom_train/46719210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstraintToursiteHref() throws Throwable { OPFPackage pack = createTestPackage(true,true,true,true, true); List<Tour> tourList = pack.getTours(); Tour tour; TourSite site; tour = new Tour(); tour.setTitle("my tour"); tourList.add(tour); // no href site = new TourSite(); site.setTitle("this one has no href"); tour.add(site); // bad href not directly testable runConstraintChecks(pack,1,false,OPFConstraintViolation.Type.TOURSITE_BAD_HREF, false); } COM: <s> constraint check href field set for tour sites </s>
funcom_train/26401288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJspAccessSuccessful() throws Exception { WebConversation wc = new WebConversation(); info("JSP access to bug report " + normalReportID); WebResponse resp = loginPage(wc, "getBugReport.do?action=show&id=" + normalReportID, true); assertTrue("Cannot view the bug report " + normalReportID, resp.getText().indexOf(normalReportTitle) >= 0); } COM: <s> jsp test try to access as </s>
funcom_train/17825034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new NameSorter()); viewer.setInput(ResourcesPlugin.getWorkspace()); getSite().getPage().addSelectionListener(this); makeActions(); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); } COM: <s> this is a callback that will allow us </s>
funcom_train/24316159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadProperties(String propertyFileName) { if (propertyFileName != null) { File file = new File(propertyFileName); if (file.exists()) { loadProperties(file); } else { InputStream is = this.getClass() .getClassLoader() .getResourceAsStream(propertyFileName); if (is != null) loadProperties(is); } } else loadProperties(); } COM: <s> loading properties from properties file name </s>
funcom_train/37803465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasExternalLinks() { for (Iterator iterator = getNodes().iterator(); iterator.hasNext();) { EdgedGraphNode node = (EdgedGraphNode) iterator.next(); /* if (node.getGraph() != this) { log.warning("Found node which is in graph but have different graph field: " + node); } */ if (hasExternalLinks(node)) { return true; } } return false; } COM: <s> finds whether this graph has edges whose nodes are not in a graph </s>
funcom_train/2294588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsRelationFilter filterDefinedInContent() { CmsRelationFilter filter = (CmsRelationFilter)this.clone(); if (filter.m_types.isEmpty()) { filter.m_types.addAll(CmsRelationType.getAllDefinedInContent()); } else { filter.m_types = new HashSet(CmsRelationType.filterDefinedInContent(filter.m_types)); } return filter; } COM: <s> returns an extended filter with defined in content type restriction </s>
funcom_train/29921878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractNode(Name entryToExtract, SOAPElement sElement ){ try { return ((SOAPElement)(sElement.getChildElements(entryToExtract)).next()).getValue(); } catch (Exception ex) { System.out.println("The element named " + entryToExtract + "is not found in the SOAP message"); return null; } } COM: <s> extract text node from soap message </s>
funcom_train/29510832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getRegionField() { if (regionField == null) { regionField = new JList(); regions = controller.getRegions(); regionField.setModel(regions); regionField.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); regionField.setVisibleRowCount(1); regionField.setPreferredSize(new Dimension(120, 20)); regionField.addListSelectionListener(new ListChanged(regions)); } return regionField; } COM: <s> this method initializes region field </s>
funcom_train/42840455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incrementRepeatCount(EmailMessage emailMessage) { DbOomQuery q = query(sql("update $T{EmailMessage email} set $email.repeatCount=:take where $email.id=:id")); emailMessage.incrementRepeatCount(); q.setInteger("take", emailMessage.getRepeatCount()); q.setLong("id", emailMessage.getId()); q.executeUpdateAndClose(); } COM: <s> increments repeat count </s>
funcom_train/35863727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCacheName() { if (cacheName != null && cacheName.length() > 0) { LOG.log(Level.FINE, "Using configured cacheName of {0}.", cacheName); return cacheName; } else { LOG.log(Level.FINE, "No cacheName configured. Using default of {0}.", DEFAULT_CACHE_NAME); return DEFAULT_CACHE_NAME; } } COM: <s> a meaningful name representative of the page being cached </s>
funcom_train/17675428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findFetchGroups(ArrayList a) { FetchGroup[] groups = classMetaData.fetchGroups; int n = groups.length; for (int i = 0; i < n; i++) { FetchGroup g = groups[i]; if (g.contains(this)) a.add(g); } } COM: <s> add all fetch groups we belong to to a </s>
funcom_train/10600398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSelectorContext(Map objectModel, Parameters parameters) { String name = parameters.getParameter("parameter-name", this.parameterName); if (name == null) { this.getLogger().warn("No parameter name given -- failing."); return null; } return ObjectModelHelper.getRequest(objectModel).getParameter(name); } COM: <s> p return the value of the parameter identified by the configured parameter </s>
funcom_train/25732096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getTagElement(String key) { Element tag; NodeList list = e.getElementsByTagName("tag"); for (int i = 0; i < list.getLength(); i++) { tag = (Element) list.item(i); if (tag.getAttribute("name").toLowerCase() .equals(key.toLowerCase())) { return tag; } } return null; } COM: <s> gets the tag element </s>
funcom_train/13478215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void responseTimedOut() { requestCounter++; if (requestCounter > 20) { if (listener != null) { listener.registryUnreachable(); } } else if (lastRequest != null) { try { this.dispatcher.sendRequest(lastRequest, this); } catch (IOException io) { log.error("Unexpected IOException while resending:", io); //$NON-NLS-1$ } } } COM: <s> should only happen if the registry is down or </s>
funcom_train/21871094
/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) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); gridLayout.setColumns(2); jContentPane = new JPanel(); jContentPane.setPreferredSize(new java.awt.Dimension(1882,80)); jContentPane.setName("Acciones"); jContentPane.setLayout(gridLayout); jContentPane.add(getJPanel(), null); jContentPane.add(getJScrollPane(), null); } jContentPane.setVisible(true); return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/27761188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object convert(Object value, Class convertTo) throws TypeConversionException { // If the value is null and primitive, return the primitives initial value // by calling the convertString method that does this work. if (value == null) { return convertString(null, convertTo); } return super.convert(value, convertTo); } COM: <s> this only handles the case of primitives and nulls </s>
funcom_train/10211763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(PrintWriter os) { os.println("Dataset {"); for(Enumeration e = vars.elements(); e.hasMoreElements(); ) { BaseType bt = (BaseType)e.nextElement(); bt.printDecl(os); } os.print("} "); if(name != null) os.print(name); os.println(";"); } COM: <s> print the code dds code on the given code print writer code </s>
funcom_train/20769009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(){ if(!libLoaded) return; int status=nativeClose(); if(status!=0) System.err.println("SiLabsC8051F320.close(): returned "+errorText(status)); isOpened=false; eventAcquisitionEnabled=false; // log.info("SiLabsC8051F320.close(): device closed"); } COM: <s> closes the device and frees the internal device handle </s>
funcom_train/28763191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivityRequesterId(java.lang.String value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_ActivityRequesterId, jj_ActivityRequesterId,kk_ActivityRequesterId, com.intersys.objects.Database.RET_PRIM, "ActivityRequesterId", dh); return; } COM: <s> sets new value for code activity requester id code </s>
funcom_train/47139551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsStock (Stock st, DataBasket db) { boolean fResult = m_stSource.containsStock (st, db); if (fResult) { for (Iterator i = st.keySet (db).iterator(); i.hasNext();) { String sKey = (String) i.next(); if (countItems (sKey, db) < st.countItems (sKey, db)) { return false; } } } return fResult; } COM: <s> check whether the filtered stock contains the given stock </s>
funcom_train/21378467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVertexColor(E3DVector4F[] vertexColor) { vertices[0].setVertexColor(vertexColor[0]); vertices[1].setVertexColor(vertexColor[1]); vertices[2].setVertexColor(vertexColor[2]); vertices[3].setVertexColor(vertexColor[3]); } COM: <s> set the color of the vertices of the quad </s>
funcom_train/18861283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ActionMappingsType createActionMappings() { ActionMappingsType element = StrutsConfigFactory.eINSTANCE .createActionMappingsType(); StrutsConfigType root = ((ConfigEditor) getPage().getEditor()) .getModelRoot(); Command command = SetCommand.create(getEditingDomain(), root, StrutsConfigPackage.eINSTANCE.getActionMappingsType(), element); if (command.canExecute()) { getEditingDomain().getCommandStack().execute(command); } return element; } COM: <s> creates a new action mappings element and adds it to the root element </s>
funcom_train/9429259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getContactId(long rawContactId) { getReadableDatabase(); try { DatabaseUtils.bindObjectToProgram(mContactIdQuery, 1, rawContactId); return mContactIdQuery.simpleQueryForLong(); } catch (SQLiteDoneException e) { // No valid mapping found, so return 0 return 0; } } COM: <s> returns contact id for the given contact or zero if it is null </s>
funcom_train/42785834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerObject(HLAObject obj) { if (obj.getHandle() != null) return; // Already registered. try { model.getRtiAdapter().registerObjectInstance(obj); model.addObject(obj); } catch (Exception e) { logger.error(name + "/" + obj.getName(), e); deregisterObject(obj); } logger.debug("object instance handle=" + handle); } COM: <s> register a new object instance with the rti </s>
funcom_train/26199956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendGeneratedMDX(String s){ /** * Commented by Prakash. * * 14 Nov 06. */ if (toolbar.getAppendGeneratedMDX()) textArea.append(s); /** * Line Inserted by Prakash * Update TextArea with generated Query. * 14 Nov 06 */ //textArea.setText(s); } COM: <s> appends specified text to the text area </s>
funcom_train/8661975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(String[] args) throws Throwable { int n = args.length - 1; if (n >= 0) { String[] args2 = new String[n]; for (int i = 0; i < n; ++i) args2[i] = args[i + 1]; run(args[0], args2); } } COM: <s> loads a class and calls code main code in that class </s>
funcom_train/49756950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closePort() { if (commPort != null) { if (isSerialPort()) { ((SerialPort) commPort).removeEventListener(); } else if (isParallelPort()) { ((ParallelPort) commPort).removeEventListener(); } commPort.close(); commPort = null; commPortStream = null; inputStream = null; } portLastUsed = -1; } COM: <s> close a previously opened port </s>
funcom_train/15945567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAddition(Vertex vertex) { //know that evaluate functions overwrite lastInput/lastOutput if (!vertexPredicate.evaluateVertex(vertex)) return; //return if vertex already exists in visible graph if (visibleVertices.contains(vertex)) return; //add copy to getVisibleVertices visibleVertices.add(vertex); //add copy to VisualizedVertices getVisualizedVertices().add(vertex); //add coordinate information initializeVertexLocation(vertex); } COM: <s> the method code update addition vertex code is called after adding </s>
funcom_train/3024431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelFont(Font font) { label.setSLFont(font); // Reset the height and width Dimension labelSize = label.getPreferredSize(); label.setSize(labelSize); high = Math.max(iconWidth + 2 * iconMargin, labelSize.height + 2 * labelMargin); wide = labelSize.width + iconWidth + 2 * iconMargin + 2 * labelMargin; // Save the font this.font = font; } COM: <s> set the font </s>
funcom_train/14274720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resizeVFSFile(FileReference file, int newSize) throws ConduitHandlerException, NotConnectedException { try { jHotSync.resizeVFSFile(file, newSize); } catch (DLPFunctionCallException e) { throw new ConduitHandlerException(e.toString(), e); } } // end-method COM: <s> resizes the specified file to the specified new size in bytes </s>
funcom_train/5592223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFileRoots(DefaultMutableTreeNode root) { File[] files = File.listRoots(); for(int i = 0; i < files.length; i++) { DefaultMutableTreeNode node = getNode(files[i].getPath()); createSubNodes(node, files[i].listFiles()); fileTree.fireTreeCollapsed(new TreePath(node.getPath())); root.add(node); } } COM: <s> adds file roots to root node </s>
funcom_train/50034167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getArchivesNumber() throws HibouTechnicalException { Transaction tr = null; Session session = null; try { session = HibernateUtil.openSession(); tr = session.beginTransaction(); Criteria criteria = session.createCriteria(Document.class) .add(Restrictions.eq("deleted", false)) .add(Restrictions.eq("type", "Archives")); return criteria.list().size(); } catch (Exception e) { if(tr != null) { tr.rollback(); } throw new HibouTechnicalException(e); } finally { session.close(); } } COM: <s> get the total number of downloadable archives </s>
funcom_train/22449079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean extractBoolean(InputStream aIn) throws IOException { // initialize array byte[] buffer = new byte[4]; Arrays.fill(buffer, (byte) 0); // read bytes aIn.read(buffer, 0, buffer.length); int result = buffer[0]; result <<= 4; result = result | buffer[1]; result <<= 4; result = result | buffer[2]; result <<= 4; result = result | buffer[3]; return result > 0; } COM: <s> extract boolean field from 00 </s>
funcom_train/22048101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(boolean b) { if (b) { m_list.setBackground(UIManager.getColor("TextArea.background")); } else { m_list.setBackground(UIManager.getColor("Label.background")); } m_list.setEnabled(b); } COM: <s> set weather the listd is enabled or disabled </s>
funcom_train/48506410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User (String name, String encryptedPassword) { this.name = name; this.encryptedPassword = encryptedPassword; this.iconName="default"; this.rating=0; this.gamesWon=0; this.gamesLost=0; DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); java.util.Date date = new java.util.Date(); this.lastLoginString = dateFormat.format(date); this.isAdmin=false; this.isOnline=true; // If my name is TestBlockedUser then user shall be blocked if(name=="TESTBLOCKEDUSER"){ this.blocked=true; } else { this.blocked=false; } } COM: <s> construct a user from a given name and encrypted password </s>
funcom_train/26574050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String xmlProject(Project project) { String strXML = ""; strXML = "<name>" + project.getName() + "</name>\n" + "<description>" + project.getDescription() + "</description>\n" + "<process>"+ attributeCacher.getProcess(project.getProcessPK()).getName() + "</process>\n"; return strXML; } COM: <s> method xml project </s>
funcom_train/20883207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pause() throws EngineStateError { synchronized (engineStateLock) { checkEngineState(DEALLOCATED | DEALLOCATING_RESOURCES); if (testEngineState(PAUSED)) { return; } handlePause(); long[] states = setEngineState(RESUMED, PAUSED); postEnginePaused(states[0], states[1]); } } COM: <s> pauses the audio stream for this code engine code and put </s>
funcom_train/24627920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { //save(null, -1); //lastbbox_.setBounds(win_.bbox); win_.remove(); // just in case win_=null; getBrowser().repaint(100); // repaint everything because lenses like Magnify have greater range destroy(); ////System.out.println("*** closing lens: "+getClass().getName()); } COM: <s> removes from lens man </s>
funcom_train/511319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClasspath() { StringBuffer sb = new StringBuffer(); for (File component : pathComponents) { if (sb.length() > 0) { sb.append(File.pathSeparatorChar); } sb.append(component.getAbsolutePath()); } return sb.toString(); } COM: <s> returns the classpath this classloader will consult </s>
funcom_train/44451371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNorthColor(int color) throws IllegalArgumentException, IllegalStateException { if (hasCorrectColoringLimits()) { if (color >= 0 && color < numVerticalColors) { northColor = color; } else { throw new IllegalArgumentException("The color must be between 0 and " + (numVerticalColors - 1)); } } else { throw new IllegalStateException("The coloring limits must be set first"); } } COM: <s> sets the north edge color of this tile </s>
funcom_train/41108996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(Long id) { if(id == null){ throw new NullPointerException("user's id"); } User user = em.find(User.class, id); if (user == null) { throw new IllegalStateException("The given user doesn't exist"); } user.getComments().size();//aby se přenesl a dalo pracovat i s listem return user; } COM: <s> it gets user with the specific id </s>
funcom_train/3328324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(Object obj) { if (obj == null) { for (int i = 0; i < elementCount; i++) { if (elements[i] == null) return i; } } else { for (int i = 0; i < elementCount; i++) { if (obj.equals(elements[i])) return i; } } return -1; } //-- indexOf COM: <s> returns the index of the first occurrence of the specified element </s>
funcom_train/5324845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openFile(String fileName, boolean closeFirst) { if (closeFirst) { // drag/drop JDXSource source = JSVPanelNode.findSourceByNameOrId((new File(fileName)) .getAbsolutePath(), panelNodes); if (source != null) closeSource(source); } openDataOrFile(null, null, null, fileName, -1, -1); } COM: <s> opens and displays a file </s>
funcom_train/28494433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (selection instanceof IStructuredSelection) { try { Object current = ((IStructuredSelection)selection).getFirstElement(); if(current instanceof AirportPartAdapter) { AirportPartAdapter first = (AirportPartAdapter) current; _viewer.setInput(new PropertyProvider(first)); _viewer.refresh(); _table.update(); } } catch(Exception e) { e.printStackTrace(); } } } COM: <s> will be called whenever the selected element changes selected through the airport </s>
funcom_train/13546965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areOutsNotPrimals(ArrayList deflist) { boolean isNotPrimal = true; for (Iterator its = ((ArrayList)deflist.clone()).iterator(); its.hasNext(); ) { Operand op_Operand = (Operand)its.next(); if(op_Operand != null) if(op_Operand.isPrimal()) isNotPrimal = false; } return isNotPrimal; } COM: <s> checks that all defs are not primal </s>
funcom_train/40667553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkImports( final Buffer buffer ) { myErrorSource.clear(); final String filename = buffer.getPath(); if ( !filename.endsWith( ".java" ) ) { return ; // not a java file, don't check } JavaParser parser = new JavaParser(); CUNode cu = parser.parse( buffer ); cu.setFilename(buffer.getPath()); checkImports(cu); } COM: <s> this method will parse the given buffer prior to checking the imports </s>
funcom_train/29418448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStandardOutputAndError() { String a=getStandardOutput().trim(), b; synchronized(this) { b=stderr; } b=b.trim(); if (a.length()!=0 && b.length()!=0) return a+"\n"+b; else return a+b; } COM: <s> wait for the process to finish and return its standard output standard error </s>
funcom_train/1664452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element do_export(Document xmlDoc, boolean withContent) { Element e = xmlDoc.createElement("indexCategory"); if (id != -1) e.setAttribute("name", name); if(children == null) loadChildren(); for(final Iterator it = children.iterator(); it.hasNext();) { final IndexTreeNode node = (IndexTreeNode)(it.next()); e.appendChild(node.do_export(xmlDoc, withContent)); } unloadChildren(); return e; } COM: <s> will export private keys too br </s>
funcom_train/28418945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int fetchRegexpEnd(String str) { try { int i = 0, count = 1; while (count > 0) { i++; if ((str.charAt(i)) == '[') { count++; } if ((str.charAt(i)) == ']') { count--; } } return i; } catch (Exception e) { return -1; } } COM: <s> find the point where the regular expression ends </s>
funcom_train/34196593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getClassName(String classType) { int i = classType.indexOf('<'); if (i != -1) { return classType.substring(0, i); } else { i = classType.indexOf('['); if (i != -1) { return classType.substring(0, i); } else { return classType; } } } COM: <s> removes type parameters and array brackets </s>
funcom_train/46734964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertUserRef(DisplayModel insertUserRef) { if (Converter.isDifferent(this.insertUserRef, insertUserRef)) { DisplayModel oldinsertUserRef= new DisplayModel(this); oldinsertUserRef.copyAllFrom(this.insertUserRef); this.insertUserRef.copyAllFrom(insertUserRef); setModified("insertUserRef"); firePropertyChange(String.valueOf(RECORDITEMS_INSERTUSERREFID), oldinsertUserRef, insertUserRef); } } COM: <s> user that created this record item </s>
funcom_train/45398288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deserializeProperties (T instance, Map<String, Object> properties) { this.detectProperties(); for (String name : properties.keySet()) { ClassProperty property = this.getProperty(name); if (!property.isWritable()) throw new ClassPropertyAccessException(this, property, "Cannot set read-only property:" + name); property.setValue(instance, ReflectionUtil.coerce(property.getType(), properties.get(name))); } } COM: <s> the keys on the map should correspond to properties that really </s>
funcom_train/3341066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuilder b = new StringBuilder(2 + 3 * (length - 1)); for (int i = 0; i < length; i++) { if (i > 0) { b.append(':'); } b.append(NumberUtils.hex(address[i] & 0xFF, 2)); } return b.toString(); } COM: <s> convert this address to a string representation </s>
funcom_train/18729766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vertex multiply(Vertex v, boolean asVertex) { double fourth = asVertex ? 1 : 0; double res[] = multiply(new double[]{v.getX(), v.getY(), v.getZ(), fourth}); return new Vertex(res[0], res[1], res[2]); } COM: <s> multiply a vertex with a matrix either as a vertex or vector </s>
funcom_train/8089156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean displayResultset(int index) { boolean result; int i; result = true; if (m_DisplayedResultsets != null) { result = false; for (i = 0; i < m_DisplayedResultsets.length; i++) { if (m_DisplayedResultsets[i] == index) { result = true; break; } } } return result; } COM: <s> checks whether the resultset with the given index shall be displayed </s>
funcom_train/48665938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleViewReactionLog() { try { reactionAlarm.reset(); if(reactionLogViewer == null) { reactionLogViewer = new ReactionLogViewer(rmsReactionLogService); reactionLogViewer.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent e) { super.windowClosed(e); reactionLogViewer = null; } }); } UIUtils.centerFrameAndShow(this.viewContainer.getAppFrame(), reactionLogViewer); } catch(Exception e) { UIExceptionMgr.userException(e); } } COM: <s> shows the reaction log </s>
funcom_train/18315689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFrameworkEventJMSImpl() throws Throwable { try { assertNotNull( FrameworkManagerFactory.getObject().getFrameworkEventJMSImpl() ); } catch( Throwable exc ) { FrameworkBaseObject.logMessage( "FrameworkManagerTest.testGetFrameworkEventJMSImpl() failed - " + exc.toString() ); throw exc; } COM: <s> tests get framework event jmsimpl on framework manager </s>
funcom_train/38322860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMethod(String sMethod) { try { if (aDescriptions!=null) { String sInfo=(String)aDescriptions.get(aDescriptions.size()-1); ArrayList aMethodInfo=(ArrayList)hMethods.get(sInfo); if (aMethodInfo==null) aMethodInfo=new ArrayList(); aMethodInfo.add(sMethod); hMethods.put(sInfo, aMethodInfo); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> add the method to be used normally either get or post </s>
funcom_train/1005255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void addAlwaysBottom(DisplayObject child) { if (child != null) { events.offer(new DisplayObjectEvent(DisplayObjectEvent.EVENT_MOVE_BOT, child)); if (always_bottom_elements == null) { always_bottom_elements = new Vector<DisplayObject>(); always_bottom_elements.add(child); } else if (!always_bottom_elements.contains(child)) { always_bottom_elements.add(child); } } } COM: <s> bottom b 2 b 1 b 0 </s>
funcom_train/13847968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocatorReg findReg(LookupLocator lct) { Iterator iter = undiscoveredLocators.iterator(); while(iter.hasNext()) { LocatorReg reg = (LocatorReg)iter.next(); if (reg.l.equals(lct)) return reg; }//end loop return null; }//end findReg COM: <s> from the sets of elements corresponding to yet to be discovered </s>
funcom_train/4696724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerHelper(AbstractAggregatorHelper helper) throws AggregatorManagerException { String fnName = helper.getFunctionName(); if (aggregatorHelpers.containsKey(fnName)) { throw new AggregatorManagerException("The Aggregator: " + fnName + " is already in use."); } aggregatorHelpers.put(fnName, helper); } COM: <s> registers under the </s>
funcom_train/39146941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRenderWindowAndCanvas() { if (this.createdRenderWindows.size() >= this.maxNumberOfRenderWindows) { throw new RuntimeException( "Maximum number of RenderWindows exeeded"); } RenderWindowCanvasPair pair = doCreateRenderWindowAndCanvas(); this.availableRenderWindows.put(pair.canvas, pair.renderWindow); this.createdRenderWindows.add(pair); } COM: <s> creates a new </s>
funcom_train/19378194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inAInvClassifierExpressionBody(AInvClassifierExpressionBody expressionBody) { String methodName = "inAInvClassifierExpressionBody"; ExceptionUtils.checkNull(methodName, "expressionBody", expressionBody); if (this.translatedExpression != null) { this.translatedExpression.setName(TranslationUtils.trimToEmpty(expressionBody.getName())); this.translatedExpression.setKind(ExpressionKinds.INV); } } COM: <s> sets the kind and name of the expression for code inv code expressions </s>
funcom_train/23453368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHasPreconditionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Profile_hasPrecondition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Profile_hasPrecondition_feature", "_UI_Profile_type"), ProfilePackage.Literals.PROFILE__HAS_PRECONDITION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the has precondition feature </s>
funcom_train/43097661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent evt) { if (evt instanceof RemoveAssociationEvent) { if ("ownedElement".equals(evt.getPropertyName())) { Object o = getChangedElement(evt); if (contains(o)) { if (o instanceof Collection) { removeAll((Collection) o); } else { removeElement(o); } } } } else { super.propertyChange(evt); } } COM: <s> override umlcombo box model2s default handling of remove association </s>
funcom_train/48404759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addMouseDownHandler(com.smartgwt.client.widgets.events.MouseDownHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.MouseDownEvent.getType()) == 0) setupMouseDownEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.MouseDownEvent.getType()); } COM: <s> add a mouse down handler </s>
funcom_train/47585491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTaskPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PartnerBinding_task_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PartnerBinding_task_feature", "_UI_PartnerBinding_type"), PmmPackage.Literals.PARTNER_BINDING__TASK, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the task feature </s>
funcom_train/19433583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveIQuery() throws ChunkStoreException { myChunkStore.put(myQuery1, VolatilityEnum.STABLE, new CacheReasonEnum[]{CacheReasonEnum.QUERY}); myChunkStore.remove(myQuery1); IChunk c1 = myChunkStore.get(myQuery1); assertEquals(null, c1); } COM: <s> class under test for ichunk remove iquery </s>
funcom_train/5572781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void subAppend(LoggingEvent event) { try { File tmp = File.createTempFile(prefix,suffix,dir); Writer out = new BufferedWriter(new FileWriter(tmp)); out.write(event.message); out.close(); /* this Appender is not supposed to be used for logging of Exceptions */ } catch (Exception e) { errorHandler.error("Error during creation of temporary File!",e,1); } } COM: <s> this method does actual writing </s>
funcom_train/1408605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("country", this.country) .append("address", this.address) .append("province", this.province) .append("city", this.city).toString(); } COM: <s> returns a multi line string with key value pairs </s>
funcom_train/16300460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runBare() throws Throwable { Throwable catchedThrowable = null; setUp(); try { runTest(); } catch (Throwable thrownDuringRun){ catchedThrowable = thrownDuringRun; } finally { try { tearDown(); } catch (Throwable thrownDuringTearDown){ catchedThrowable = (catchedThrowable != null) ? catchedThrowable : thrownDuringTearDown; } finally { if (catchedThrowable != null) { throw catchedThrowable; } } } } COM: <s> runs the test by invoking </s>
funcom_train/36022079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Comment getComment(long commentID){ String COMMENT = TamTamyAPI.url + "/comment/" + commentID + TamTamyAPI.type + "?token=" + token.getToken() + "&appName="+TamTamyAPI.APP_NAME; String comment = doGetRequest(COMMENT); Comment comm = null; if(TamTamyAPI.type.toUpperCase().indexOf(TamTamyAPI.REQ_XML) != -1) comm = new XMLComment(comment); return comm; } COM: <s> calls the uri to access the resource to have back the comment item </s>