__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35947211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(Reader reader) throws IOException, SAXException { try { _xmlReader.setInput(reader); parseAll(); } catch (XMLStreamException e) { if (e.getNestedException() instanceof IOException) throw (IOException)e.getNestedException(); throw new SAXException(e.getMessage()); } finally { _xmlReader.reset(); } } COM: <s> parses an xml document using the specified reader </s>
funcom_train/19141687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateAbsoluteBearing( double x1,double y1, double x2,double y2 ) { double xo = x2-x1; double yo = y2-y1; double distance = calculateDistance(x1,y1,x2,y2); if(xo > 0 && yo > 0) { return Math.asin(xo/distance); } if(xo > 0 && yo < 0) { return Math.PI - Math.asin(xo/distance); } if(xo < 0 && yo < 0) { return Math.PI + Math.asin(-xo/distance); } if(xo < 0 && yo > 0) { return 2.0*Math.PI - Math.asin(-xo/distance); } return 0; } COM: <s> calculates the absolute bearing between to points on the battlefield </s>
funcom_train/28367026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertViewNode( final ViewNode<?, ?> node, final int viewIndex ) { windowNodes.add( viewIndex, node ); node.addBrickListener( this ); treeNode.insert( node.getTreeNode(), viewIndex ); ((Window)node.getView()).setVisible( true ); brickListener.treeNeedsRefresh( this, this ); } COM: <s> insert the bean nodes in this node beginning at the specified index </s>
funcom_train/9701297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ICondition getOSElement(String propertyName,String value,final String os){ if (os==null){ throw new NullPointerException("The OS family may not be null"); } ICondition cond = new AntCondition(propertyName,value) { public Element toElement() { Element e = createEmptyCondition(); Element ie = new Element("os"); ie.setAttribute("family", os); e.addContent(ie); return e; } }; return cond; } COM: <s> create a condition for an operating system </s>
funcom_train/35569802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void pointerPressed(int x, int y) { // switch (gamestate) { // case MBOUNCE_LOGO: // break; // case MENU: // // break; // case GAME: // select_man_index = getSelectMan_index(x, y); // if (select_man_index != -1) { // press_x = x; // press_y = y; // } // // break; // case SETTING: // // break; // } // // } COM: <s> there are two time press time and release time </s>
funcom_train/50053775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatistics() { if (!isVisible()) { return; } Runtime runtime = Runtime.getRuntime(); lblMemory.setText(String.format("%dKB / %dKB", runtime.freeMemory() / 1024, runtime.totalMemory() / 1024)); lblNumParticles.setText(Integer.toString(ParticlesEngine.getInstance().size())); } COM: <s> updates the statistics </s>
funcom_train/4377922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RJSONObject put(String key, Object value) throws RJSONException { if (key == null) { throw new RJSONException("Null key."); } if (value != null) { testValidity(value); this.map.put(key, value); } else { remove(key); } return this; } COM: <s> put a key value pair in the jsonobject </s>
funcom_train/39062019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IExtensionAttribute_key_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IExtensionAttribute_key_feature", "_UI_IExtensionAttribute_type"), MarkingPackage.eINSTANCE.getIExtensionAttribute_Key(), false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the key feature </s>
funcom_train/22448798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTermWeight(){ int termWeight = 0; for (Enumeration e = this.getTerms() ; e.hasMoreElements() ;){ Term t = (Term) e.nextElement(); int depth = t.termDepth(); if (depth > termWeight) { termWeight = depth; } } return termWeight; } COM: <s> a simple function for the term weight of a predicate </s>
funcom_train/51337168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_nsymbolsOne_nulls() { if(isFixedLength()) return; final byte[][] a = new byte[3][]; a[0] = new byte[]{1}; a[1] = null; a[2] = null; if (rabaCoder.isValueCoder()) { doRoundTripTest(rabaCoder, new ReadOnlyValuesRaba(a)); } } COM: <s> test with a single byte value nsymbols 1 and some nulls </s>
funcom_train/18593118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedReference(ComponentReference ref) { if (ref != selectedReference) { selectedReference = ref; updateReferenceSelection(ref); Component c = ref != null ? getComponentForReference(ref) : null; if (c != selectedComponent) { selectedComponent = c; updateComponentSelection(c); } fireSelectionChanged(); } } COM: <s> select the given reference in the current view </s>
funcom_train/22470934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(Keyword newParent) throws KeywordCycleException { if (newParent != null) { if ((newParent == this) || (newParent.isChildOf(this))) { throw new KeywordCycleException("The parent of " + getName() + " cannot be " + newParent.getName() + ", it would cause a Keyword-cycle."); } } this._parent = newParent; } COM: <s> change the parent of a keyword </s>
funcom_train/11121394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { try { initialize(); try { run(); } catch (Exception e) { getLogger().error("error while running", e); } } catch (Exception e) { getLogger().error("error while initializing", e); } dispose(); } COM: <s> implementation execute method for ant compatability </s>
funcom_train/27811245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getTranscodeDirectory() { File dir = new File(SettingsService.getSubsonicHome(), "transcode"); if (!dir.exists()) { boolean ok = dir.mkdir(); if (ok) { LOG.info("Created directory " + dir); } else { LOG.warn("Failed to create directory " + dir); } } return dir; } COM: <s> returns the directory in which all transcoders are installed </s>
funcom_train/32057871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetButtonText() { System.out.println("testGetButtonText"); GPGraphpad pad = new GPGraphpad(); GPMarqueeHandler handler = new GPMarqueeHandler(pad); assertEquals("getButtonText failed", handler.getButtonText() != null, true); //pad.getFrame().dispose(); } COM: <s> test of get button text method of class gpmarquee handler </s>
funcom_train/18077574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XYDataInterface createXYData(String type) { XYDataInterface d; if("decorator".equalsIgnoreCase(type)) { d = new XYDecorator(new IntID(counter)); } else { throw new UnsupportedOperationException("Couldn't find an implementation of specified type:" + type); } addToPool(d); return d; } COM: <s> this method creates a specific implementation of the xydata interface </s>
funcom_train/17711647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanel_Details() { if (panel_Details == null) { GridLayout gridLayout1 = new GridLayout(); gridLayout1.setRows(3); gridLayout1.setColumns(2); GridLayout gridLayout = new GridLayout(); gridLayout.setRows(3); gridLayout.setHgap(1); gridLayout.setColumns(2); panel_Details = new JPanel(); panel_Details.setLayout(new BorderLayout()); } return panel_Details; } COM: <s> this method initializes panel details </s>
funcom_train/18656249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onViewAsText(java.awt.event.ActionEvent evt) { // we need to re-register the document listeners JEditorPane Editor=(JEditorPane)this.getEditor(); String CurrentText=Editor.getText(); Editor.setContentType("text/plain"); Editor.setText(CurrentText); // re-register the document listeners addDocumentChangeListener(); } COM: <s> message handler view content as text </s>
funcom_train/44011512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTransSubTotal() { System.out.println("getTransSubTotal"); TransactionBO instance = new TransactionBO(); double expResult = 0.0; double result = instance.getTransSubTotal(); 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 trans sub total method of class edu </s>
funcom_train/28471778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAuthor() { Review testReview = new Review(); User horst = new User(); User hannelore = new User(); testReview.setAuthor(horst); assertTrue(testReview.getAuthor() == horst); testReview.setAuthor(hannelore); assertTrue(testReview.getAuthor() == hannelore); } COM: <s> this should test the methods set author and set author of review </s>
funcom_train/3841073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleResult(Result r) { if (myListener == null) { synchronized (synch) { results.add(r); synch.notifyAll(); } } else { try { myListener.handleResult(r); } catch (Exception e) { System.out.println("error in result listener: " + e); } } } COM: <s> handle the returning results from the job processing </s>
funcom_train/47184031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long addEmptyPersonnel(Role role) throws DBException, iTrustException { Connection conn = null; PreparedStatement ps = null; long nextID = getNextID(role); try { conn = factory.getConnection(); ps = conn.prepareStatement("INSERT INTO Personnel(MID, Role) VALUES(?,?)"); ps.setString(1, ""+nextID); ps.setString(2, role.name()); ps.executeUpdate(); return nextID; } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> adds an empty personnel and returns the mid </s>
funcom_train/7613232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleApAlive(AccessPoint ap) { // Check whether we are stale and should cancel if (shouldCancel()) return; // We're satisfied with this AP, so go idle setIdleState(false); if (D) { myLogD("AP is alive: " + ap.toString()); } // Queue the next action to be a background check mHandler.backgroundCheckAp(ap); } COM: <s> handles the case when an access point is alive </s>
funcom_train/43245264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOneStreetAddr2() { System.out.println("getNOKOneStreetAddr2"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOneStreetAddr2(); 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 nokone street addr2 method of class org </s>
funcom_train/44283721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ShortMessage newControlChange(IPatchDriver driver, int controlNumber, int value) throws InvalidMidiDataException { ShortMessage ccMessage = new ShortMessage(); ccMessage.setMessage(ShortMessage.CONTROL_CHANGE, driver.getDevice().getChannel() - 1, controlNumber, value); return ccMessage; } COM: <s> returns a short message representing a single nrpn value </s>
funcom_train/12193946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copy(URLIntrospector url) { queryParameters = new TreeMap(); // copy internal state of this to copy this.protocol = url.protocol; this.reference = url.reference; this.host = url.host; this.userInfo = url.userInfo; this.port = url.port; setPath(url.path); // copy the query string setQuery(url.getQuery()); } COM: <s> make this urlintrospector a copy of the urlintrospector that is passed </s>
funcom_train/47945209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareSubTypes(List<String> productSubTypesTmp) { if (productSubTypes.size() != productSubTypesTmp.size()) { return -1; } int i = 0; for (i = 0; i < productSubTypes.size(); i++) { if (productSubTypes.get(i) != productSubTypesTmp.get(i)) { break; } } return i; } COM: <s> compares content of product subtypes list with another product subtypes list </s>
funcom_train/6489440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(OptionNode option) { LogTools.trace(logger, 25, "MainOptionComponent.setModel() - START"); this.option = option; build(option); // Expand the tree. expandTree(jtree); LogTools.trace(logger, 25, "MainOptionComponent.setModel() - COMPLETE"); } COM: <s> set the model for this component </s>
funcom_train/38291701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resumedAgent(AID name) throws NotFoundException { AgentDescriptor ad = platformAgents.acquire(name); if(ad == null) throw new NotFoundException("ResumedAgent failed to find " + name); AMSAgentDescription amsd = ad.getDescription(); if (amsd != null) { amsd.setState(AMSAgentDescription.ACTIVE); } ContainerID cid = ad.getContainerID(); platformAgents.release(name); // Notify listeners fireResumedAgent(cid, name); } COM: <s> notify the platform that an agent has just resumed </s>
funcom_train/40614765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableLinkConnection getLinkConnection(String driver, String url, String user, String password) { if (linkConnections == null) { linkConnections = New.hashMap(); } return TableLinkConnection.open(linkConnections, driver, url, user, password, dbSettings.shareLinkedConnections); } COM: <s> open a new connection or get an existing connection to another database </s>
funcom_train/28298535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int insertEdge(int from, int to, int weight) { if (from<0||from>=getNrNodes()||to<0||to>=getNrNodes()||weight<0) return -10402; if (weight>0 && (!getNode(from).getVisible() || !getNode(to).getVisible())) return -10404; setWeight(from,to,weight); return 0; } COM: <s> inserts bidirectional edge in the graph </s>
funcom_train/50484456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSyntaxElementChoices(Vector referenceChoices) { choices = referenceChoices; picker = new JComboBox(choices); picker.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { reference = (SyntaxElement)picker.getSelectedItem(); fireActionListener(); } }); } COM: <s> set vector of syntax element s from which user may choose a selection </s>
funcom_train/32056968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toBack(Object aobj[]) { if (aobj != null && aobj.length > 0) { if (isOrdered()) { CellView acellview[] = getMapping(aobj, false); GraphViewLayerEdit graphviewlayeredit = new GraphViewLayerEdit( this, acellview, -2); graphModel.edit(null, null, null, new UndoableEdit[] { graphviewlayeredit }); } else { graphModel.toBack(aobj); } } } COM: <s> sends code cells code to back </s>
funcom_train/11648663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder contextAttribute(String attributeKey, Object attributeValue) { if (attributeKey == null) { String msg = "Subject context map key cannot be null."; throw new IllegalArgumentException(msg); } if (attributeValue == null) { this.subjectContext.remove(attributeKey); } else { this.subjectContext.put(attributeKey, attributeValue); } return this; } COM: <s> allows custom attributes to be added to the underlying context </s>
funcom_train/45473381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMethod getMethod(final String name, final int startIndex) { for (int i = startIndex; i < _methods.size(); i++) { JMethod jMethod = (JMethod) _methods.elementAt(i); if (jMethod.getName().equals(name)) { return jMethod; } } return null; } COM: <s> returns the first occurance of the method with the given name starting </s>
funcom_train/20803882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertBlankParagraph (XText text, XTextCursor textCursor, boolean appendNewParagraph) throws Exception { XPropertySet propertySet = As.XPropertySet (textCursor); textCursor.collapseToEnd(); propertySet.setPropertyValue ("NumberingRules", Any.VOID); if (appendNewParagraph) { text.insertControlCharacter (textCursor.getEnd(), ControlCharacter.PARAGRAPH_BREAK, false); } } COM: <s> insert a blank paragraph </s>
funcom_train/14093392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXMLTestSuite1() throws IOException { m_elementFixture.newElement("echo", new String[] { "message", "test" }); File file = m_elementFixture.getSuiteFile(); String name = file.getCanonicalPath(); m_xmlTestSuite = new XMLTestSuite(name); } COM: <s> test the consturctor with file name </s>
funcom_train/49262607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyContent(final TreeItem source, final TreeItem destination) { TreeItem next; for (TreeItem previousChild : source.getItems()) { next = new TreeItem(destination, previousChild.getStyle()); configureItem(next, getProperty(previousChild)); //Recursive copy or repeated items if (previousChild.getItemCount() > 0) { addRepeatedChild(next, previousChild.getItem(0)); } } } COM: <s> copies the source content to the destination one </s>
funcom_train/44872427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoordinateRect getCoordinateRect(int i) { if (i == 0 && (coordinateRects == null || coordinateRects.size() == 0)) { addNewCoordinateRect(0, 1, 0, 1); } if (coordinateRects == null || i < 0 || i >= coordinateRects.size()) { return null; } else { return ((CRData) coordinateRects.elementAt(i)).coords; } } COM: <s> get the i th coordinate rect in this display canvas </s>
funcom_train/39255981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseObjectCollection getOutstandingBugs() throws Exception { BaseObjectCollection oOutstanding = new BaseObjectCollection(); BaseObjectCollection oBugs = getBugs(); for(int i=0;i<oBugs.getCount();i++) { Bug oBug = (Bug)oBugs.getItem(i); if(!oBug.resolved) oOutstanding.Add(oBug); } return oOutstanding; } COM: <s> this returns the bugs that are not yet resolved </s>
funcom_train/11378859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public JobConf createJob(String[] argv) throws IOException { StreamJob job = new StreamJob(); job.argv_ = argv; job.init(); job.preProcessArgs(); job.parseArgv(); job.postProcessArgs(); job.setJobConf(); return job.jobConf_; } COM: <s> this method creates a streaming job from the given argument list </s>
funcom_train/34670924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSupportsSPO() throws Exception { String[] langs = _reader.listTripleLanguages(); boolean found = false; for (int i = 0; i < langs.length; i++) { if (langs[i].equalsIgnoreCase("SPO")) { found = true; } } assertTrue("None of the triple langs returned were SPO", found); } COM: <s> test that spo is a supported triple language </s>
funcom_train/33403238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finalize() throws Throwable { if (currentPrinc != null) { // never close the root connection if (!currentPrinc.equals(bbdDBPrincipal)) { try { synchronized (conns) { if (currentPrinc.decrementUsage()) { // this was last usage, so close and remove the // connection conns.get(currentPrinc).close(); conns.remove(currentPrinc); currentPrinc = null; } } } catch (final SQLException ex) { } } } super.finalize(); } COM: <s> finalize the bbdconneciton </s>
funcom_train/19077897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBoxAndWhiskerItem(double [] results, String algorithmName, String problemName) { ArrayList<Double> list = new ArrayList<Double>(results.length); for (int i = 0; i < results.length; i++) { list.add(results[i]); } // problem is the series (row), algorithm is the type (column) if(groupByAlgorithm) { dataset.add(list, problemName, algorithmName); } // algorithm is the series (row), problem is the type (column) else { dataset.add(list, algorithmName, problemName); } } COM: <s> add a result to the plot where results are grouped by algorithm </s>
funcom_train/28984119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getRunSymmetricEncryption () { if (runSymmetricEncryption == null) {//GEN-END:|155-getter|0|155-preInit // write pre-init user code here runSymmetricEncryption = new Command ("Run", Command.OK, 0);//GEN-LINE:|155-getter|1|155-postInit // write post-init user code here }//GEN-BEGIN:|155-getter|2| return runSymmetricEncryption; } COM: <s> returns an initiliazed instance of run symmetric encryption component </s>
funcom_train/28423640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAction(String action) { action = action.toLowerCase(); if (action.equals(STOP) || action.equals(START) || action.equals(ELAPSED) || action.equals(TOTAL)) { this.action = action; } else { throw new BuildException("invalid action: " + action); } } COM: <s> sets the action attribute of the stop watch task object </s>
funcom_train/2635589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FuzzyNumber createGaussianFuzzyNumber(double modal, double alpha, double beta) { if (this.type == FuzzyFactory.LR) return new LRFuzzyNumber(modal, alpha, beta, FuzzyNumber.FUNCTION_GAUSSIAN, FuzzyNumber.FUNCTION_GAUSSIAN); else // decomposed return new DecomposedFuzzyNumber(modal, alpha, beta, FuzzyNumber.FUNCTION_GAUSSIAN, FuzzyNumber.FUNCTION_GAUSSIAN, FuzzyFactory.defaultDecomposedCuts); } COM: <s> creates a fuzzy number with gaussian membership functions on both sides </s>
funcom_train/12857899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int toPrevious(int amount) throws FetchException { if (amount <= 1) { return (amount <= 0) ? 0 : (toPrevious() ? 1 : 0); } int count = 0; disableKeyAndValue(); try { while (amount > 0) { if (toPrevious()) { count++; amount--; } else { break; } } } finally { enableKeyAndValue(); } return count; } COM: <s> move the cursor to the previous available entry decrementing by the </s>
funcom_train/28351328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void plotEllipse() { FunctionGraphsJPanel GP_ep = (FunctionGraphsJPanel) getParamsHashMap().get("EMITTANCE_3D_PLOT"); GP_ep.removeAllCurveData(); if (emtLocal_Text.getValue() > 0.) { phasePlaneEllipse.setEmtAlphaBeta( 3.0 * emtLocal_Text.getValue(), alphaLocal_Text.getValue(), betaLocal_Text.getValue()); phasePlaneEllipse.calcCurvePoints(); GP_ep.addCurveData(phasePlaneEllipse.getCurveData()); } } COM: <s> plots the ellipse on the phasespace graph </s>
funcom_train/9685846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { isOkPressed = false; dialog = RitDialog.create(context); dialog.setTitle("Inline Method"); dialog.setContentPane(contentPanel); buttonOk.requestFocus(); HelpViewer.attachHelpToDialog(dialog, buttonHelp, "refact.inline_method"); SwingUtil.initCommonDialogKeystrokes(dialog, buttonOk, buttonCancel, buttonHelp); dialog.show(); } COM: <s> allowed to be called several times recreates dialog as needed </s>
funcom_train/18288193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleDeviceSearchException(Throwable t) { EclipseMEUIPlugin.displayError( getShell(), IStatus.ERROR, -999, "Search Error", "Error searching for devices", t); EclipseMECorePlugin.log(IStatus.ERROR, t.getMessage(), t); } COM: <s> handle an error during the device search </s>
funcom_train/23943630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void dispatch(Object... nameValuePairs) { Map<String, Iterable<T>> values = Maps.newHashMap(); for (int i = 0; i < nameValuePairs.length; i += 2) { String name = (String)nameValuePairs[i]; Object value = nameValuePairs[i + 1]; if (value instanceof Iterable) { @SuppressWarnings("unchecked") T v = (T)value; values.put(name, Collections.singleton(v)); } else { @SuppressWarnings("unchecked") Iterable<T> v = (Iterable<T>)value; values.put(name, v); } } dispatch(values); } COM: <s> dispatch a set of outputs given by subsequent string and xelement types </s>
funcom_train/35184864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableCellEditor getTableCellEditor(Class<?> aClass, boolean readOnly) { ClassRecord cr = getClassRecord(aClass); if (cr == null) return null; else { TableCellEditor result = null; if (readOnly) result = cr.readOnlyEditor; else result = cr.editor; // special code for advanced cell support if (result instanceof OIEnumEditor) result = new OIEnumEditor(aClass); return result; } } COM: <s> gets a table cell editor for renders the values of a specified class </s>
funcom_train/42715321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllSettings(String[] settings) { setLanguage(settings[0]); font_size = settings[1]; show_own_messages_value = settings[2]; show_join_leave_value = settings[3]; highlight_own_messages_value = settings[4]; vibrate_duration_value = settings[5]; } COM: <s> sets all settings except for the user name </s>
funcom_train/350252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTabToolTip() { boolean isSubTabs = (findProperty(propertyTypes.SUBTABS) != null); String tipText = null; if (isSubTabs) { tipText = String.format("Double click to create a new %s form", getFormNiceName()); } else { tipText = String.format("Click to view %s form", getFormNiceName()); } return tipText; } COM: <s> set an appropriate tool tip for the tab panel </s>
funcom_train/1663526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(final javax.swing.Icon icon, final String status, java.awt.Color color) { if(status != null) { statusBar.setText(status); } else { statusBar.setText(" ");/* not empty else the status bar disappear */ } if (icon != null) statusBar.setIcon(icon); if (color != null) statusBar.setForeground(color); } COM: <s> change text in the status bar </s>
funcom_train/28339997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double normInf() { this.setElem(PhaseIndexHom.HOM, PhaseIndexHom.HOM, 0.0); double dblNorm = this.getMatrix().normInf(); this.setElem(PhaseIndexHom.HOM, PhaseIndexHom.HOM, 1.0); return dblNorm; }; COM: <s> return the l infinity norm of this matrix which is the </s>
funcom_train/19149922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getInitParam(String paramName) throws FatalException { String param = this.context.getInitParameter(paramName); if (param == null || param.trim().length() == 0) { String message = "Missing InitParameter for " + paramName; log.error(message); throw new FatalException(message); } return param; } COM: <s> gets the specified init param from the web </s>
funcom_train/39001632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object dequeue() { synchronized (this) { if (!isEmpty()) { Object obj = dataArray[headIndex]; /* * For GC to collect old data, it is good to make the slot * equals to null. */ dataArray[headIndex] = null; headIndex++; headIndex %= dataArray.length; numberOfElements--; return obj; } else { return null; } } } COM: <s> returns the head element of the queue and removes it </s>
funcom_train/16912525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void normalizeAllIncomingWeights() { double normFactor = getSummedIncomingWeights(); for (Iterator i = getNeuronList().iterator(); i.hasNext(); ) { Neuron n = (Neuron) i.next(); for (Synapse s : n.getFanIn()) { s.setStrength(s.getStrength() / normFactor); } } } COM: <s> normalize all weights coming in to this network </s>
funcom_train/45804238
/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 g2 = (Graphics2D) g; Shape clip = g2.getClip(); Rectangle bounds = clip.getBounds(); double width = bounds.getWidth(); double height = bounds.getHeight(); g2.setColor(squareColor); g2.fill3DRect(((int) width - 25), 0, 25, (int) height, true); visibleIndicator.paintComponent(g); } COM: <s> draw a coloured square at the end of the display </s>
funcom_train/5711681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CapiMessage createMessage(int appID, int type, int number) throws CapiException { if (device == null){ throw new CapiException("no device defined, unable to create message"); } return device.getRCapiMessage(appID, type, number); } COM: <s> constructs a new capi message object </s>
funcom_train/12273667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer str = new StringBuffer(); str.append("["); str.append( FTPCommand.getCommandName( m_cmd)); str.append(":"); str.append( m_arg); str.append("]"); return str.toString(); } COM: <s> return the ftp request as a string </s>
funcom_train/26663018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init( ServletConfig config ) { if (server != null) return; server = MBeanServerLocator.locate(); String s = config.getInitParameter("ridServiceName"); try { ridServiceName = new ObjectName(s); } catch (Exception e) { log.error( "Exception in init! ",e ); } } COM: <s> iinitialize the rid service delegator </s>
funcom_train/2487363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection getTemplateFiles(String path) { ArrayList documents = new ArrayList(); DirectoryIterator iterator = new DirectoryIterator(path); File skeletFile = null; while ((skeletFile = iterator.getNext()) != null) { if (!skeletFile.getName().endsWith(".vsl")) continue; documents.add(skeletFile); } return documents; } COM: <s> returns a collection of file for all </s>
funcom_train/5512693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MFString to_MFString( SFString str ) { MFString mfs = new MFString(); String qs = str.getValue(); String nqs = qs.replace('"', ' '); String s = nqs.trim(); if ( s.length() > 0 ) { java.util.StringTokenizer st = new java.util.StringTokenizer( s ); while ( st.hasMoreTokens() ) { mfs.addValue( st.nextToken() ); } } return mfs; } COM: <s> convert sfstring representing mfboolean to mfstring </s>
funcom_train/18518241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Item getNewItem(String isbn, Connection conn) throws Exception { ProductInfo pInfo = AmazonConnector.getInstance().searchByISBN(isbn, "books-de", "heavy"); Details[] details = pInfo.getDetails(); Details d = details[0]; Item item = createItem(d, conn); return item; } COM: <s> creates a new item in the database </s>
funcom_train/5874174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redraw(Writer out) throws IOException { final String mold = getMoldURI(); if (D.ON && log.finerable()) log.finer("Redraw comp: "+this+" with "+mold); final Map attrs = new HashMap(3); attrs.put("self", this); _desktop.getExecution() .include(out, mold, attrs, Execution.PASS_THRU_ATTR); } COM: <s> includes the page returned by </s>
funcom_train/21647922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Comparator getComparator( int col ) { switch ( currPanel ) { case EMPLOYE_INDEX : return EmployeComparatorFactory.comparator( EmployeEditor.getColPos( col ) ); case BUSINESS_UNIT_INDEX : return BusinessUnitComaparatorFactory.comparator( col ); case SECTION_INDEX : return SectionComparator.comparator( col ); } return null; } COM: <s> returns comparator instance that is able to sort objects in model by </s>
funcom_train/43474662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(String key, String value) { try { DHTMessage msg = new DHTMessage(this.id, DHTMessage.INSERT, key, value); Id target = GenericFactory.buildId(key, "SHA"); System.out.println(" INSERT '" + target + "'\t Tied To '" + value + "'"); endPoint.route(target, msg, null); } catch (InitializationException e) { e.printStackTrace(); } } COM: <s> owner symphony dhtapplication method which permits to send a message with a </s>
funcom_train/2891093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object handleGetObject(String key) { if (lookup == null) { loadLookup(); } if (LOCALPATTERNCHARS.equals(key)) { return lookup.get(key); } String[] contents = (String [])lookup.get(key); if (contents == null) { return null; } int clen = contents.length; String[] tmpobj = new String[clen+1]; tmpobj[0] = key; for (int i = 0; i < clen; i++) { tmpobj[i+1] = contents[i]; } return tmpobj; } COM: <s> override resource bundle </s>
funcom_train/46377736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title) { synchronized (this) { if (title == null && this.title == null) { return; } if (title.equals(this.title)) { return; } this.title = title; changeMask |= CHANGED_TITLE; updateViews(); } updateFrames(); } COM: <s> specify the windows title </s>
funcom_train/44309791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { checkPopulated(); if (m_list instanceof HydrateObject[]) { HydrateObject[] list = (HydrateObject[])m_list; int i, sz=0; for(i=0; i<list.length; ++i) { if (list[i]!=null) { ++sz; } } return sz; } return ((Set)m_list).size(); } COM: <s> this implements the size method of the collection interface </s>
funcom_train/39126479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphPoint getNextPoint () { // If out of bounds then return null if (index >= count) { return null; } // if else { // Get the element and bump the counter GraphPoint point = (GraphPoint) v.get (index); index++; return point; } // if } // getNextPoint () COM: <s> get the next element graph point object from the vector </s>
funcom_train/16569290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getCentralMedirian(final double centralLongitudeZone1, final double zoneWidth) { double t; t = centralLongitudeZone1 + (getZone(centralLongitudeZone1, zoneWidth)-1)*zoneWidth; t -= 360*Math.floor((t+180)/360); // Bring back into [-180..+180] range. return t; } COM: <s> convenience method returning the meridian in the middle of current zone </s>
funcom_train/27945104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AllocThreadMethodRef getSiblingAlloc() { needConstructed(); if (!image.getAlwaysRefresh()) thread.refreshAllocThreadMethods(); List o=thread.getAllocThreadMethods(); return (AllocThreadMethodRef) image.filterByLocation(o, getLocationR()); } COM: <s> returns alloc thread method ref of the same thread and the same method </s>
funcom_train/39399526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getRuleID(Rule rule) { String id = rule.getName().toLowerCase().replaceAll("[^\\d\\w]","_").replaceAll("__+","_"); if (id.startsWith("ruleminator_default_")) { // cut this long name id = id.substring(20,id.length() - 1); } return id; } COM: <s> this method creates an identifier for the given rule which is used to </s>
funcom_train/1833911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { System.out.println("Starting server on port " + port + "..."); daemon = new Daemon(port, this); if (daemon.isRunning()) System.out.println("Server started"); else throw new PortBindingException( "LanguageTool server could not be started " + "on port " + port + ", maybe something else is running on that port already?"); } COM: <s> start the server </s>
funcom_train/28346255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runOnlineModel() { myScenario.setProbe(myProbe); myScenario.setSynchronizationMode(mySrcSelector); try { myScenario.resync(); myScenario.run(); } catch (SynchronizationException e) { System.out.println(e); } catch (ModelException e) { System.out.println(e); } } COM: <s> run online model to obtain correct ttf and so on </s>
funcom_train/24475424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAuthorized(String user,Traversal traversal){ if(hasUser(user)){ return true; }else{ for(Group group:childGroups){ if(!traversal.hasVisited(group)){ traversal.addVisited(group); if(group.isAuthorized(user, traversal)){ return true; } } } } return false; } COM: <s> check does this user authorized to access resources assigned to this group </s>
funcom_train/35716457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computeAllAutoActivationTriggers() { if (fProcessors == null) return ""; //$NON-NLS-1$ StringBuffer buf= new StringBuffer(5); Iterator iter= fProcessors.entrySet().iterator(); while (iter.hasNext()) { Entry entry= (Entry) iter.next(); IContentAssistProcessor processor= (IContentAssistProcessor) entry.getValue(); char[] triggers= processor.getCompletionProposalAutoActivationCharacters(); if (triggers != null) buf.append(triggers); triggers= processor.getContextInformationAutoActivationCharacters(); if (triggers != null) buf.append(triggers); } return buf.toString(); } COM: <s> computes the sorted set of all auto activation trigger characters </s>
funcom_train/12561515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestRepaint(int x, int y, int w, int h) { addDirtyRegion(x, y, w, h); if (owner != null && visible) { // We request a repaint of our parent window after translating // the origin into the coordinate space of the window. owner.requestRepaint(); } } COM: <s> request a repaint for a specific region of this layer </s>
funcom_train/43096755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInterface() { Object target = getTarget(); if (Model.getFacade().isANamespace(target)) { Object ns = /*(MNamespace)*/ target; Object ownedElem = Model.getCoreFactory().createInterface(); Model.getCoreHelper().addOwnedElement(ns, ownedElem); TargetManager.getInstance().setTarget(ownedElem); } } COM: <s> create a new interface </s>
funcom_train/49439927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int verifyAndSave() throws InterruptedException{ // Find out the hash of the file and verify that its the same // as our hash. URN fileHash = scanForCorruption(); if (corruptState == CORRUPT_STOP_STATE) { cleanupCorrupt(incompleteFile, completeFile.getName()); return CORRUPT_FILE; } // Save the file to disk. return saveFile(fileHash); } COM: <s> verifies the completed file against the sha1 hash and saves it </s>
funcom_train/878503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void end(){ for( int i=0; i<this.threads.size(); i++ ){ logger.info("Stopping " + this.threads.elementAt(i)); ((Steppable)this.threads.elementAt(i)).end(); } logger.info("Stopping Arbitrator"); this.keepRunning = false; } COM: <s> safely end execution of this thread by first stopping all controlled </s>
funcom_train/15613902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearMenus() { for (String menuId : MenuSelectionListener.MENU_BEANS) { AbstractMenuBean menuBean = (AbstractMenuBean) FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(FacesContext.getCurrentInstance(), "#{" + menuId + "}", AbstractMenuBean.class); menuBean.setSelectedMenuChildId(null); } } COM: <s> clears all menus from selected items </s>
funcom_train/43245278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECOneCity() { System.out.println("getECOneCity"); EmergencyContactDG3Object instance = new EmergencyContactDG3Object(); String expResult = ""; String result = instance.getECOneCity(); 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 econe city method of class org </s>
funcom_train/1412636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int searchByUsername(String username) throws XmlRpcException { // TODO verify login username = username.trim(); if ("".equals(username)) throw (ErrorCode.E_NOVAL.getException()); User user = getUserByUsername(username); return (user == null ? -1 : user.getUserIdentifier()); } COM: <s> searches for users by username </s>
funcom_train/17593197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEdge(Object from, Object to) { if (from instanceof InferenceRule) { InferenceRule ir = (InferenceRule) from; Relation r = (Relation) to; relationToDefiningRule.remove(r, ir); } else { Relation r = (Relation) from; InferenceRule ir = (InferenceRule) to; relationToUsingRule.remove(r, ir); } } COM: <s> remove a specific edge from this navigator </s>
funcom_train/15625165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check(@NotNull final G gameObject, @NotNull final Map<Integer, Rec> info) { final int[] values = Connections.parseConnections(gameObject); if (values == null) { return; } for (final int value : values) { getRec(value, info).add(gameObject); } } COM: <s> processes a game object </s>
funcom_train/14457065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void produceObservation(Observation observation) throws ObservationsInWrongOrderException, ObservationInIllegalStateException { if(isStarted() || isStopped()) { observation.startObservation(); Iterator<Behaviour> iterator = observations.iterator(); while(iterator.hasNext()) { iterator.next().reproduceBehaviour(observation); } if(isStopped()) { observation.stopObservation(stoptime); } } } COM: <s> produce an observation </s>
funcom_train/23676250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureSelectedItemsVisible() { if (curSelection == null || curSelection.isEmpty()) { return; } FastMSTreeItem item = curSelection.iterator().next(); FastMSTreeItem parent = item.getParentItem(); while (parent != null) { parent.setState(true); parent = parent.getParentItem(); } moveFocus(item); } COM: <s> ensures that the currently selected item is visible opening its parents </s>
funcom_train/25642942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String read(File f) throws IOException { byte[] bytes = new byte[(int) f.length()]; DataInputStream in = new DataInputStream(new FileInputStream(f)); try { in.readFully(bytes); } finally { in.close(); } return new String(bytes); } COM: <s> read the contents of a file </s>
funcom_train/38810512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent event) { //check to make sure the source is the red, green, or blue spinner if (event.getSource() == red || event.getSource() == green || event.getSource() == blue) { //change colorPreview's background color to the new color based on all the values colorPreview.setBackground(new Color((Integer) red.getValue(), (Integer) green.getValue(), (Integer) blue.getValue())); } } COM: <s> change listeners required method </s>
funcom_train/22497978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttributeSet getAttributes() { final SimpleAttributeSet attributes = new SimpleAttributeSet(); final Enumeration components = fontComponents.elements(); while (components.hasMoreElements()) { attributes.addAttributes(((AttributeComponent) components.nextElement()).getValue()); } return attributes; } COM: <s> get the set of attributes resulting from the settings on </s>
funcom_train/39363230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator tableIterator() { return new Iterator() { /** * -1 because we haven't even started. */ private int current = -1; private final int last = workbook.getNumberOfSheets() - 1; public void remove() { throw new UnsupportedOperationException("Cannot remove a sheet from an Excel file."); } public boolean hasNext() { return current < last; } public Object next() { if (hasNext()) { current++; Sheet sheet = workbook.getSheet(current); return createDataTableAdapter(sheet); } else { return null; } } }; } COM: <s> iterate over sheets </s>
funcom_train/25027913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean end() { if (turn < NUMBER_OF_DEPLOYMENT_MOVES) { return (false); } boolean hasNegative = false; boolean hasPositive = false; for (int j = 0; j < BOARD_SIZE; j++) { for (int i = 0; i < BOARD_SIZE; i++) { if (stones[i][j] < 0) { hasNegative = true; } if (stones[i][j] > 0) { hasPositive = true; } } } return (!(hasNegative && hasPositive)); } COM: <s> decide if the game has reached its end </s>
funcom_train/31111529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RacePointsList findAll(AbstractDivision div) { RacePointsList list = new RacePointsList(); for (Iterator iter = iterator(); iter.hasNext();) { RacePoints p = (RacePoints) iter.next(); if ((p.getDivision() != null) && (p.getDivision().equals(div))) { list.add(p); } } return list; } COM: <s> finds all the members that are scored for the specified abstract division </s>
funcom_train/7646325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scheduleAtFixedRate(TimerTask task, Date when, long period) { if (period <= 0 || when.getTime() < 0) { throw new IllegalArgumentException(); } long delay = when.getTime() - System.currentTimeMillis(); scheduleImpl(task, delay < 0 ? 0 : delay, period, true); } COM: <s> schedule a task for repeated fixed rate execution after a specific time </s>
funcom_train/13260721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getJobClassPosition(String className) { if (jobClasses == null) { //classes not loaded yet return -1; } //else search in the array JobClass jobClass; for (int c = 0; c < jobClasses.length; c++) { jobClass = jobClasses[c]; if (jobClass.getName().equalsIgnoreCase(className)) { //it's the class we are searching for return c; } } //no class with the specified name return -1; } COM: <s> find the position of the specified class </s>