__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17992141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspException { if(super.doStartTag() == EVAL_BODY_INCLUDE) { // adapter return SKIP_BODY; } else { // not adapter ServletRequest req = pageContext.getRequest(); PortletConfig portletConfig = (PortletConfig)req.getAttribute(WebKeys.JAVAX_PORTLET_CONFIG); if (portletConfig != null) // container return EVAL_BODY_INCLUDE; else // not container return SKIP_BODY; } } COM: <s> return code eval body include code only if the request is being </s>
funcom_train/3102537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleModelChanged(final String tag, final int priority, final boolean removable) { Assertion.nonEmpty(tag); Assertion.ok(priority == CorePreferences.TASK_PRIORITY_HIGH || priority == CorePreferences.TASK_PRIORITY_NORMAL || priority == CorePreferences.TASK_PRIORITY_LOW); fTagDescriptions.add(new TaskTagDescriptor(tag, priority, removable)); } COM: <s> handles the model changed event </s>
funcom_train/48147779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g){ super.paintComponent(g); try { if (showCard) g.drawImage(cardImage[cardNumber], 0, 0, this); else g.drawImage(cardImage[52], 0, 0, this); } catch (Exception e ) { System.out.println("STACK::"+e); } //System.err.println("Okay in Card.java::paint() 2 of 2"); } COM: <s> this method paints the card </s>
funcom_train/4962624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areAdjacent(Edge e1, Edge e2) { Vertex [] ev1 = endVertices(e1); Vertex [] ev2 = endVertices(e2); return ( ev1[0] == ev2[0] || ev1[0] == ev2[1] || ev1[1] == ev2[0] || ev1[1] == ev2[1] ); } COM: <s> built on end vertices </s>
funcom_train/46010178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OneLink createCopy(Long rsid, String schema){ MultiSchemaHibernateUtil.beginTransaction(schema); OneLink gv = new OneLink(); gv.setBase_id(this.getId()); gv.setRs_id(rsid); gv.setSim_id(this.getSim_id()); gv.setStartingValue(this.getStartingValue()); MultiSchemaHibernateUtil.getSession(schema).saveOrUpdate(gv); MultiSchemaHibernateUtil.commitAndCloseTransaction(schema); return gv; } COM: <s> creates and saves to the database a copy of this one link object </s>
funcom_train/12182426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String convertArrayToValue(String[] array, String sep) { StringBuffer intermediateResult = new StringBuffer(); String actualSep = null; for (int n =0; n < array.length;) { if (actualSep != null) { intermediateResult.append(sep); } else { actualSep = sep; } intermediateResult.append(array[n]); n++; } return intermediateResult.toString(); } COM: <s> convert the array of values back into a seperated list </s>
funcom_train/25945918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateStatus() { TextView text = (TextView) findViewById(R.id.pwd_status); if (testPin(2, 4, 6, 1)) { text.setText("Congratulation!"); } else { text.setText("Invalid PIN"); } } COM: <s> updates entered pin status </s>
funcom_train/44770437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discard() { if (!temp) { // do nothing if this instance is not backed by temporarily // allocated resource/buffer return; } if (file != null) { // this instance is backed by a temp file file.delete(); } else if (buffer != null) { // this instance is backed by a in-memory buffer buffer = EMPTY_BYTE_ARRAY; } } COM: <s> frees temporarily allocated resources such as temporary file buffer etc </s>
funcom_train/24186383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsRandom () throws JDOMException { // For each variable for (Element varElmt : (List<Element>) problem.getRootElement().getChild("variables").getChildren()) { String isRand = varElmt.getAttributeValue("type"); assertEquals (isRand != null && isRand.equals("random"), parserInt.isRandom(varElmt.getAttributeValue("name"))); } } COM: <s> test method for frodo2 </s>
funcom_train/50505246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SelectorDescriptor getSelector(String name) { synchronized(selectors) { Iterator iter = selectors.iterator(); while(iter.hasNext()) { SelectorDescriptor item = (SelectorDescriptor) iter.next(); if(item.getSignature().equals(name)) { return item; } } return null; } } COM: <s> gets the selector attribute of the entity bean info object </s>
funcom_train/42825208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDate(java.sql.Date sqlDate) { String date = sqlDate.toString(); StringTokenizer tokenizer = new StringTokenizer(date,"-"); year = Integer.parseInt(tokenizer.nextToken()); month = Integer.parseInt(tokenizer.nextToken()); day = Integer.parseInt(tokenizer.nextToken()); } COM: <s> this method is used for setting the date with object of </s>
funcom_train/23069340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeApplications() { applications = new ArrayList(); for (Iterator iter = getCaf().getApplications().iterator(); iter.hasNext();) { Application app = (Application) iter.next(); applications.add(new ComparableSelectItem(app.getId().toString(), app.getTargetOrganization().getName())); } Collections.sort(applications); } COM: <s> create the list of apps that </s>
funcom_train/31414799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean allThere(StringTokenizer tok, String listField) { while(tok.hasMoreTokens()) { String str = tok.nextToken(); if(listField.toLowerCase().indexOf(str.toLowerCase())==-1) return false; } return true; } COM: <s> are all the parts there </s>
funcom_train/39315126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /**public void testZoom4ActionPerformed() { System.out.println("testZoom4ActionPerformed"); f.zoom4ActionPerformed(actionEvent); //t.zoom4ActionPerformed(actionEvent); assertEquals(8,(int)f.center.getZoom()); //assertEquals(8,(int)t.center.getZoom()); assertEquals(f.zoom4, f.curZoom); }*/ COM: <s> public void test copy action performed </s>
funcom_train/39396831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentLanguage(String[] languages) throws MessagingException { if (languages != null && languages.length > 0) { StringBuffer buffer = new StringBuffer(); buffer.append(languages[0]); for (int i = 1; i < languages.length; i++) { buffer.append(','); buffer.append(languages[i]); } setHeader(MimeBodyPart.CONTENT_LANGUAGE_NAME,buffer.toString()); } else { setHeader(MimeBodyPart.CONTENT_LANGUAGE_NAME,null); } } COM: <s> sets the content language header of this message </s>
funcom_train/18195705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRoot(ReadableTreeRoot root) { lastSelected = null; if (root == null) { // nothing is done here because an empty root cannot be accepted by // the tree. } else { this.root = root; fireStructureChanged(new TreeModelEvent(this, new Object[] { root })); } } COM: <s> set a new root as the root of the tree managed by this </s>
funcom_train/51783483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDrawLine() { mockG2d.expects(once()).method("setStroke"); mockG2d.expects(once()).method("setColor").with(eq(Color.BLACK)); mockG2d.expects(once()).method("draw"); drawingContext.drawLine(0, 1, 100, 101); } COM: <s> tests the draw line method </s>
funcom_train/7823279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkCommit(boolean explicit) throws Exception { transModel.addTriple(objectA, RDF.Res.TYPE, classA, namedGraphA); if (explicit) transModel.commit(); transModel.close(); initializeTest(factImpl); boolean result = transModel.hasTriple(objectA, RDF.Res.TYPE, classA, false, namedGraphA); transModel.deleteTriple(objectA, RDF.Res.TYPE, classA, namedGraphA); return result; } COM: <s> checks that commit works by br </s>
funcom_train/9053516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMimeType() { Context ctx = ObjectModelHelper.getContext(objectModel); if (ctx != null) { final String mimeType = ctx.getMimeType(source); if (mimeType != null) { return mimeType; } } return this.parameters.getParameter("content-type", super.getMimeType()); } COM: <s> returns the mime type of the resource in process </s>
funcom_train/41096961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initNumberImages(){ if( _imgNums != null ) return; _imgNums = new Image[11]; try{ for( int i = 0; i < 10; i++ ){ // load i _imgNums[i] = Image.createImage( IMGPATH_NUMS + i + ".png" ); } } catch( Exception e ){ _imgNums = null; } } COM: <s> called when this class is first instantiated to load the number images </s>
funcom_train/11742914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transaction createTransaction() { if (isUsingExternalTransactions()) { Transaction transaction = Transaction .externalTransaction(getTransactionDelegate()); transaction.setJdbcEventLogger(jdbcEventLogger); return transaction; } else { Transaction transaction = Transaction .internalTransaction(getTransactionDelegate()); transaction.setJdbcEventLogger(jdbcEventLogger); return transaction; } } COM: <s> creates and returns a new inactive transaction </s>
funcom_train/36236255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long addMachineFunction(MachineFunctionEntity machineFunction) { QualificationEntity generatedQuali = new QualificationEntity(); generatedQuali.setName(machineFunction.getName() + " bedienen"); generatedQuali.setDescription("(zu Funktion " + machineFunction.getName() + ")"); machineFunction.setQualification(generatedQuali); em.persist(generatedQuali); em.persist(machineFunction); generatedQuali.setMachineFunction(machineFunction); return machineFunction.getId(); } COM: <s> persists a new </s>
funcom_train/36685308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFriends() { if (myUserDatabase.getUser(myUser.getUsername()) != null) { myUser = myUserDatabase.getUser(myUser.getUsername()); } myFriendList = makeFriendList(myUser); myClient.addFriends(myFriendList); displayDefault(); } COM: <s> updates the list of friends associated with the display list </s>
funcom_train/2888839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyDefaultIni(File inSrc, File inDest, String inIP) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(inSrc)); BufferedWriter writer = new BufferedWriter(new FileWriter(inDest)); String line = null; while ((line = reader.readLine()) != null) { writer.write(line.replace("[vast ip]", inIP)); } reader.close(); writer.close(); } COM: <s> copies the template default </s>
funcom_train/9644425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String verbalizeSG(SG sg) { StringBuffer b = new StringBuffer("<html>"); for (Iterator iter = sg.getSGDescription().iterator(); iter.hasNext();) { SGNominalSelector select = (SGNominalSelector) iter.next(); String selString = select.getDescription(); b.append(XMLUtils.convertToHTMLCompliantText(selString)); if (iter.hasNext()) { b.append("<br>"); } } b.append("</html>"); return b.toString(); } COM: <s> verbalize the subgroup </s>
funcom_train/35020096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveParameters(Breakpoint bp) { if (commonPanel != null) { commonPanel.saveParameters(bp); } if (specificPanel != null) { specificPanel.saveParameters(bp); } if (filtersPanel != null) { filtersPanel.saveParameters(bp); } if (actionsPanel != null) { actionsPanel.saveParameters(bp); } } COM: <s> saves the values from the fields of this editor to the given breakpoint </s>
funcom_train/22054657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshDisplay() { if (mapImage != null) { m_iImageX = mapImage.getWidth(this); m_iImageY = mapImage.getHeight(this); } if (getCallback() != null) { getCallback().checkButtonSelections(); } setModified(true); repaint(); } COM: <s> refreshes the whole image on command </s>
funcom_train/13190098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getMovesList() { if (movesList == null) { DefaultListModel listModel = new DefaultListModel(); for (Iterator<String> iter = modelMap.keySet().iterator(); iter .hasNext();) { String model = iter.next(); listModel.addElement(model); } movesList = new JList(listModel); movesList.addListSelectionListener(this); movesList.setPreferredSize(new Dimension(200, 250)); } return movesList; } COM: <s> this method initializes j list </s>
funcom_train/35649671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void outputBaseContributionIfFound(Writer writer) { try { outputContributionName(writer, baseValidationScriptContributionName); } catch (Exception ex) { // this just means that they don't have a base... you should // log this as info. log.handleExceptionInfo("Don't have a base", ex); } } COM: <s> this method outputs the base contribution if found </s>
funcom_train/38318854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkTemplate () throws BuildException { if (_template == null) { throw new BuildException("Missing template."); } if (!_template.exists()) { throw new BuildException("Template " + _template.getAbsolutePath() + " does not exist."); } if (!_template.isFile()) { throw new BuildException("Template " + _template.getAbsolutePath() + " is not a file."); } } COM: <s> validates the template </s>
funcom_train/4757597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { JComponent content = (JComponent) getContentPane(); JPanel primaryView = new JPanel(); // AnimatingCardLayout layout = new RandomAnimatingCardLayout(new // Animation[] {new FadeAnimation(), new SlideAnimation()}); CardLayout layout = new CardLayout(); content.setLayout(layout); content.add(primaryView, "primary"); setupContent(primaryView); populateContent(primaryView); } COM: <s> initializes the applet </s>
funcom_train/16319930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openArtefactByPath(String path, boolean bool, boolean remote) { // if(validateAndNormalizeXmlByPath(path)) this.createNewTreeView(path, bool, remote); // else{ // System.out.println("Error de validacion"); // this.createNewTreeView(path, bool); // } } COM: <s> open artefact in a treeview by path </s>
funcom_train/4613640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setThresholds(int low, int high) { synchronized (this) { threshHigh = high; threshLow = low; pin.setThresholds(Math.max(low, MIN_VALUE), Math.min(high, MAX_VALUE)); pin.enableThresholdEvents(true); } } COM: <s> sets the thresholds on this irsensors pin to low high inclusive bounds </s>
funcom_train/2288274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessage(CmsMessageContainer message) { if ((message != null) && (message.getKey() != Messages.ERR_MULTI_EXCEPTION_1)) { m_individualMessage = true; m_message = message; } else { // if message is null, reset and use default message again m_individualMessage = false; updateMessage(); } } COM: <s> sets an individual message for the multi exception base message </s>
funcom_train/2448204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text, Color color) { if (text == null) { text = ""; //$NON-NLS-1$ } adaptee.setText(text); Interval i = IntervalFactory.fromStartAndLength(0, text.length()); decorator.addColoredRegion(i, color); } COM: <s> sets the text in this text pane using the specified text color </s>
funcom_train/46062502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Condition updateConditionFromFormData(Condition cond) { if (cond == null) cond = new Condition(); TextAreaElement el = getTextAreaElement("precond"); if (el != null) cond.setConditionExpression(el.getValue()); cond.setExpertMode(true); cond.setConditionId(conditionId); if (StringHelper.containsNonWhitespace(cond.getConditionExpression())) { return cond; } cond.setConditionExpression(null); return cond; } COM: <s> update a condition using the data in the current form </s>
funcom_train/25291167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorIndex(int index, int colorIndex) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_COLOR_INDEX_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("IndexedGeometryArray3")); ((IndexedGeometryArrayRetained)this.retained).setColorIndex(index, colorIndex); } COM: <s> sets the color index associated with the vertex at </s>
funcom_train/41143914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFlow(Vector v) throws Exception { // Vector beansCopy = null, connectionsCopy = null; clearLayout(); SerializedObject so = new SerializedObject(v); Vector copy = (Vector)so.getObject(); Vector beans = (Vector)copy.elementAt(0); Vector connections = (Vector)copy.elementAt(1); integrateFlow(beans, connections); } COM: <s> set the flow for the knowledge flow to edit </s>
funcom_train/8605538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKinahPrice() { switch (getLegionLevel()) { case 1: return LegionConfig.LEGION_LEVEL2_REQUIRED_KINAH; case 2: return LegionConfig.LEGION_LEVEL3_REQUIRED_KINAH; case 3: return LegionConfig.LEGION_LEVEL4_REQUIRED_KINAH; case 4: return LegionConfig.LEGION_LEVEL5_REQUIRED_KINAH; } return 0; } COM: <s> this method will return the kinah price required to level up </s>
funcom_train/24920132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleLogins() { // Util.echo("Attempting to handle logins...",this); Iterator<SelectionKey> keyIterator = this.loginSelector.selectedKeys().iterator(); while (keyIterator.hasNext()) { // Get the key that is next in line and process SelectionKey thisKey = keyIterator.next(); // Dequeue this key as it is being processed keyIterator.remove(); this.handleLoginInput(thisKey); } } COM: <s> process all keys of login selector that are ready for reading </s>
funcom_train/26014550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List findPhonemes(Map lexicon) { List phonemeList = new ArrayList(); for (Iterator i = lexicon.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); String[] phonemes = getPhones(lexicon, key); for (int index = 0; index < phonemes.length; index++) { if (!phonemeList.contains(phonemes[index])) { phonemeList.add(phonemes[index]); } } } return phonemeList; } COM: <s> returns a list of the unique phonemes in the lexicon </s>
funcom_train/20405531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(TextBox dateField) { actualDateField = dateField; setPopupPosition(actualDateField.getAbsoluteLeft(), actualDateField.getAbsoluteTop() + actualDateField.getOffsetHeight()); Date date; try { date = Utils.parseDateTime(actualDateField.getText()); } catch (IllegalArgumentException e) { date = new Date(); } if (date == null) { date = new Date(); } datePicker.setValue(date); datePicker.setCurrentMonth(date); super.show(); } COM: <s> use this to show the date picker popup for the particular text field </s>
funcom_train/38413887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void setAggregationMessageLimit( short newMsgLimit ) { if( newMsgLimit<nbMessages ) { Debug.signal( Debug.NOTICE, this, "setAggregationMessageLimit refused: "+nbMessages ); return; } NetMessage listTmp[] = new NetMessage[newMsgLimit]; System.arraycopy( messageList, 0, listTmp, 0, nbMessages ); messageList = listTmp; aggregationMsgLimit=newMsgLimit; } COM: <s> to change the aggregation message limit </s>
funcom_train/3764736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareUnix() { File dir = new File(getApplicatonTask().contentsDir(), "UNIX"); String cp = new File(dir, "UNIXClassPath.txt").getPath(); createMappings(cp, woappPlusVersion() + "/Contents/UNIX/UNIXClassPath.txt", classpathFilter('/')); } COM: <s> prepare mappings for unix subdirectory </s>
funcom_train/26531517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save(Defect [] defects) { if (Settings.isReadOnly()) return; else if (Settings.getBool(USE_XML_SETTING, false)) saveAsXML(defects); else { if (saveAsTabDelimited(defects) == false) { enableXmlStorageFormat(); saveAsXML(defects); } } } COM: <s> save the defect data </s>
funcom_train/50297558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FBField getField(int columnIndex) throws SQLException { FBField field = getField(columnIndex, true); wasNullValid = true; // wasNull = field.isNull(); if (row != null) wasNull = (row[columnIndex - 1] == null); else wasNull = true; return field; } COM: <s> get the code fbfield code object at the given column index </s>
funcom_train/3151600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { //forward request to delegate, this accomplishes functionality encapsulation this.setDelegate(value); return delegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); } COM: <s> this method does two things </s>
funcom_train/36153719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateData() { //TODO: check, if it is really nessesary to get fields by getDeclaredFields or if it //is enough to reset the values from the fields-map this.fields = new HashMap<String, Field>(); fieldNames = new ArrayList<String>(); Field fields[] = containerClass.getDeclaredFields(); AccessibleObject.setAccessible(fields, true); for (Field field : fields) { this.fields.put(field.getName(), field); fieldNames.add(field.getName()); } } COM: <s> read the object and update all fields </s>
funcom_train/1728766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getChild(Object parent, int index) { if (parent instanceof String) { return new TreeFile(roots[index]); } File f = ((TreeFile) parent).getFile(); File child = new File(f.getAbsolutePath(), getSubDirs(f)[index]); return new TreeFile(child); } COM: <s> gets the subdirectory of the specified parent directory at the the </s>
funcom_train/33740671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { Panel panel = new Panel(); panel.setBorder(false); panel.setPaddings(15); panel.setLayout(new HorizontalLayout(15)); panel.add(new Panel("Item 1", 100, 150)); panel.add(new Panel("Item 2", 75, 150)); panel.add(new Panel("Item 3", 100, 150)); Panel item4=new Panel("Item 4", 150, 300); item4.setLayout(new VerticalLayout(15)); item4.add(new Label("Foo")); item4.add(new Label("Bar")); panel.add(item4); RootPanel.get().add(panel); } COM: <s> this is the entry point method </s>
funcom_train/30005530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getScrollableTracksViewportHeight() { // TODO Auto-generated method stub if (this.getParent() != null) return this.getParent().getHeight() < this.getPreferredScrollableViewportSize().height?false:true; return false; //return this.getHeight() < this.getPreferredScrollableViewportSize().height?false:true; } COM: <s> returns true if the vertical scrollbar should be turned off </s>
funcom_train/37537420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePrefEntry(String key) { boolean retval = true; PreparedStatement ps; try { ps = getStatement("removePrefEntry","DELETE FROM prefs WHERE pkey = ?"); ps.setString(1,key); ps.execute(); if ( ps.getUpdateCount() == 0 ) retval = false; } catch ( SQLException sqlEx ) { throw new RuntimeException(sqlEx); } return retval; } COM: <s> deletes the preferences entry with the specified key </s>
funcom_train/39314576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVertical_skewActionPerformed() { System.out.println("testVertical_skewActionPerformed"); System.out.println("Dead code"); stretch s=new stretch(f,true); ActionEvent evt=new ActionEvent(new Object(),1,"hi"); s.vertical_skewActionPerformed(evt); assertNotNull(f.center.getBufferedImage()); } COM: <s> test of vertical skew action performed method of class stretch </s>
funcom_train/48499205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AggregateUserTime getBooking (AggregateProgressDTO aggregate) { AggregateUserTime time = new AggregateUserTime (); time.setName(aggregate.getName()); time.setDepartment(aggregate.getDepartment()); double[] bookings = aggregate.getBookings(); if (bookings != null && bookings.length == 4) { time.setBooking1(bookings[0]); time.setBooking2(bookings[1]); time.setBooking3(bookings[2]); time.setBooking4(bookings[3]); } return time; } COM: <s> the data is delivered from the backend as aggregate progress dto objects which </s>
funcom_train/44832751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlternateText(java.lang.String alternateText) { String result = (String) ComponentUtils.invokeMethod(getPage().getHandler(), getMethod("onSetAlternateText"), new Object[] {alternateText}); this.alternateText = (result != null) ? result : alternateText; } COM: <s> setter for property alternate text </s>
funcom_train/13950578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(double offsetX,double offsetY) { if (dc == null) dc = getDefaultContainer(); if (!getVisible()) return; Ellipse2D.Double circle = new Ellipse2D.Double(offsetX+(curr.x-getRadius()), offsetY+(curr.y-getRadius()), (double)getRadius()*2, (double)getRadius()*2); dc.draw(circle); } COM: <s> the default paint method for the particle </s>
funcom_train/7607322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean splitSpace(Space space, int level, int target, ArrayList spaceList) { if (space.size() <= target) { spaceList.add(space); return true; } if (level > maxLevels) { spaceList.add(space); return true; } Space[] spaces = space.getQuadSpaces(); for (int j=0;j<4;j++) { splitSpace(spaces[j], level+1, target, spaceList); } return false; } COM: <s> considering splitting a space into 4 sub spaces </s>
funcom_train/20307128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void instantiateRuleEngine(List rules) { if (rules != null) { if (useRETE) { engine = new RETEEngine(this, rules); } else { engine = new FRuleEngine(this, rules); } } else { if (useRETE) { engine = new RETEEngine(this); } else { engine = new FRuleEngine(this); } } } COM: <s> instantiate the forward rule engine to use </s>
funcom_train/22565369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAsGoal(final ActionEvent event) { CompetenceProfileLevel selectedProfileLevel = null; for (RankedProfileLevel profileLevel : bestMatches) { if (profileLevel.isSelected()) { selectedProfileLevel = profileLevel.getCompetenceProfileLevel(); } } if (selectedProfileLevel != null) { motivationDialog.setSelectedProfileLevel(selectedProfileLevel); motivationDialog.setPopupVisible(true); } } COM: <s> sets the currently selected competence profile as the goal of the user </s>
funcom_train/12603795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBytes(double... newBytes) { int length = newBytes.length; if (length == 0) return; double[] newSnap = getNewArray(); // shift the existing array forward by 'length' bytes System.arraycopy(data, length, newSnap, 0, ARRAY_SIZE - length); // place the new bytes at the end of the array System.arraycopy(newBytes, 0, newSnap, ARRAY_SIZE - length, length); setData(newSnap); } COM: <s> adds the specified array to the end of the buffered array </s>
funcom_train/46375783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCellResource(CellID cellID, CellID parentID) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Update parent for cell " + cellID); } CellResourceContext ctx = ctxFactory.joinTransaction(); CellResourceImpl rsrc = ctx.getResource(cellID); if (rsrc != null) { rsrc.setParentID(parentID); } } COM: <s> update the parent of a particular resource in the cache </s>
funcom_train/6206125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSupportBeansXmlIfNecessary() throws CoreException { IFile support = getWebFlowGroup().getSpringSupportContextFile(); if (!support.exists()) { ApplicationXmlTemplate template = new ApplicationXmlTemplate(); String contents = template.generate(null); byte[] bytes = contents.getBytes(); ByteArrayInputStream byteStream = new ByteArrayInputStream(bytes); support.create(byteStream, true, null); } } COM: <s> if the support beans xml file does not exist add it </s>
funcom_train/8483212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATObject unpack() throws InterpreterException { try { ClassLoader c = this.getClass().getClassLoader(); return unpackUsingClassLoader(c); } catch ( XClassNotFound e) { try { ClassLoader s = ClassLoader.getSystemClassLoader(); return unpackUsingClassLoader(s); } catch (XClassNotFound ef) { ClassLoader t = Thread.currentThread().getContextClassLoader(); return unpackUsingClassLoader(t); } } } COM: <s> deserialize this message using the default class loader </s>
funcom_train/2862909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void blockChars(String authoString) throws AuthoException { for (int i=0; i<blockChars.length();i++) { if (authoString.indexOf(blockChars.charAt(i)) != -1) { throw new AuthoException(AuthoException.AUTHORIZATION_DENIED, "Invalid character"); } } } COM: <s> checks the string passed to it for illegal characters </s>
funcom_train/9031848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dispatchOnAfterSetList( List list ){ ArrayList<DataListListener> listeners; synchronized (this) { listeners = (ArrayList<DataListListener>) dataListListeners.clone(); } DataListEvent event = new DataListEvent(this); for (Iterator iterator = listeners.iterator(); iterator.hasNext();) { DataListListener dataListListener = (DataListListener) iterator.next(); dataListListener.onAfterSetList(event, list); } } COM: <s> dispara o on after set list dos listeners do datalist </s>
funcom_train/24135241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGUI() { ServerHolder holder = (ServerHolder)_serverCombo.getSelectedItem(); if (holder != null) { _editButton.setEnabled(true); _deleteButton.setEnabled(true); } else { _editButton.setEnabled(false); _deleteButton.setEnabled(false); } } COM: <s> enable or disable add and delete buttons depending on combo state </s>
funcom_train/50982629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReleaseResource_nullStore() { final ResourceManager resourceManager = new ResourceManager( getName() ); final ProxyResourceFactory factory = new ProxyResourceFactory(); final ManagedResource resource = factory.getResource( resourceManager ); try { factory.releaseResource( null, resource ); fail( "Expected exception" ); } catch( final NullPointerException e ) { // Expected path } } COM: <s> try passing a null store into release resource </s>
funcom_train/1469574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Segment addition(Segment other){ return new Segment( new Point(this.getP1().getX()+other.getP1().getX(),this.getP1().getY()), new Point(this.getP2().getX()+other.getP2().getX(),this.getP1().getY())); } COM: <s> must be horizontal segments </s>
funcom_train/14306598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElements(String elements) { System.out.println( "addElements:" + elements ); // tokenize on the path separator String pathSeparator = System.getProperty("path.separator"); StringTokenizer tokenizer = new StringTokenizer(elements, pathSeparator); while (tokenizer.hasMoreTokens()) { addElement(tokenizer.nextToken()); } } COM: <s> adds multiple class path elements in string form </s>
funcom_train/44283760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int value) { // Function header is followed by one normal byte, which is either // 0 (for global dump), or the program #, effect #, etc. SysexRoutines.setBits(value-offset, this.patch.sysex, QSConstants.HEADER, this.msBit, this.bitSize); } COM: <s> given an integer representing a new value for the parameter </s>
funcom_train/3159656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBandsToProduct(Product prodRet) { Band band = null; FlagCoding flagCoding = null; for (int n = 0; n < _file.getNumBands(); n++) { band = _file.getBandAt(n); prodRet.addBand(band); flagCoding = band.getFlagCoding(); if (flagCoding != null) { prodRet.addFlagCoding(flagCoding); } } } COM: <s> adds all geophysical bands to the product </s>
funcom_train/2677178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postInitialize() { ITag tag = null; if (log.isDebugEnabled()) { log.debug("FLVReader 1 - Buffer size: " + getTotalBytes() + " position: " + getCurrentPosition() + " remaining: " + getRemainingBytes()); } if (getRemainingBytes() >= 9) { decodeHeader(); } keyframeMeta = analyzeKeyFrames(); long old = getCurrentPosition(); } COM: <s> post initialization hook reads keyframe metadata and decodes header if any </s>
funcom_train/11732243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SpellChecker createSpellChecker() { SpellChecker spCheck = null; if (spellCheckerClass != null) { try { spCheck = (SpellChecker) spellCheckerClass.newInstance(); spCheck.init(this); } catch (Exception e) { log.warn("Exception initializing spell checker: " + spellCheckerClass, e); } } return spCheck; } COM: <s> creates a spell checker for this query handler </s>
funcom_train/20659764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI getUri() { try { uri = new URI( uri.getScheme(), uri.getUserInfo(), getToHost(), getToPort(), uri.getPath(), uri.getQuery(), uri.getFragment() ); } catch( Exception e ) { logger.warn("Exception caught while building the URI for this request: "+e, e); } return uri; } COM: <s> get the uri of this request </s>
funcom_train/31928793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSPSR(int newSPSR) { //save the previous CPSR as the current SPSR if (operatingMode == OperatingMode.USR || operatingMode == OperatingMode.SYS) { //these modes don't have a SPSR, so ignore them return; } shadowRegisters[operatingMode.SHADOW_OFFSET + SPSR_OFFSET] = newSPSR; } COM: <s> overwrites the spsr of the current mode with the supplied value </s>
funcom_train/30164177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FilenameFilter getFilenameFilter() { if (filter == null) { filter = new FilenameFilter() { public boolean accept(File dir, String name) { for (int i = 0; i < extensions.length; i++) { if (new File(dir, name).isDirectory()) { return false; } if (name.endsWith(extensions[i])) { return true; } } return false; } }; } return filter; } COM: <s> gets the filename filter attribute of the generate playlists object </s>
funcom_train/8073170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double cosine(FrequencyVector<T, ?> other) { if(this.norm()==0 || other.norm()==0) return(0); double cosine = 0; for (T term : this.terms()) { cosine += doubleValueFor(term) * other.doubleValueFor(term); } return (cosine / this.norm() / other.norm()); } COM: <s> computes the cosine to another vector </s>
funcom_train/40950659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAlias(CriteriaImpl impl, String path) { for (Iterator iterator = impl.iterateSubcriteria(); iterator.hasNext();) { Subcriteria subcriteria = (Subcriteria) iterator.next(); if (subcriteria.getPath().equals(path)) { return subcriteria.getAlias(); } } return null; } COM: <s> gets the alias </s>
funcom_train/1590942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, 0, iDivisor - 1); int divided = getDivided(getWrappedField().get(instant)); return getWrappedField().set(instant, divided * iDivisor + value); } COM: <s> set the specified amount of remainder units to the specified time instant </s>
funcom_train/35669598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInArcsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Node_inArcs_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Node_inArcs_feature", "_UI_Node_type"), ModelsPackage.Literals.NODE__IN_ARCS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the in arcs feature </s>
funcom_train/44011544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCustPhone() { System.out.println("setCustPhone"); String custPhone = ""; CustomerBO instance = null; instance.setCustPhone(custPhone); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set cust phone method of class edu </s>
funcom_train/18056915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getIconButton() { if (iconButton == null) { iconButton = new JButton(); iconButton.setBounds(new java.awt.Rectangle(70, 133, 62, 47)); iconButton.setText("Icon"); iconButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { uploadIcon(); } }); } return iconButton; } COM: <s> this method initializes icon button </s>
funcom_train/37105114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String typeString = null; switch (type) { case VARIABLE_TYPE_CLASS_ATRRIBUTE:typeString = "CLASS_ATRRIBUTE"; break; case VARIABLE_TYPE_METHOD_PARAMETER:typeString = "METHOD_PARAMETER"; break; case VARIABLE_TYPE_LOCAL_VARIABLE:typeString = "LOCAL_VARIABLE"; break; } return "[" + name + ":" + typeString + ":" + occurrences + "]"; } COM: <s> prints variable info </s>
funcom_train/28349017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateLoggerInfo() { LoggerSessionHandler session = _model.getSelectedSessionHandler(); String status = (session != null) ? String.valueOf( session.isLogging() ) : "false"; _loggingStatusField.setText(status); String periodText = (session != null) ? String.valueOf( session.getLoggingPeriod() ) : "0"; _loggingPeriodField.setText(periodText); } COM: <s> update information about the remote logger including logging period </s>
funcom_train/45395365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String captureRawInput (String prompt) { try { if (prompt != null) writer.print("\n" + prompt); String read = reader.readLine(); if (read == null) throw new UserInterfaceException(this, "No more input available for CLI"); if (echo) writer.println(read); return read; } catch (IOException e) { throw ThrowableManagerRegistry.caught(new UserInterfaceException(this, e)); } } COM: <s> if there is no more input available a ui exception will be thrown </s>
funcom_train/46098798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand2() { if (okCommand2 == null) {//GEN-END:|100-getter|0|100-preInit // write pre-init user code here okCommand2 = new Command("Ok", "Ok", Command.OK, 0);//GEN-LINE:|100-getter|1|100-postInit // write post-init user code here }//GEN-BEGIN:|100-getter|2| return okCommand2; } COM: <s> returns an initiliazed instance of ok command2 component </s>
funcom_train/18787893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerListener(Class clazz, PropertyChangeListener listener) { assert (clazz != null) && (listener != null); if (!listeners.containsKey(clazz)) { listeners.put(clazz, new ArrayList<PropertyChangeListener>()); } listeners.get(clazz).add(listener); } COM: <s> registers the listener interested in the given class </s>
funcom_train/8461391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasUniqueStrictDuration() { /*short strictDuration = ((Note)m_notes.elementAt(0)).getStrictDuration(); short currentDuration = 0; for (int i=1; i<m_notes.size(); i++) { currentDuration = ((Note)(m_notes.elementAt(i))).getStrictDuration(); if (currentDuration!=strictDuration) return false; } return true;*/ return getStrictDurations().length==1; } COM: <s> returns tt true tt if the strict durations of all notes composing this </s>
funcom_train/29265267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTooManyConnections() throws Throwable { //assume maximum is 5 Connection c1 = getConnection(); Connection c2 = getConnection(); Connection c3 = getConnection(); Connection c4 = getConnection(); Connection c5 = getConnection(); Connection c6 = null; boolean flag = false; try { //will wait till the time goes out and then throw an exception c6 = getConnection(); fail(); } catch (ResourceException re) { flag = true; } finally { assertNull(c6); assertTrue("Expected exception was not thrown", flag); } c1.close(); c2.close(); c3.close(); c4.close(); c5.close(); c6 = getConnection(); assertNotNull(c6); c6.close(); } COM: <s> tests a scenario when more connections requested than available in the pool </s>
funcom_train/10252275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User createUser(HsqlName name, String password) { // This will throw an appropriate exception if grantee already exists, // regardless of whether the name is in any User, Role, etc. list. User user = granteeManager.addUser(name); user.setPassword(password); boolean success = userList.add(name.name, user); if (!success) { throw Error.error(ErrorCode.X_28503, name.statementName); } return user; } COM: <s> creates a new user object under management of this object </s>
funcom_train/12857715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long count(FilterValues<S> values) throws FetchException { Cursor<S> cursor = fetch(values); try { long count = cursor.skipNext(Integer.MAX_VALUE); if (count == Integer.MAX_VALUE) { int amt; while ((amt = cursor.skipNext(Integer.MAX_VALUE)) > 0) { count += amt; } } return count; } finally { cursor.close(); } } COM: <s> counts results by opening a cursor and skipping entries </s>
funcom_train/1379050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateOntology(JenaOWLModel model, String ontName){ Collection errors = new ArrayList(); model.save(new File(this.ontLibPath + "\\" + ontName + ".owl").toURI(), FileUtils.langXMLAbbrev, errors, model.getOntModel()); for(Object obj : errors){ log.error(obj.toString()); } } COM: <s> update exsit ontology represent by owlmodel </s>
funcom_train/31985862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTraceReceiver(MessageReceiver trcRec) { if ( trcRec==null) { sendWarning ( "Can not add receiver to experiment! Command ignored.", "Experiment '"+getName()+"', method 'void addTraceReceiver("+ "MessageReceiver trcRec)'", "The parameter 'trc' passed was a null reference.", "Make sure to construct a valid MessageReciever before adding it to "+ "the experiment's messaging system."); return; // do nothing } messMan.register(trcRec, tracenote); } COM: <s> adds a messagereceiver for tracenotes to the experiment </s>
funcom_train/5459741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDataSourceURIEscaped() { String result = null; try { String uriString = getDataSourceURI(); result = URLEncoder.encode(uriString,"UTF-8"); } catch (UnsupportedEncodingException e) { // really weird... log.log(Level.SEVERE,"Couldn't encode the uri",e); } return result; } COM: <s> returns the utf 8 encoded version of the data source uri </s>
funcom_train/44875709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullArray() { String encoded = StringListEditor.encodeStrings(null); assertNotNull("encoded is null", encoded); String[] decoded = StringListEditor.decodeStrings(encoded); assertNotNull("decoded is null", decoded); assertEquals("wrong number of attributes", 0, decoded.length); } COM: <s> test that nulls encode alright </s>
funcom_train/3524319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValueNull() throws ModelException { validateProperties(); for (int i = 0; i < propertyNames.length; i++) { Object value = getValueHolder().getPropertyValue(propertyNames[i]); if ( value != null) { return false; } } return true; } COM: <s> returns true if all of the properties property names are null </s>
funcom_train/34519658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InterfaceImplementation getInterfaceByName(String namespace, String name){ for (int i=0;i<interfaces.size();i++){ InterfaceImplementation impl = (InterfaceImplementation)interfaces.get(i); TypeRef ref = impl.getInterface(); if (ref.getNamespace().equals(namespace) && ref.getName().equals(name)) return impl; } return null; } COM: <s> returns the interface whose name is given by namespace and name </s>
funcom_train/548184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { if(fullDescription == null) { if(description == null || isExtensionListInDescription()) { fullDescription = description==null ? "(" : description + " ("; // build the description from the extension list Enumeration extensions = filters.keys(); if(extensions != null) { fullDescription += "." + extensions.nextElement(); while (extensions.hasMoreElements()) fullDescription += ", " + extensions.nextElement(); } fullDescription += ")"; } else fullDescription = description; } return fullDescription; } COM: <s> returns the human readable description of this filter </s>
funcom_train/31078038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanDescriptor getBeanDescriptor() { BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] { "preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "An ambient light component." }); //bd.setValue("hidden-state", Boolean.TRUE); bd.setValue("helpSetName", "net/jbeans/j3d/scenegraph/resources/TextureAttributes/jhelpset.hs"); return bd; } COM: <s> returns a bean descriptor for ambient light bean </s>
funcom_train/2852221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public customerList getCustomers(){ customerList customers = new customerList(); Iterator it = files.iterator(); while (it.hasNext()){ File f = (File)it.next(); customer user = getcustomerFromYDB(f); if (f != null && user != null) customers.addElement(user); } return customers; } COM: <s> reads a given directory parses all user </s>