__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21734407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupKeys() { this.input.setActionSpeed(20); KeyBindingManager.getKeyBindingManager().add("rain", KeyInput.KEY_I); KeyBindingManager.getKeyBindingManager().add("snow", KeyInput.KEY_O); KeyBindingManager.getKeyBindingManager().add("clear", KeyInput.KEY_M); } COM: <s> setup rain and snow triggers </s>
funcom_train/32876330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(java.lang.Object otherObject) { boolean equal = false; if (otherObject instanceof Version) { Version other = (Version) otherObject; equal = (this == other) || ((this.major_ == other.major_) && (this.minor_ == other.minor_)); } return equal ; } COM: <s> compares major and minor version number of this objects with the other </s>
funcom_train/34341183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodCuenta() { if (CodCuenta == null) {//GEN-END:|31-getter|0|31-preInit // write pre-init user code here CodCuenta = new TextField("CodCuenta", null, 5, TextField.ANY);//GEN-LINE:|31-getter|1|31-postInit // write post-init user code here }//GEN-BEGIN:|31-getter|2| return CodCuenta; } COM: <s> returns an initiliazed instance of cod cuenta component </s>
funcom_train/31358990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getActionSensitivity(int buttonNo){ switch (buttonNo){ case RemoteClientGUI.NEW: return drivers; case RemoteClientGUI.STOP: if (status.startsWith(WAITING)) return true; return !system && super.getActionSensitivity(buttonNo); case RemoteClientGUI.START: if (status.startsWith(WAITING)) return false; case RemoteClientGUI.DELETE: return !system;// && super.getActionSensitivity(buttonNo); } return super.getActionSensitivity(buttonNo); } COM: <s> is this tool in the toolbar sensitive </s>
funcom_train/31986613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseUp(MouseEvent e, int x, int y) { if (e.isPopupTrigger()) { handlePopupMenu(e, x, y); } else if (e.getClickCount() == 2) { handleMouseDoubleClick(e, x, y); } else { super.mouseUp(e, x, y); handleMouseUp(e, x, y); handleMouseClick(e, x, y); } } COM: <s> mouse listener method for mouse up events </s>
funcom_train/3173181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkSex(Indi indi) { if(sex==3) return true; switch(indi.getSex()) { case PropertySex.MALE: if(sex!=0) return false; else return true; case PropertySex.FEMALE: if(sex!=1) return false; else return true; case PropertySex.UNKNOWN: if(sex!=2) return false; else return true; default: return false; } } COM: <s> checks if the sex of an indi matches the user choice </s>
funcom_train/40879294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAccountStatus(String accountStatus) { if(accountStatus != null) { if(accountStatus.equalsIgnoreCase("deleted")) { setAccountStatus(AccountStatus.DELETED); } else if(accountStatus.equalsIgnoreCase("suspended")) { setAccountStatus(AccountStatus.PURGED); } else if(accountStatus.equalsIgnoreCase("suspended")) { setAccountStatus(AccountStatus.SUSPENDED); } else { // shouldn't be here logger.error("Encountered an invalid account status"); assert(false); } } } COM: <s> helper setter to convert from a string value to account status </s>
funcom_train/44166002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disconnect(String reason) { if (connection.getMessageHandler() != null) { try { connection.getMessageHandler().handle(connection, DOMMessage.createMessage("disconnect", "reason", reason)); } catch (FreeColException e) { logger.log(Level.WARNING, "Rx disconnect", e); } } askToStop(); } COM: <s> disconnects this thread </s>
funcom_train/9774843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoPoint3D Point3DIn(String label, Region region, double x, double y, double z) { //Application.debug("Point3DIn - \n x="+x+"\n y="+y+"\n z="+z); AlgoPoint3DInRegion algo = new AlgoPoint3DInRegion(cons, label, region, x, y, z); GeoPoint3D p = algo.getP(); return p; } COM: <s> point in region with cartesian coordinates x y z </s>
funcom_train/31689695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLength(Length func) throws DataStoreException { StringBuffer strbuf = new StringBuffer(); strbuf.append("LENGTH("); Object lenObj = func.getLengthObject(); if(lenObj instanceof String) { strbuf.append(addEscapeChars((String) lenObj)); } else if(lenObj instanceof ColumnRef) { strbuf.append(((ColumnRef)lenObj).getFullRef()); } strbuf.append(")"); return strbuf.toString(); } COM: <s> returns the sql length statement from the given </s>
funcom_train/12165525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteFragmentLink() throws Exception { final FraglinkAttributes attributes = (FraglinkAttributes) ProtocolIntegrationTestHelper. provideAttributes(FraglinkAttributes.class); final VolantisProtocol protocol = getProtocol(); MethodInvoker invoker = new MethodInvoker() { public void invoke() throws Exception { protocol.writeFragmentLink(attributes); } }; String expecting = getExpectedWriteFragmentLinkResult(); ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting); } COM: <s> this method tests the method public void write fragment link fraglink attributes </s>
funcom_train/133852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBasesTrimmedRight(int theBasesTrimmed) { this.rightTrim = theBasesTrimmed; Rectangle2D.Double coordbox = bar_glyph.getCoordBox(); if (right_trim_glyph != null) { bar_glyph.removeChild(right_trim_glyph); } right_trim_glyph = new FillRectGlyph(); right_trim_glyph.setColor(trim_color); right_trim_glyph.setCoords( coordbox.x + coordbox.width - theBasesTrimmed, coordbox.y, theBasesTrimmed, coordbox.height); bar_glyph.addChild(right_trim_glyph); bar_map.toBack(right_trim_glyph); } COM: <s> highlights last n bases called </s>
funcom_train/16102862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCancel() { if (jButtonCancel == null) { jButtonCancel = new JButton(); jButtonCancel.setText(rb.getString("dialog.cancel")); //$NON-NLS-1$ jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); } }); } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/15617417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parserResult(ParserOutput parserOutput, String fileName) throws IOException, ParserException { String raw = TestFileUtil.retrieveFileContent(TestFileUtil.TEST_TOPICS_DIR, fileName); String topicName = TestFileUtil.decodeTopicName(fileName); ParserInput parserInput = this.parserInput(topicName); return ParserUtil.parse(parserInput, parserOutput, raw); } COM: <s> given a topic file name located within the test topics dir parse the </s>
funcom_train/2628469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddValueBySignature() { System.out.println("addValueBySignature"); AttributesType signature = null; String name = ""; Set<String> values = null; GUIStructureWrapper instance = null; instance.addValueBySignature(signature, name, values); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of add value by signature method of class guistructure wrapper </s>
funcom_train/9919052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVecAttribute(String name, float x, float y, float z, float w) { int loc = getAttribLocation(name); if (-1 < loc) gl.glVertexAttrib4fARB(loc, x, y, z, w); } COM: <s> sets the vec4 attribute with name to the given values </s>
funcom_train/45740578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getDumpFileCommand() { if (dumpFileCommand == null) {//GEN-END:|37-getter|0|37-preInit // write pre-init user code here dumpFileCommand = new Command("Dump file", Command.ITEM, 0);//GEN-LINE:|37-getter|1|37-postInit // write post-init user code here }//GEN-BEGIN:|37-getter|2| return dumpFileCommand; } COM: <s> returns an initiliazed instance of dump file command component </s>
funcom_train/34579207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadFromDB() throws ClassNotFoundException, SQLException{ Connection conn = DBUtils.getConnection(); DBUtils.selectRecord(new GIPSERecord(0, new Date(),"","",0,0), conn);//this won't find anything, but shouldn't throw an error conn.close(); assertTrue(true); } COM: <s> tests that we can execute a select against db </s>
funcom_train/4558026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void broadcastMessage(MapleCharacter source, MaplePacket packet, boolean repeatToSource, boolean ranged) { broadcastMessage(repeatToSource ? null : source, packet, ranged ? MapleCharacter.MAX_VIEW_RANGE_SQ : Double.POSITIVE_INFINITY, source.getPosition()); } COM: <s> ranged and repeat according to parameters </s>
funcom_train/41058905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean run(JMudObject whoToRunThisBehaviorOn, JMudEvent jme) { if (whoToRunThisBehaviorOn == jme.getTarget()) { return this.targetBehavior(whoToRunThisBehaviorOn, jme); } else if (whoToRunThisBehaviorOn == jme.getSource()) { return this.sourceBehavior(whoToRunThisBehaviorOn, jme); } else { return this.bystanderBehavior(whoToRunThisBehaviorOn, jme); } } COM: <s> perform this code behaviors code behavior </s>
funcom_train/37654040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getXmlString(Node node) throws TransformerException { StringWriter writer = new StringWriter(); Source source = new DOMSource(node.getAsDocument()); Result result = new StreamResult(writer); TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setAttribute("indent-number", 3); Transformer xformer = transformerFactory.newTransformer(); xformer.setOutputProperty(OutputKeys.INDENT, "yes"); xformer.transform(source, result); return writer.toString(); } COM: <s> returns an unformatted xml string without the declaration </s>
funcom_train/36221086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action, OWLOntology ontology) { if (!(XDCorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow() .getActivePage().findViewReference(ODPSelectionsView.ID) == null)) { ODPSelectionsView selectionView = (ODPSelectionsView) XDCorePlugin .getDefault().getWorkbench().getActiveWorkbenchWindow() .getActivePage().findViewReference(ODPSelectionsView.ID) .getView(true); selectionView.refresh(ontology); } } COM: <s> runs the action with the specified ontology </s>
funcom_train/18485728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAttribute(String attr) throws DOMException { if (domNode.getNodeType() == Node.ELEMENT_NODE) { Element element = (Element) domNode; element.removeAttribute(attr); fireAttributeChanged(this, attr); } else { throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Only Element Nodes can have attributes"); } } //}}} //{{{ getAttributeAt() COM: <s> p removes an attribute by name </s>
funcom_train/17853619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDate(Date date) throws PropertyVetoException { if (!checkDate(date)) { PropertyChangeEvent propertyChangeEvent = new PropertyChangeEvent( this, PROPERTY_NAME_DATE, this.date, date); throw new PropertyVetoException( "Value vetoed by current vetoPolicy", propertyChangeEvent); } Date old = this.date; this.date = date; if (old != null || date != null) { firePropertyChange(PROPERTY_NAME_DATE, old, date); } } COM: <s> sets currently selected date to the control </s>
funcom_train/14359620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(DataSource data, ParserContext ctx) throws IOException { for (int i = 0; i < names.length; i++) { String elementName = names[i]; Element element = (Element) elements.get(elementName); boolean internal = element.isInternal(); ctx.fireStartParseEvent(elementName, internal, null); element.read(data, ctx); ctx.fireEndParseEvent(elementName, internal); } } COM: <s> reads all the children elements in turn sending events to the </s>
funcom_train/45918096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class loadClass(String clazz) throws UserManagerFactoryException { try { return this.getClass().getClassLoader().loadClass(clazz); } catch (ClassNotFoundException cnfe) { throw new UserManagerFactoryException(String.format("Error while loading class [%s].", clazz), cnfe); } } COM: <s> loads a class by name </s>
funcom_train/5392291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XQueryService getXQueryServiceFromCollection(Collection collection) throws XMLDBException { XQueryService service = (XQueryService) collection.getService( XQUERYSERVICE_NAME, XQUERYSERVICE_VERSION); if (getNameSpaces() != null) { Iterator keys = getNameSpaces().keySet().iterator(); while (keys.hasNext()) { String key = (String) keys.next(); service.setNamespace(key, (String) getNameSpaces().get(key)); } } return service; } COM: <s> get the e xist xquery service for the collection </s>
funcom_train/18742225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PrologEngine getEngine() { this.resultsStatus.setText(" "); if (this.engine == null) { try { this.engine = new PrologEngine(getEnvironment()); } catch (FormatException e) { getResultsArea().append("\nError loading the prolog engine:\n"); getResultsArea().append(e.getMessage()); } } return this.engine; } COM: <s> make sure the prolog environment is initialized and clean up previous </s>
funcom_train/42089374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGenModelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Decoration_genModel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Decoration_genModel_feature", "_UI_Decoration_type"), DecModelPackage.Literals.DECORATION__GEN_MODEL, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the gen model feature </s>
funcom_train/15687268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableLayoutConstraints getConstraints(Component component) { ListIterator<Entry> iterator = list.listIterator(0); while (iterator.hasNext()) { Entry entry = iterator.next(); if (entry.component == component) { return new TableLayoutConstraints(entry.cr1[C], entry.cr1[R], entry.cr2[C], entry.cr2[R], entry.alignment[C], entry.alignment[R]); } } return null; } COM: <s> gets the constraints of a given component </s>
funcom_train/1505230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupWebView(){ webView = (WebView) findViewById(R.id.webview); webView.getSettings().setJavaScriptEnabled(true); webView.setWebViewClient(new WebViewClient()); webView.loadUrl(MAP_URL); /** Allows JavaScript calls to access application resources **/ webView.addJavascriptInterface(new JavaScriptInterface(), "android"); } COM: <s> sets up the web view object and loads the url of the page </s>
funcom_train/21792379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existeLogin(String login) throws HibernateException, DAOException{ if(login == null || login.trim().equals("")) return false; String hql = "select count(*) from Usuario where login = :login"; return ((Long) getSession().createQuery(hql).setString("login", login).uniqueResult()) > 0 ? true : false; } COM: <s> m todo que verifica se existe o usu rio com o login informado </s>
funcom_train/3090118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean eval(String s) { boolean retVal = false; if (s.indexOf("||") > -1) { retVal = false; StringTokenizer st = new StringTokenizer(s, "||"); for (int i = 0, l = st.countTokens(); i < l; i++) { String ss = st.nextToken(); if (subEval(ss)) { retVal = true; break; } } } else { retVal = subEval(s); } return retVal; } COM: <s> method used to check if expression is true </s>
funcom_train/14011739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(RenderIdSupport object) { purge(); String id = object.getRenderId(); WeakReference weakReference; synchronized(idToReferenceMap) { if (!idToReferenceMap.containsKey(id)) { weakReference = new WeakReference(object, referenceQueue); idToReferenceMap.put(id, weakReference); } } } COM: <s> registers an object with the code id table code </s>
funcom_train/8022159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExists() { System.out.println("exists"); Category category = null; boolean expResult = true; boolean result = CategoryManager.exists(category); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. //fail("The test case is a prototype."); } COM: <s> test of exists method of class vgrabber </s>
funcom_train/40432749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(TelemetryStream stream) throws TelemetryDataModelException { if (this.streamMap.containsKey(stream.getTag())) { throw new TelemetryDataModelException("Duplicated stream tag detected.: " + stream.getTag()); } this.streamMap.put(stream.getTag(), stream); } COM: <s> adds a telemetry stream to this collection </s>
funcom_train/48614629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendError( String error) { log.info("send emails = " + sendEmails); if( sendEmails ) { log.debug("send subscribers emails"); MimeMessage message = mailSender.createMimeMessage(); MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(message); try { mimeMessageHelper.setSubject(subject); mimeMessageHelper.setTo(toAddress); mimeMessageHelper.setText(error); mailSender.send(message); } catch (MessagingException e) { log.error("Messaging exception occured ", e); } } else { log.info( "send emails disabled "); log.error(error); } } COM: <s> send the error to the specified address </s>
funcom_train/40516864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyDirectionChanged() { for (int i = 0; i < encoderListeners.size(); i++) { ((JagEncoderListener) encoderListeners.elementAt(i)).rotationDidStop(new JagEncoderEvent(this, JagEncoderEvent.DIRECTION, getState(DISTANCE), (getState(DIRECTION) == Sensor.TRUE))); } } COM: <s> notifies all code jag encoder listener code s that encoder direction has changed </s>
funcom_train/36616882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean vibrate(int duration) { // Grey area of Spec.: // The spec. does not specify when negative number // is passed into this function AND the Display is not // in the foreground. To be safe here, we always // check for the parameters first. if (duration < 0) { throw new IllegalArgumentException(); } return false; } COM: <s> requests operation of the devices vibrator </s>
funcom_train/15625136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInv(@NotNull final ArchetypeType archetypeType, @NotNull final int[] types) { if (inv.containsKey(archetypeType)) { throw new IllegalArgumentException(); } final int[] tmp = types.clone(); Arrays.sort(tmp); inv.put(archetypeType, tmp); } COM: <s> sets the allowed environment game object types for an </s>
funcom_train/45383602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMnuAbout() { if (mnuAbout == null) { mnuAbout = new JMenuItem(); mnuAbout.setText("About"); mnuAbout.setMnemonic(KeyEvent.VK_A); mnuAbout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JOptionPane.showMessageDialog(HVTHelperGUI.this, aboutMessage); } }); } return mnuAbout; } COM: <s> this method initializes mnu about </s>
funcom_train/34455128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void induceModel(Graph graph, DataSplit split) { super.induceModel(graph, split); tmpVector = new double[classPrior.length]; localEstimate = new Estimate(graph, split.getView().getNodeType(), split.getView().getAttribute()); } COM: <s> induce the model </s>
funcom_train/50464743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object call(Object obj, String methodName, String value) throws ReflectException, InvocationTargetException { if(obj == null) throw new ReflectException("obj cannot be null"); return call(obj.getClass(), obj, methodName, new Object[]{value}, new Class[]{String.class}); } COM: <s> call a method on a object instance with a single string argument </s>
funcom_train/13392189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGroups(String[] groups, boolean append) { if(!append) groupList.clear(); for(int i=0; i<groups.length; i++) { String group = groups[i]; if(group.equals("public")) group = ""; groupList.add(groups[i]); } } COM: <s> add to the groups collection </s>
funcom_train/49217409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasRowReferenceTo(int rowIndex) { TextTableCellReference[] textTableCellReferences = textTableFormulaModel .getCellReferences(); for (int i = 0; i < textTableCellReferences.length; i++) { TextTableCellReference textTableCellReference = textTableCellReferences[i]; if (!textTableCellReference.isModified()) { boolean value = textTableCellReference.containsRow(rowIndex); if (value) return true; } } return false; } COM: <s> returns information whether this formula has a reference to the submitted </s>
funcom_train/24635442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeTable(Table table, ByteArrayOutputStream out) throws IOException, DocumentException { inTable = true; table.complete(); RtfTable rtfTable = new RtfTable(this); rtfTable.importTable(table, pageWidth - marginLeft - marginRight); rtfTable.writeTable(out); inTable = false; } COM: <s> write a code table code </s>
funcom_train/11704341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean endOfProcessingReached(long entityCount) { // Special case, -1 means all entities in the corpus if (numToProcess == -1) { return false; } else if (numToProcess == 0) { return true; } else { // check if exceeded or matched the configured max number of entities return (entityCount >= numToProcess); } } COM: <s> determines if the cpm processed all documents </s>
funcom_train/16147384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillDataCurrency(String dbFieldname,String value,String IsoCurrency){ convB4it = new UtilFormatOut(); double curr = Double.parseDouble(value); String ueb = convB4it.formatCurrency(curr,IsoCurrency,Locale.getDefault()); this.fillDataInternal(dbFieldname, ueb); } COM: <s> converts string to currency </s>
funcom_train/25761950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtSchema() { if (txtSchema == null) { txtSchema = new JTextField(); txtSchema.setBounds(new Rectangle(139, 195, 140, 35)); txtSchema.setText(StateSaver.getInstance().getDatabaseSettings().getSchema()); } return txtSchema; } COM: <s> this method initializes txt schema </s>
funcom_train/46575562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getControlStyles(NamedNodeMap nnm, int def) { int style = def; style |= getAttributeBool(nnm, "border", false) ? SWT.BORDER : 0; style |= getAttributeBool(nnm, "righttoleft", false) ? SWT.RIGHT_TO_LEFT : 0; return style; } COM: <s> styles common to all controls </s>
funcom_train/19223836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("ContentProviderLocalEndpoint".equals(portName)) { setContentProviderLocalEndpointEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/23370331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean moveSongUp(int index) { if (index < 1) { return false; } else { File previous = list_.get(index-1); list_.set(index-1, list_.get(index)); list_.set(index, previous); // if current playling track was moved, update the pointer if (index == currentTrackNo_) { currentTrackNo_--; } else if (index-1 == currentTrackNo_) { currentTrackNo_++; } // notify listeners of the changed rows fireEvent(index-1, false); fireEvent(index, true); return true; } } COM: <s> move a song up the playlist by swapping with the previous song </s>
funcom_train/38528953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showMainWindow() { final int posx = 50; final int posy = 0; this.frame.setLocation(posx, posy); this.frame.setResizable(true); /* Important to initially display in the AWT/Swing thread. */ final Runnable showWindow = new Runnable() { public void run() { JamInitialization.this.frame.pack(); JamInitialization.this.frame.setVisible(true); /* print out where configuration files were read from */ properties.outputMessages(); } }; SwingUtilities.invokeLater(showWindow); } COM: <s> show the main window </s>
funcom_train/25389930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean CheckForLumps(String[] name, WadLoader W) { for (int i = 0;i < name.length; i++) if (W.CheckNumForName(name[i].toUpperCase())<0) { // Even one is missing? Not OK. return false; } return true; } COM: <s> check if all of the lumps exist </s>
funcom_train/7796027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ITextRegion extractPhpScriptRegion(ITextRegion textRegion) { ContextRegionContainer container = (ContextRegionContainer) textRegion; ITextRegionList containerRegions = container.getRegions(); for (int z = 0; z < containerRegions.size(); z++) { ITextRegion containerTextRegion = containerRegions.get(z); if (containerTextRegion instanceof PhpScriptRegion) { return containerTextRegion; } } return textRegion; } COM: <s> given a context region container looks for the phpscript region in it </s>
funcom_train/23160468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadPropertyFiles() { log("Loading property files..."); NodeList propertyList = getDocument(getDocumentBase().toString()).getElementsByTagName("property"); Element element = null; String fileAttribute = null; for (int i = 0; i < propertyList.getLength(); i++) { element = (Element) propertyList.item(i); fileAttribute = element.getAttribute("file"); loadPropertyFile(fileAttribute); } } COM: <s> load property files </s>
funcom_train/14061661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Composite getButtonBoxControl(Composite parent) { if (buttonBox == null) { buttonBox = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.marginWidth = 0; buttonBox.setLayout(layout); createButtons(buttonBox); buttonBox.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { addButton = null; editButton = null; removeButton = null; upButton = null; downButton = null; buttonBox = null; } }); } else { checkParent(buttonBox, parent); } selectionChanged(); return buttonBox; } COM: <s> returns this field editors button box containing the add remove </s>
funcom_train/45077666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFile(String file) { try { java.io.FileOutputStream fileOut = new java.io.FileOutputStream(file); store( fileOut,null); fileOut.close(); } catch (IOException e) { cat.error("writeFile; "+e); } } COM: <s> write the file </s>
funcom_train/18903095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performDirectAdd(Triple t) throws AddDeniedException { try { session.insert(graphURI, t.getSubject(), t.getPredicate(), t.getObject()); } catch (QueryException qe) { logger.error("Failed to add triple ", qe); throw new AddDeniedException("Failed to add triple ", t); } } COM: <s> adds a triple to the database without checking reification </s>
funcom_train/47867991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getShrotestDistance(V vertex1, V vertex2) { LOGGER.debug("Finding the shortest distance between the vertices - " + vertex1 + " and " + vertex2); List<E> path = getShortestPath(vertex1, vertex2); if(path == null) { return Double.MAX_VALUE; } Double distance = 0d; for(E edge : path) { distance += this.graph.getEdgeWeight(edge); } return distance; } COM: <s> p returns the shortest distance between the given vertices p </s>
funcom_train/4922872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCaseInsensitiveAlias() { this.isCaseSensitive = false; this.mapAlias("aliasone", "propertyone"); this.mapAlias("ALIASTWO", "PROPERTYTWO"); this.object.setPropertyOne("One"); this.object.setPropertyTwo("Two"); this.doTest("AliasOne", "One", "AliasTwo", "Two"); } COM: <s> ensure can have case insensitive alias mappings </s>
funcom_train/41163747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoResponseCompleteE2 entity) { EntityManagerHelper.log("deleting CoResponseCompleteE2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoResponseCompleteE2.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co response complete e2 entity </s>
funcom_train/39048620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWaiter(LockRequest<K> request) { if (waiters.isEmpty() || !request.getUpgrade()) { waiters.add(request); } else { /* * Add upgrade requests after any existing ones, but before * other requests. */ boolean added = false; for (int i = 0; i < waiters.size(); i++) { if (!waiters.get(i).getUpgrade()) { waiters.add(i, request); added = true; break; } } if (!added) { waiters.add(request); } } } COM: <s> adds a lock request to the list of requests waiting for this lock </s>
funcom_train/5374513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds () { checkLayout(); // computeRuns(null); int width = 0; if (wrapWidth != -1) { width = wrapWidth; } else { // for (int line=0; line<runs.length; line++) { // width = Math.max(width, lineWidth[line]); // } } return new Rectangle (0, 0, width, lineY[lineY.length - 1]); } COM: <s> returns the bounds of the receiver </s>
funcom_train/2876729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LoadedEngine createEngine(String language) throws SmartFrogLifecycleException { ScriptEngine engine = manager.getEngineByName(language); if (engine == null) { throw new SmartFrogLifecycleException(ERROR_NO_ENGINE + "\"" + language + "\"" ); } return new LoadedEngine(language, engine); } COM: <s> create an engine in the given language </s>
funcom_train/36992356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedReader reader(String filename) { try { return reader(openStream(filename)); } catch (Exception e) { if (filename == null) { die("Filename passed to reader() was null", e); } else { die("Couldn't create a reader for " + filename, e); } } return null; } COM: <s> i want to read lines from a file </s>
funcom_train/3678623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void erasePressed() { ModelFacade modelFacade = ModelFacade.getInstance(); modelFacade.eraseSelectedPaintingFromCurrentSlide(); ViewFacade viewFacade = ViewFacade.getInstance(); viewFacade.repaint(); String message = modelFacade.generateXML( ModelFacade.SLIDE ); applicationContext.validation( message ); } COM: <s> erase the selected painting from the model </s>
funcom_train/31084716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int tagSignedByteAt(int index) throws RIFFFormatException { if (index >= _tagData.length) throw new RIFFFormatException ("Tag " + _tagID + " is too short in chunk " + _chunkID + "."); int result = _tagData[index]; if (result >= 128) // This converts bytes 128 to 255 to -128 to -1 result -= 256; return result; } COM: <s> interpret tag data index as a one byte signed integer </s>
funcom_train/21333200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String reverse(String str) { if (str == null) { return null; } char[] newStr = new char[str.length()]; StringCharacterIterator iterator = new StringCharacterIterator(str); int i = 0; for (char ch = iterator.last(); ch != CharacterIterator.DONE; ch = iterator.previous()) { newStr[i] = ch; i++; } return new String(newStr); } COM: <s> returns a string that contains all characters of the given string in </s>
funcom_train/8712263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermBuffer(String buffer, int offset, int length) { assert offset <= buffer.length(); assert offset + length <= buffer.length(); growTermBuffer(length); buffer.getChars(offset, offset + length, termBuffer, 0); termLength = length; } COM: <s> copies the contents of buffer starting at offset and continuing </s>
funcom_train/7660459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttemptStamp(){ int[] mark = new int[1]; AtomicStampedReference ai = new AtomicStampedReference(one, 0); assertEquals(0, ai.getStamp()); assertTrue(ai.attemptStamp(one, 1)); assertEquals(1, ai.getStamp()); assertEquals(one, ai.get(mark)); assertEquals(1, mark[0]); } COM: <s> attempt stamp succeeds in single thread </s>
funcom_train/39314518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteBitmap(){ System.out.println("testWriteBitmap"); System.out.print("writeBitmap function can't be tested because "); System.out.print("it is used in save function, and save needs an abstract "); System.out.println("Image object which cannot be instantiated."); } COM: <s> test of write bitmap method of class converter </s>
funcom_train/27702257
/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(logger.isDebugEnabled())logger.debug("setting property '" + evt.getPropertyName() + "' to '" + evt.getNewValue() + "'"); if (isConnectionInfoSaveable()) { properties.setProperty(evt.getPropertyName(), evt.getNewValue().toString()); } } COM: <s> this method gets called when a bound property is changed </s>
funcom_train/9701719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateCompilationUnitFromString() { parser = ASTParser.newParser(AST.JLS3); // Java 5.0 and up parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(baseClass.toCharArray()); parser.setResolveBindings(true); parser.setBindingsRecovery(true); unit = (CompilationUnit) parser.createAST(null /* IProgrssMonitor*/); ast=unit.getAST(); document=new Document(baseClass); } COM: <s> this methods generates a compilation unit from a </s>
funcom_train/50328031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeader() { int val = 0; for (int i = 2; i<=10; i++) { _RTRoffset = i; if (_dataChars[i] == 'N') break; if (_dataChars[i] == 'R') break; val = val*16 + getHexDigit(i); } return val; } COM: <s> get the can header by using chars from 2 to up to 9 </s>
funcom_train/37104457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean issnsAreEqual(String issn1, String issn2) { if ( isEmpty(issn1) || isEmpty(issn2)){ return true; } if ( lookup != null ){ return issn1.equalsIgnoreCase(issn2) || issn1.equalsIgnoreCase(lookup.lookup(issn2) ); }else { return issn1.equalsIgnoreCase(issn2) ; } } COM: <s> the method to check if issn are equal </s>
funcom_train/1831806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commandAction(Command c, Item item) { try { //sign in if (c == CMD_SIGNIN) signIn(); //skip to public calendars else if (c == CMD_SKIP) Components.pubCal.handle(); }catch(Exception e) { ErrorHandler.showError("LoginComponent commandAction", e); } } COM: <s> processes item commands </s>
funcom_train/16174577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void play() { //TODO: Switch and choose play method if (Settings.getInstance().getSoundType().equals("wav")) { playWav(); } else if (Settings.getInstance().getSoundType().equals("jsf")) { // } } COM: <s> this method plays this note based on the prefered method </s>
funcom_train/48382197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JInternalFrame getJStopInternalFrame() { if (jStopInternalFrame == null) { jStopInternalFrame = new JInternalFrame(); jStopInternalFrame.setBounds(new java.awt.Rectangle(366, 295, 304, 178)); jStopInternalFrame.setTitle("Step Made"); jStopInternalFrame.setVisible(false); jStopInternalFrame.setContentPane(getJContentPaneOfInternalFrame()); } return jStopInternalFrame; } COM: <s> this method initializes j stop internal frame </s>
funcom_train/1533260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExpressionNode convertNumberValueToExpressionNode(NumberValue nv) { GeoElement geo = nv.toGeoElement(); AlgoElement algo = geo.getParentAlgorithm(); if (algo != null && algo instanceof AlgoDependentNumber) { AlgoDependentNumber algoDep = (AlgoDependentNumber) algo; return algoDep.getExpression().getCopy(this); } else { return new ExpressionNode(this, geo); } } COM: <s> converts a number value object to an expression node object </s>
funcom_train/8992628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStorageLocation() throws ApplicationException { String attachmentRootFolder = SystemParameterFactory.getSystemParameter(SystemParameterConstant.WORKFLOW_ATTACHMENT_PHYSICAL_PATH); File rootFolder = new File(attachmentRootFolder); if (!rootFolder.exists()) { rootFolder.mkdirs(); } return attachmentRootFolder; } COM: <s> gets the storage location for workflow files </s>
funcom_train/5393553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element findElement(Element node, String name) { String pName = node.attributeValue("name"); if (pName != null && pName.equals(name)) { return node; } Element found = null; for (Iterator ix = node.elementIterator(); ix.hasNext(); ) { Element element = (Element) ix.next(); found = findElement(element,name); if (found != null) return found; } return found; } COM: <s> find a element in the schema </s>
funcom_train/5733397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isDescriptorValid(ElementInfo info, Element descriptor) { if (descriptor == null || descriptor.hasChildren()) { if (info.hasChildren()) { logger.logError(MessageManager.invalidElementDescriptor, info.getElementName()); } } return (descriptor != null); } COM: <s> this method returns the value of descriptor null </s>
funcom_train/16532377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadWorkingFile(String filePath) throws LoadXRMException { /* Need to add the RMTModel as a listener to the WorkingFile */ WorkingFile wf = new WorkingFile(); wf.addModelListener(this); storage.readFile(wf, filePath); /* Perform necessary notifications */ this.workingFile = wf; //this.notifyWorkingFileChanged(); this.notifyAllArtifactsRemoved(); this.notifyArtifactsAdded(this.workingFile.getAllArtifacts()); this.notifyGroupsChanged(); } COM: <s> loads and sets the rmtmodels working file from a specified file path </s>
funcom_train/29561877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean expandInternal(LayoutConstraintMap map, IAttribute attr, int attrId) { // default impl is read-modify-write IAttributeConstraint c = getDecoded( map, attrId ).clone(); boolean expanded = c.expand(attr); // expand encode(map, attrId, c); // re-encode return expanded; } COM: <s> expand map using attribute attr </s>
funcom_train/26216030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (!done) { try { if (announcer) { discoverySocket.send(heartbeatDatagram); } checkTimeStamps(); Thread.sleep(HEARTBEAT_TIME); } catch (Exception exception) { LOG.severe("*** Can't send data ***"); LOG.log(Level.SEVERE, exception.getMessage(), exception); } } } COM: <s> this method is a loop that runs on its own thread generating </s>
funcom_train/10472015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printTypeError(String name, int position) { if (!imports.contains(name)) { out.error(NodesVisitor.class.getSimpleName(), "The name '" + name + "' cannot be resolved.", unit.getLineNumber(position), unit.getColumnNumber(position)); wrongApiUsing = true; } } COM: <s> prints error about not resolved name </s>
funcom_train/13810972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String sessionKeyFromRequest(SipServletRequest req) { URI ruri = req.getSubscriberURI(); if (ruri != null) { monitor.putEvent(new DebugEvent("sessionKeyFromRequest(): returning key = " + ruri.toString())); return ruri.toString(); } else { monitor.putEvent(new WarnEvent("sessionKeyFromRequest(): SipServletRequest.getSubscriberURI() returned null")); return null; } } COM: <s> generate the key used for key based session targeting mechanism </s>
funcom_train/39974217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override protected void startup() { if(loadConfiguration()){ try{ List<Szenario> listSze = root.getSzenarios().getSzenario(); testRunner = new TestRunner(listSze); view = new TestGUIView(this); show(view); }catch(Exception any){ any.printStackTrace(); } } } COM: <s> at startup create and show the main frame of the application </s>
funcom_train/4540156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (keepGoing) { TriggerData triggerData = popPair(); if (triggerData != null) { if (triggerData.username != null) { trigger.fire(this.vectorIndex, name.name, table.getName().name, triggerData.oldRow, triggerData.newRow); } } } } COM: <s> run method declaration p </s>
funcom_train/17387891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(FrameWorkCheckedException o) { return ( this.getMessage() == null ? (o.getMessage() == null ? 0 : -1) : (o.getMessage() == null ? 1 : this.getMessage().toUpperCase().compareTo(o.getMessage().toUpperCase()))); } COM: <s> compares based on the exception message </s>
funcom_train/44136147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endViewing() { // Return to normal mode returnFromFullScreen(); int numberScreen = getNumberScreen(); if(numberScreen==2){ m_frame.setVisible(false); m_frame1.setVisible(false); m_win.setVisible(false); m_win1.setVisible(false); } } COM: <s> stops the viewing of the presentation </s>
funcom_train/7626393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class Factory { private static Spannable.Factory sInstance = new Spannable.Factory(); /** * Returns the standard Spannable Factory. */ public static Spannable.Factory getInstance() { return sInstance; } /** * Returns a new SpannableString from the specified CharSequence. * You can override this to provide a different kind of Spannable. */ public Spannable newSpannable(CharSequence source) { return new SpannableString(source); } } COM: <s> factory used by text view to create new spannables </s>
funcom_train/34068057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Session recreateSession() { switch (settings.mode) { case Settings.MODE_TIME : session = new Session(Session.SessionMode.TIME, settings.laps); return session; case Settings.MODE_RACE : session = new Session(Session.SessionMode.RACE, settings.laps); return session; default : throw new AssertionError(); } } COM: <s> creates a new session object </s>
funcom_train/38867343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getTierOneMapping(HttpServletRequest req, HttpServletResponse res) throws ApiException, SQLException, ServletException, IOException { String mapping = new GetDataDescribe().getParameters(req); req.setAttribute("mapping", mapping); req.setAttribute("url", req.getRequestURL().toString()); getServletContext().getRequestDispatcher("/GetDataDescribeTierOne.jsp").forward(req, res); } COM: <s> displays the initial describe page </s>
funcom_train/43233223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Effort getCumulatedManDayCostsOfClosedPbis() throws NoValidValueException { this.result = 0; for (final ProductBacklogItem pbi : this.getPBIs()) { if (pbi.getTicketType().getStateProfile().getEndStates().contains(pbi.getCurrentState())) { this.result += pbi.getManDayCosts().getValue(); } } return new Effort(this.result); } COM: <s> method get cumulated man day costs of closed pbis </s>
funcom_train/38310791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConcat() throws ExpressionException { assertEquals("This is a test 123", exi.evalString("${string + ' 123'}", properties, formatHelper)); assertEquals("UJAC-11", exi.evalString("${${name} + '-' + ${ten + 1}}", properties, formatHelper)); } COM: <s> tests the concat operation </s>
funcom_train/44283886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupSHPanel(JPanel parentPanel, Patch patch) { addWidget(parentPanel,new KnobWidget("Speed", patch, 0, 127,0,new ScaledParamModel(patch, 53 + pgmDumpheaderSize, 127, 63),new CCSender(41)),6,0,1,1,33); } COM: <s> sets up the sample hold effects panel </s>
funcom_train/48909203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfRepresentante() { if (txfRepresentante == null) { txfRepresentante = new JTextField(); txfRepresentante.setBounds(new Rectangle(110, 105, 282, 22)); txfRepresentante.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) txfRegistro.grabFocus(); } }); } return txfRepresentante; } COM: <s> this method initializes txf representante </s>
funcom_train/43893209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String scanExpression(final Token initialTocken) { // scan geometry Token end = initialTocken; while (end.next != null) { end = end.next; } final String wktGeom = cqlSource.substring( initialTocken.beginColumn - 1, end.endColumn); assert wktGeom.length() > 0: "a wkt geometry is required"; return wktGeom; } COM: <s> extracts expression between initial token and last token in buffer </s>