__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/39166076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getTotalTrials(){ float sumTotal = 0; for(int i = 0; i < featureValues.size(); ++i) { for(int j = 0; j < featureValues.size(); ++j) { sumTotal += confusionMatrix[i][j]; } } return sumTotal; } COM: <s> gets the total number of annotations in the two sets </s>
funcom_train/3049162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Configuration configure(URL url) throws HibernateException { log.info( "configuring from url: " + url.toString() ); try { return doConfigure( url.openStream(), url.toString() ); } catch (IOException ioe) { throw new HibernateException( "could not configure from URL: " + url, ioe ); } } COM: <s> use the mappings and properties specified in the given document </s>
funcom_train/3919692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemType findGlobalItemType(String idref) { LD_DataComponent[] dcs = getItemTypeStructure(); for(int i = 0; i < dcs.length; i++) { ItemType itemType = __findGlobalItemType(idref, dcs[i]); if(itemType != null) { return itemType; } } return null; } COM: <s> find an item by its idref </s>
funcom_train/3111338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupRotation(boolean removeTranslation) { // Clear the transforms (rot automatically clears everything) x.rotX(0.0); y.rotY(0.0); z.rotZ(0.0); // Get the previous Transform3D puppet.getTransform(puppetT3D); // Remove the translation if told to do so if (removeTranslation) { puppetT3D.get(storage); puppetT3D.setTranslation(ZERO); } } COM: <s> setup the rotations </s>
funcom_train/9909058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createBusinessEntityObject(Object businessEntityObject) throws PojoActionException { CodeTableService service = this.getService(); try { service.addJointCodeItem((JointCodeItem) businessEntityObject); } catch (CodeTableException e) { throw new UIException(e.getErrorCode(), e); } } COM: <s> create joint code item </s>
funcom_train/3331583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected short compareTo(JDocDescriptor jdd) { short jddType = jdd.getType(); if (jddType == this.type) return 0; // The ordering is as follows // #param // #exception // #author // #version // #see (reference) // return (short) ((jddType < this.type) ? 1 : -1); } //-- compareTo COM: <s> compares the type of this jdoc descriptor with the given descriptor </s>
funcom_train/46058534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImPreferences findPropertiesFor(Identity identity) { Property imProperty = PropertyManager.getInstance().findProperty(identity, null, null, null, ImPreferences.USER_PROPERTY_KEY); if (imProperty == null) { return null; } else { ImPreferences imPrefs = (ImPreferences) XStreamHelper.fromXML(imProperty.getTextValue()); imPrefs.owner = identity; // reset transient value imPrefs.dbProperty = imProperty; return imPrefs; } } COM: <s> load an existing im prefs from the property store </s>
funcom_train/15493900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyConfig(XMLConfigInfo info,XMLConfiguration config) { if (info == null) { return; } Map entries = info.getConfigInfo(); for (Iterator iter = entries.keySet().iterator(); iter.hasNext();) { String key = (String)iter.next(); config.addConfigurationEntry( (XMLConfigurationEntry)entries.get(key)); } } COM: <s> this method copies the xml configuration </s>
funcom_train/12113032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC23(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.annullaJButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c23 annulla jbutton </s>
funcom_train/15554981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double categoryUtility() { double totalCU = 0; for (int i = 0; i < m_children.size(); i++) { CNode child = m_children.elementAt(i); totalCU += categoryUtilityChild(child); } totalCU /= (double) m_children.size(); return totalCU; } COM: <s> computes the utility of all children with respect to this node </s>
funcom_train/32056843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSelectedGraphModelProvider() { System.out.println("testGetSelectedGraphModelProvider"); GraphModelProvider provider = new TPGraphModelProvider(); GraphModelProviderRegistry.addGraphModelProvider(provider); Frame f = new Frame(); GPSelectProvider x = new GPSelectProvider(f); GraphModelProvider g; g = x.getSelectedGraphModelProvider(); assertNotNull(g); GraphModelProviderRegistry.removeGraphModelProvider(provider); } COM: <s> test of get selected graph model provider method of class gpselect provider </s>
funcom_train/13372127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAlreadyExists(String name) { boolean isExists = false; for (int i = 0; i < dataVector.size(); i++) { String item = (String) dataVector.elementAt(i); if (item.equals(name)) { isExists = true; break; } } return isExists; } COM: <s> check whether the name is already in use </s>
funcom_train/22799184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionMessages deleteAttributeGroup(AttributeGroup attributeGroup) throws DatabaseException { QueryHelper queryHelper = new QueryHelper(AdminQueries.deleteAttributeGroupQuery()); queryHelper.addInputInt(attributeGroup.getId()); queryHelper.addInputInt(attributeGroup.getObjectTypeId()); return executeProcedure(queryHelper); } COM: <s> deletes attribute group </s>
funcom_train/13256026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSegment(DPoint p1, DPoint p2) { if (p1 == null || p2 == null) return; g.draw(new Line2D.Double(getTrueX(p1.getX()), getTrueY(p1.getY()), getTrueX(p2.getX()), getTrueY(p2.getY()))); } COM: <s> draws a segment between two points </s>
funcom_train/34353146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Match getMatch(SSWAPResource resource) { String resourceURL = resource.getResource().getURI(); Match match = (Match) matches.get(resourceURL); if (match == null) { match = new Match(resource); matches.put(resourceURL, match); } return match; } COM: <s> creates if necessary then returns the match object associated with </s>
funcom_train/21210534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IFlow flow, SRInstance run) { System.out.println("SpeakRight ITester.."); m_done = false; m_hasFinished = false; m_hasGeneratedFinPage = false; m_turnNumber = 0; m_flow = flow; m_wrap1 = new TrailWrapper(m_flow); System.out.println("RUNNING " + m_flow.name() + "........."); m_run = run; m_run.setExtensionFactory(this); } COM: <s> init the runner </s>
funcom_train/12179529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDynamicVisualPrefixURL() throws Exception { RuntimeProject project = createNewProject(baseURLString, false); MarinerURL url = project.getPrefixURL(VariantType.VIDEO); assertNotNull("URL should exist", url); assertEquals("Project and test URLs should match", url, new MarinerURL(dynamicVisualPrefixString)); } COM: <s> test that the dynamic visual prefix url is set correctly </s>
funcom_train/41164016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoEditorReviewerPairT3 entity) { EntityManagerHelper.log("saving CoEditorReviewerPairT3 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co editor reviewer pair t3 </s>
funcom_train/15602517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isItemCompleted(Person tester, TestSuiteItem item) { //TODO: maybe altering equals on testregister and doing a contains() + iteration on the set ? boolean result = false; try { result = (null != DAOFactory.createTestRunHibernateDAO().getRegister(tester,this,item)); } catch (DAOException ignored) { LoggerFacade.log("TestRun::isItemCompleted(): Ignoring DAOException: " + ignored.getMessage()); } return result; } COM: <s> returns true if and only if the given tester has </s>
funcom_train/23351857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireStateChanged() { if (!listeners.isEmpty()) { ChangeEvent evt = new ChangeEvent(this); for (int i=0; i < listeners.size(); i++) { ((ChangeListener) listeners.get(i)).stateChanged(evt); } } } COM: <s> notifies all the listeners that the trees state has changed </s>
funcom_train/5715493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performCaptureAction(java.awt.event.ActionEvent e) { //disable TimeFlow if active this.m_presentationControl.disableTimeFlow(); //act as if captured from within tour creator this.m_buttonCaptureActionPerformed(e); if(this.m_currentTourCreatorOptions.getShowWindowOnPerformCaptureAction()) this.refreshAndShow(); }//performCaptureAction COM: <s> method which can be called e </s>
funcom_train/9278890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReleaseMultipleTimes() throws SQLException { Connection con = getConnection(); Savepoint savepoint1 = con.setSavepoint("MyName"); con.releaseSavepoint(savepoint1); try { con.releaseSavepoint(savepoint1); fail("FAIL 12 releasing a savepoint multiple times should fail"); } catch (SQLException se) { // Expected exception. assertSQLState("3B001", se); } con.rollback(); } COM: <s> test 12 releasing a savepoint multiple times should not work </s>
funcom_train/25099458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferringPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MultiLevelReference_referring_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MultiLevelReference_referring_feature", "_UI_MultiLevelReference_type"), ElementsPackage.Literals.MULTI_LEVEL_REFERENCE__REFERRING, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the referring feature </s>
funcom_train/32724800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (getArity()==0) return getName() + " "; String str = new String(); str += getName() + " ( "; for (int i=0; i<getArity(); i++) str += children[i]; str += ") "; return str; } COM: <s> returns the string representing the tree rooted at this node </s>
funcom_train/3393971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean lint(String s) { // return true if either the specific option is enabled, or // they are all enabled without the specific one being // disabled return get(LINT + ":" + s)!=null || (get(LINT)!=null || get(LINT + ":all")!=null) && get(LINT+":-"+s)==null; } COM: <s> check for a lint suboption </s>
funcom_train/41965520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Selection intersection(Selection s) { if (s != null) { int start = Math.max(index0, s.index0); int end = Math.min(index1, s.index1); s = (start <= end ? new Selection(start, end) : null); } return s; } COM: <s> computes the intersection of this selection to s </s>
funcom_train/38315671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { String val = null; PrivateMessage m = (PrivateMessage) pageContext.getAttribute("currentMessage"); val = m.getMessage(); JspWriter out = pageContext.getOut(); try { out.write(val); } catch (IOException e) { throw new JspTagException("Error writing to page"); } return EVAL_PAGE; } COM: <s> get the next message in line and print out its text </s>
funcom_train/14520016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revokeCertificate(Admin admin, Certificate cert, Collection publishers, int reason, String userDataDN) { if (cert instanceof X509Certificate) { setRevokeStatus(admin, CertTools.getIssuerDN(cert), CertTools.getSerialNumber(cert), publishers, reason, userDataDN); } } //revokeCertificate COM: <s> revokes a certificate already revoked by the ca in the database </s>
funcom_train/18136353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableDisableActions() { for (int i = 0; i < getComponentCount(); i++) { Component component = getComponent(i); if(component instanceof EBioFlowMenu){ ((EBioFlowMenu) component).enableDisableCommand(); } else if (component instanceof JMenuItem) { Action action = ((JMenuItem) component).getAction(); if (action instanceof EBioFlowCommand) { ((EBioFlowCommand) action).enableDisableCommand(); } } } } COM: <s> method for enabling and disabling the popup menu components </s>
funcom_train/18725769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getGraphAsText() { String eol = System.getProperty("line.separator"); JaxoList oblist = getGraph().getObjectList(); StringBuilder buffer = new StringBuilder(32 * oblist.size()); for (JaxoObject ob : oblist) { buffer.append(ob.getClass().getName()).append(eol); } return buffer.toString(); } COM: <s> returns a string representation of the export graph </s>
funcom_train/2325046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int indexOfDecimalPoint(String s) { int i = s.lastIndexOf('.'); if (i < 0) i = s.lastIndexOf('e'); if (i < 0) i = s.lastIndexOf('E'); if (i < 0) i = s.length(); return i; } COM: <s> returns the index of the decimal point </s>
funcom_train/5861869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancel() { for (int j = _tis.length; --j >= 0;) { final ScalableTimerInfo ti = _tis[j]; synchronized (ti) { if (ti.timer != null) { try { ti.timer.cancel(); } catch (Throwable ex) { log.warningBriefly("Unable to cancel "+ti.timer, ex); } ti.timer = null; } ti.count = 0; } } } COM: <s> terminates this timer discarding any currently scheduled tasks </s>
funcom_train/34531625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareComponentSize() { int width = board.getWidth() * (SQUARE_INNER_SIZE + SQUARE_BORDER_SIZE) + SQUARE_BORDER_SIZE; int height = board.getHeight() * (SQUARE_INNER_SIZE + SQUARE_BORDER_SIZE) + SQUARE_BORDER_SIZE; Dimension exactSize = new Dimension(width, height); setMinimumSize(exactSize); setMaximumSize(exactSize); setPreferredSize(exactSize); revalidate(); } COM: <s> prepares the components size based on the games board </s>
funcom_train/35313736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getOffscreenBuffer(Component c,int proposedWidth,int proposedHeight) { RepaintManager delegate = getDelegate(c); if (delegate != null) { return delegate.getOffscreenBuffer(c, proposedWidth, proposedHeight); } return _getOffscreenBuffer(c, proposedWidth, proposedHeight); } COM: <s> return the offscreen buffer that should be used as a double buffer with </s>
funcom_train/21884044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRepoUrl(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("package.").append(type + ".").append(name + ".").append(Constants.PROPERTY_PKG_REPOURL_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the package repo url </s>
funcom_train/35461106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findDeespestMinorStructure(final String source) { CommonTree ast = parseAndEnhance(source); ASTStructureMapper mapper = new ASTStructureMapper(); return mapper.findDeepestMinorStructure( new CommonTreeAdaptor(), ast, null, 1, new MinorStructure()).toString(); } COM: <s> generic helper to find deepest minor structure </s>
funcom_train/32368658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testfindKindByDescription() throws Exception { String testName = "findKindByDescription"; if (logger.isInfoEnabled()) { logger.info("\n\t\tRunning Test: " + testName); } String desc = MatrixKind.KIND_AA; MatrixKind result = getFixture().findKindByDescription(desc); //verify assertTrue(result != null); assertTrue(result.getDescription().equals(desc)); if (logger.isInfoEnabled()) { logger.info(testName + " - end "); //$NON-NLS-1$ } } COM: <s> test find kind by description </s>
funcom_train/25423453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean complete(RequestContext context, String uuid) { try { HjCompleteRequest request = new HjCompleteRequest(context, uuid); return request.execute(); } catch (SQLException ex) { LOGGER.log(Level.WARNING, "[SYNCHRONIZER] Error completing task", ex); return false; } } COM: <s> completes the task </s>
funcom_train/18653129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String selectAlgo() { return (String)JOptionPane.showInputDialog( this.gograph, "Please select the algorithm you want to execute :\n" + "WARNING: current graph will be reseted to original state!", "Select algorithm", JOptionPane.WARNING_MESSAGE, null, this.gograph.getAlgoActionMap().keys(), null); } COM: <s> allows selection of an algorithm for execution </s>
funcom_train/9877843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSelectedRows(int [] rows) { Object [] objs = new Object[rows.length]; for(int i = 0; i < rows.length; i++) { objs[i] = indices.get(sortedIndices[rows[i]]); } for(int i = 0; i < rows.length; i++) { //let lem mod shared structure, and selected boolean lem.toggleSelectedLocus( ((Integer)objs[i]).intValue() ); fireRowDeleted(); } sortByMinLocation(); } COM: <s> removes specified rows </s>
funcom_train/37518347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean specializes( CSpecializedType other, CClassType[] args ) { return isSpecialized // this must be specialized && staticType.equals( other.staticType, args ) && ( !other.isSpecialized() // case 1: other is not specialized || isAlwaysAssignableTo( other,args ) // case 2: other is specialized ); } COM: <s> checks whether this specialized type is a specializing type </s>
funcom_train/12173514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CapabilitySupportLevel getSupportType(StyleProperty styleProperty) { CapabilitySupportLevel supportType = null; if (styleProperty != null) { Object supportObject = supportedStyleProperties.get(styleProperty); if (supportObject instanceof CapabilitySupportLevel) { supportType = (CapabilitySupportLevel) supportObject; } } return supportType; } COM: <s> get the support level for a given style property provided for this </s>
funcom_train/51616789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unnoteFileUsed( String file ) { //if the file is already in the recently used files list, remove it for( int i=0; i<recentFiles.size(); i++ ) if( recentFiles.get(i).equals( file ) ) recentFiles.removeElementAt( i ); writeToXML(); //save the new list populateRecentlyUsedMenus(); //populate the menus in the GUI } COM: <s> update recent files file is no longer available </s>
funcom_train/50848700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGuestbookLogo(){ return "<a href=\"http://menelik.sourceforge.net/jguestbook/\" target=\"_blank\"><img src=\"images/jguestbooklogo03.gif\" border=\"0\" alt=\"Powered by JGuestBook\"></a>"; } COM: <s> display a link to aa jguest book homepage at sourceforge aajguestbook </s>
funcom_train/35838758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setArrow(PCSession session, String sLinkID, int oldValue, int newValue) throws SQLException { // // String modelName = session.getModelName(); // // DBConnection dbcon = getDatabaseManager().requestConnection(modelName); // // boolean typeChanged = DBLink.setArrow(dbcon, sLinkID, newValue); // // getDatabaseManager().releaseConnection(modelName,dbcon); return true; } COM: <s> sets the type of the arrow on link </s>
funcom_train/32759304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildGuiComponents() { for (WireScanner.Data.ANGLE angle : WireScanner.Data.ANGLE.values()) { JLabel lblData = new JLabel( angle.getLabel() ); SingleProfileDisplay pnlPrjDspl = new SingleProfileDisplay(); this.mapPrj2Lbl.put(angle, lblData); this.mapPrj2Dspl.put(angle, pnlPrjDspl); } } COM: <s> builds all the gui components of the panel </s>
funcom_train/22718362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateWidth(String fieldName) { if (fontRenderContext == null) { // font render context not yet set so we cannot // yet ascertain the string width. } else { int fieldWidth = (int)Math.ceil(font.getStringBounds(fieldName, fontRenderContext).getWidth()) + 6; width = (fieldWidth > width) ? fieldWidth : width; } } COM: <s> update the width of this table with a potentially wider field </s>
funcom_train/31985588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long sample() { incrementObservations(); // increase the number of randoms given to the client double r = java.lang.Math.exp(-mean); double q = 1.0; long m = -1; if ( antithetic ) { // check if antithetic mode is switched on do { q *= ( 1 - randomGenerator.nextDouble()); m++; } while ( q>=r ); } else { do { q *= randomGenerator.nextDouble(); m++; } while ( q>=r ); } return m; } COM: <s> returns the next poisson distributed sample from this distribution </s>
funcom_train/13713515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bezier(final float[] points){ gl.glMap1f(GL.GL_MAP1_VERTEX_3, 0.0f, bezierDetail, 3, 4, points, 0); gl.glEnable(GL.GL_MAP1_VERTEX_3); gl.glColor3f(0, 0, 0); gl.glBegin(GL.GL_LINE_STRIP); //gl.glMapGrid1d(bezierDetail,0,1); //gl.glEvalMesh1(GL.GL_LINE,0,1); for (float i = 0; i <= bezierDetail; i++){ //System.out.println(i); gl.glEvalCoord1f(i); } gl.glEnd(); } COM: <s> draws a bezier curve with the given points </s>
funcom_train/42131090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void normalize() { if (segmentFraction < 0.0) { segmentFraction = 0.0; } if (segmentFraction > 1.0) { segmentFraction = 1.0; } if (segmentIndex < 0) { segmentIndex = 0; segmentFraction = 0.0; } else if (segmentIndex >= line.getNumPoints()) { segmentIndex = line.getNumPoints() - 1; segmentFraction = 1.0; } } COM: <s> ensures the values in this object are valid </s>
funcom_train/44697620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseTaxonomy(Element baseEl) { if (baseEl.getAttribute("namespace").length()>0) { baseTaxonomy = new ImportedSchema(); baseTaxonomy.namespace = baseEl.getAttribute("namespace"); baseTaxonomy.prefix = baseEl.getAttribute("namespacePrefix"); baseTaxonomy.schemaFile = baseEl.getAttribute("schema"); } } COM: <s> adds a base taxonomy element only if the namespace is defined </s>
funcom_train/2807507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getContext(String workEffortId) throws WfException { WfExecutionObject obj = getExecutionObject(workEffortId); if (obj == null) throw new WfException("Invalid Execution Object (null value)"); if (Debug.verboseOn()) Debug.logVerbose("ProcessContext (" + workEffortId + ") => " + obj.processContext(), module); return obj.processContext(); } COM: <s> returns the process context of the execution object </s>
funcom_train/44296945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Row createRow(final String code, final FactoryException exception) { final Row row = new Row(escape(code)); row.hasError = true; if (exception != null) { row.remark = escape(exception.getLocalizedMessage()); if (row.remark == null) { row.remark = escape(exception.toString()); } } return row; } COM: <s> creates a new row for the given authority code and exception </s>
funcom_train/43897873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getPerimeter(Polygon polygon) { double perimeter = 0.0d; LineString lineString = polygon.getExteriorRing(); perimeter += getPerimeter(lineString); int numberOfHoles = polygon.getNumInteriorRing(); for (int i = 0; i < numberOfHoles; i++) { perimeter += getPerimeter(polygon.getInteriorRingN(i)); } return perimeter; } COM: <s> returns the perimeter of a polygon </s>
funcom_train/7867811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { if (identificationIterator.hasNext()) { return true; } while (keyIterator.hasNext()) { currentKey = keyIterator.next(); if (identifications.get(currentKey).size() > 0) { identificationIterator = identifications.get(currentKey).iterator(); return true; } } return false; } COM: <s> returns true if more peptide identifications are left </s>
funcom_train/21849105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokePropertyDialog(Component comp) { CompoundBorderView view = new CompoundBorderView( (CompoundBorderProperty) getValue()); JETADialog dlg = (JETADialog) JETAToolbox.createDialog(JETADialog.class, comp, true); dlg.setPrimaryPanel(view); dlg.setSize(dlg.getPreferredSize()); dlg.setTitle(I18N.getLocalizedMessage("Edit Border")); dlg.showCenter(); if (dlg.isOk()) { setValue(view.createBorderProperty()); } } COM: <s> invokes a dialog used to update the property </s>
funcom_train/29915911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getReActivateCard() { if (reActivateCard == null) { reActivateCard = new JButton(); reActivateCard.setBounds(new Rectangle(91, 365, 282, 45)); reActivateCard.setHorizontalAlignment(SwingConstants.LEFT); reActivateCard.setText(UIHelper.getText("otheractions.reactivatecard")); reActivateCard.setIcon(UIHelper.getImage("reactivate.gif")); } return reActivateCard; } COM: <s> this method initializes re activate card </s>
funcom_train/51120043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addItemIds(Collection col, File f) { File[] l; if (this.filter != null) l = f.listFiles(this.filter); else l = f.listFiles(); List ll = Arrays.asList(l); Collections.sort(ll); for (Iterator i = ll.iterator();i.hasNext();) { File lf = (File)i.next(); if (lf.isDirectory()) addItemIds(col, lf); else col.add(lf); } } COM: <s> internal recursive method to add the files under the specified </s>
funcom_train/1549539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNode(Node<E> nodeToInsert, Node<E> insertBeforeNode) { nodeToInsert.next = insertBeforeNode; nodeToInsert.previous = insertBeforeNode.previous; insertBeforeNode.previous.next = nodeToInsert; insertBeforeNode.previous = nodeToInsert; size++; modCount++; } COM: <s> inserts a new node into the list </s>
funcom_train/36090390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public fQuaternion inverse() { double norm = norm(); if (norm > 0.0) { double invNorm = 1.0f / norm; return new fQuaternion(-x * invNorm, -y * invNorm, -z * invNorm, w * invNorm); } // return an invalid result to flag the error return null; } COM: <s> code inverse code returns the inverse of this quaternion as a new </s>
funcom_train/49637221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installCommand(Command cmd) { commands.put(cmd.getName(), cmd); aliases.put(cmd.getName(), cmd.getName()); for(String alias: cmd.getAliases()) { aliases.put(alias, cmd.getName()); } cmdComparator.addCandidateString(cmd.getName()); } COM: <s> install a command into this core </s>
funcom_train/4831978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreState(Bundle oldState) { selectedShipIndex = -1; ships = (Ship[]) oldState.getSerializable(BUNDLE_SHIPS); short[] shipsFields = ShipUtil.getShipsFields(ships); moveShipsAdapter = new MoveShipsAdapter(this, shipsFields); rule = new FieldForbiddingRuleSquareImpl(Game.BOARD_SIDE); forbiddenPositions = (ForbiddenPositionsManager) oldState.getSerializable(BUNDLE_FORBIDDEN_POSITION); board = (short[]) oldState.getSerializable(BUNDLE_BOARD); selectedShip = null; lastPossiblePosition = null; } COM: <s> restores the state of the arrange ships board as it was before </s>
funcom_train/205768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(int x, int y) { if (!valid) { update(); } for (int i = 1; i < 4; i++) { Line2D.Float line = new Line2D.Float(ppx[0], ppy[0], ppx[i], ppy[i]); if (line.ptSegDist(x, y) < 3) { return true; } } return false; } COM: <s> this method checks whether the given point with coordinates x and y </s>
funcom_train/12160966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() { response = new MyHttpServletResponse(); requestContext = new MyMarinerServletRequestContext(response); pageContext = new TestMarinerPageContext(); pageContext.pushRequestContext(requestContext); ContextInternals.setMarinerPageContext(requestContext, pageContext); envContext = new ServletEnvironmentContext(requestContext); } COM: <s> set up the layout for this testcase </s>
funcom_train/51207898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAbout(Displayable next) { String text = "DazioAES\nv. " + Dazio.instance.getAppProperty("MIDlet-Version") + "\nby Mario Negro Ponzi\nhttp://www.negroponzi.it\nupdate by Hardwire\nFree for all!"; try { showFormAlert(next, RS.ABOUT, text); } catch (Exception e) { e.printStackTrace(); } } COM: <s> show the about message </s>
funcom_train/51144394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAliasNames(String[] newAliasNames) { if( (newAliasNames == null) || (newAliasNames.length == 0) ) { this.aliasNames.clear(); return; } this.aliasNames.clear(); // Make sure only valid names can be set for(int i=0; i < newAliasNames.length; i++) { if( (newAliasNames[i] == null) || (newAliasNames[i].trim().equals("")) ) { continue; } this.aliasNames.add(newAliasNames[i]); } } COM: <s> sets an array of new alias names to this target </s>
funcom_train/42114873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ESValue reverse() throws EcmaScriptException { int size = theArray.size(); if (size > 0) { Vector reversed = new Vector(size); reversed.setSize(size); for (int i = 0, j = size - 1; i < size; i++, j--) { reversed.setElementAt(theArray.elementAt(j), i); } theArray = reversed; } return this; } COM: <s> reverse the orders of the elements in an array </s>
funcom_train/20169240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set_rel_diff (double rel_diff) { min_ratio = 1 - rel_diff; max_ratio = 1 + rel_diff; off = (rel_diff == 0.0); //System.out.println ("min_ratio = " + min_ratio + ", max_ratio = " // + max_ratio); } COM: <s> set the relative diff after creation </s>
funcom_train/3437903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object decodeObject(Remote r, Name name) throws NamingException { try { Object obj = (r instanceof RemoteReference) ? ((RemoteReference)r).getReference() : (Object)r; return NamingManager.getObjectInstance(obj, name, this, environment); } catch (NamingException e) { throw e; } catch (RemoteException e) { throw (NamingException) wrapRemoteException(e).fillInStackTrace(); } catch (Exception e) { NamingException ne = new NamingException(); ne.setRootCause(e); throw ne; } } COM: <s> decodes an object that has been retrieved from the registry </s>
funcom_train/50911446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RealArray getXArray() { double[] f = new double[size()]; int count = 0; for (int i = 0; i < size(); i++) { Real2 p = getReal2(i); f[count++] = p.getX(); } return new RealArray(f); } COM: <s> get the x coordinate array </s>
funcom_train/9662744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (!done) { // decide whether the gauge should start moving // backwards or forwards. int newValue = getValue() + delta; if (newValue == maxValue) { delta = -1; } else if (newValue == 0) { delta = 1; } setValue(newValue); try { Thread.currentThread().sleep(100); } catch (InterruptedException err) { } } } COM: <s> this method moves the gauge left and right </s>
funcom_train/48406357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLinkedWorkDefinitionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkDefinitionPerformer_linkedWorkDefinition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinitionPerformer_linkedWorkDefinition_feature", "_UI_WorkDefinitionPerformer_type"), SpemxtcompletePackage.eINSTANCE.getWorkDefinitionPerformer_LinkedWorkDefinition(), false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the linked work definition feature </s>
funcom_train/7796667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInterface() { if (isUnknown()) { return false; } boolean result = true; for (IModelElement element : elements) { IType member = (IType) element; try { result &= (member.getFlags() & Modifiers.AccInterface) != 0; } catch (ModelException e) { if (DLTKCore.DEBUG) { e.printStackTrace(); } } } return result; } COM: <s> returns whether this type binding represents an interface type </s>
funcom_train/46477779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAcActorsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActorsDiagram_AcActors_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ActorsDiagram_AcActors_feature", "_UI_ActorsDiagram_type"), SecurityContextPackage.Literals.ACTORS_DIAGRAM__AC_ACTORS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the ac actors feature </s>
funcom_train/191706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawToCachedImage(Rectangle size) { GC gc = null; try { if (cachedImage != null) cachedImage.dispose(); cachedImage = new Image(Display.getCurrent(), size.width, size.height); gc = new GC(cachedImage); render.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, gc); Generator gr = Generator.instance(); gr.render(render, state); } catch (ChartException ex) { ex.printStackTrace(); } finally { if (gc != null) gc.dispose(); } } COM: <s> draws the chart onto the cached image in the area of the given </s>
funcom_train/1209898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("Cut")) { evalTextArea.cut(); } else if (cmd.equals("Copy")) { evalTextArea.copy(); } else if (cmd.equals("Paste")) { evalTextArea.paste(); } } COM: <s> performs an action on the text area </s>
funcom_train/28289326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getTestDirectory() { try { String o = (String) global.getMember( "TEST_DIRECTORY" ); o = o.endsWith( File.separator ) ? o : o + File.separator; return new File( o.toString() ); } catch ( Exception e ) { System.err.println( "TEST_DIRECTORY is not defined: " + e ); return new File( "." ); } } COM: <s> get the test directory variable which must be defined in the </s>
funcom_train/17203377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perform(IR ir) { ir.cfg.entry().clearInfrequent(); if (ir.options.REORDER_CODE_PH) { // Do Pettis and Hansen PLDI'90 Algo2 doPettisHansenAlgo2(ir); } else { // Simple algorithm: just move infrequent code to the end exileInfrequentBlocks(ir); } } COM: <s> reorder basic blocks either by trivially moving infrequent blocks </s>
funcom_train/39949980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButtonRendering() { if (jRadioButtonRendering == null) { jRadioButtonRendering = new JRadioButton(); jRadioButtonRendering.setText("Rendering"); jRadioButtonRendering.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setDeviceClass(); } }); } return jRadioButtonRendering; } COM: <s> this method initializes j radio button rendering </s>
funcom_train/33493103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemExport() { if (jMenuItemExport == null) { jMenuItemExport = new JMenuItem(); jMenuItemExport.setText("Export"); jMenuItemExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() DumpList(); } }); } return jMenuItemExport; } COM: <s> this method initializes j menu item export </s>
funcom_train/3720609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HL7Writer getWriter(OutputStream out) throws LLPException { try { if (charset != null) { return new MinLLPWriter(out, charset); } else { return new MinLLPWriter(out); } } catch (IOException e) { throw new LLPException("Can't create MinLLPWriter with the given output stream: " + e.getMessage(), e); } } COM: <s> creates an hl7 writer that implements message writing according to </s>
funcom_train/9025208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkOverwrite() { boolean proceed = true; if (library.isDirty()) { proceed = MessageDialog.openConfirm(getShell(), "Are you sure?", //$NON-NLS-1$ "You have unsaved changes--are you sure you want to lose them?"); //$NON-NLS-1$ } return proceed; } COM: <s> checks the current file for unsaved changes </s>
funcom_train/38309988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeAttribute(PrintWriter writer, String name, String value) { if (value == null) { return; } writer.print(" "); writer.print(name); writer.print("=\""); writer.print(value); writer.print("\""); } COM: <s> writes a xml attribute to the given writer </s>
funcom_train/25289911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpreadAngle(float spreadAngle) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SPREAD_ANGLE_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("SpotLight0")); if (isLive()) ((SpotLightRetained)this.retained).setSpreadAngle(spreadAngle); else ((SpotLightRetained)this.retained).initSpreadAngle(spreadAngle); } COM: <s> sets spot light spread angle </s>
funcom_train/44290512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); int itemCount = getItemCount (); if (count == itemCount) return; setRedraw (false); remove (count, itemCount - 1); for (int i = itemCount; i<count; i++) { new TableItem (this, SWT.NONE); } setRedraw (true); } COM: <s> sets the number of items contained in the receiver </s>
funcom_train/25708309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveHiddenBoardNames(final HashSet<String> names) { beginExclusiveThreadTransaction(); try { removeAllFromStorage(storageRoot.hiddenBoardNames); for( final String s : names ) { final PerstHiddenBoardName h = new PerstHiddenBoardName(s); storageRoot.hiddenBoardNames.add(h); } } finally { endThreadTransaction(); } } COM: <s> clear table and save all hidden board names </s>
funcom_train/37657480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void exitItemInit() { LOGGER.entering(getClass().getName(), "exitItemInit"); assert exitItem == null : "exitItem already initialized."; exitActionInit(); exitItem = new JMenuItem(exitAction); LOGGER.exiting(getClass().getName(), "exitItemInit"); } COM: <s> initializes the exit menu item </s>
funcom_train/32056130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { Icon icon = getIcon(); setIcon(null); Dimension d = getSize(); Image img = null; if (icon instanceof ImageIcon) img = ((ImageIcon) icon).getImage(); if (img != null) g.drawImage(img, 0, 0, d.width - 1, d.height - 1, graph); super.paint(g); } COM: <s> paints the graphics </s>
funcom_train/19257367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponentToLayout(Component c) { LayoutManager l = getLayout(); if (null != l) { if (l instanceof LayoutManager2) { ((LayoutManager2) l).addLayoutComponent(c, c.layoutModifier); } else { l.addLayoutComponent(c.getName(), c); } } } COM: <s> adds an existing component to the layout manager </s>
funcom_train/1840238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IntBuffer duplicateIntBuffer(IntBuffer source) { ByteBuffer vbb = ByteBuffer.allocateDirect(source.limit() * 4); vbb.order(ByteOrder.nativeOrder()); IntBuffer dest = vbb.asIntBuffer(); source.position(0); dest.put(source); source.position(0); dest.position(0); return dest; } COM: <s> utility method to duplicate an int buffer </s>
funcom_train/19389291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CompletionInfo getNoNamespaceCompletionInfo() { CompletionInfo info = (CompletionInfo)m_mappings.get(""); if(info == null) { info = new CompletionInfo(); m_mappings.put("",info); } return info; } //}}} //{{{ xsElementToElementDecl() method COM: <s> gets the completion info for the null namespace </s>
funcom_train/10912471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { RegionViewport rv = new RegionViewport((Rectangle2D)viewArea.clone()); rv.regionReference = (RegionReference)regionReference.clone(); if (props != null) { rv.props = new HashMap(props); } if (foreignAttributes != null) { rv.foreignAttributes = new HashMap(foreignAttributes); } return rv; } COM: <s> clone this region viewport </s>
funcom_train/25415304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compactColumns() { for (int column = 0; column < getColumnDimension(); column++) { int counter = 0; while (counter++ < getRowDimension()) { for (int row = getRowDimension() - 1; row > 0; row--) { if (board[row][column] == null) { board[row][column] = board[row - 1][column]; board[row - 1][column] = null; } } } } } COM: <s> compacts the board in the y direction </s>
funcom_train/7655473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean engineVerify(byte[] sigBytes) throws SignatureException { if (sigBytes == null) { throw new NullPointerException(Messages.getString("security.83", "sigBytes")); //$NON-NLS-1$ //$NON-NLS-2$ } return checkSignature(sigBytes, 0, 0); } COM: <s> verifies the signature bytes </s>
funcom_train/16564826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpacing(double dx, double dy) { this.dx = dx; this.dy = dy; this.xNumCells = (int) Math.floor(env.getLength(0) / dx); this.yNumCells = (int) Math.floor(env.getLength(1) / dy); } COM: <s> sets the spacing between grid cells and rows </s>
funcom_train/3710827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshText() { if (caller.isConstrained()) { text.setForeground (Color.blue); caller.setText(text, fx, caller.value); } else { text.setForeground (Color.black); caller.setText(text, fx, caller.toNativeUnits (caller.value)); } } COM: <s> refreshes the text field with the parameter value </s>
funcom_train/3155389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpCoefficientStructures() throws ProcessorException { try { if (_processDual) { setUpDualCoeffStructures(); } if (_processNadir) { setUpNadirCoeffStructures(); } } catch (IOException e) { throw new ProcessorException("An I/O error occured:\n" + e.getMessage(), e); } } COM: <s> loads the coefficient files from the request and stores the coefficients </s>
funcom_train/9442829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void commitText(int layer) { String tmp = mComposingText.toString(layer); if (mOptLearning && mConverter != null && tmp.length() > 0) { WnnWord word = new WnnWord(tmp, tmp); mConverter.learn(word); } mInputConnection.commitText(tmp, (FIX_CURSOR_TEXT_END ? 1 : tmp.length())); mCandidatesViewManager.clearCandidates(); } COM: <s> commit the composing text </s>
funcom_train/51812780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getPropertyType(Object bean, String property) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException{ GetSet[] getSet = parse(bean, property); for ( int i=0; i<getSet.length -1; i++ ) bean = getSet[i].get(bean); return getSet[ getSet.length - 1 ].getType(bean); } COM: <s> retrieves the property type of the supplied bean based on the nested </s>
funcom_train/3768154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertFileSuffix(String suffix) { File file = getSelectedFile(); if (file == null) return; String filename = file.getPath(); // check if the filename already has suffix "suffix" if(! filename.endsWith("." + suffix)) { filename = filename + "." + suffix; setSelectedFile(new File(filename)); } } COM: <s> inserts suffix to filename if the user didnt specify if </s>