__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9054166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillColumnNamesMapping(String[] actualColumNames, String[] uiColumnList) { for(int i = 0; i < uiColumnList.length; i++) { //0th column = Row identifier if(i == 0) columnNameMap.put(uiColumnList[i], ROW_ID); else columnNameMap.put(uiColumnList[i], actualColumNames[i-1]); } } COM: <s> fill the map for ui display column names and actual colum nnames </s>
funcom_train/13287088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { try { Country country = (Country) obj; return new EqualsBuilder() .append(this.getCode(), country.getCode()) .isEquals(); } catch (ClassCastException e) { // The given object is not a country, therefore they are not equal. return false; } } COM: <s> compares this country with the given object for equality </s>
funcom_train/4360830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Realm getRealm() { Realm configured=super.getRealm(); // If no set realm has been called - default to JAAS // This can be overriden at engine, context and host level if( configured==null ) { configured=new JAASRealm(); this.setRealm( configured ); } return configured; } COM: <s> provide a default in case no explicit configuration is set </s>
funcom_train/8087791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertReverseSorted(final int idx, final double distance) { java.util.Enumeration en = this.elements(); ListNode temp; int i=0; while(en.hasMoreElements()) { temp = (ListNode) en.nextElement(); if(temp.distance < distance) break; i++; } this.insertElementAt(new ListNode(idx, distance), i); } COM: <s> inserts an element in reverse sorted order in </s>
funcom_train/3888100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSchemaversionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExtendType_schemaversion_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ExtendType_schemaversion_feature", "_UI_ExtendType_type"), ImsldV1p0Package.Literals.EXTEND_TYPE__SCHEMAVERSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the schemaversion feature </s>
funcom_train/45469294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void releaseLock(final TransactionContext tx, final OID oid) { ObjectLock lock; TypeInfo typeInfo; typeInfo = (TypeInfo) _typeInfo.get(oid.getName()); lock = typeInfo.release(oid, tx); lock.getOID().setDbLock(false); } COM: <s> called at transaction commit or rollback to release all locks </s>
funcom_train/28107956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Init the GUI // Seting up look and feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } // Initiaizing the window frames and GUI components configuratorGUI.init(); } COM: <s> here begins the real work </s>
funcom_train/9161975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { m_target = null; m_connectionGraph = new DefaultDirectedGraph<Concept,DefaultEdge>(DefaultEdge.class); m_vertexQueries = new HashMap<Concept,Query>(); setChanged(); notifyObservers(new ObservableData(ObservableEvent.CLEARED)); } COM: <s> clears the model driven workspace </s>
funcom_train/19794400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void addContactGroup(String nameGroup) throws UnsupportedEncodingException { try { ContactGroupDAO.addContactGroup(nameGroup); } catch (SQLException ex) { Logger.getLogger(TasksBUS.class.getName()).log(Level.SEVERE, null, ex); return; } } COM: <s> add contact group to database </s>
funcom_train/32051804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readMetric(ProfileScenario scenario) throws XMLStreamException { final ProfileMetric metric = new ProfileMetric(xml.getAttribute("key")); metric.setType(MetricType.valueOf(xml.getAttribute("type"))); metric.setValue(Double.valueOf(xml.getAttribute("value"))); scenario.addMetric(metric); xml.consume(); } COM: <s> reads a metric from the xml stream </s>
funcom_train/26336131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContainerCharsCapableOf( GameAction action ) { String str = ""; Iterator iter = this.contains.iterator(); while( iter.hasNext() ) { GameItem item = (GameItem) iter.next(); if( item == null ) continue; if( action == null || item.canDo( action )) str = str + this.getContainerChar( item.getID() ); } return str; } COM: <s> return all container chars items capable of a game action type </s>
funcom_train/36767078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(int index, Collection c) { boolean ret = super.addAll(index,c); Iterator it = c.iterator(); while( it.hasNext() ) { AbstractQueryImpl q = (AbstractQueryImpl)it.next(); this.element.appendChild(q.getElement()); } return ret; } COM: <s> adds query data objects from another collection at a certain index </s>
funcom_train/18426593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IWorkbenchPart part, ISelection selection){ IStructuredSelection ssel = (IStructuredSelection)selection; if(ssel.getFirstElement() instanceof TreeChild){ TreeChild element = (TreeChild)ssel.getFirstElement(); try{ viewer.setDocument(new Document(element.getInfo())); }catch(Exception e){ e.printStackTrace(); } }else{ viewer.setDocument(new Document("WS-CDL Information Viewer")); } } COM: <s> notifies this listener that the selection has changed </s>
funcom_train/16677957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTab(Profile profile, XTabFolder folder) { XTabItem itm = new XTabItem(folder, SWT.NONE); itm.setTextForLocaleKey("ControlOverviewPanel.item.title.cop", profile.getName( )); //$NON-NLS-1$ COPComposite comp = new COPComposite(folder, SWT.NONE, profile); itm.setControl(comp); } COM: <s> creates the cop tab for the given profile in the given tab </s>
funcom_train/42824388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node elementMouseIsHoveringOver(int x, int y) { int yOffset = 0; int xOffset = 0; if (x > TBSGraphics.LINE_OF_DEATH) { yOffset = view.getYOffset(); xOffset = view.getXOffset(); } for (ModelElement me : model.inTreeElements()) { if (me instanceof Node && me.contains(x + xOffset, y + yOffset)) return (Node) me; } return null; } COM: <s> returns the identity of the node at x y </s>
funcom_train/12158097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeGetJDBCConnection () { out.println (); GenerateUtilities.formatParagraph (out, " // ", "Cast the repository connection to a JDBCRepositoryConnection."); out.println (" JDBCRepositoryConnection jdbcConnection"); out.println (" = (JDBCRepositoryConnection) connection;"); } COM: <s> write code which gets the jdbcrepository connection from the </s>
funcom_train/51783481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDrawGridLne() { mockG2d.expects(once()).method("setStroke"); mockG2d.expects(once()).method("setColor"); mockG2d.expects(once()).method("draw"); drawingContext.drawGridLine(0, 1, 100, 101); } COM: <s> tests the draw grid line method </s>
funcom_train/331245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAllProcessingGroups() { for ( String name : this.processes.keySet() ) { ProcessGroup g = this.processes.get( name ); g.linearAverageSpectraProcess.destroyProcess(); removePamProcess( g.linearAverageSpectraProcess ); g.normalizerProcess.destroyProcess(); removePamProcess( g.normalizerProcess ); g.spectralEtiProcess.destroyProcess(); removePamProcess( g.spectralEtiProcess ); g.thresholdDetectorProcess.destroyProcess(); removePamProcess( g.thresholdDetectorProcess ); } this.processes.clear(); } COM: <s> removes the all processing groups </s>
funcom_train/1529702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSpreadsheetLabelWithDollars(boolean col$, boolean row$) { String colName = getSpreadsheetColumnName(spreadsheetCoords.x); String rowName = Integer.toString(spreadsheetCoords.y + 1); StringBuilder sb = new StringBuilder(label.length() + 2); if (col$) sb.append('$'); sb.append(colName); if (row$) sb.append('$'); sb.append(rowName); return sb.toString(); } COM: <s> returns the spreadsheet reference name of this geo element using signs </s>
funcom_train/21821707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLeaveChannel() { System.out.println("leaveChannel"); mchattie.Session session = null; String channel = ""; String reason = ""; mchattie.Admin instance = new mchattie.Admin(); instance.leaveChannel(session, channel, reason); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of leave channel method of class mchattie </s>
funcom_train/32057475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSelectionCell() { System.out.println("testSetSelectionCell"); JGraph jp = new JGraph(); DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp); Object obj = new Object(); dg.setSelectionCell(obj); assertEquals(dg.getSelectionCell(),obj); } COM: <s> this function tests set selection cell function of default graph cell class </s>
funcom_train/12687300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void linkLabel(QName key, JLabel label) throws DataSetException { IDataControl control = new LabelDataControl(label); linkDataControl(key, control); control.setDescription("Label"); control.setValueTranslator(EmptyValueTranslator.getInstance()); control.setValueValidator(EmptyValueValidator.getInstance()); } COM: <s> helper method to bind a label </s>
funcom_train/24000663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToConcrete() { PropertyCallAst instance = new PropertyCallAst(-1, TokenFactory.createToken(-1), "oclType"); OclExpressionAst source = new TestOclExpressionAst("source", OclObjectFactory.FALSE); instance.addChild(source); assertEquals("source.oclType",instance.toConcrete()); } COM: <s> test of to concrete method of class property call ast </s>
funcom_train/26433025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResultDBBeanHome getResultDBBeanHome(InitialContext initialCtx) { try { if(null != initialCtx) { return (ResultDBBeanHome) PortableRemoteObject.narrow(initialCtx.lookup("ejb/mhptester_server/ResultDBBean"),ResultDBBeanHome.class); } } catch(Exception ex) { logger.error( "Error locating ResultDBBeanHome: " + ex ); return null; } return null; } COM: <s> retrieves the result dbhome </s>
funcom_train/28151680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type transpose() { if ((arities & (1<<2))==0) return EMPTY; TempList<ProductType> ee=new TempList<ProductType>(); int aa=0; for(ProductType a:this) if (a.types.length==2) aa=add(ee, aa, a.transpose()); return make(false, false, ee.makeConst(), aa); } COM: <s> returns a new type a a is binary and a is in this </s>
funcom_train/20899888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getPixelAt(int xp, int yp, int zp) { int x = xp + bounds.xmin; int y = yp + bounds.ymin; int z = zp + bounds.zmin; if (xp < 0 || yp < 0 || zp < 0 || xp >= width || yp >= height || zp >= depth) return 0; return volume.getVoxelUnchecked(x, y, z); } COM: <s> this is a helper function to determine if pixels outside this region is </s>
funcom_train/19746840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { ObjectCountInfo info = (ObjectCountInfo) o; if (this.getUniqueCount().equals(info.getUniqueCount())) { return -this.getTotalCount().compareTo(info.getTotalCount()); } else { return -this.getUniqueCount().compareTo(info.getUniqueCount()); } } COM: <s> p compares this object with the specified object for order </s>
funcom_train/44714732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertPositionInRange(int position, int upperLimit) { try { FormBuilderUtil.assertArgumentInRange(position, 1, upperLimit); } catch (Exception e) { throw new IllegalArgumentException("position " + Integer.toString(position) + " provided to " + this.toString() + " is invalid" + ", should be between 1 and " + Integer.toString(upperLimit)); } } COM: <s> assert that the position is between 1 and the given upper limit </s>
funcom_train/24321290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // create the request RobotAdjacencyPair.Request req = new RobotAdjacencyPair.Request(); req.actor.id = actor; // then find the response try { RobotAdjacencyPair.Response res = apsrv.call(req); // determine what to return if (res.result.value == Flag.SUCCESS) { response = res.action.value; } else response = APAction.NO_ACTION; } catch (Exception e) { response = APAction.NO_ACTION; } }; COM: <s> the robot is initiating an adjacency pair </s>
funcom_train/10258058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RootData load(String filename, FileLoader loader) throws FileIOException { if (!(new File(filename).exists())) throw new FileIOException(FileIOException.ERR_NOSUCHFILE, filename); if (loader.canHandle(filename)) return loader.load(filename); else throw new FileIOException(FileIOException.ERR_UNSUPPORTEDFORMAT, filename); } COM: <s> tries to load data from disk using the specified loader module </s>
funcom_train/11393516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void genDirStructure() throws IOException { BufferedReader in = new BufferedReader( new FileReader(new File(inDir, StructureGenerator.DIR_STRUCTURE_FILE_NAME))); String line; while ((line=in.readLine()) != null) { fc.mkdir(new Path(root+line), FileContext.DEFAULT_PERM, true); } } COM: <s> read directory structure file under the input directory </s>
funcom_train/22048018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void menuMinimizeAll_actionPerformed(ActionEvent e) { if (windowList != null) { for (int i = 0; i < windowList.getNumWindows(); i++) { DesktopItem item = windowList.getDesktopAt(i); if ((item != null) && item.isDesktopItemMinable()) { item.minimizeDesktopItem(); } } } } COM: <s> minimize all desktop items menu option </s>
funcom_train/32228865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delListAuthorityTheoGid(String gid) { DetachedCriteria criteria = DetachedCriteria.forClass(SecGroupAuthoritiesBO.class); //Create Alias criteria.createAlias("group_id", "grp"); //Add Criteria criteria.add(Property.forName("grp.gid").eq(gid)); List<SecGroupAuthoritiesBO> resultList = this.getHibernateTemplate().findByCriteria(criteria); //Delete list of GroupAuthoritiesBO for(SecGroupAuthoritiesBO secGroupAuthor:resultList) { this.delete(secGroupAuthor); } } COM: <s> del list authority theo gid </s>
funcom_train/3340240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hide() { if (!_visible) { System.err.println("Trying to hide window " + this + " that is already hidden!"); return; // This window is already hidden. } _term.removeWindow( this ); _visible = false; WindowEvent we = new WindowEvent(this, AWTEvent.WINDOW_CLOSING); _term.getSystemEventQueue().postEvent(we); } COM: <s> hide this window and all of its contained components </s>
funcom_train/7368454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { setStatus(0); try { try { Thread.sleep(50); } catch (final InterruptedException e) { } handler.connection.send(message); setStatus(1); } catch (final InterruptedIOException e) { setStatus(-1); } catch (final IOException e) { setStatus(-2); } } COM: <s> implementation of runnable interface </s>
funcom_train/12173519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CapabilitySupportLevel getSupportType(String attributeName) { CapabilitySupportLevel supportType = null; if (attributeName != null && !attributeName.equals("")) { Object supportObject = supportedAttributes.get(attributeName); if (supportObject instanceof CapabilitySupportLevel) { supportType = (CapabilitySupportLevel) supportObject; } } return supportType; } COM: <s> get the support level provided for a given attribute on this element by </s>
funcom_train/47677939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNodeName() { if (this.nodeName == null) { if (getUserObject() instanceof Field) { nodeName = ((Field)getUserObject()).getName(); } else { logger.warn("UserObject is not of type Field, cannot set default node name"); } } return nodeName; } COM: <s> get the name set in the dom node that may be different from </s>
funcom_train/11653799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createPasswordPanel() { JPanel panel = new JPanel(new BorderLayout(5, 0)); JLabel label = new JLabel(JMeterUtils.getResString("password")); // $NON-NLS-1$ label.setLabelFor(password); panel.add(label, BorderLayout.WEST); panel.add(password, BorderLayout.CENTER); return panel; } COM: <s> create a panel containing the password field and corresponding label </s>
funcom_train/2286750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void increment() { if (m_number < 1999999999999L) { m_number += (long)Math.pow(1000.0, (4 - m_dots)); setVersion(m_number); } else { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_MODULE_VERSION_NUMBER_0)); } } COM: <s> increments this version number by 1 in the last digit </s>
funcom_train/16514793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IWorkbenchPart part, ISelection selection) { // only react on changes in the selection view: if (!(part instanceof SelectionView)) { return; } StructuredSelection sselection = (StructuredSelection) selection; if (sselection.getFirstElement() instanceof IVisualizationData) { IVisualizationData visData = (IVisualizationData) sselection .getFirstElement(); if (currentVisualizationData != visData) { currentVisualizationData = visData; updateAll(); } } } COM: <s> listens for selection changes in the chart selection view and updates the </s>
funcom_train/29063112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AdviceType_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AdviceType_name_feature", "_UI_AdviceType_type"), AspectxPackage.eINSTANCE.getAdviceType_Name(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/21606246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTargetSetClass(Class targetSetClass) { if (targetSetClass == null) { throw new IllegalArgumentException("'targetSetClass' must not be null"); } if (!Set.class.isAssignableFrom(targetSetClass)) { throw new IllegalArgumentException("'targetSetClass' must implement [java.util.Set]"); } this.targetSetClass = targetSetClass; } COM: <s> set the class to use for the target set </s>
funcom_train/16833761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPlayerStanding(final User player) { if (leaguesStandingExpression == null) { throw new IllegalArgumentException( "Undefined expression to the league " + getName()); } try { return leaguesStandingExpression.evaluate(new LeagueContext(this, player)); } catch (UnknownVariableException e) { throw new UnknownVariableException(BLMSMessages.UNKNOWN_STANDING_VARIABLE); } catch (ArithmeticException e) { throw new ArithmeticException(BLMSMessages.DIVISION_BY_ZERO_IN_STANDINGS); } } COM: <s> returns the standing of the player </s>
funcom_train/22880646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrdersListItem cancelOrder(long id, String playerName){ if(this.canCancelOrder(id, playerName)){ OrdersListItem oItem = this.getOrder(id, this.buyList); if(oItem==null){ oItem = this.getOrder(id, this.sellList); this.sellList.remove(oItem); this.activatedOrders(true); }else{ this.buyList.remove(oItem); this.activatedOrders(false); } return oItem; } return null; } COM: <s> removes specified order and returns what was removed </s>
funcom_train/12182769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action createSelectAllAction(final TableViewer viewer) { Action selectAllAction = new Action() { public void run() { viewer.getTable().selectAll(); } }; selectAllAction.setText(EditorMessages.getString(RESOURCE_PREFIX + "selectAll.action")); return selectAllAction; } COM: <s> returns a select all action for the specified table viewer </s>
funcom_train/37447592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void beginTable(AnnotatedObject anObject) throws IOException { if (null == tableLevel) { write("<table width=100% bgcolor=\"" + tableBackgroundColor + "\">"); tableLevel = anObject.getClass(); logger.info("HtmlBuilder starts table level: " + tableLevel); } } COM: <s> start a new html table if currently no table is open </s>
funcom_train/5081899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getMoveChildrenCommand(Request request) { CompoundCommand command = new CompoundCommand(); List editParts = ((ChangeBoundsRequest)request).getEditParts(); EditPart insertionReference = getInsertionReference(request); for (int i = 0; i < editParts.size(); i++) { EditPart child = (EditPart)editParts.get(i); command.add(createMoveChildCommand(child, insertionReference)); } return command.unwrap(); } COM: <s> a move is interpreted here as a change in order of the children </s>
funcom_train/28773594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getBudget() { if (budget == null) {//GEN-END:|39-getter|0|39-preInit // write pre-init user code here budget = new TextField("Budget", null, 32, TextField.DECIMAL);//GEN-LINE:|39-getter|1|39-postInit // write post-init user code here }//GEN-BEGIN:|39-getter|2| return budget; } COM: <s> returns an initiliazed instance of budget component </s>
funcom_train/41604284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initExecutables() { Action execute = createBoundAction(MATCH_ACTION_COMMAND, "match"); getActionMap().put(ActionManager.EXECUTE_ACTION_COMMAND, execute); getActionMap().put(MATCH_ACTION_COMMAND, execute); refreshEmptyFromModel(); } COM: <s> creates and registers all executable actions </s>
funcom_train/16594393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existsDefaultOrderManager() { try { ExtensionPoint ep = (ExtensionPoint) ExtensionPointsSingleton.getInstance(). get(DefaultOrderManager.getExtensionPointName()); if (ep!=null) { Object obj = ep.create(DefaultOrderManager.getDefaultManagerKey()); if (obj!=null) { return true; } } } catch (Exception ex) { Logger.getLogger(MapContext.class).warn("Error getting default layer order manager", ex); } return false; } COM: <s> checks whether an order manager was configured as default in the </s>
funcom_train/33944169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFormulaServiceRound() { String formula = "<A2> + <B2> RoUND <C2> + <C3> "; double realResult = 8.123; HashMap argumentMap = new HashMap(); argumentMap.put("<A2>",new Double(2)); argumentMap.put("<B2>",new Double(3.123)); argumentMap.put("<C2>",new Double(4)); argumentMap.put("<C3>",new Double(3)); formula(formula,realResult,argumentMap); } COM: <s> test the formula service for round </s>
funcom_train/31890731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toElement() { Element root = DocumentHelper.createElement("message"); root.addElement("body").addElement("text").setText(text); root.addElement("sender").setText(username); root.addElement("roomname").setText(roomname); root.addElement("roompath").setText(roompath); return root; } COM: <s> stores the message as xml </s>
funcom_train/1864708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue(Element givenElement) { if (hasChildren(givenElement) || givenElement == null) { return null; } else { // Element has no child elements, but it may have children if (givenElement.getFirstChild() != null) { // Has a child (<element>child</element>) return givenElement.getFirstChild().getNodeValue(); } else { // No children at all (<element />) return null; } } } COM: <s> get the value of the given element </s>
funcom_train/33373911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { try { DefaultNetViewCoordinates otherCoordinates = (DefaultNetViewCoordinates) obj; return(otherCoordinates.x==x && otherCoordinates.y==y); } catch(java.lang.ClassCastException e) { System.out.println(e); } return(false); } COM: <s> tests if these coordinates are equal to the given </s>
funcom_train/32348115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void postLine() throws IOException { if (center) { int adjustment = Math.max(0, (lineLength - lineBuf.length()) / 2); char[] skootch = new char[adjustment]; Arrays.fill(skootch, ' '); out.write(skootch); } out.write(lineBuf.toString()); } COM: <s> write out the characters in the line buffer optionally centering this </s>
funcom_train/39288669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNsPrefixPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Import_nsPrefix_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Import_nsPrefix_feature", "_UI_Import_type"), SdlPackage.eINSTANCE.getImport_NsPrefix(), false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ns prefix feature </s>
funcom_train/21189395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publish(Element cruisecontrolLog) throws CruiseControlException { boolean status = this.connect(); XMLLogHelper helper = new XMLLogHelper(cruisecontrolLog); String message = createMessage(helper); if (status) { try { YahooPublisher.connection.sendMessage(recipient, message); Thread.sleep(5 * 1000); } catch (Exception e) { LOG.error("Error sending message to buddy: " + e.getMessage()); } } } COM: <s> publish the results to the yahoo transport via an instant message </s>
funcom_train/9652254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private E removeAt(int i) { assert i >= 0 && i < size; modCount++; int s = --size; if (s == i) {// removed last element queue[i].index = -1; queue[i] = null; } else { E moved = (E) queue[s]; moved.index = -1; queue[s] = null; siftDown( i, moved ); if (queue[i] == moved) { siftUp( i, moved ); if (queue[i] != moved) return moved; } } return null; } COM: <s> removes the ith element from queue </s>
funcom_train/3118901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPanning(final boolean flag) { panActive = flag; if (panActive) { final PRoot root = radarCanvas.getRoot(); panCamera(panActivity.getDx(), panActivity.getDy()); // Do the rest of the scrolling after a short delay (500ms). panActivity.setStartTime(root.getGlobalTime() + 500); root.addActivity(panActivity); } else { panActivity.terminate(); } } COM: <s> sets whether a pan control is active </s>
funcom_train/3158631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalValues(Parameter parameter, Object value1, Object value2) { Number n1 = castToNumber(value1); Number n2 = castToNumber(value2); if (n1 == n2) { return true; } if (n1 == null && n2 != null) { return false; } if (n1 != null && n2 == null) { return false; } return n1.equals(n2); } COM: <s> compares two parameter values for equality </s>
funcom_train/27780181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputStream getReaderFile(IListMeta ilm, InputStream def) { try { if (ilm.isSeparated()) { return new BufferedInputStream( new FileInputStream(location + ilm.getTermText() + ".sep")); } else { return def; } } catch (IOException x) { logger.log(Level.WARNING, "getReaderFile", x); return null; } } COM: <s> gets the reader file attribute of the thick barrel in object </s>
funcom_train/8689271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void pack() { GZIPOutputStream zOut = null; try { zOut = new GZIPOutputStream(new FileOutputStream(zipFile)); zipResource(getSrcResource(), zOut); } catch (IOException ioe) { String msg = "Problem creating gzip " + ioe.getMessage(); throw new BuildException(msg, ioe, getLocation()); } finally { FileUtils.close(zOut); } } COM: <s> perform the gzip compression operation </s>
funcom_train/22368089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean clearCache(Cache cache) { try { cache.removeAll(); } catch (IllegalStateException e) { Logger.info(COULD_NOT_DELETE_ALL_FILES_FROM_CACHE, cache.getName()); return true; } catch (CacheException e) { Logger.info(COULD_NOT_DELETE_ALL_FILES_FROM_CACHE, cache.getName()); return true; } return false; } COM: <s> clears a cache returning true if some error happened </s>
funcom_train/15865745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initCache(){ lock.lock(); try{ if( cache == null ){ CacheManager manager = CacheManager.getInstance(); String cacheName = JetMashupProxy.class.getName() + ".cache"; if( ! manager.cacheExists(cacheName) ){ manager.addCache( cacheName ); } cache = manager.getCache( cacheName ); } cache.removeAll(); }finally{ lock.unlock(); } } COM: <s> method to initialize the ehcache initialze only if not aready done </s>
funcom_train/2327777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AbstractMatrix2D vDice() { int tmp; // swap; tmp = rows; rows = columns; columns = tmp; tmp = rowStride; rowStride = columnStride; columnStride = tmp; tmp = rowZero; rowZero = columnZero; columnZero = tmp; // flips stay unaffected this.isNoView = false; return this; } COM: <s> self modifying version of view dice </s>
funcom_train/47184151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSmoked(long patientID) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn .prepareStatement("SELECT * FROM PersonalHealthInformation WHERE PatientID=? AND Smoker=1"); ps.setLong(1, patientID); return ps.executeQuery().next(); // if this query has ANY rows, then yes } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> returns if the patient has ever smoked in their life </s>
funcom_train/18899460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitForPrefetchThread() throws RMITimeoutException { if (prefetchThread != null) { try { prefetchThread.join(timeout); } catch (InterruptedException ie) { // Not concerned about interruptions, only in finishing } if (!prefetchThread.hasFinished()) { // abandon the joining thread prefetchThread = null; throw new RMITimeoutException("No data returned within " + timeout + "ms"); } } } COM: <s> wait on the prefetched page if it is already coming in </s>
funcom_train/19130555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void DataRecieved(byte[] bytes) { //System.out.println(getClass().getName() + " Bytes Recv'd = " + bytes);// convert the bytes to a String before output this.bytes = new byte[bytes.length]; System.arraycopy(bytes, 0, this.bytes, 0, bytes.length); bytesRecieved = true; } COM: <s> data arrived event </s>
funcom_train/39912358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object transform(Object target) { List list = new ArrayList(); AbstractReferenceData data = null; Collection col = (Collection)target; if (!col.isEmpty()) { Iterator iterate = col.iterator(); while (iterate.hasNext()) { data = (AbstractReferenceData)iterate.next(); Map map = new HashMap(); map.put("value", data.getId()); map.put("label", data.getName()); list.add(map); } } return list; } COM: <s> transforms any collection of jds value objects in to a map containing </s>
funcom_train/8066817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FigNode getFigNodeFor(Object node, int x, int y, Map styleAttributes) { FigNode figNode = null; if (node instanceof NetNode) { figNode = ((NetNode) node).presentationFor(null); figNode.setLocation(x, y); } return null; } COM: <s> return a fig that can be used to represent the given node </s>
funcom_train/2748046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFlowId(RequestContext context) { HttpServletRequest request = ((ServletExternalContext) context.getExternalContext()).getRequest(); IDataComposer dataComposer = HDIVUtil.getDataComposer(request); String _flowExecutionValue = context.getExternalContext().getRequestParameterMap().get("_flowExecutionKey"); if (_flowExecutionValue != null) { dataComposer.addFlowId(_flowExecutionValue); } } COM: <s> adds the flow identifier to the page of type code ipage code </s>
funcom_train/29838166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSession(Session s) { sessions.add(s); if (s instanceof EditorSession) { SelectionModel selModel = new SelectionModel(); ((EditorSession) s).setSelectionModel(selModel); for (Iterator<SelectionListener> it = selectionListeners.iterator(); it.hasNext();) { selModel.addSelectionListener(it.next()); } selModel.add(new Selection(sBundle.getString("activeSelection"))); selModel.setActiveSelection(sBundle.getString("activeSelection")); } } COM: <s> adds the given session to the list of sessions </s>
funcom_train/17084393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBotIniciar() { if (botIniciar == null) {//GEN-END:|25-getter|0|25-preInit // write pre-init user code here botIniciar = new Command("Iniciar", "Iniciar Partida", Command.ITEM, 0);//GEN-LINE:|25-getter|1|25-postInit // write post-init user code here }//GEN-BEGIN:|25-getter|2| return botIniciar; } COM: <s> returns an initiliazed instance of bot iniciar component </s>
funcom_train/50091023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSpatproduct(Vector3d a, Vector3d b, Vector3d c) { return (c.x * (b.y * a.z - b.z * a.y) + c.y * (b.z * a.x - b.x * a.z) + c.z * (b.x * a.y - b.y * a.x)); } COM: <s> gets the spatproduct of three vectors </s>
funcom_train/32057845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetScrollPane() { System.out.println("testSetScrollPane"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.setScrollPane(null); } catch (Exception e) { fail(); } } COM: <s> test of set scroll pane method of class gpdocument </s>
funcom_train/51297714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearUnvalidFields(GregorianCalendar gc) { if (hour == -1) { gc.clear(Calendar.HOUR_OF_DAY); } if (minute == -1) { gc.clear(Calendar.MINUTE); } if (year == -1) { gc.clear(Calendar.YEAR); } if (month == -1) { gc.clear(Calendar.MONTH); } if (weekOfYear == -1) { gc.clear(Calendar.WEEK_OF_YEAR); } if (weekOfMonth == -1) { gc.clear(Calendar.WEEK_OF_MONTH); } if (dayOfMonth == -1) { gc.clear(Calendar.DAY_OF_MONTH); } if (dayOfWeek == -1) { gc.clear(Calendar.DAY_OF_WEEK); } } COM: <s> clears unused fields in the calendar </s>
funcom_train/31133222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSample(AvnmpStateQueue s, AvnmpTime lvt, AvnmpTime t, AvnmpLP mylp) { for(Enumeration e = elements(); e.hasMoreElements();) { PredMeasure pm = (PredMeasure) e.nextElement(); pm.addSample(s, lvt.time(), t.time(), mylp); } } COM: <s> add a sample to all the relevant pred measure elements </s>
funcom_train/26224507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SwitchboardServer () { Properties props = Configuration.getConfiguration("switchoard_server"); int port = DEFAULT_PORT; String portString = props.getProperty ("port.insecure"); try { port = Integer.parseInt (portString); } catch (Exception anyExc) { Logger.getLogger ("org.noses.tttn.sb").warn ("Could not parse port value "+portString+ ". Using default of "+port); } init (port, null, false); } COM: <s> starts the switchboard server on the default port and listens on </s>
funcom_train/26336337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoveHate( GameCharacter character, double like ) { if( like < -1.0 ) like = -1.0; else if( like > 1.0 ) like = 1.0; Double ld = new Double( like ); this.abtChars.put( (Object) character, (Object) ld ); } COM: <s> set friend enemy value for a specific game character </s>
funcom_train/1835286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public YamlText (YamlText parent, int line) throws GamlException { setLineBreak (parent.getLineBreak ()); setIdentationString (parent.getIdentationString ()); int shift = parent.getIdentation (line); while (! parent.isEnd (++line)) if (shift >= parent.getIdentation (line)) break; else lines.add (new YamlLine (parent.getValue (line), identString, shift)); } COM: <s> create new yaml text object </s>
funcom_train/36643331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void NNI(NodeRef node1, int neighbour, int A, int B) { if (neighbour == A) throw new IllegalArgumentException(); NodeRef node2 = getNeighbour(node1, neighbour); NodeRef nA = getNeighbour(node1, A); NodeRef nB = getNeighbour(node2, B); addEdge(node1, nB, getBranchLength(node1, A)); addEdge(node2, nA, getBranchLength(node2, B)); removeEdge(node1, nA); removeEdge(node2, nB); } COM: <s> swap node a with node b across focal edge between node1 and node2 </s>
funcom_train/34973783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getGlobalTimestamp() { long timestamp = System.currentTimeMillis(); Long lastTimestamp = (Long) Memcache.get(MC_KEY_TIMESTAMP); if (lastTimestamp != null && lastTimestamp >= timestamp) { timestamp = lastTimestamp + 1; } Memcache.put(MC_KEY_TIMESTAMP, timestamp); return timestamp; } COM: <s> returns a global time stamp </s>
funcom_train/24558383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Workspacecounter merge(Workspacecounter detachedInstance) { LOG.debug("merging Workspacecounter instance"); try { Workspacecounter result = (Workspacecounter) getSession().merge( detachedInstance); LOG.debug("merge successful"); return result; } catch (RuntimeException re) { LOG.error("merge failed", re); throw re; } } COM: <s> merges the specified instance </s>
funcom_train/25503580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileScannerResultNode addFormat(String formatName, long formatStart, long formatEnd) { assert formatName != null; final long clampedEnd = clampEnd(formatEnd); final long clampedStart = clampStart(formatStart, formatEnd); final FileScannerResultNode node = new FileScannerResultNode(this, FileScannerResultType.FORMAT, formatName, this.input, clampedStart, clampedEnd); addChildNode(node); updateEndPosition(node.end); return node; } COM: <s> add a child node of type code format code to this node </s>
funcom_train/12116372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disableTwoSidedLighting() { logger.debug("Two Sided Lighting disabled"); Boolean cached = (Boolean) opengl.getStateMachine().get(GL.GL_LIGHT_MODEL_TWO_SIDE); if (cached==null || Boolean.TRUE.equals(cached)){ opengl.getStateMachine().set(GL.GL_LIGHT_MODEL_TWO_SIDE, Boolean.FALSE); opengl.getGl().glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, GL.GL_FALSE); } } COM: <s> disables lighting back faces calculations </s>
funcom_train/3847699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newLine(String line) { if( line == null ) return; line = line.trim(); if( filePrefix == null && line.startsWith(NS_ID) && line.length() > NS_ID.length()) setFilePrefix(line); if( line.trim().equals(sender) || line.trim().equals(receiver) ) return; message.append(line).append(lineSeparator); } COM: <s> a new line was read for the current message </s>
funcom_train/16593373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPSelectionButtons() { if (pSelectionButtons == null) { FlowLayout flowLayout1 = new FlowLayout(); flowLayout1.setAlignment(FlowLayout.LEFT); pSelectionButtons = new JPanel(); pSelectionButtons.setLayout(flowLayout1); pSelectionButtons.setName("pSelectionButtons"); pSelectionButtons.add(getBotSelectAll(), null); pSelectionButtons.add(getBotDeselectAll(), null); } return pSelectionButtons; } COM: <s> this method initializes p selection buttons </s>
funcom_train/40386150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaders() { int numHeaders = 1; //Set HTTP headers headers = new Header[numHeaders]; // Set User-Agent headers[0] = new Header("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0"); } COM: <s> sets the kerberos authentication headers when authorizing </s>
funcom_train/9270025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof ConsistencyToken)) return false; ConsistencyToken ct = (ConsistencyToken) o; int len = bytes.length; if (len != ct.bytes.length) return false; for (int i = 0; i < len; ++i) { if (bytes[i] != ct.bytes[i]) return false; } return true; } COM: <s> check whether this object is equal to another object </s>
funcom_train/130292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FiducialInterface (PlayerClient pc, short indexOfDevice) { super(pc); device = PLAYER_FIDUCIAL_CODE; index = indexOfDevice; // create the new items for (int i = 0; i < fiducials.length; i++) { fiducials[i] = new PlayerFiducialItem(); } } COM: <s> constructor for fiducial interface </s>
funcom_train/51186274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(BusData data, final int notifyMethod) { data = (data != null)? data : new BusData(); final BusDispatcher dispatcher = (BusDispatcher) busDispatchers.get(data.getBus()); if (dispatcher != null){ dispatcher.dispatch(data, notifyMethod); } } COM: <s> sends action data on the specified bus this method is blocking </s>
funcom_train/2290323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExplorerButtonStyle(String buttonstyle) { int buttonstyleValue = BUTTONSTYLE_TEXTIMAGE; try { if (buttonstyle != null) { buttonstyleValue = BUTTON_STYLES_LIST.indexOf(buttonstyle); } } catch (Exception e) { // do nothing, use the default value } setExplorerButtonStyle(buttonstyleValue); } COM: <s> sets the style of the explorer workplace buttons of the user </s>
funcom_train/17394103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(){ try{ if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1){ localAddress = getLocalAddressForWindows(); }else{ localAddress = getLocalAddressForLinux(); } udpSocket = new DatagramSocket(PORT); udpSocket.setBroadcast(true); }catch(SecurityException se){ logger.error("Client init failed!", se); }catch(SocketException se){ logger.error("Client init failed!", se); } } COM: <s> initialize the local address and udp socket </s>
funcom_train/3891973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IViewPart showViewPart(String viewPartName) { IWorkbenchPage page = getWorkbench().getActiveWorkbenchWindow().getActivePage(); IViewPart viewPart = null; try { viewPart = page.showView(viewPartName); } catch(PartInitException ex) { ex.printStackTrace(); } return viewPart; } COM: <s> attempt to show the given view of hidden or bring it to focus </s>
funcom_train/34130068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( ActionEvent e) { SelectBookmarkDialog dialog = getDialog(); dialog.show( parent.getView().getEditor().getBookmarks()); if (!dialog.isCancelled()) { Bookmark bookmark = dialog.getSelectedBookmark(); parent.getView().getEditor().selectLineWithoutEnd( bookmark.getLineNumber()+1); } } COM: <s> the implementation of the select document action </s>
funcom_train/46205569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visit(String file) { try { if (!Bootstrap.isInitialized()) { Bootstrap.init(); } } catch (ConfigurationException e) { throw new GorillaRuntimeException(logger, "GXE bootstrap failed", e); } try { Module.factory.loadModule(file); assert Preferences.getCurrentModule() != null; } catch (ConfigurationException e1) { throw new GorillaRuntimeException(logger, "Unable to load module " + file); } // visit(SystemFactory.current().defaultModelWorld().model()); } COM: <s> visit a model file </s>
funcom_train/45317101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassword(String password) { try { synchronized (stmtSetPassword) { stmtSetPassword.clearParameters(); stmtSetPassword.setString(1, password); stmtSetPassword.setLong(2, id); stmtSetPassword.execute(); } this.password = password; } catch (SQLException ex) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.SEVERE, null, ex); } } COM: <s> sets user password </s>
funcom_train/32629068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model read( String uri, String base, String lang ) { try { URL url = new URL( uri ); return read( url.openStream(), base, lang ); } catch (IOException e) { throw new OntologyException( "I/O error while reading from uri " + uri ); } } COM: <s> p read the ontology indicated by the given uri </s>
funcom_train/37586394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGrow() { Gap gap0 = new Gap(0, ReducedToken.FREE); Gap gap1 = new Gap(1, ReducedToken.FREE); gap0.grow(5); assertEquals(5, gap0.getSize()); gap0.grow(0); assertEquals(5, gap0.getSize()); gap1.grow(-6); assertEquals(1, gap1.getSize()); } COM: <s> tests the ability to grow a gap </s>
funcom_train/3812803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isActive(Grammar grammar) { if (!grammar.isEnabled()) { return false; } else if (grammar.getActivationMode() == Grammar.GLOBAL) { return true; } else if (testEngineState(FOCUS_ON)) { if (grammar.getActivationMode() == Grammar.RECOGNIZER_MODAL) { return true; } else if (!hasModalGrammars) { return true; } } return false; } COM: <s> determine if the given grammar is active </s>