__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/36259459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processGeneralInformationRecord(final PdbRecord record, final Database database) throws Exception { // set creation date and commit date database.writeCreationDate(record.readDbDate(0x08)); dbCommitDate = record.readDbDate(0x0a); isDbCommitted = dbCommitDate != 0; if (isDbCommitted) { database.writeCommitDate(dbCommitDate); } } COM: <s> process the general information record tag 1 idx 0 </s>
funcom_train/28473263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getMaxComparisonDistField() { if (maxComparisonDistField == null) { maxComparisonDistField = new JTextField(); maxComparisonDistField.setPreferredSize(new Dimension(60, 20)); maxComparisonDistField.setMaximumSize(new Dimension(60, 20)); maxComparisonDistField.setMinimumSize(new Dimension(60, 20)); maxComparisonDistField.setText("500"); } return maxComparisonDistField; } COM: <s> this method initializes max comparison dist field </s>
funcom_train/14093438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element newChild(final Element parent, final String name, final String[] attrs) { Element e = m_doc.createElement(name); for (int i = 0; i < attrs.length; i += 2) { e.setAttribute(attrs[i], attrs[i + 1]); } parent.appendChild(e); return e; } COM: <s> create a new child element </s>
funcom_train/1958025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed (ActionEvent event) { String cmd = event.getActionCommand(); if (cmd.equals("btnBrowseKeyfile")){ JFileChooser chooser = new JFileChooser(); int returnVal = chooser.showDialog(this, "Select Keyfile for ssh"); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); keyText.setText(file.getAbsolutePath()); } } } COM: <s> handle the button to browse for ssh key file </s>
funcom_train/17984419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCursor(Cursor cursor) { Cursor oldCursor = getCursor(); // Make sure the cursor actually changed, otherwise // we get cursor flicker (notably on w32 title bars) if (oldCursor == null && cursor != null || oldCursor != null && !oldCursor.equals(cursor)) { this.cursor = cursor; super.setCursor(cursor); } } COM: <s> set the cursor to something else </s>
funcom_train/10267679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addYAWLService(String serviceURI, String serviceDocumentation, String sessionHandle) throws IOException { YAWLServiceReference service = new YAWLServiceReference(serviceURI, null); service.setDocumentation(serviceDocumentation); return _interfaceAClient.setYAWLService(service, sessionHandle); } COM: <s> adds a yawl service to the engine </s>
funcom_train/13866348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHTML(int row, int column, String html) { prepareCell(row, column); Element td = cleanCell(row, column, html == null); if (html != null) { DOM.setInnerHTML(td, html); } } COM: <s> sets the html contents of the specified cell </s>
funcom_train/41162599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(MaParagraphCheckList entity) { EntityManagerHelper.log("saving MaParagraphCheckList instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ma paragraph check list </s>
funcom_train/47561444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Creature getNearestCreature(Creature centre) { double closestDistance = areaSize * 2; double currentDistance = 0; Creature closestAnim = null; for (Creature c : population) { if (!c.equals(centre)) { currentDistance = centre.getPosition().getDistance(c.getPosition()); if (closestDistance > currentDistance) { closestDistance = currentDistance; closestAnim = c; } } } return closestAnim; } COM: <s> returns the closest creature to centre excluding itself </s>
funcom_train/451380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date queryGuideDataThrough() { getSession(); logger.info("Sending " + QUERY_GUIDEDATATHROUGH.getMythCmdType()); MythPacket ret = sendCommand(QUERY_GUIDEDATATHROUGH); if (debug) { logger.debug(ToStringBuilder.reflectionToString(ret)); } return ((Date) (QUERY_GUIDEDATATHROUGH.parse(ret))[0]); } COM: <s> queries the backend to see when we have guide data to </s>
funcom_train/8087012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkGlobalInfo() { boolean result; Class cls; print("Global info..."); result = true; cls = getObject().getClass(); // test for globalInfo method try { cls.getMethod("globalInfo", (Class[]) null); } catch (Exception e) { result = false; } if (result) println("yes"); else println("no"); return result; } COM: <s> checks whether the object declares a global info method </s>
funcom_train/30009244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetType() { System.out.println("getType"); Document instance = new Document(); int expResult = 0; int result = instance.getType(); 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 get type method of class papyrus </s>
funcom_train/40526683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expression rewriteIdentifiers(FilePosition pos, String names) { if ("".equals(names)) { return null; } JsConcatenator concat = new JsConcatenator(); rewriteIdentifiers(pos, names, concat); Expression result = concat.toExpression(false); ((AbstractExpression) result).setFilePosition(pos); return result; } COM: <s> foo bar baz foo suffix bar suffix baz suffix </s>
funcom_train/2956634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkValue(int var, int val, IBitSetIntDomain v) { int i = v.getContent().nextSetBit(0); for(; i >=0; i = v.getContent().nextSetBit(i+1)){ if(table[var][val - offsets[var]].get(i)){ return true; } } return false; } COM: <s> check is there exist a support for value val of variable var </s>
funcom_train/13641047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readURL(String adress) throws IOException { URL url = new URL(adress); BufferedReader urlReader = new BufferedReader(new InputStreamReader(url .openStream())); String line; StringBuilder res = new StringBuilder(); while ((line = urlReader.readLine()) != null) { res.append(line); } return res.toString(); } COM: <s> note not currently used anywhere parsing is done using nekohtml </s>
funcom_train/28589211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MethodDeclaration generateInsertMethod(MethodDeclaration methodDeclaration) { MethodDeclaration md = new MethodDeclaration(); md.setMethodName("insert"); md.setVisibility(methodDeclaration.getVisibility()); md.setStatic(false); md.addDocumentationLine("Insert this object into the DB"); md.setReturnValueDocumenation("number","new id (auto increment value) genereated",null); String body = methodDeclaration.getMethodBody(); body = replaceConstants(body, md.getUseThisInWhereClause()); md.setMethodBody(body); return md; } COM: <s> generate the php code for the insert method based on the method fragment </s>
funcom_train/25705343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonPanel() { if( buttonPanel == null ) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(FlowLayout.RIGHT); buttonPanel = new JPanel(); buttonPanel.setLayout(flowLayout); buttonPanel.add(getBok(), null); buttonPanel.add(getBcancel(), null); } return buttonPanel; } COM: <s> this method initializes button panel </s>
funcom_train/19700238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatGrid() { setBorderWidth(0); setCellPadding(3); setCellSpacing(0); // avoid white gaps around cells RowFormatter rf = getRowFormatter(); // alternating row colors for (int i = 0; i < getRowCount(); i++) { if (i % 2 == 0) rf.addStyleName(i, "genrePickerGenreWhite"); else rf.addStyleName(i, "genrePickerGenreGray"); } } COM: <s> formats this grid </s>
funcom_train/15724922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMessageCount() throws MessagingException { if (!exists()) { throw new FolderNotFoundException(this, getFullName()); } else if (!holdsMessages()) { throw new MessagingException(CANNOT_HOLD_MESSAGES); } else { return (messageVector.size()); } } COM: <s> get total number of messages in this folder </s>
funcom_train/44448480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double alpha(int i, int j) { if (i == j) return k(i); if (alpSet[i - 1][j - 1] == true) return alpha[i - 1][j - 1]; alpha[i - 1][j - 1] = alpha(i - 1, j) - k(i) * alpha(i - 1, i - j); alpSet[i - 1][j - 1] = true; return alpha[i - 1][j - 1]; } COM: <s> returns the alpha value used by the levinson durbin recursion </s>
funcom_train/13274015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void seekForward() { for (int i = 0; i < 10 && this.cameraPathIterator.hasNext(); i++) { this.playbackTimer.getActionListeners() [0].actionPerformed( new ActionEvent(this.playbackTimer, 0, "forward", System.currentTimeMillis(), 0)); } } COM: <s> moves quickly camera 10 steps forward </s>
funcom_train/34641446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String scanIdent(int ch) { StringBuffer ident = new StringBuffer(); final WordDetector wordDetector = IDENT_DETECTOR; if (wordDetector.isWordStart((char)ch)) { ident.append((char)ch); lch = ch; ch = fScanner.read(); while (wordDetector.isWordPart((char)ch)) { ident.append((char)ch); lch = ch; ch = fScanner.read(); } if (ch != BufferedDocumentScanner.EOF) fScanner.unread(); return ident.toString(); } else { return null; } } COM: <s> scan an ident string </s>
funcom_train/18126211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexedValue getNodeValue(String indexValue) { if (indexValue.equals("")) { return value; } if (children.size() == 0) { return this.value; } Node node = children.get(String.valueOf(indexValue.charAt(0))); if (node == null) { return children.get(NULLSTRING).getValue(); } return node.getIndexedValue(indexValue, 0); } COM: <s> searches for a node value </s>
funcom_train/15488658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addType(ZType type) { if(ZUtils.DEBUG) { ZUtils.assert_(type != null); ZUtils.assert_(name2type.get(type.getName()) == null); ZUtils.assert_(type.getBlock() == this); } name2type.put(type.getName(), type); } COM: <s> adds a type </s>
funcom_train/24178100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showSelected() { if (this.getFigure().getBorder() == null) { showSelected = true; BoundsRefreshment.refreshBounds(this, this.getSize().width + 2, 39); RoundedRectangleBorder border = new RoundedRectangleBorder(10, 10); border.setWidth(2); border.setColor(ColorConstants.orange); this.getFigure().setBorder(border); this.getFigure().repaint(); } } COM: <s> it will also show handler highlighted if its linked to any handler and </s>
funcom_train/34341946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodigoPedido2() { if (codigoPedido2 == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here codigoPedido2 = new TextField("Codigo del Pedido 2", null, 5, TextField.NUMERIC);//GEN-LINE:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return codigoPedido2; } COM: <s> returns an initiliazed instance of codigo pedido2 component </s>
funcom_train/21963386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateHistory() { if (combo == null) return; String temp = combo.getText(); if (history == null) history = getInternalWebBrowserHistory(); String[] historyList = new String[history.size()]; history.toArray(historyList); combo.setItems(historyList); combo.setText(temp); } COM: <s> update the history list to the global shared copy </s>
funcom_train/32316072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTagPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectOneOf_tag_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectOneOf_tag_feature", "_UI_ObjectOneOf_type"), OdmPackage.Literals.OBJECT_ONE_OF__TAG, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the tag feature </s>
funcom_train/19209131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getPersistentAsBoolean(AbstractUIPlugin plugin){ String stored= plugin.getPreferenceStore().getString(getKey().toString()); boolean result= false; if(stored != null && !stored.equals("")){ result= new Boolean(stored).booleanValue(); }else{ if(getDefault() != null){ result= ((Boolean)getDefault()).booleanValue(); } } return result; } COM: <s> gets a boolean value from the persistent store for the specified plugin </s>
funcom_train/2581978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getTimePeriodsUniqueToOtherSeries(TimeSeries series) { Collection result = new java.util.ArrayList(); for (int i = 0; i < series.getItemCount(); i++) { RegularTimePeriod period = series.getTimePeriod(i); int index = getIndex(period); if (index < 0) { result.add(period); } } return result; } COM: <s> returns a collection of time periods in the specified series but not in </s>
funcom_train/16888593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openStatementEditor(String eClass, String language, String activityName) { System.out.println("StatementEditor: " + eClass + " : " + language); if (!Application.getInstance().isStatementEditorOpen()){ new StatementEditor(this, language, eClass, activityName); } } COM: <s> opens a statement editor shell </s>
funcom_train/181011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDbNlsString(ch.softenvironment.jomm.datatypes.DbNlsString nlsString) { setnlsString(nlsString); if (nlsString == null) { getBtnTranslation().setText("..."); getBtnTranslation().setToolTipText("Sprache wechseln (aktuell: <ohne>)"); } else { String language = Locale.getDefault().getLanguage(); getBtnTranslation().setText(language); getBtnTranslation().setToolTipText("Sprache wechseln (aktuell: <" + language + ">)"); } } COM: <s> method generated to support the promotion of the db nls string attribute </s>
funcom_train/8987637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSelectedAttachment(int no, HttpServletRequest request) { String selectAttachments[] = request.getParameterValues("attachment"); if (selectAttachments == null || selectAttachments.length == 0) { return false; } for (int i = 0; i < selectAttachments.length; i++) { if (no == Integer.parseInt(selectAttachments[i])) { return true; } } return false; } COM: <s> is selected attachment </s>
funcom_train/8250233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStoreEventUnrelated() { Event event = new Event(); try { eventDao.storeEvent(event); fail("Should not be able to store an unrelated event"); } catch (DaoException e) { //Expected } catch (Exception e) { //fail("Unexpected exception... " + e); //FIXME org.hibernate.PropertyValueException... //(org.hibernate.AssertionFailure) log.warn("THIS SHOUL REALLY BE FIXED :"); } } COM: <s> test the store method </s>
funcom_train/10048220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMailPrivate() { boolean isPrivate = false; String sql = "select hideEmail from blogger;"; try { DataConnection conn = DataConnectionPool.getDataConnection(); ResultSet rs = conn.executeQuery(sql); rs.first(); isPrivate = (rs.getInt("hideEmail") == 1) ? true : false; DataConnectionPool.returnDataConnection(conn); } catch (Exception e) { System.out.println("BlogDAO.isMailPrivate() caught " + e.getMessage()); } return isPrivate; } COM: <s> check if mail address is private </s>
funcom_train/37637589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(int row, int column, Font cellFont){ font.setElementAt(row, column, cellFont); AttributeModelEvent e = new AttributeModelEvent(this, AttributeModelEvent.CELLS_UPDATED, row, column, 1, 1); fireDataChanged(e); } COM: <s> set the font of cell row column </s>
funcom_train/14093395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXMLTestSuite2() throws IOException { setUpEf2(); IXMLTestSuite suite = m_ef2.getTestSuite(); File f = m_ef2.getSuiteFile(); String name = f.getCanonicalPath(); Element element = m_ef2.getSuiteElement(); m_xmlTestSuite = new XMLTestSuite(name, element); } COM: <s> test a constructor with element and name </s>
funcom_train/46154823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void makeEntityPickable(Entity entity, Node node) { JMECollisionSystem collisionSystem = (JMECollisionSystem) ClientContextJME.getWorldManager().getCollisionManager(). loadCollisionSystem(JMECollisionSystem.class); entity.removeComponent(CollisionComponent.class); CollisionComponent cc = collisionSystem.createCollisionComponent(node); entity.addComponent(CollisionComponent.class, cc); } COM: <s> make this entity pickable by adding a collision component to it </s>
funcom_train/47752028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean traverseBreadthFirst(IFrameVisitor visitor) { Queue<FrameTreeNode> queue = new LinkedList<FrameTreeNode>(); queue.add(this); FrameTreeNode node; while( (node = queue.poll()) != null ) { if(visitor.visit(node)) { return true; } queue.addAll(node.m_children); } return false; } COM: <s> breadth first traversal </s>
funcom_train/1060017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addViewportPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramLink_viewport_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramLink_viewport_feature", "_UI_DiagramLink_type"), Di2Package.Literals.DIAGRAM_LINK__VIEWPORT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the viewport feature </s>
funcom_train/11112782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reader getReader(InputStream in, String declaredEncoding) { setCanonicalDeclaredEncoding(declaredEncoding); try { setText(in); CharsetMatch match = detect(); if (match == null) { return null; } return match.getReader(); } catch (IOException e) { return null; } } COM: <s> autodetect the charset of an input stream and return a java reader </s>
funcom_train/15400069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateCursorChildren(Cursor c) { ArrayList children = getChildren(); for (int i = 0; ((children != null) && (i < children.size())); i++) { ((DICOMImageCluster)children.get(i)).updateCursor(c); } if (children == null) { _dipg.setCursor(c); } } COM: <s> updates the cursors for all of the nodes children </s>
funcom_train/13902534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized static public void addDirectContract(IResource target, IResource contract) { try { contract.setSessionProperty(QN_TARGET_PROPERTY, target); target.setSessionProperty(QN_DIRECTCONTRACT_PROPERTY, contract); Collection<IResource> contracts = new Vector<IResource>(); contracts.add(contract); addContracts(target, contracts); } catch (CoreException e) {} } COM: <s> the caller should update the state of the subtypes of em target em </s>
funcom_train/47519057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixIndices() { for (int row = 0; row < ((DefaultTableModel) cvTermsJTable.getModel()).getRowCount(); row++) { ((DefaultTableModel) cvTermsJTable.getModel()).setValueAt(new Integer(row + 1), row, 0); } } COM: <s> fixes the indices so that they are in accending order starting from one </s>
funcom_train/12639489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean implies(ProtectionDomain pd, Permission p) { Map pdMap = policyInfo.getPdMapping(); PermissionCollection pc = (PermissionCollection) pdMap.get(pd); if (pc != null) { return pc.implies(p); } pc = getPermissions(pd); if (pc == null) { return false; } // cache mapping of protection domain to its PermissionCollection pdMap.put(pd, pc); return pc.implies(p); } COM: <s> evaluates the the global policy for the permissions granted to </s>
funcom_train/22232620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPosition(float x, float y, float z) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_POSITION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PointSound0")); ((PointSoundRetained)this.retained).setPosition(x,y,z); } COM: <s> sets this sounds position from the three values provided </s>
funcom_train/38865939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConfigInfo() { String info = "\nLog4j Configuration:"; info += "\n Log level="+loglevel; if(logcfg!=null) { info += "\n Log configuration file="+logcfg; } else { if(logfile!=null) info += "\n Log output file="+logfile; if(logpattern!=null) info += "\n Log pattern="+logpattern; } return info; } COM: <s> get logging parameters and format as a single string that can </s>
funcom_train/18807596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRangeAxis(int index, ValueAxis axis) { ValueAxis existing = getRangeAxis(index); if (existing != null) { existing.removeChangeListener(this); } if (axis != null) { axis.setPlot(this); } this.rangeAxes.set(index, axis); if (axis != null) { axis.configure(); axis.addChangeListener(this); } notifyListeners(new PlotChangeEvent(this)); } COM: <s> sets a range axis and sends a </s>
funcom_train/25778973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVkePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InstructionExecutionDetails_vke_feature"), getString("_UI_PropertyDescriptor_description", "_UI_InstructionExecutionDetails_vke_feature", "_UI_InstructionExecutionDetails_type"), CoveragepackagePackage.Literals.INSTRUCTION_EXECUTION_DETAILS__VKE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the vke feature </s>
funcom_train/7510751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerMoveRowsUpButton(JButton button) { if (upButton != null) { throw new IllegalStateException("'upButton' already registered (" + upButton.getText() + ")."); } if (button == null) { throw new IllegalStateException("Internal error. Parameter 'button' must be not null."); } this.upButton = button; button.setActionCommand("up"); button.setName("up"); Utils.addCheckedListener(button, this); } COM: <s> register move rows up button on dialog </s>
funcom_train/19286971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDeletePage() throws FailedRequest { dataBitStorage.deleteDataBits(dataBitStorage.getSurveyPagesTable(), pageNum.getValue(), "page"); dataBitStorage.deleteDataBits(dataBitStorage.getPagesOfQuestionsTable(), pageNum.getValue(), "page"); // reset it to show that it's new again. pageNum.setValue(null); } COM: <s> call when saving to delete the page </s>
funcom_train/16379921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateInputLengthType_Min(int inputLengthType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = inputLengthType >= INPUT_LENGTH_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.INPUT_LENGTH_TYPE, new Integer(inputLengthType), new Integer(INPUT_LENGTH_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em input length type em </s>
funcom_train/41225859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntegerEquals() throws ServletException, javax.servlet.jsp.JspException { request.setAttribute(testIntegerKey, testIntegerValue); net.setName(testIntegerKey); net.setValue(testIntegerValue.toString()); assertEquals("Integer equals comparison", true, net.condition(0, 0)); } COM: <s> verify that an code integer code and a code string code </s>
funcom_train/3337543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object orderBy(Object rootCtx, Collection c) throws EvaluationException { Collection out = null; for (int i = argOps.length - 1; i >= 0; i--) { out = sort(rootCtx, c, argOps[i]); } return (Object) out; } COM: <s> sorts the given collection using the arg ops criteria </s>
funcom_train/35019166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeListeners(Session session) { BreakpointManager bm = BreakpointProvider.getBreakpointManager(session); bm.removeBreakpointListener(this); Iterator<Breakpoint> biter = bm.getDefaultGroup().breakpoints(true); while (biter.hasNext()) { Breakpoint bp = biter.next(); bp.removePropertyChangeListener(this); } } COM: <s> unregister as a listener with certain components </s>
funcom_train/2034880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getAbsolutePosition(GridPosition pos) { NodeDimensions dims = settings.getNodeDimensions(); Point margin = dims.getDistanceToBorder(); Point gridSize = dims.getGridDistance(); int x = margin.x + pos.getXPos() * gridSize.x; int y = margin.y + pos.getYPos() * gridSize.y; return new Point(x, y); } COM: <s> returns the absolute pixel coordinates given the grid position </s>
funcom_train/44385388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String resolveJar(String className, String jarProperty) { WhichResourceFile whichResource = new WhichResourceFile(); whichResource.setProject(getProject()); whichResource.setTaskName(getTaskName()); whichResource.setClass(className); whichResource.setProperty(jarProperty); whichResource.execute(); return getProject().getProperty(jarProperty); } COM: <s> look for a class in current class loader and return the corresponding jar </s>
funcom_train/37079860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildGUI() { super.buildGUI(); JButton browseButton = new JButton("Browse..."); browseButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { browseFiles(); } } ); getInnerPanel().add(browseButton, getConstraints().nextColumn()); } COM: <s> add in browse button </s>
funcom_train/3020892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getProperties(String key) { Properties p = null; Object o = get(key); if (o == null) { o = new Properties(); set(key, o); } if (o instanceof Properties) { p = (Properties) o; } else { throw new DataStoreException(key + " does not referr to Properties data.", this); } return p; } COM: <s> retrieves from this data store the properties map stored under the </s>
funcom_train/43827844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConditionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HLTransitionAddin_condition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HLTransitionAddin_condition_feature", "_UI_HLTransitionAddin_type"), ModelPackage.Literals.HL_TRANSITION_ADDIN__CONDITION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the condition feature </s>
funcom_train/3990209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOdglos_opukowyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_odglos_opukowy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_odglos_opukowy_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__ODGLOS_OPUKOWY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the odglos opukowy feature </s>
funcom_train/34264822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildFlywheelNameBox() { this.getFlywheelNameBox().removeAllItems(); OrganizationRepository lSelectedRepository = (OrganizationRepository)getRepositoryBox().getSelectedItem(); if (lSelectedRepository != null) { for (int i=0; i < lSelectedRepository.flywheelWorkspaceListSize(); ++i) { this.getFlywheelNameBox().addItem(lSelectedRepository.getFlywheelWorkspace(i)); } } } COM: <s> builds the flywheel box when the repository changes </s>
funcom_train/1150186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(Message m) throws RemoteException { OperationType op = OperationType.valueOf(m.key); switch (op) { case GET_ERROR: // error message response to GET System.err.println("Error: An unknown GET error occurred"); break; case GET_RESPONSE: // non-error response to GET handleGetResponse(m); break; default: // unsupported message type System.err.println("Error: Operation Not Supported: " + m.key); } } COM: <s> sends a message into this system </s>
funcom_train/12163549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBlockAddition() throws Exception { String original = "<wml>" + "<card>"+ "simple" + "</card>"+ "</wml>"; String expected = "<wml>" + "<card>"+ "<p>" + "simple" + "</p>" + "</card>"+ "</wml>"; checkTransformation(original, expected, true); } COM: <s> test to see that blocks are added into simple documents when required </s>
funcom_train/11372693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File findFile(NameNodeDirType dirType, String name) { for (StorageDirectory sd : dirIterable(dirType)) { File candidate = new File(sd.getCurrentDir(), name); if (sd.getCurrentDir().canRead() && candidate.exists()) { return candidate; } } return null; } COM: <s> return the first readable storage file of the given name </s>
funcom_train/6407635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performAction(InputActionEvent evt) { Vector3f loc = camera.getLocation(); if(upVector != null) { loc.subtractLocal(upVector.mult(speed * evt.getTime(), tempVa)); camera.update(); } else { loc.subtractLocal(camera.getUp().mult(speed * evt.getTime(), tempVa)); camera.update(); } } COM: <s> code perform action code moves the camera along the negative up </s>
funcom_train/27825764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set getVirtualProperties(Set input,boolean isInOIModel) throws KAONException { Set output=new HashSet(); Iterator iterator=input.iterator(); while (iterator.hasNext()) { Property property=(Property)iterator.next(); output.add(m_oimodel.getProperty(property,isInOIModel)); } return output; } COM: <s> converts a set of original properties into a set of virtual properties </s>
funcom_train/5420237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean toolEnabled(int tool) { switch( tool ) { case MESSAGESTOOL : return messagesAccess != DISABLED; case FILESTOOL : return filesAccess != DISABLED; case MEMBERSTOOL : return membersAccess != DISABLED; case POSTTOOL : return postAccess != DISABLED; case FORWARDINGTOOL : return forwardingAccess != DISABLED; case PICTURESTOOL : return picturesAccess != DISABLED; default : throw new IllegalArgumentException("Invalid tool code : " + tool ); } } COM: <s> return true if the tool is enabled </s>
funcom_train/13243545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildDoc(Reader in) throws IOException { try { SAXReader xmlReader = new SAXReader(); document = xmlReader.read(in); } catch (Exception e) { throw new IOException(e.getMessage()); } finally { if (in != null) { in.close(); } } } COM: <s> builds the document xml model up based the given reader of xml data </s>
funcom_train/2929220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntegerProperty(String key) throws ConfigurationException { // we can safely avoid synchronization while (true) { try { for (Iterator<PropertyProviderInterface> i = this.propertyProviderList.iterator(); i .hasNext();) { try { return i.next().getIntegerProperty(key); } catch (ConfigurationException e) { // try next } } // not found throw new ConfigurationException("Property " + key + " not defined"); } catch (ConcurrentModificationException e) { // just retry } } } COM: <s> integer property getter delegating to backing provider implementations </s>
funcom_train/41164524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoActivity entity) { EntityManagerHelper.log("saving CoActivity instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co activity entity </s>
funcom_train/16544942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void artifactRemoved(String key) { /* remember what row was selected */ int rowToRemove = tableModel.getRow(key); int selectedRow = jXTable.convertRowIndexToView(rowToRemove); /* remove the row from the table */ int rowRemoved = tableModel.removeArtifact(key); if(rowRemoved == -1) { /* artifact was not in the tableModel, so wasn't removed */ return; } setTableSelections(selectedRow); } COM: <s> method called when an </s>
funcom_train/2861275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDbList(Object dbs) { if (dbs instanceof Hashtable) { int i=0; dbnames = new String[((Hashtable)dbs).size()]; for (Enumeration fff = ((Hashtable)dbs).keys(); fff.hasMoreElements();) dbnames[i++] = (String) fff.nextElement(); } else if (dbs instanceof String[]) dbnames = (String[])dbs; } COM: <s> set the database list for the user </s>
funcom_train/40340787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPoint(float x, float y) { if (npoints == xpoints.length) { float[] tmp; tmp = new float[npoints * 2]; System.arraycopy(xpoints, 0, tmp, 0, npoints); xpoints = tmp; tmp = new float[npoints * 2]; System.arraycopy(ypoints, 0, tmp, 0, npoints); ypoints = tmp; } xpoints[npoints] = x; ypoints[npoints] = y; npoints++; updatePath(x, y); } COM: <s> appends the specified coordinates to this code polygon2 d code </s>
funcom_train/31012491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllQuestions(long pollid) { PollManager pollMan = null; try { pollMan = ((PollManagerHome)EJBHomeFactory.getInstance().lookup(POLL_MANAGER_JNDI,PollManagerHome.class)).create(); return pollMan.getAllQuestion(pollid); } catch (Exception e) { e.printStackTrace(); return null; } finally { EJBUtils.remove(pollMan); } } COM: <s> get all questions from the database of a poll </s>
funcom_train/13957283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjectsForKey(NSArray<? extends EOEnterpriseObject> bugs, Object key) { NSArray<EOGlobalID> gids = NOT_FOUND_MARKER; if(bugs != null) { gids = ERXEOControlUtilities.globalIDsForObjects(bugs); } setCachedArrayForKey(gids, key); } COM: <s> add a list of objects to the cache with the given key </s>
funcom_train/39912201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRh9() { System.out.println("getRh9"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getRh9(); 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 get rh9 method of class timesheetmanagement </s>
funcom_train/2388124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAccessTime(PwsEntryBean anEntry) { if (anEntry != null) { //set access date if (!isReadOnly() && "3".equals(anEntry.getVersion())) { // fetch the real entry if sparse if (anEntry.isSparse()) { anEntry = getPwsDataStore().getEntry(anEntry.getStoreIndex()); } anEntry.setLastAccess(new Date()); dataStore.updateEntry(anEntry); } } } COM: <s> update the access time of an entry </s>
funcom_train/9673102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void message(Class messageClass,int messageId,int messageLevel,String[] messageArguments){ super.message(messageClass,messageId,messageLevel,messageArguments); frame.getGUI().message(messageClass,messageId,messageLevel,messageArguments); } COM: <s> show message to the user console message </s>
funcom_train/21915902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public OJPackage findOJPackage(IPackage umlPack, OJPackage javamodel) { OJPathName path = new OJPathName(); Iterator it = umlPack.getPathName().getNames().iterator(); while( it.hasNext()){ String n = (String) it.next(); if (!n.equals(OctopusConstants.OCTOPUS_INVISIBLE_PACK_NAME)){ path.addToNames(n); } } OJPackage ojPack = javamodel.findPackage(path); return ojPack; } COM: <s> returns the java package that has been generated in javamodel for uml cls </s>
funcom_train/19314298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final String str) { if (! this.doOutput) { return; } try { final byte buff[] = str.getBytes(this.encoding.name()); this.out.write(buff); } catch (final IOException e) { throw new RuntimeException(e.toString()); } } COM: <s> write some text to this stream </s>
funcom_train/24118513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doShowDialog(SecGroup aGroup) throws InterruptedException { try { textbox_AddGroupRightDialog_GroupName.setValue(aGroup.getGrpShortdescription()); textbox_AddGroupRightDialog_RightName.setValue(""); btnCtrl.setInitNew(); addGrouprightDialogWindow.doModal(); // open the dialog in // modal // mode } catch (final Exception e) { Messagebox.show(e.toString()); } } COM: <s> opens the dialog window modal </s>
funcom_train/34840424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Role createRole(String roleName) { try { JPAUtil.beginEntityTransaction(); Role role = new Role(); role.setRoleName(roleName); role.setPrincipals(new ArrayList<Admin>()); JPAUtil.getEntityManager().persist(role); JPAUtil.commitEntityTransaction(sessionOwner); return role; } catch (EntityExistsException pe) { return null; } } COM: <s> creates a new role if it doesnt exists </s>
funcom_train/14027453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(int maxStack, int maxLocals) { assert(maxStack <= 0xffff); assert(maxLocals <= 0xffff); getProperties(); _props.maxStack = maxStack; _props.maxLocals = maxLocals; Types.bytesFromShort((short)(maxStack & 0xffff), _data, 0); Types.bytesFromShort((short)(maxLocals & 0xffff), _data, 2); } COM: <s> set the code properties </s>
funcom_train/39291202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendActionToUndoGroup(IMenuManager menu, String actionId) { IAction action = getActionRegistry().getAction(actionId); if (action != null && action.isEnabled()) { menu.appendToGroup(GEFActionConstants.GROUP_UNDO, action); } } COM: <s> appends the specified action to the specified menu group </s>
funcom_train/49214527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseLuFields(){ String luString = "key1:val1, key2:val2,key3"; HashMap luMap = PropertyHelper.parseLuFields(luString); assertEquals(luMap.get("key1"), "val1"); assertTrue(luMap.size() == 3); } COM: <s> test of parse lu fields method of class property helper </s>
funcom_train/3395492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isException() { if (isEnum() || isInterface() || isAnnotationType()) { return false; } for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) { if (t.tsym == env.syms.exceptionType.tsym) { return true; } } return false; } COM: <s> return true if this is an exception class </s>
funcom_train/45485776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton10Add() { if (jButton10Add == null) { jButton10Add = new JButton(); jButton10Add.setBounds(new Rectangle(5, 252, 64, 26)); Font font = new Font("Serif", Font.BOLD, 16); jButton10Add.setFont(font); jButton10Add.setForeground(Color.green); jButton10Add.setText("10"); } return jButton10Add; } COM: <s> this method initializes j button10 add </s>
funcom_train/4295479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Choice getBackDateChoice() { if (backDateChoice == null) { backDateChoice = new Choice(); backDateChoice.setBounds(new java.awt.Rectangle(604,55,138,21)); backDateChoice.add("All Mystery Shops"); backDateChoice.add("1 Month"); backDateChoice.add("3 Months"); backDateChoice.add("6 Months"); backDateChoice.add("1 Year"); } return backDateChoice; } COM: <s> this method initializes back date choice </s>
funcom_train/35752298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu getJPopupMenuNewsItems() { if (jPopupMenuNewsItems == null) { jPopupMenuNewsItems = new JPopupMenu(); jPopupMenuNewsItems.setSize(new Dimension(99, 98)); jPopupMenuNewsItems.add(getJMenuItemStar()); jPopupMenuNewsItems.add(getJMenuItemSetUnread()); jPopupMenuNewsItems.add(getJMenuItemOpenInBrowser()); } return jPopupMenuNewsItems; } COM: <s> this method initializes j popup menu news items </s>
funcom_train/51822821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJPortField() { if (jPortField == null) { jPortField = new JTextField(); jPortField.setPreferredSize(new Dimension(100, 22)); jPortField.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { jPortField.selectAll(); } public void focusLost(FocusEvent e) { } } ); } return jPortField; } COM: <s> this method initializes j port field </s>
funcom_train/12834334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public L2CAPConnection createDownstreamDataConnection(BTAddress nextHop, int psm) throws IOException { String con_str = "btl2cap://" + nextHop.toStringSep(false) + ":" + Integer.toHexString(psm); out("createDatConn", "con_str='" + con_str + "'"); return (L2CAPConnection) Connector.open(con_str); } COM: <s> sets up the forward path of the data connection </s>
funcom_train/9536178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getJTextPaneServerRaw() { if (jTextPaneServerRaw == null) { jTextPaneServerRaw = new JRawTextPane(Direction.ServerToClient); jTextPaneServerRaw.setText(""); jTextPaneServerRaw.setEditable(true); } return jTextPaneServerRaw; } COM: <s> this method initializes j text pane server raw </s>
funcom_train/123121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Object value) { final FastComparator valueComp = this.getValueComparator(); for (Record r = head(), end = tail(); (r = r.getNext()) != end;) { if (valueComp.areEqual(value, valueOf(r))) return true; } return false; } COM: <s> indicates if this collection contains the specified value </s>
funcom_train/16891246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSelectionChanged(final SelectionChangedEvent event) { Object[] listeners = this.listeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ISelectionChangedListener l = (ISelectionChangedListener)listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } @Override public void handleException(Throwable e) { super.handleException(e); //If an unexpected exception happens, remove it //to make sure the workbench keeps running. removeSelectionChangedListener(l); } }); } } COM: <s> notifies all registered selection changed listeners that the editors </s>
funcom_train/50586647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testResourcePath() { // testinPreparedEnvironment( // "SelfTestData/original/testManagement.properties", // new Runnable() { // public void run() { // String resourcePath = PersistenceManager.getDefaultInstance().getStandardRootPath(); // String errorPath = // ClassLoader.getSystemClassLoader().getResource("TestSpecData/errors").getPath(); // assertEquals(errorPath, resourcePath.concat("/errors")); // } // }); // // } COM: <s> this test assures that the standardrootpath of persistence manager is located as parent </s>
funcom_train/33817302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkImagem () { if (okImagem == null) {//GEN-END:|28-getter|0|28-preInit // write pre-init user code here okImagem = new Command ("Carrega imagem", Command.OK, 0);//GEN-LINE:|28-getter|1|28-postInit // write post-init user code here }//GEN-BEGIN:|28-getter|2| return okImagem; } COM: <s> returns an initiliazed instance of ok imagem component </s>
funcom_train/4385666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Amsler ( WebGraph graph ) { this.graph = graph; this.scores = new HashMap(); int numLinks = graph.numNodes(); for(int i=0; i<numLinks; i++) { HashMap aux = new HashMap(); for(int j=0; j<i; j++) aux.put(new Integer(j),new Double(-1)); scores.put(new Integer(i),aux); } } COM: <s> constructor for amsler </s>
funcom_train/18704638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFormattedString(String format) { String retval = value; StringTokenizer st = new StringTokenizer(format, ","); while (st.hasMoreTokens()) { String token = st.nextToken().trim(); StringFormatter fmtr = (StringFormatter) (formatters.get(token)); // check if a StringFormatter could be found and, if so, call it. if (fmtr != null) { retval = fmtr.format(retval); } } return retval; } COM: <s> format strings are comma separated lists of the following tokens </s>
funcom_train/29583736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void forEachOverEmptyList() { Element parentWithoutChildren = doc.createElement("elementWithoutChildren"); List<String> list = new ArrayList<String>(); for (Node node : new IterableChildList(parentWithoutChildren)) { list.add(node.getNodeName()); } // nothing should have been added assertTrue(list.size() == 0); } COM: <s> tests whether empty lists are handled correctly when </s>