__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11374905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canStartNameNode(Configuration conf) throws IOException { NameNode nn2 = null; try { nn2 = NameNode.createNameNode(new String[]{}, conf); } catch(IOException e) { if (e instanceof java.net.BindException) return false; throw e; } finally { stopNameNode(nn2); } return true; } COM: <s> check whether the namenode can be started </s>
funcom_train/41593609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNegationIndPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_POCDMT000040EntryRelationship_negationInd_feature"), getString("_UI_PropertyDescriptor_description", "_UI_POCDMT000040EntryRelationship_negationInd_feature", "_UI_POCDMT000040EntryRelationship_type"), V3Package.eINSTANCE.getPOCDMT000040EntryRelationship_NegationInd(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the negation ind feature </s>
funcom_train/1111806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSelectionCellAt(Point2D pt) { pt = fromScreen((Point2D) pt.clone()); Object[] cells = getSelectionCells(); if (cells != null) { for (int i = 0; i < cells.length; i++) if (getCellBounds(cells[i]).contains(pt.getX(), pt.getY())) return cells[i]; } return null; } COM: <s> returns the selection cell at the specified location </s>
funcom_train/51620685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean openWindows() { IStatus status = getWorkbenchConfigurer().restoreState(); if (!status.isOK()) { if (status.getCode() == IWorkbenchConfigurer.RESTORE_CODE_EXIT) { return false; } if (status.getCode() == IWorkbenchConfigurer.RESTORE_CODE_RESET) { getWorkbenchConfigurer().openFirstTimeWindow(); } } return true; } COM: <s> opens the workbench windows on startup </s>
funcom_train/2760626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EvalState getFlowEvalState() { // // check current context(not attached to the progress structure so far) if(_eventInvocation.getFlowEvalState() != null) { return _eventInvocation.getFlowEvalState(); } // // check parent contexts return _flowExecCtx.getFlowEvalState(); } COM: <s> returns the evaluation state for the flow </s>
funcom_train/41165802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoTestUserHistory entity) { EntityManagerHelper.log("deleting CoTestUserHistory instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoTestUserHistory.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co test user history entity </s>
funcom_train/42950111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFromColumnModelChange(TableColumnModel oldModel) { if (oldModel != null) { oldModel.removeColumnModelListener(columnModelListener); } populatePopupMenu(); if (canControl()) { table.getColumnModel().addColumnModelListener(columnModelListener); } } COM: <s> adjust internal state to after tables column model property has changed </s>
funcom_train/21848403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSizeType(String sizeType) { if ("CONSTANT".equalsIgnoreCase(sizeType)) m_spec_panel.setSelected(SpecViewNames.ID_CONSTANT_SIZE_RADIO, true); else if ("BOUNDED".equalsIgnoreCase(sizeType)) m_spec_panel.setSelected(SpecViewNames.ID_BOUNDED_SIZE_RADIO, true); else m_spec_panel.setSelected(SpecViewNames.ID_COMPONENT_SIZE_RADIO, true); } COM: <s> selects the size type radio that corresponds to the given size type </s>
funcom_train/43260866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem1() { if (stringItem1 == null) {//GEN-END:|95-getter|0|95-preInit // write pre-init user code here stringItem1 = new StringItem("", "");//GEN-LINE:|95-getter|1|95-postInit // write post-init user code here }//GEN-BEGIN:|95-getter|2| return stringItem1; } COM: <s> returns an initiliazed instance of string item1 component </s>
funcom_train/47184615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateOv(EditOfficeVisitForm form) throws DBException, FormValidationException, iTrustException { validator.validate(form); OfficeVisitBean ov = getBean(); ov.setNotes(form.getNotes()); ov.setVisitDateStr(form.getVisitDate()); ov.setHcpID(Long.valueOf(form.getHcpID())); ov.setPatientID(Long.valueOf(form.getPatientID())); ov.setHospitalID(form.getHospitalID()); updateBean(ov); } COM: <s> updates the office visit </s>
funcom_train/14653186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListPanel (final Actor actor, final String name, final List components, final int interf, final Chunk parent_chunk, final MemoryMap memorymap) { this.parent_chunk = parent_chunk; this.memorymap = memorymap; initPanel (actor, name, components, interf); } COM: <s> create list panel init panel </s>
funcom_train/49608684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Person updatePerson(String username,EntityManager em,Person vo) throws Throwable { try { return (Person)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } finally { em.flush(); } } COM: <s> update a person </s>
funcom_train/20042815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _setDropDownLineCount() { requiredMethod("getDropDownLineCount()") ; boolean result = true ; oObj.setDropDownLineCount((short)(lineCount + 1)) ; result = oObj.getDropDownLineCount() == lineCount + 1 ; tRes.tested("setDropDownLineCount()", result) ; } COM: <s> sets a new value and then checks get value </s>
funcom_train/6423198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDataSizeValue() { if ( ( dataSize & DS2048 ) != 0 ) { return 2048; } if ( ( dataSize & DS1024 ) != 0 ) { return 1024; } if ( ( dataSize & DS512 ) != 0 ) { return 512; } if ( ( dataSize & DS256 ) != 0 ) { return 256; } if ( ( dataSize & DS128 ) != 0 ) { return 128; } if ( ( dataSize & DS64 ) != 0 ) { return 64; } // minimal requirement is always 64 bytes return 64; } COM: <s> get the size of the acceptable packets </s>
funcom_train/18150204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOutboundLink(RoleLink outboundLink) { // create the association set if it doesn't exist already if(_outboundLink == null) _outboundLink = new AssociationSetImpl<RoleLink>(); // add the association to the association set getOutboundLink().add(outboundLink); // make the inverse link outboundLink.setSource(this); } COM: <s> adds an association outbound link </s>
funcom_train/32761860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBorderTab( final JTabbedPane tabbedPane, final String name, final Vector<BorderProxy> borders ) { final JList list = new JList(); list.setDragEnabled( true ); list.setTransferHandler( new ViewTransferHandler( list ) ); list.setListData( borders ); list.setCellRenderer( new ViewCellRenderer() ); tabbedPane.add( name, new JScrollPane( list ) ); } COM: <s> add a tab of borders to the tabbed pane </s>
funcom_train/19845145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClip(int x, int y, int width, int height) { predraw(); if (clip == null) { GL.glEnable(SGL.GL_SCISSOR_TEST); clip = new Rectangle(x, y, width, height); } else { clip.setBounds(x, y, width, height); } GL.glScissor(x, screenHeight - y - height, width, height); postdraw(); } COM: <s> set the clipping to apply to the drawing </s>
funcom_train/7980671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runProcessorFinalTasks(){ for (Iterator ic = processorChains.iterator(); ic.hasNext(); ) { for (Iterator ip = ((ProcessorChain) ic.next()).iterator(); ip.hasNext(); ) { ((Processor) ip.next()).finalTasks(); } } } COM: <s> this method iterates through processor chains to run processors final </s>
funcom_train/25595917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcon(Icon icon) { ModifiedTreeNode root = (ModifiedTreeNode) treeModel.getRoot(); this.nodeIcon = icon; Enumeration children = root.getBFTEnumeration(); while (children.hasMoreElements()) { ModifiedTreeNode child = (ModifiedTreeNode) children.nextElement(); (child.getNodeRenderer()).setIcon(this.nodeIcon); } } COM: <s> sets the given icon to all the nodes of the tree </s>
funcom_train/37125265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onFocusGained() { if(m_backgroundImageWhenFocused != null) { try { m_panel.setImage(m_backgroundImageWhenFocused) ; } catch(kanaputs.logging.Exception e) {} } else if(m_backgroundColorWhenFocused != null) { m_panel.setOpaque(true) ; m_panel.setBackground( m_backgroundColorWhenFocused.m_color) ; } } COM: <s> activated when focus is gained </s>
funcom_train/3861817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addExternalLinkUrls(List linkUrls) { Iterator mExternalApiIterator = cMasterRepository.getExternalRepositories().iterator(); while (mExternalApiIterator.hasNext()) { ExternalRepository bRep = (ExternalRepository)mExternalApiIterator.next(); linkUrls.add(bRep.getApiUrl()); } } COM: <s> adds external links to a list of link urls </s>
funcom_train/12385055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDoc( StampDocument docu ) { DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)this.treeModel.getRoot(); selectedNode.removeAllChildren(); selectedNode.removeFromParent(); this.doc = docu; this.treePane.setModel( createTree(this.doc) ); this.viewPane.setDoc(this.doc); this.viewPane.setPage(null); this.pageListView.setDoc(this.doc); this.updateControls(); reloadImageCache(); this.mainFrame.setTitle( getFrameTitle() ); repaintViews(); } COM: <s> set document to views used by load undo new etc </s>
funcom_train/14093306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWindowByNullTitle() { setWindow(createJFrame(null)); packAndShow(getFrame()); Finder finder = new FrameFinder("Notfound"); finder.setWait(0); assertNull("Window should not be found", finder.find()); finder = new FrameFinder(null); assertEquals("null title should find frame", getFrame(), finder.find()); } COM: <s> checks that when finding a window using the partial title </s>
funcom_train/9294713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopLeft(Control c, boolean layout) { checkWidget(); if (c != null && c.getParent() != this) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (this.topLeft != null && !this.topLeft.isDisposed()) { this.topLeft.setBounds(OFFSCREEN, OFFSCREEN, 0, 0); } this.topLeft = c; if (layout) layout(); } COM: <s> set the control that appears in the top left corner of the pane </s>
funcom_train/4193222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAbsoluteURI(String absolute_uri) { absolute_uri=absolute_uri.trim(); if (absolute_uri.indexOf("<")<0) absolute_uri="<"+absolute_uri; if (absolute_uri.indexOf(">")<0) absolute_uri=absolute_uri+">"; value=absolute_uri; } COM: <s> sets the absolute uri </s>
funcom_train/18591346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeGridlet(SSGridlet sgl) { if(!sgl.hasReserved()) { // removes the gridlet from the profile profile.addPartTimeSlot(sgl.getPartitionID(), sgl.getStartTime(), sgl.getActualFinishTime(), sgl.getPERangeList()); } } COM: <s> this method removes updates all the entries of a gridlet from the profile </s>
funcom_train/18289047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReplaceOne() { //simple replacement testEditor.setText("beta"); testSearch.searchTF.setText("beta"); testEditor.selectAll(); testSearch.replaceTF.setText("alpha"); testEditor.replace(testSearch); assertEquals("alpha", testEditor.getText()); //partial replacmeent testEditor.setText("beta"); testSearch.searchTF.setText("beta"); //select "be" of "beta" string. testEditor.select(0,2); testSearch.replaceTF.setText("alpha"); testEditor.replace(testSearch); assertEquals("alphata", testEditor.getText()); } COM: <s> test replace functionality on simple string </s>
funcom_train/15621097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MiningMartChain createMiningMartChain(ModelFigureElement parent,Chain chain, Point point, Rectangle bounds) { MiningMartChain result; result = new MiningMartChain(app,thecase,chain,casename,point,bounds,parent); result.initTheChain(); return addMiningMartChain(parent,result); } COM: <s> creates a new code mining mart chain code </s>
funcom_train/5669036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTimeStepNum(String stepLine) { stepLine = stepLine.substring(1, stepLine.length()); //take out the period at the beginnings try { return Integer.parseInt(stepLine); } catch (NumberFormatException nfe) { System.err.println("NumberFormatException in BackEndCommunication.updateStorage().\n" + nfe); } return -1; } COM: <s> parses the time step into an int </s>
funcom_train/6279382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessageCC() throws MessagingException { String s = ""; String recipient = ""; Address[] ad = getMessage().getRecipients(MimeMessage.RecipientType.CC); if (ad != null) { for (int i = 0; i < ad.length; i++) { if (i != 0) s = s + "; "; recipient = ad[i].toString(); s = s + recipient; } } try { return MimeUtility.decodeText(s); } catch (UnsupportedEncodingException e) { return s; } } COM: <s> method get message cc </s>
funcom_train/23633556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadImages() { images = new HashMap<String, Image>(); try { for (String s : allImageFiles) { Image currentImage = ImageIO.read(new File(s)); images.put(s, currentImage); } } catch (IOException e) { System.out.println(e.getMessage()); } } COM: <s> this function loads all images before the application starts so all </s>
funcom_train/18899437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(String model) throws JspTagException { try { this.model = new URI(model); } catch (URISyntaxException use) { // log the error log.error("Invalid model URI in metadata tag"); // wrap it and re-throw! throw new JspTagException("metadata: Invalid URI specified as model " + "attribute value"); } // try-catch } COM: <s> sets the model to issue queries against </s>
funcom_train/7618290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBoundsFields(int x, int y, int w, int h, int bMask) { if ((bMask & NativeWindow.BOUNDS_NOSIZE) == 0) { this.w = w; this.h = h; } if ((bMask & NativeWindow.BOUNDS_NOMOVE) == 0) { this.x = x; this.y = y; } } COM: <s> sets the bounds fields </s>
funcom_train/20896126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetFirstName() { System.out.println("setFirstName"); String name = ""; User instance = new User(); instance.setFirstName(name); // 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 first name method of class it </s>
funcom_train/9367830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTag(int key, final Object tag) { // If the package id is 0x00 or 0x01, it's either an undefined package // or a framework id if ((key >>> 24) < 2) { throw new IllegalArgumentException("The key must be an application-specific " + "resource id."); } setTagInternal(this, key, tag); } COM: <s> sets a tag associated with this view and a key </s>
funcom_train/12757120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fixErrorMessages() { Cursor currentCursor = getCursor(); try { setCursor(new Cursor(Cursor.WAIT_CURSOR)); for (Iterator iter = getSelectedErrorMessageRows().iterator(); iter .hasNext();) { ErrorRow row = (ErrorRow) iter.next(); getParentConsole().fixErrorMessage(row); } setCursor(currentCursor); } catch (Throwable e) { setCursor(currentCursor); JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } COM: <s> attempt to run fix editor s for any selected errors </s>
funcom_train/18057537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getEdgeButton() { if (edgeButton == null) { edgeButton = new JButton(); edgeButton.setBounds(new Rectangle(81, 143, 62, 23)); edgeButton.setToolTipText("Add new edge specification"); edgeButton.setText("Edge"); edgeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showEdgeClassEditor(null); } }); } return edgeButton; } COM: <s> this method initializes edge button </s>
funcom_train/36048412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { System.out.println("\tLV=" + name + ", crisp=" + crisp); for (MembershipFunction mf : members.values()) { System.out.println("\t\t" + mf.getName() + ":\t" + mf.degreeOfMembership(crisp)); } } COM: <s> print the values of each member and the corresponding degree of </s>
funcom_train/16791382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionResources getActionResources(Object context, String name) { ActionResources res; try { res = ActionResources.load(context.getClass().getResource(name)); } catch (JAXBException ex) { this.logger.error("Unable to get resources " +name + " for " + context, ex); res = new ActionResources(); } res.setContext(context, this); return res; } COM: <s> get a collection of action resources for an object </s>
funcom_train/37062418
/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 ); Graphics2D g2d = (Graphics2D)g; g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); drawChainWheel( g2d, myGears.getFrontChainWheels(), CW_FRONT ); drawChainWheel( g2d, myGears.getRearChainWheels(), CW_BACK ); drawChain( g2d ); } COM: <s> draw the chainwheels and the chain </s>
funcom_train/43245178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKTwoZip() { System.out.println("setNOKTwoZip"); String nOKTwoZip = ""; EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); instance.setNOKTwoZip(nOKTwoZip); // 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 noktwo zip method of class org </s>
funcom_train/45602236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEndTime() { Calendar now = new GregorianCalendar(); mainWindow.getTo().setHours(now.get(Calendar.HOUR)); if (now.get(Calendar.AM_PM) == now.get(Calendar.PM)) { final int noonOffset = 12; mainWindow.getTo().setHours(mainWindow.getTo().getHours() + noonOffset); } mainWindow.getTo().setMinutes(now.get(Calendar.MINUTE)); mainWindow.getTo().setSeconds(now.get(Calendar.SECOND)); } COM: <s> action for setting end time to now </s>
funcom_train/31702121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawVerticalString(String text, int x, int y) { final int FONT_POSITION_CORRECTION = 2; if (DRAW_STRINGS) { gl.glRotatef(90f, 0f, 0f, -1f); drawString(text, y, -x - FONT_POSITION_CORRECTION); gl.glLoadIdentity(); } } COM: <s> draws given string vertically position is upper left corner </s>
funcom_train/50499460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onEvent( Event event ) { if ( event.type == ControlEvent.PRESSED ) { if ( event.target == right ) { //Vm.debug( "ScrollBox: onEvent: target right " + event ); movePane(); } else if ( event.target == bottom ) { //Vm.debug( "ScrollBox: onEvent: target bottom " + event ); movePane(); } } } COM: <s> called by system </s>
funcom_train/15616999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parse(JFlexLexer lexer, String raw, Object... args) { if (lexer.getMode() <= JFlexParser.MODE_MINIMAL) { return raw; } if (lexer.getParserInput().getTemplateDepth() == 0) { // if this isn't an inclusion then the tag content should not render return ""; } // there is no need to parse the tag content since that will be done by TemplateTag return JFlexParserUtil.tagContent(raw); } COM: <s> parse a call to a mediawiki includeonly tag of the form </s>
funcom_train/1303472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean acceptPointer(WordNetFile.Pointer pointer, WordSenseWrapper source) { boolean result = true; if (acceptPointers != null) { result = acceptPointers.contains(pointer.pointerSymbol); } if (result && rejectPointers != null) { result = !rejectPointers.contains(pointer.pointerSymbol); } return result; } COM: <s> determine whether the pointer should be accepted for expansion </s>
funcom_train/18135328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(String specid, String status, String task, String workflow) { runTableModel.addRow(specid, status, task, workflow); int sel = runTable.getSelectedRow(); if (sel==-1) { if (runTableModel.getRowCount()>0) { runTable.setRowSelectionInterval(0,0); } } } COM: <s> performs and update </s>
funcom_train/43394234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceFirst(String str, String oldStr, String newStr) { int index = str.indexOf(oldStr); if (index > -1) { String partBefore = str.substring(0, index); String partAfter = str.substring(index + oldStr.length()); return partBefore + newStr + partAfter; } else { // return original string return str; } } COM: <s> sub string change </s>
funcom_train/18020709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getFile(ProgressMonitor mon) throws IOException { if ( resourceURI==null || resourceURI.toString().equals("") ) { throw new IllegalArgumentException("expected file but didn't find one, check URI for question mark"); } return getFile( resourceURI, mon ); } COM: <s> make the remote file available </s>
funcom_train/48603449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bug() { try { setCursor(true); WriterXML err = new WriterXML(); getCurrent().print(err, false, true); new ImportErrXML(this).xmlErrorIn(err); } catch (Exception ex) { addMessage(ex); } finally { setCursor(false); } } COM: <s> submits bug information to developers </s>
funcom_train/37081929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCurator(XMLElement xml) { XMLElement pub = getGrandchild(xml, 0, null); if (pub == null) return null; // Ignore type_id--it just says "curator" XMLElement curator = getChild(pub, "uniquename"); if (curator == null) return null; return(curator.getCharData()); } COM: <s> featureprop pub pub id pub type id pub type curator type id </s>
funcom_train/47899068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getLatestXML() { Document doc = null; try { // get the XML stream from the URL & convert to a Document if (conurl != null) doc = getDocument(conurl.openStream(), conurl.toString()); } catch (Exception e) { System.err .println("ERROR: WebWorkBook.getLatestXML: Connecting to: " + ServerURL + ":" + e.toString()); } return doc; } COM: <s> retrieve the lastest xml stream from the conurl url and format into a </s>
funcom_train/20827802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { Object obj = e.getSource(); if (obj instanceof JButton) { if (((JButton) obj).getText() == "login") { loginButton(); } else if (((JButton) obj).getText() == "logout") { logoutButton(); } else if (((JButton) obj).getText() == "send") { sendButton(); } } } COM: <s> the mouselistener event checks for a mouse click and performs this </s>
funcom_train/43107101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getResidents(Object handle) { if (isANode(handle)) { return ((MNode) handle).getResidents(); } if (isANodeInstance(handle)) { return ((MNodeInstance) handle).getResidents(); } if (isAComponentInstance(handle)) { return ((MComponentInstance) handle).getResidents(); } return illegalArgumentCollection(handle); } COM: <s> returns a collection with all residents belonging to the given </s>
funcom_train/2598327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEvents(Matrix events) { int seriesCount = getSeriesCount(); for (int r = 0; r < events.getRowCount(); r++) { long timestamp = events.getAsLong(r, 0); for (int c = 1; c < events.getColumnCount(); c++) { double value = events.getAsDouble(r, c); addEvent(timestamp, seriesCount + c - 1, value); } } } COM: <s> adds the events of a new matrix to the time series </s>
funcom_train/17771128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calcFMeasure(int classNr, ClusteringResult expRes){ double recall = calcRecall(classNr, expRes); double precision = calcPrecision(classNr, expRes); if((precision + recall) == 0) return 0; return (2*recall*precision)/(precision+recall); } COM: <s> calculates f measure of a cluster for class class nr i </s>
funcom_train/9020476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Size2D calculateDimensions(final Canvas g2) { double width = 0.0; double height = 0.0; final Iterator iterator = this.lines.iterator(); while (iterator.hasNext()) { final TextLine line = (TextLine) iterator.next(); final Size2D dimension = line.calculateDimensions(g2); width = Math.max(width, dimension.getWidth()); height = height + dimension.getHeight(); } return new Size2D(width, height); } COM: <s> returns the width and height of the text block </s>
funcom_train/2888871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopVirtualMachines() { for (VirtualMachineConfig virt : listVirtualMachines) { if (checkPhysicalExistance(virt.getAffinity())) { try { refAvlServer.sendVMCommand(virt.getAffinity(), virt.getDisplayName(), "stop"); } catch (Exception e) { sfLog().error("Error while trying to stop virtual machines", e); } } } } COM: <s> sends a stop command to all virtual machines </s>
funcom_train/25887926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T removeLast() { T o = _tail; if ( o == null ) return null; T prev = (T) o.getPrevious(); o.setPrevious(null); if (null != prev) { prev.setNext(null); } _tail = prev; if (--_size == 0) { _head = null; } return o; } COM: <s> remove and return the last element in the list </s>
funcom_train/50862889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTotalAmountResourceTypesStored() { totalAmountCache = 0D; if (amountResourceTypeStored != null) { Iterator<AmountResource> i = amountResourceTypeStored.keySet().iterator(); while (i.hasNext()) totalAmountCache += getAmountResourceTypeStored(i.next()); } totalAmountCacheSet = true; } COM: <s> updates the total amount of resources stored </s>
funcom_train/2708580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openFile(LatexFile file) { TabItem item = new TabItem(file.getFileId().getFilename()); item.setClosable(true); item.setIconStyle("icon-tabs"); tabs.put(file, item); LatexTextBox text = new LatexTextBox(); textboxes.put(file, text); text.setValue(file.getContent()); text.addListener(new TextFieldListener()); item.add(text); tabFolder.add(item); tabFolder.setSelection(item); } COM: <s> opens a new tab for the given file </s>
funcom_train/25423833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Term neighbor) { String key = neighbor.getSubject(); if (containsKey(key)) { Term n = get(key); if (neighbor.getCount()>n.getCount()) { put(key,neighbor); } } else { put(key,neighbor); } } COM: <s> adds a neighbor indexed by subject </s>
funcom_train/3337649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copy(TarInputStream tin, TarOutputStream tout) throws IOException { TarEntry entry; while ((entry = tin.getNextEntry()) != null) { tout.putNextEntry(entry); tin.copyEntryContents(tout); tout.closeEntry(); } tin.close(); } COM: <s> copies an archive to another archive </s>
funcom_train/40347259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GQuery replaceWith(String html) { for (Element el : elements) { Element nextSibling = el.getNextSiblingElement(); if (nextSibling != null) { $(nextSibling).before(html); } else { Element parent = el.getParentElement(); $(parent).append(html); } $(el).remove(); } return this; } COM: <s> replaces all matched elements with the specified html </s>
funcom_train/13392281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(SLAPolicyEvent event) { Object[] arrLocal; synchronized (this) { arrLocal = listeners.toArray(); } for(int i = arrLocal.length-1; i>=0; i--) ((SLAPolicyEventListener)arrLocal[i]).policyAction(event); } COM: <s> notify all registered slapolicy event listener instances </s>
funcom_train/46457526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getDevSquared(Function f, double[] x, double[] y) { double total = 0; for (int i = 0; i < x.length; i++) { double next = f.evaluate(x[i]); double dev = (next-y[i]); total += dev*dev; } return total; } COM: <s> gets the total deviation squared between function and data </s>
funcom_train/27719826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRowIndex() { System.out.println("testRowIndex"); assertEquals(2, tl.rowIndex(10)); assertEquals(2, tl.rowIndex(12)); assertEquals(3, tl.rowIndex(13)); assertEquals(3, tl.rowIndex(15)); } COM: <s> test of row index method of class puce </s>
funcom_train/39482809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasWaitersIMSE () { final ReentrantLock lock = new ReentrantLock(fairness); final Condition c = (lock.newCondition()); try { lock.hasWaiters(c); shouldThrow(); } catch (IllegalMonitorStateException success) { } catch (Exception ex) { unexpectedException(); } } COM: <s> has waiters throws imse if not locked </s>
funcom_train/2877416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Reader openInclude(String include, String codebase) throws Exception { InputStream is = null; is = SFClassLoader.getResourceAsStream(include, actualCodebase(codebase), true); if (is == null) { throw new Exception("Include file: " + include + " not found"); } return new InputStreamReader(is, "utf-8"); } COM: <s> locate the include and returns an input stream on it </s>
funcom_train/4519223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RButton getRButton31110() { if (RButton31110 == null) { RButton31110 = new RButton(2); RButton31110.setText("GroupHeader"); RButton31110.setBounds(new Rectangle(300, 430, 120, 30)); RButton31110.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { (new TestGroupHeaderTable()).setVisible(true); } }); } return RButton31110; } COM: <s> this method initializes rbutton31110 </s>
funcom_train/33517215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFalsePositive(Key key){ if(key == null) { throw new NullPointerException("key can not be null"); } int[] h = hash.hash(key); hash.clear(); for(int i = 0; i < nbHash; i++) { fpVector[h[i]].add(key); } }//end addFalsePositive() COM: <s> adds a false positive information to i this i retouched bloom filter </s>
funcom_train/13275607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLightPower(Float lightPower) { if (lightPower != this.lightPower) { Float oldLightPower = this.lightPower; this.lightPower = lightPower; this.propertyChangeSupport.firePropertyChange(Property.LIGHT_POWER.name(), oldLightPower, lightPower); } } COM: <s> sets the edited light power </s>
funcom_train/46327630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(Long attributeID) { if (attributeID == null) { throw new IllegalArgumentException("primary key null."); } // Set the whereArgs to null here. return database.delete(DATABASE_TABLE, KEY_EVENTATTRIBUTEID + "=" + attributeID, null) > 0; } COM: <s> delete a registered event attribute record </s>
funcom_train/17729452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void monitorNewDirectories(FileEvent event) { // If the new file is a directory, add it to the master list in the // directory monitor... if (event.getAfterSnapshot().isDirectory()) monitor_.internalAddDirectory(event.getAfterSnapshot().toFile()); } COM: <s> this really shouldnt be the responsiblity of the recognizer but </s>
funcom_train/32206097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean removeConnection ( HybridConnection conn ) { // Checks if the connection is valid if ( this.objConnection == null || conn == null ) { return false; } // Checks if it is the same connection object if ( this.objConnection == conn ) { // Removes the connection object this.objConnection.removeArena( ASArena.getInstance() ); this.objConnection = null; return true; } return false; } COM: <s> remove the connection object used by this plugin </s>
funcom_train/8716077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasRecords(short platformID, short platformSpecificID) { for (Iterator i = records.keySet().iterator(); i.hasNext(); ) { NameRecord rec = (NameRecord) i.next(); if (rec.platformID == platformID && rec.platformSpecificID == platformSpecificID) { return true; } } return false; } COM: <s> determine if we have any records with a given platform id and </s>
funcom_train/12565429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revert() throws AMSpacksException { this.updateJar = Utils.getUninstallJar(applicationDirectory); try { jarInputStream = new NullEofZipInputStream(new BufferedInputStream( new FileInputStream(updateJar))); } catch (FileNotFoundException e) { throw new UpdateException("Update archive not found: " + updateJar.getAbsolutePath(), e); } createUninstaller = false; run(); } COM: <s> uninstall the latest update </s>
funcom_train/49338340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRadius() { HiperGpxExtensionType hiperExtension = null; for (int i = 0; i < extensions.size(); i++) { if (extensions.get(i) instanceof HiperGpxExtensionType) { hiperExtension = (HiperGpxExtensionType) extensions.get(i); } } return hiperExtension.getRadius(); } COM: <s> the trigger radius in meters around this hiper waypoint </s>
funcom_train/13874131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferredClassPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectTemplateExp_referredClass_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectTemplateExp_referredClass_feature", "_UI_ObjectTemplateExp_type"), QvttemplatePackage.Literals.OBJECT_TEMPLATE_EXP__REFERRED_CLASS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the referred class feature </s>
funcom_train/44283923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Patch createNewPatch() {/* byte[] sysex = new byte[PATCH_AND_HEADER_SIZE]; sysex[0] = (byte) 0xF0; sysex[1] = (byte) 0x0F; sysex[2] = (byte) 0x05; sysex[3] = (byte) 0x00; sysex[4] = (byte) 0x00; sysex[5] = (byte) 0x0B; sysex[PATCH_AND_HEADER_SIZE-1] = (byte) 0xF7; Patch p = new Patch(sysex); p.ChooseDriver(); p.getDriver().setPatchName(p, "Untitled"); return p; */ return null; } COM: <s> description of the method </s>
funcom_train/7222810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasInterest(ConsumerContext context, Token token){ if(!token.isNamedAs(name_)){ return false; } Attribute found = token.findAttribute(attrName_); return ((null != found) && ((null == attrValue_) || (attrValue_.equals(found.getValue())))); } COM: <s> examine name of token and attribute </s>
funcom_train/26509417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position position() { Position result=new Position(); for (Iterator i=position.iterator(); i.hasNext(); ) { Position.Entry e = (Position.Entry)i.next(); result.push(externalView(e.getObject()), e.getIndex()); } return result; } COM: <s> describe code position code method here </s>
funcom_train/25218133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToIndex(String prefix) { Character c = (prefix.equals("") ? null : Character.valueOf(prefix.charAt(0))); SortedSet<String> set = index.get(c); if (set == null) { set = new TreeSet<String>(COMPERATOR); index.put(c, set); } set.add(prefix); } COM: <s> add a prefix to the index </s>
funcom_train/3362391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDomain(String domain) { if (domain == null) return true; final char[] d=domain.toCharArray(); final int len = d.length; int next = 0; while (next < len) { final char c = d[next++]; switch (c) { case ':' : case '\n' : return false; case '*' : case '?' : _domain_pattern = true; break; } } return true; } COM: <s> check if domain is a valid domain </s>
funcom_train/2611957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWord(String word) { putWord(word); if (dictFile == null) return; try { FileWriter w = new FileWriter(dictFile.toString(), true); // Open with append. w.write(word); w.write("\n"); w.close(); } catch (IOException ex) { System.out.println("Error writing to dictionary file"); } } COM: <s> add a word permanantly to the dictionary and the dictionary file </s>
funcom_train/46494459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { jd = new JProgressGrid(); jd.setProgress(this); ba = new BandwidthAnalyzer(new BandwidthAnalyzer.BandwidthAnalyzerSource() { @Override public long getWrittenBytes() { return 0; } @Override public long getReadBytes() { if(doneParts==null) return 0L; return getDoneParts().size()*512*1024L; } },false); if(!isDone()) { netMisc.downloads.add(this); startDownload(); redoTable(); } else finished(); ackPeriod = new CountingPeriodChecker(2000,3); //EntryPoint.gui.newDockable("Download "+path_filename, jd); } COM: <s> initializes the download after being restored from the database </s>
funcom_train/22278292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawInRect(Graphics g, int x, int y, int width, int height) { drawTitleBar(g, x, y, width, height); drawLeftBorder(g, x, y, width, height); drawRightBorder(g, x, y, width, height); drawBottomBorder(g, x, y, width, height); } COM: <s> draws the internal window border in the given rect </s>
funcom_train/11641215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getByte(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; this.setWasNull(obj); try { return (obj == null) ? Byte.valueOf((byte) 0) : Byte.valueOf(obj.toString()); } catch (NumberFormatException e) { throw new SQLException(e.getMessage()); } } COM: <s> gets the byte value at the given column index </s>
funcom_train/17492570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(PreDecrement node) { visitUnaryExpression(node); Node exp = node.getExpression(); ClassInfo ci = NodeProperties.getClassInfo(exp); if (!(ci instanceof JavaClassInfo)) { throw new ExecutionError("pre.decrement.type", node); } node.setProperty(NodeProperties.TYPE, ci); return null; } COM: <s> visits a pre decrement </s>
funcom_train/20923757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createRequest(OpendfDebugTarget target) throws CoreException { String kind = ""; if (isAccess()) { if (isModification()) { kind = "readwrite"; } else { kind = "read"; } } else { if (isModification()) { kind = "write"; } else { kind = "clear"; } } kind.toString(); // TODO send request // target.sendRequest("watch " + getActorName() + " " + // getVariableName() + " " + kind); } COM: <s> read write readwrite clear </s>
funcom_train/4974125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection<? extends E> c) { modCount++; atomicModCount.incrementAndGet(); Object[] a = c.toArray(); int numNew = a.length; ensureCapacityHelper(elementCount + numNew); System.arraycopy(a, 0, elementData, elementCount, numNew); elementCount += numNew; return numNew != 0; } COM: <s> appends all of the elements in the specified collection to the end of </s>
funcom_train/18467489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean objEqual(Object aThis, Object aThat){ try { Class c1 = aThis.getClass(); Class c2 = aThat.getClass(); System.out.println("c1 class: "+c1); System.out.println("c2 class: "+c2); Field[] fields = c1.getDeclaredFields(); for (Field field : fields) { System.out.println(field); System.out.println(field.get(aThis)); } } catch (IllegalAccessException e) { e.printStackTrace(); return false; } return true; } COM: <s> universal equals using reflection </s>
funcom_train/22205949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Topic getTopicBySubject(Locator subjectLocator) { if (m_provider.isTransactionOpen()) { return getTopicBySubject(m_provider.getOpenTransaction(), subjectLocator); } else { ProviderTransaction txn = m_provider.openTransaction(); Topic ret = getTopicBySubject(txn, subjectLocator); txn.rollback(); return ret; } } COM: <s> get the topic which is bound to the specified subject </s>
funcom_train/46857643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SimTimeEdit getSteOutgoingBeginTime() { if (steOutgoingBeginTime == null) { steOutgoingBeginTime = new SimTimeEdit(); steOutgoingBeginTime.setEnabled(false); steOutgoingBeginTime.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { currentHotSpot.setDirectionOutBeginTime(steOutgoingBeginTime.getValue()); } }); } return steOutgoingBeginTime; } COM: <s> this method initializes ste outgoing begin time </s>
funcom_train/8630100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteLogFileLater(String fileName) throws SQLException { if (fileLockMethod == FileLock.LOCK_SERIALIZED) { // need to truncate the file, because another process could keep it open FileUtils.setLength(fileName, 0); } else { if (writer != null) { writer.deleteLogFileLater(fileName); } else { FileUtils.delete(fileName); } } } COM: <s> delete an unused log file </s>
funcom_train/51169412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopPlayback() { if ((m_status == PLAYING) || (m_status == PAUSED)) { if (m_line != null) { m_line.flush(); m_line.stop(); } m_status = STOPPED; trace(1, getClass().getName(), "Stop called"); } } COM: <s> stops the playback </s>
funcom_train/18266463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void avoidObstacles() { Obstacle ob = (Obstacle) ((BaseModel) getRoot()).getObstacles().findNearest(this.getCoordinate(), null, false, getObstacleRange()); if (ob != null) { // find the angle from the origin of the obstacles (assume this Boid is at the origin) headAway(ob); prioritySet = true; } } COM: <s> find all obstacles within range </s>
funcom_train/24607352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _generateAnAssociateProfessor(int index) { String id = _getId(CS_C_ASSOPROF, index); writer_.startSection(CS_C_ASSOPROF, id); _generateAProf_a(CS_C_ASSOPROF, index); writer_.endSection(CS_C_ASSOPROF); _assignFacultyPublications(id, ASSOPROF_PUB_MIN, ASSOPROF_PUB_MAX); } COM: <s> generates an associate professor instance </s>
funcom_train/3274515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { try { if (initialize()) { while(true) { switch(mainSelect()) { case -1: System.out.println("Unknown command"); break; case 0: return; case 1: editProject(); break; case 2: deleteProject(); break; case 3: insertProject(); break; case 4: moveCloneProject(); break; } } } System.out.println("\n\nThanks for using FIW!"); } catch (IOException ex) { ex.printStackTrace(); } } COM: <s> starts the cli </s>
funcom_train/43214007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flushOutputStreams() { try { dataOutputStream.flush(); } catch (Exception e) { debugErr(e); } try { bufferedOutputStream.flush(); } catch (Exception e) { debugErr(e); } try { outputStream.flush(); } catch (Exception e) { debugErr(e); } } COM: <s> p send the output </s>