__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24060621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString ( ) { String state = this.ready ? "ready" : "killed"; synchronized ( this.lock ) { if ( this.keepRunning ) { state = "alive, not watching"; if ( this.isWatching ) { state = "watching, not timed out"; if ( this.isTimedOut ) { state = "timed out"; } } } } return state; } COM: <s> must lock to avoid confusing state analysis </s>
funcom_train/3150284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPropertyTextValue(Object value) { if (value == null) { return ""; } if (beanWrapper == null) { beanWrapper = new BeanWrapperImpl(value); } else { beanWrapper.setWrappedInstance(value); } return String.valueOf(beanWrapper.getPropertyValue(propertyName)); } COM: <s> convert cell value into a string </s>
funcom_train/36012301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFormatedString(String description) { StringTokenizer token = new StringTokenizer(description, "\r"); StringBuffer buffer = new StringBuffer(); for (; token.hasMoreTokens();) { buffer.append("<pre>").append(token.nextToken()).append("</pre>"); } return buffer.toString(); } COM: <s> gets the formatted description </s>
funcom_train/47585717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInputPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ControlFlowRelation_input_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ControlFlowRelation_input_feature", "_UI_ControlFlowRelation_type"), BpdPackage.Literals.CONTROL_FLOW_RELATION__INPUT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the input feature </s>
funcom_train/45521127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rocketHit(Vector2d pos,Player player) { if(player.local) { //Is the player in this engine? player.getClient().sendHit(pos); rocketBlow(pos,player); } else { current_rocket=null; //just hide the rocket if not blow } } COM: <s> called upon when the rocket class detects a collision </s>
funcom_train/29517976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int fastComputeTableHypergeometricProbabilities(double[] probs, int... t) { FastProbTableVisitor visitor = (FastProbTableVisitor) getVisitor(FastProbTableVisitor.class); visitor.setProbs(probs); int n = enumerateAllCompatibleTables(visitor, t); visitor.setProbs(null); // useless, but who knows return n; } COM: <s> compute table hypergeometric probabilities using a fast approximate method </s>
funcom_train/7518292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Proposta entity) { EntityManagerHelper.log("deleting Proposta instance", Level.INFO, null); try { entity = getEntityManager().getReference(Proposta.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent proposta entity </s>
funcom_train/21176212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getShippableSizes() { List shippableSizes = new LinkedList(); Iterator i = iterator(); while (i.hasNext()) { ShoppingCartItem item = (ShoppingCartItem) i.next(); if (item.shippingApplies()) { shippableSizes.add(new Double(item.getSize())); } } return shippableSizes; } COM: <s> returns a list of shippable items size </s>
funcom_train/40097367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DOMParserImplMod (SymbolTable symbolTable) { this ( (XMLParserConfiguration) ObjectFactory.createObject ( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XIncludeAwareParserConfiguration")); fConfiguration.setProperty ( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY, symbolTable); } // <init>(SymbolTable) COM: <s> constructs a dom builder using the specified symbol table </s>
funcom_train/18597244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getFeatureCalalogFile(File file) { File tmp = null; File fcRepo = new File(file, MEFConstants.SCHEMA); if (fcRepo.exists()) { File fc = new File(fcRepo, MEFConstants.FILE_METADATA); if (fc.exists()) tmp = fc; else { File[] files = fcRepo.listFiles(); // Retrieve first files into applschema directory, without any // tests. if (files.length != 0) tmp = files[0]; } } return tmp; } COM: <s> get feature calalog file method return feature catalog xml file if exists </s>
funcom_train/4382243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void batchInsert(final Collection<T> parameterList) throws DataAccessException { final String insertMethod = iBatisDaoUtils.getInsertQuery(this.getClassName()); this.getSqlMapClientTemplate().execute(new SqlMapClientCallback() { public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { executor.startBatch(); for (Object parameter : parameterList) { executor.insert(insertMethod, parameter); } executor.executeBatch(); return null; } }); } COM: <s> batch insert from db </s>
funcom_train/47741951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtnCancell() { if (jbtnCancell == null) { jbtnCancell = new JButton(); jbtnCancell.setText("Cancelar"); jbtnCancell.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); // TODO Auto-generated Event stub actionPerformed() } }); } return jbtnCancell; } COM: <s> this method initializes jbtn cancell </s>
funcom_train/11792749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Option createEprInOption() { Option eprOption = OptionBuilder.create("i"); eprOption.setDescription(Messages.getString("Client.EPRInOptionText")); logger.debug("EPR in option description: " + Messages.getString("Client.EPRInOptionText")); eprOption.setArgName("file"); eprOption.setArgs(1); eprOption.setLongOpt("eprIn"); return eprOption; } COM: <s> creates the cli code option code of the epr in option </s>
funcom_train/15740722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFullErrorLogSubmissionAllowed(boolean allowed) { int submission = allowed ? ALLOW : FORBID; // store in configuration and preference scope saros.getConfigPrefs().putInt( PreferenceConstants.ERROR_LOG_ALLOW_SUBMISSION_FULL, submission); saros.saveConfigPrefs(); saros.getPreferenceStore().setValue( PreferenceConstants.ERROR_LOG_ALLOW_SUBMISSION_FULL, submission); } COM: <s> saves in the workspace and globally if the user wants to submit the </s>
funcom_train/20045220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getPresentation() { boolean result = true; // begin test here log.println("getting presentetion with bShowCommand flag..."); result &= oObj.getPresentation(true) != null; log.println("getting presentetion without bShowCommand flag..."); result &= oObj.getPresentation(false) != null; tRes.tested( "getPresentation()", result ); } // end getPresentation() COM: <s> calls the method with code true code and code false code </s>
funcom_train/17017164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxWorkerThreads() { int maxWorkerThreads = rmConf.getInt( "mapred.capacity-scheduler.init-worker-threads", MAX_INITIALIZATION_WORKER_THREADS); if(maxWorkerThreads <= 0) { throw new IllegalArgumentException( "Invalid initializater worker thread number " + maxWorkerThreads); } return maxWorkerThreads; } COM: <s> gets maximum number of threads which are spawned to initialize jobs </s>
funcom_train/13994338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInfix02() { model.setInfix("1"); assertEquals(4, model.getSize()); assertEquals("1", model.getElementAt(0)); assertEquals("11", model.getElementAt(1)); assertEquals("12", model.getElementAt(2)); assertEquals("121", model.getElementAt(3)); } COM: <s> tests infix 1 </s>
funcom_train/19318303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDouble(double value) throws JMSException { if(!isBodyModifiable()) { throw new MessageNotWriteableException("BytesMessage read_only"); } try { getOutputStream().writeDouble(value); } catch(IOException e) { throw new JMSException(e.getMessage()); } } COM: <s> converts the code double code argument to a code long code </s>
funcom_train/23393686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addObjectivePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectiveFulfilment_objective_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectiveFulfilment_objective_feature", "_UI_ObjectiveFulfilment_type"), FactPackage.Literals.OBJECTIVE_FULFILMENT__OBJECTIVE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the objective feature </s>
funcom_train/28553368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interface getInterface(String disInt){ return new Interface(getName(disInt),getType(disInt),getHwAdrr(disInt), getInetAdress(disInt),getInet6Adress(disInt), getBCast(disInt),getMask(disInt),getScope(disInt)); } COM: <s> create a interface with the parameter from the string </s>
funcom_train/39294086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addApplicableLawPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContractType_applicableLaw_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContractType_applicableLaw_feature", "_UI_ContractType_type"), CntPackage.Literals.CONTRACT_TYPE__APPLICABLE_LAW, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the applicable law feature </s>
funcom_train/21850953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridComponent getSelectedComponent() { Iterator iter = gridIterator(); while (iter.hasNext()) { GridComponent gc = (GridComponent) iter.next(); if (gc instanceof FormComponent) { FormComponent cc = (FormComponent) gc; gc = cc.getSelectedComponent(); if (gc != null) return gc; } else if (gc instanceof FormContainerComponent) { FormContainerComponent cc = (FormContainerComponent) gc; gc = cc.getSelectedComponent(); if (gc != null) return gc; } else { if (gc.isSelected()) return gc; } } return null; } COM: <s> returns the first selected grid component found in the component hierarhcy </s>
funcom_train/44797930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Printable getPrintable(final int pageIndex) { if (pageIndex >= mNumPages) { throw new IndexOutOfBoundsException(); } double originX = (pageIndex % mNumPagesX) * mFormat.getImageableWidth(); double originY = (pageIndex / mNumPagesX) * mFormat.getImageableHeight(); Point2D.Double origin = new Point2D.Double(originX, originY); return new TranslatedPrintable(mPainter, origin); } COM: <s> returns the code printable code instance responsible for </s>
funcom_train/3375214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(Font f) { AccessibleContext ac = getCurrentAccessibleContext(); if (ac instanceof AccessibleComponent) { ((AccessibleComponent) ac).setFont(f); } else { Component c = getCurrentComponent(); if (c != null) { c.setFont(f); } } } COM: <s> sets the code font code of this object </s>
funcom_train/23793013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCompiledMethod (String name) { /* * The methodName is currently unused. But could be used if * we wished to produce many more smaller dump files for * a compilation. * * Reset the pass number whenever we start compiling * another method. Since the files are always opened * in append mode, the info for each method will in a class * for a pass will appear in the right order. */ passNumber = FIRST; } COM: <s> set the name of the method currently being compiled </s>
funcom_train/16676906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMaximumRatioFor(Rectangle bounds) { float part = 0, whole = 0; if (getSash( ).isVertical( )) { whole = bounds.width; part = whole - children[1].getMinimumWidth( ); } else { whole = bounds.height; part = whole - children[1].getMinimumHeight( ); } return (part != whole) ? (part - SASH_WIDTH) / whole : IPageLayout.RATIO_MAX; } COM: <s> obtain the maximum ratio required to display the control on the br </s>
funcom_train/16763683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix4f transposeLocal() { float tmp = m01; m01 = m10; m10 = tmp; tmp = m02; m02 = m20; m20 = tmp; tmp = m03; m03 = m30; m30 = tmp; tmp = m12; m12 = m21; m21 = tmp; tmp = m13; m13 = m31; m31 = tmp; tmp = m23; m23 = m32; m32 = tmp; return this; } COM: <s> code transpose code locally transposes this matrix </s>
funcom_train/36198427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean reset() throws Exception { if (driver == null) { throw new Exception("Driver not set"); } if (waitBusy()) { throw new ModemBusyException("Modem is already executing command"); } busy = true; try { if (driver.reset(this)) { driver.echo(this, echo); return true; } return false; } finally { busy = false; } } COM: <s> sends reset command </s>
funcom_train/7980643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void kickUpdate() { toePool.setSize(order.getMaxToes()); this.scope.kickUpdate(); this.frontier.kickUpdate(); this.processorChains.kickUpdate(); // TODO: continue to generalize this, so that any major // component can get a kick when it may need to refresh its data setThresholds(); } COM: <s> while many settings will update automatically when the settings handler is </s>
funcom_train/11792767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Option createTransMethodOption() { Option transMethodOption = OptionBuilder.create("m"); transMethodOption.setDescription(Messages .getString("Client.TransportMethodOptionText")); logger.debug("Transport Method option description: " + Messages.getString("Client.TransportMethodOptionText")); transMethodOption.setArgName("transtype"); transMethodOption.setArgs(1); transMethodOption.setLongOpt("transmethod"); return transMethodOption; } COM: <s> creates the cli code option code of the transport method option </s>
funcom_train/38501073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCourseFileName(String courseFileName) { if (_status != Status.STOPPED) { throw new IllegalStateException(); } File f = new File(courseFileName); if (!f.exists()) { throw new IllegalArgumentException("File " + courseFileName + " does not exist."); } _courseFileName = courseFileName; } COM: <s> sets the name of the course definitions file </s>
funcom_train/2293103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String decodeParamValue(String paramName, String paramValue) { if ((paramName != null) && (paramValue != null)) { return CmsEncoder.decode(paramValue, getCms().getRequestContext().getEncoding()); } else { return null; } } COM: <s> decodes an individual parameter value </s>
funcom_train/37246395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title, String newTitle) { Object o = null; try { o = getObjectByTitle(title); } catch (Exception e) { handleException(e); } if (o instanceof Score) { Score s = (Score) o; s.setTitle(newTitle); } else if (o instanceof Part) { Part p = (Part) o; p.setTitle(newTitle); } else if (o instanceof Phrase) { Phrase ph = (Phrase) o; ph.setTitle(newTitle); } } COM: <s> set a new title for a score part or phrase </s>
funcom_train/27823360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InstanceInfo getInstanceInfo(String entityURI,int instanceVersion) { InstanceInfo result=(InstanceInfo)m_instanceInfos.get(entityURI); if (result==null) { result=new InstanceInfo(entityURI,instanceVersion); m_instanceInfos.put(entityURI,result); } return result; } COM: <s> returns the instance info object with given uri </s>
funcom_train/25761748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setLayout(new GridBagLayout()); jPanel2.add(getBtnDiscard(), new GridBagConstraints()); jPanel2.add(getBtnSave(), new GridBagConstraints()); } return jPanel2; } COM: <s> this method initializes j panel2 </s>
funcom_train/9301406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistance(List<String> firstList, List<String> secondList) { double[][] bestDistances = initialize(new double[firstList.size() + 1][secondList.size() + 1]); return getDistance(firstList, secondList, 0, 0, bestDistances); } COM: <s> returns the edit distance between two sentences </s>
funcom_train/48633866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object newProxyInstance(String implClassName) throws RuntimeException { Class interfaceClass = null; Object object = null; try { interfaceClass = loadClass(implClassName); } catch (ClassNotFoundException e) { interfaceClass = null; } if(interfaceClass!=null){ MyInvocationHandler handler = new MyInvocationHandler(implClassName); object = Enhancer.create(interfaceClass, interfaceClass.getInterfaces(), handler); } return object; } COM: <s> create a proxy instance that implements the specified access interface </s>
funcom_train/3046393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryableCollection requireQueryableCollection(String role) throws QueryException { try { QueryableCollection queryableCollection = ( QueryableCollection ) sfi.getCollectionPersister( role ); if ( queryableCollection != null ) { collectionPropertyMappingByRole.put( role, new CollectionPropertyMapping( queryableCollection ) ); } return queryableCollection; } catch ( ClassCastException cce ) { throw new QueryException( "collection role is not queryable: " + role ); } catch ( Exception e ) { throw new QueryException( "collection role not found: " + role ); } } COM: <s> locate the collection persister by the collection role requiring that </s>
funcom_train/44854929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AvailableMemberSearcherConfiguration getActiveMemberSearcher() { if (availableMemberSearchers.length == 0) return null; String lSearcherName = getMemberSearcherName(); for (AvailableMemberSearcherConfiguration lMemberSearcher : availableMemberSearchers) { if (lSearcherName.equals(lMemberSearcher.getNamespaceID())) { return lMemberSearcher; } } //if we didn't find the appropriate one, take the first available return availableMemberSearchers[0]; } COM: <s> returns the active member searcher configuration according to the applications settings </s>
funcom_train/9238073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callUnknownCTCPReply(final String sType, final String sMessage, final String sTarget, final String sHost) { final CallbackOnUnknownCTCPReply cb = (CallbackOnUnknownCTCPReply)getCallbackManager().getCallbackType("OnUnknownCTCPReply"); if (cb != null) { return cb.call(sType, sMessage, sTarget, sHost); } return false; } COM: <s> callback to all objects implementing the unknown ctcpreply callback </s>
funcom_train/269179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenu mkMenu(ResourceBundle b, String name) { String menuLabel = null; String menuTip = null; menuLabel = this.getBundleMessage(name+".label"); menuTip = this.getBundleMessage(name+".tooltip"); JMenu menu = new JMenu(menuLabel); menu.setToolTipText(menuTip); return menu; } COM: <s> convenience routine to make a jmenu </s>
funcom_train/44107810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParam(Object val, int num) throws SQLException { if (dbtype.equals("file")) return; if(val instanceof String) pstatement.setString(num, (String)val); else if(val instanceof Integer) pstatement.setInt(num, ((Integer)val).intValue()); } COM: <s> set paremeter to this prepared statement </s>
funcom_train/19871188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCategories(ArrayList<Long> categories){ CategoryFieldWidget.this.categories = categories; if(categories==null || categories.isEmpty()) return; String name = Application.category(categories.get(0)).getName(); for (int i=1; i<categories.size(); i++){ Long categoryId = categories.get(i); if (categoryId != null) name += ", "+Application.category(categoryId).getName(); } text.setText(name); } COM: <s> set category names to input field </s>
funcom_train/5346107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isIndivisible(String currKey, String val) { //the license-type is always indivisible. //note that for weed licenses, this works because getKeyWordsIndivisible //is returning a list of only 'WeedInfo.LAINFO'. the content-id & version-id //are essentially lost & ignored. return currKey.endsWith(XML_LICENSE_TYPE_ATTRIBUTE); } COM: <s> determines if this keyword value is indivisible </s>
funcom_train/5315851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int occurrencesOfTokenWhenCommand(String token, String command) { ResultSet res = this .query("SELECT SUM(occurrences) AS ctsum FROM command_has_token WHERE token_value = '" .concat(token).concat("' AND command_value = '") .concat(command).concat("'")); int occurrences = 0; try { if (res.next()) { occurrences = res.getInt("ctsum"); } } catch (SQLException e) { e.printStackTrace(); } return occurrences; } COM: <s> retrieves the total number of occurrences of the command when its </s>
funcom_train/46189469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommentWithCustomThreshold() { blog.getPluginProperties().setProperty(SpamScoreListener.COMMENT_THRESHOLD_KEY, "2"); comment.incrementSpamScore(); comment.incrementSpamScore(); listener.commentAdded(commentEvent); assertTrue(comment.isApproved()); comment.incrementSpamScore(); listener.commentAdded(commentEvent); assertTrue(comment.isRejected()); } COM: <s> tests a comment with a custom threshold </s>
funcom_train/50159965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHasIdeasForUse() { ResultDoc[] annoResults = ( (ItemDocReader)primaryResultDoc.getDocReader() ).getAnnotationResultDocs(); for ( int i = 0; i < annoResults.length; i++ ) { if ( ( (DleseAnnoDocReader)annoResults[i].getDocReader() ).getType().equals( "See also" ) ) { return "true"; } } return "false"; } COM: <s> gets the has ideas for use attribute of the ddsview resource form object </s>
funcom_train/48506322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void blockUser (User playerName) { UserContext context = lobby.getUserContext(); // create String msg = "<admin-command version='1.0' id='1'>"; msg += "<user-block player=\"" + playerName.name + "\"/>"; msg += "</admin-command>"; Document d = Message.construct(msg); Message m = new Message(d); try { context.getClient().sendToServer(m); } catch(NullPointerException e) { Debug.println("Not connected to a server"); } } COM: <s> blocks the given user </s>
funcom_train/4312576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitEditorItem() { if (exitEditorItem == null) { exitEditorItem = new JMenuItem(); exitEditorItem.setText("Exit"); exitEditorItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, Event.CTRL_MASK, false)); exitEditorItem.addActionListener(this); } return exitEditorItem; } COM: <s> this method initializes exit editor item </s>
funcom_train/46759157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MedInteractionModel getMedInteraction(final long medInteractionId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return MedData.getMedInteraction(medInteractionId, chain, call); }}; return (MedInteractionModel) call(method, call); } COM: <s> same transaction return the single med interaction model for the primary key </s>
funcom_train/43421596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existsMorePriorityTask(int priority) { if (priority == Task.PRIORITY_HIGH) return false; int count = tasks.size(); for (int i=0; i<count; i++) { Task task = (Task) tasks.get(i); if ((task.getState() != Task.STATE_DONE) & (task.getPriority() < priority)) return true; } return false; } COM: <s> checks if there is some unfinished task in plan with higher priority </s>
funcom_train/17046434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pause(long checkInterval) { if (this.paused.compareAndSet(false, true)) { this.pauseTime = System.currentTimeMillis(); } this.pauseCheckInterval = checkInterval; if (subCounters != null) { for (UnitCounter uc : subCounters) uc.pause(checkInterval); } } COM: <s> mark counting as being paused and set the time to sleep between checking </s>
funcom_train/32634622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int putConstant(Object c) { if (c instanceof String) { return putIndexed(STRING, c, putUTF8((String) c), 0); } else { int tag; if (c instanceof Integer) tag = INTEGER; else if (c instanceof Float) tag = FLOAT; else throw new IllegalArgumentException ("illegal constant " + c + " of type: " + c.getClass()); return putConstant(tag, c); } } COM: <s> puts a one slot constant into this constant pool </s>
funcom_train/28995953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDisplayChildren() throws IOException{ Portal portal = PortalSystemFinders.findPortalByName("iportal"); CharArrayWriter output = new CharArrayWriter(); output.write("******************************************************************\n"); output.write("********************* CONTENT NODE CHILDREN ************************\n"); output.write("******************************************************************\n"); int level =1; displayContentChildren(portal.getRootNode(), level, output); System.out.print(output.toString()); } COM: <s> test the display tree paths functionallity for this domain object </s>
funcom_train/42860982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createStatusBar() { GridData statusBarLData = new GridData(); statusBarLData.horizontalAlignment = GridData.FILL; statusBarLData.horizontalSpan = 2; statusBarLData.verticalAlignment = GridData.END; statusBarLData.grabExcessHorizontalSpace = true; statusBar = new StatusBar(sShell, SWT.NONE); statusBar.setSize(new Point(600, 48)); statusBar.setLayoutData(statusBarLData); } COM: <s> this method initializes status </s>
funcom_train/8342478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutButtonPanel() { buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); buttonPanel.add(Box.createHorizontalGlue()); buttonPanel.add(cancelButton); buttonPanel.add(Box.createHorizontalStrut(PAD_X)); buttonPanel.add(printButton); buttonPanel.add(Box.createHorizontalStrut(PAD_X / 4)); buttonPanel.setBorder(new EmptyBorder(insets)); } COM: <s> layout the buttons on this view </s>
funcom_train/26508649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeStatement(Statement stmt) throws RAPDBException { try { if (stmt != null) { stmt.close(); } } catch (SQLException se) { LogService.instance().log(LogService.ERROR, "SQL Exception while closing " + "Statement : \n" + se); throw new RAPDBException("SQL Exception while closing " + "Statement : \n" + se); } } COM: <s> releases the specified statement objects database and jdbc resources </s>
funcom_train/15614308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getNumberOfWarnings() { Integer numberOfWarnings = this.getGlobalWarnings().size(); for (String fieldId : this.fieldWarnings.keySet()) { List<String> warnings = this.fieldWarnings.get(fieldId); numberOfWarnings = numberOfWarnings + warnings.size(); } return numberOfWarnings; } COM: <s> number of warnings in this result </s>
funcom_train/33768623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nodeStructureChanged(Object node) { int n = getChildCount(root); int[] childIdx = new int[n]; Object[] children = new Object[n]; for (int i = 0; i < n; i++){ childIdx[i] = i; children[i] = getChild(root, i); } fireTreeStructureChanged(this, new Object[] { root }, childIdx, children); } COM: <s> 438 invoke this method if youve totally changed the children of node and </s>
funcom_train/50575576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DiscInfo get(int key) throws Exception { if (selectDiscId == null) selectDiscId = con.prepareStatement(selectDiscIdQuery); setInt(selectDiscId, 1, key); ResultSet rs = doExecute(selectDiscId, selectDiscIdQuery); if (!rs.next()) { rs.close(); return null; } return getAlbum(rs, null); } COM: <s> looks up an album in the database by its freedb id </s>
funcom_train/24535468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectFontName(String name) { ListModel lm = getNamesList().getModel(); String temp; for (int i = 0; i < lm.getSize(); i++) { temp = (String)lm.getElementAt(i); if (name.equalsIgnoreCase(temp)) { getNamesList().setSelectedValue(temp, true); break; } } } COM: <s> select a given font name on the list ignoring case </s>
funcom_train/12781285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void translateModuleToCAst(Module module, CAst ast, Set<Pair<CAstEntity, ModuleEntry>> topLevelEntities) { for (Iterator<ModuleEntry> mes = module.getEntries(); mes.hasNext();) { translateModuleEntryToCAst(mes.next(), ast, topLevelEntities); } } COM: <s> translate all relevant entities in the module to cast storing the results </s>
funcom_train/18191374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawDottedLineToPostScript(EPSOutputPrintStream pw, Position from, Position to) { pw.println("[2 2] 0 setdash\n"); translateToGUIPosition(from); double fromX = guiXDouble; double fromY = guiYDouble; translateToGUIPosition(to); pw.drawLine(fromX, fromY, guiXDouble, guiYDouble); pw.println("[] 0 setdash\n"); } COM: <s> draw a dotted line between two points </s>
funcom_train/36604279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move() { //panint ball move calling ball method // _ball.Move(getHeight(), getWidth()); // _ball2.Move(getHeight(), getWidth()); for (Ball _b : _balls) { _b.Move(getHeight(), getWidth()); } } // end method move COM: <s> computes the next position for the balls and updates their positions </s>
funcom_train/45452852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedUserPositions(final String[] selectedUserPositionsString) { /* * Defensive Copy */ if (selectedUserPositionsString == null) { this.selectedUserPositions = null; return; } this.selectedUserPositions = new String[selectedUserPositionsString.length]; for (int i = 0; i < selectedUserPositionsString.length; i++) { this.selectedUserPositions[i] = selectedUserPositionsString[i]; } } COM: <s> sets the selected user positions for termination </s>
funcom_train/50755821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsReleasePermissionDenied() throws Exception { Document doc = getDocument("src/test/html_docs/notadmin.html"); assertEquals(true, _fsrBean.isReleasePermissionDenied(doc)); doc = getDocument("src/test/html_docs/admin_frs.html"); assertEquals(false, _fsrBean.isReleasePermissionDenied(doc)); } COM: <s> test for is release permission denied </s>
funcom_train/2801744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ITracking getMsgTracking() { ITracking tracking = null; IField msgField = getMsgField(RvTracking.TRACKING_FIELD_NAME); if (msgField != null) { tracking = new RvTracking(); try { tracking.fromNative(msgField); } catch (IllegalArgumentException e) { tracking = null; } } return tracking; } COM: <s> retrieves from this message the related tracking information </s>
funcom_train/21995155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getMap() throws RpcException { try { authorize(ScannerSettings.GET_MAP); ScannerSettingCache cache = ScannerSettingCache.getInstance(); return cache.getMap(); } catch (MalformedURLException e) { throw new RpcException("url-problem getting scanner settings", e); } catch (JRecSecurityException e) { throw new RpcException("security-problem getting scanner settings", e); } } COM: <s> return a list of driver setting maps </s>
funcom_train/39967763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matchesIntervals(int[] someIntervals) { if ( intervals.length != someIntervals.length ) return false; for ( int i = 0; i < intervals.length; i++ ) { if ( intervals[i] != someIntervals[i] ) { return false; // fast false return } } return true; // interval arrays are identical } COM: <s> return true if some intervals exactly matches our intervals </s>
funcom_train/32056874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMenuComponent() { GPGraphpad gp = new GPGraphpad(); AbstractActionRadioButtonImpl aa = new AbstractActionRadioButtonImpl(gp,""); JMenuItem button = (JMenuItem)(aa.getMenuComponent("File")); assertNotNull( button ); } COM: <s> test of get menu component method of class abstract action radio button </s>
funcom_train/50239144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void supplementTitle(TreeItem item) { StringBuffer b = getTitlePrefix(selection); TreeItem root = item; // fix submitted by Jacob Eckel 5/27/03 while (root.getParentItem() != null) root = root.getParentItem(); b.append(" - ").append(root.getText(1)); setPartName(b.toString()); } COM: <s> add the metric desciption to the titlebar </s>
funcom_train/3350468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassLoader getPluginsClassLoader() { if (classLoaderHolder == null) { classLoaderHolder = new VmIsolateLocal<PluginsClassLoader>(); } if (classLoaderHolder.get() == null) { classLoaderHolder.set(new PluginsClassLoader(this)); } return classLoaderHolder.get(); } COM: <s> gets the classloader that loads classes from all loaded plugins </s>
funcom_train/13693031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectNodesOnSelectedLinks(){ GuiLink tmplink = null; for(Enumeration en = links.elements(); en.hasMoreElements();) { tmplink = (GuiLink)en.nextElement(); if (tmplink == null) continue; if (tmplink.selectionMode) { tmplink.source.setSelectionMode(true); tmplink.target.setSelectionMode(true); } } repaint(); } COM: <s> selects nodes which touch on selected links </s>
funcom_train/40337643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite buildToolPanel(Tool tool) { Composite toolPanel = new Composite(panel, SWT.NONE); Label image = new Label(toolPanel, SWT.NONE); image.setImage(tool.getIcon()); Label title = new Label(toolPanel, SWT.NONE); title.setText(tool.getName()); toolPanel.setLayout(new GridLayout(2, false)); return toolPanel; } COM: <s> create a composite with a grid layout using 2 columns </s>
funcom_train/15617113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseCustom(ParserInput parserInput, ParserOutput parserOutput, String raw, int mode) throws ParserException { if (mode < JFlexParser.MODE_CUSTOM) { return raw; } Reader reader = toReader(raw, false); JAMWikiCustomTagLexer lexer = new JAMWikiCustomTagLexer(reader); int preMode = (mode > JFlexParser.MODE_CUSTOM) ? JFlexParser.MODE_CUSTOM : mode; return this.lex(lexer, parserInput, parserOutput, preMode); } COM: <s> after templates are parsed look for any custom tags </s>
funcom_train/45473276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMember(final JMember jMember) { if (jMember == null) { throw new IllegalArgumentException("argument 'jMember' may not be null."); } if (jMember instanceof JField) { addField((JField) jMember); } else { throw new IllegalArgumentException("invalid member for JInterface: " + jMember.toString()); } } COM: <s> adds the given jmember to this jinterface </s>
funcom_train/13519748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JInternalFrame initJF() { if (staticOngletsJF == null) { staticOngletsJF = new JInternalFrame("Static results", true, true, true, true); staticOngletsJF.setSize(new Dimension(438, 335)); staticOngletsJF.setJMenuBar(getJJMenuBar()); staticOngletsJF.setContentPane(getStaticOngletsContainer()); } return staticOngletsJF; } COM: <s> this method initializes static onglets jf </s>
funcom_train/10504927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPrefixKey(Artifact artifact) { // use the hashcode as a uuid for the artifact (fingers crossed) int hashCode = artifact.getId().hashCode(); // use just some visual cue return "artifact:" + artifact.getName() + "#" + artifact.getType() + "#" + artifact.getExt() + "#" + hashCode; } COM: <s> creates the unique prefix key that will reference the artifact within the properties </s>
funcom_train/50914602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCount(double[] value) throws RuntimeException { if (value == null) { throw new RuntimeException("null count"); } List<CMLAtom> atomList = this.getAtoms(value.length, "count"); int i = 0; for (CMLAtom atom : atomList) { atom.setCount(value[i++]); } } COM: <s> array of object counts </s>
funcom_train/20748017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContainsAll() { System.out.println("containsAll"); List<ISIMetaData> instance = jaseSearchable.search("sample"); List<ISIMetaData> instance2 = jaseSearchable.search("document"); assertTrue(instance2.containsAll(instance)); assertFalse(instance.containsAll(instance2)); instance2.remove(instance.get(0)); assertFalse(instance2.containsAll(instance)); } COM: <s> test of contains all method of class org </s>
funcom_train/32070810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void btnEditPressed() { if (model.getSelectedVocabulary() == null) { JOptionPane.showMessageDialog(view, I18NToolkit .getLabel("main.view.notify.no.selection")); return; } VocAdminController vocAdminController = new VocAdminController(model .getSelectedVocabulary()); this.addChild(vocAdminController); ((VocAdminView) vocAdminController.getView()).setModal(true); ((VocAdminView) vocAdminController.getView()).setVisible(true); } COM: <s> button edit was pressed </s>
funcom_train/15493016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminate() { try { server.shutdown(); DatabaseManager.closeDatabases(0); state.terminate(true); log.info("Hsql has been shut down exiting"); } catch (Exception ex) { log.error("Failed to stop the logger : " + ex.getMessage(), ex); } } COM: <s> this method is called to soft terminate the processing thread </s>
funcom_train/35837197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintEnabledText(UINode n, Graphics g, String s, int textX, int textY) { //g.setColor(n.getForeground()); BasicGraphicsUtils.drawString(g, s, '\0', textX, textY); } COM: <s> paint clipped text at text x text y with the nodes foreground color </s>
funcom_train/33368276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPointValue(float pointValue) throws SQLException { dbm.exec("update Problem set pointValue = '" + pointValue + "' where id = '" + getID() + "'"); // invalidate cached assignment point value try { dbm.exec("delete from AssignmentValues " + "where assignID = " + getAssignment()); } catch (NotFoundException nfe) { /* no associated assignment - do nothing */ } } COM: <s> sets the total point value possible for the problem </s>
funcom_train/31625854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canRequesterAdd() throws RepositoryException { try { WizDefinition wizdef = new WizDefinition(); wizdef.setRequestingUser(RequestRegistry.getUser()); return wizdef.canRequesterAdd(); } catch (DBException ex) { throw new RepositoryException("Cannot determine if requester can add records.", ex); } } COM: <s> returns true if the current requester can add </s>
funcom_train/9851460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startSet(){ if(activationEmails.isEmpty()){ warning("Error: there are not set activation email"); return false; } for (EmailVertex v : g.getVertices()) { verticesValue.put(v, 0.0); } // set value of activation email for (EmailVertex activationV : activationEmails) { verticesValue.put(activationV, 1.0); } startVertices.clear(); for (EmailVertex v : activationEmails) { startVertices.add(v); } direct = true; checkParameters(); compute(); return true; } COM: <s> algorithm first phrase </s>
funcom_train/10188335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPatternPanelLabel() { if (PatternPanelLabel == null) { PatternLabel = new JLabel(); PatternLabel.setText(" Pattern "); PatternLabel.setHorizontalTextPosition(SwingConstants.LEFT); PatternLabel.setPreferredSize(new Dimension(60, 20)); PatternLabel.setHorizontalAlignment(SwingConstants.LEFT); PatternPanelLabel = new JPanel(); PatternPanelLabel.setLayout(new BorderLayout()); PatternPanelLabel.setName("jPanel4"); PatternPanelLabel.add(PatternLabel, BorderLayout.NORTH); } return PatternPanelLabel; } COM: <s> this method initializes pattern panel label </s>
funcom_train/34784614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { theList.add("Hello"); assertEquals("Hello", theList.get(0)); assertEquals(1, theList.size()); assertEquals(1, listener.nItemsAdded); assertEquals(0, listener.nItemsChanged); assertEquals(0, listener.nItemsRemoved); } COM: <s> test of add method of class com </s>
funcom_train/23284512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getLEDState() throws IOException, UPNPResponseException { ActionMessage message = messageFactory.getMessage("GetLEDState"); ActionResponse response = message.service(); String state = response.getOutActionArgumentValue("CurrentLEDState"); return "On".equals(state); } COM: <s> gets the current state of the sonos devices led </s>
funcom_train/27788418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getFileName(String pkg, String file) { StringTokenizer stk = new StringTokenizer(pkg, ".", false); File rc = outputDirectory; while (stk.hasMoreTokens()) { String tk = stk.nextToken(); rc = new File(rc, tk); } rc.mkdirs(); return new File(rc, file); } COM: <s> construct full file name by output directory of generator package and </s>
funcom_train/7421858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getContainment(String containment) { if (containment != null) { if (containment.equals(CONTAINMENT_REQUIRED)) { return ParticipantReferenceDataObject.CONTAINMENT_REQUIRED; } else if (containment.equals(CONTAINMENT_MUST_ADD)) { return ParticipantReferenceDataObject.CONTAINMENT_MUST_ADD; } else if (containment.equals(CONTAINMENT_ADD_IF_NOT_EXISTS)) { return ParticipantReferenceDataObject.CONTAINMENT_ADD_IF_NOT_EXISTS; } } return null; } COM: <s> determines the value of the containment attribute for a participant </s>
funcom_train/50197628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasFeature(String feature, String version) { if (m_tie != null) { char charFeature[] = new char[0]; if (feature != null) { charFeature = feature.toCharArray(); } char charVersion[] = new char[0]; if (version != null) { charVersion = version.toCharArray(); } return m_tie.hasFeature(charFeature, charVersion); } return false; } COM: <s> test if the dom implementation implements a specific feature and version </s>
funcom_train/19973566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateImage(CachedFile cache, URL url) { for (int i = 0; i < SUN_URLS.length; ++i) { if (SUN_URLS[i].equals(url)) { synchronized (this) { CachedFile.Entry entry = cache.getFile(url); String dstr = formatDate(entry.date); SUN_CAPTIONS[i][2] = dstr; if (i == currentSunImage) CharFormatter.formatString(sunCaptionBuf[2][0], 0, dstr, -1); break; } } } } COM: <s> this method is invoked when a file is loaded by the image cache </s>
funcom_train/8074070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance reduceDimensionality(Instance in) throws Exception { if (m_attributeFilter == null) { throw new Exception("No feature selection has been performed yet!"); } if (m_transformer != null) { in = m_transformer.convertInstance(in); } m_attributeFilter.input(in); m_attributeFilter.batchFinished(); Instance result = m_attributeFilter.output(); return result; } COM: <s> reduce the dimensionality of a single instance to include only those </s>
funcom_train/42680050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCmdExit() { if (cmdExit == null) { cmdExit = new JButton(); cmdExit.setBounds(new Rectangle(514, 272, 114, 68)); cmdExit.setEnabled(false); cmdExit.setIcon(new ImageIcon(getClass().getResource("/Cancel2-64.png"))); cmdExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { task.cancel(true); } }); } return cmdExit; } COM: <s> this method initializes cmd exit </s>
funcom_train/5728564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CourseMember addCourseMember(Course course, User user, CourseMemberType type) { CourseMember member = persistCourseMember(course, user, type); if (CourseMemberType.ASSISTANT == type) { CourseMemberPK pk = member.getCourseMemberPk(); getSecurityService().setPermissions(userOfPk(pk), courseOfPk(pk), LectureAclEntry.INSTITUTE_TUTOR); } else if (CourseMemberType.PARTICIPANT == type) { defineParticipantsPermission(member); } return member; } COM: <s> create a course member and define needed permissions </s>
funcom_train/11592860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeRowEnd(UIComponent component, ResponseWriter writer, int column, int maxColumn) throws IOException { while (column < maxColumn) { writer.startElement(Attributes.TD, component); writer.endElement(Attributes.TD); column++; } writer.endElement(Attributes.TR); } COM: <s> appends free cells to the number of columns </s>
funcom_train/9689214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ASTImpl getBodyAST() { ASTImpl node = (ASTImpl) getOffsetNode().getFirstChild(); while ((node != null) && (node.getType() != JavaTokenTypes.SLIST)) { node = (ASTImpl) node.getNextSibling(); } return node; } COM: <s> gets ast node corresponding to the body of this method </s>
funcom_train/15743657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAwarenessDetailString(User user) { List<String> details = getAwarenessDetails(user); StringBuilder sb = new StringBuilder(); boolean first = true; for (String detail : details) { sb.append((first ? "" : " - ") + detail); first = false; } return sb.toString(); } COM: <s> returns a dash separated string describing the current user state </s>
funcom_train/1540343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (springsChanged) { registerComponents(horizontalGroup, HORIZONTAL); registerComponents(verticalGroup, VERTICAL); } StringBuffer buffer = new StringBuffer(); buffer.append("HORIZONTAL\n"); dump(buffer, horizontalGroup, " ", HORIZONTAL); buffer.append("\nVERTICAL\n"); dump(buffer, verticalGroup, " ", VERTICAL); return buffer.toString(); } COM: <s> returns a textual description of this group layout </s>