__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26256327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBufferSpace(int length) { int newLength = len+length; if (newLength > buffer.length) { char[] newBuffer = new char[2*newLength]; System.arraycopy(buffer, 0, newBuffer, 0, len); buffer = newBuffer; } } COM: <s> makes the buffer have room for code len code more chars </s>
funcom_train/24250086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectMe() { if (NativeAddressBook.instance().getMe() != null) { panel.getGroupTable().getSelectionModel() .setSelectionInterval(0, 0); fetchSelectedGroup(false); ((AbstractTableModel) panel.getContactTable().getModel()) .fireTableDataChanged(); panel.getContactTable().getHandler() .selectContact(NativeAddressBook.instance().getMe()); } } COM: <s> changes the current selection to select the me contact </s>
funcom_train/5339460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean appliesTo (String theclass) { return (packagename.equals("*") && classname.equals("*")) || (classname.equals("*") && theclass.startsWith(packagename)) || (theclass.equals(packagename + "." + classname)) || (packagename.equals("<default>") && theclass.equals(classname)); } COM: <s> determine if this filter applies to a given class </s>
funcom_train/21776284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getParameterList() { List retval = new ArrayList( params.keySet().size()); Set temp = params.keySet(); List keys = new ArrayList(temp); Collections.sort(keys); Iterator keyIterator = keys.iterator(); while(keyIterator.hasNext()) { retval.add(params.get(keyIterator.next())); } return retval; } COM: <s> code get parameter list code </s>
funcom_train/47673450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Long getLongAttribute(String p_objectName, String p_attribute) throws NullPointerException, MalformedObjectNameException, MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException { ObjectName objectName = null; objectName = new ObjectName(p_objectName); return (Long) server.getAttribute(objectName, p_attribute); } COM: <s> gets a long attribute from mules mbean server </s>
funcom_train/3909510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMandatory(Element element){ XMLPath elPath = XMLPath.getXMLPathForElement(element); SchemaElement schEl = (SchemaElement) (md.getSchemaController().getSchemaNode(elPath)); // true if the minOccurs is one (?) if(schEl != null){ return schEl.getMinOccurs() == 1; }else{ return false; } } COM: <s> check whether the element is mandatory minoccurs 1 </s>
funcom_train/23689280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeCode lookupVar(String x) { TypeChecker.print("lookupVar(..)"); for (ScopeEntry entry : scopes){ TypeChecker.print("#= "); TypeCode t = entry.getType(x); if (t != null) return t; // should not always search the lower scopes if(!entry.isFallThrough()) break; } //throw new TypeException("Unexpected error"); //return null; // Should never happen throw new TypeException("Unknown variable " + x + "."); } COM: <s> lookup the type of variable x </s>
funcom_train/32741680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String columnName(String entityName, String name) { ddp.initializeNameResolver(nr, entityName); String n = nr.resolveFieldName(entityName, name); if (n == null) { throw new MakumbaError("Fail with " + name); } return n; } COM: <s> converts to the database level column name </s>
funcom_train/4048065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int Get_elements(Datatype datatype) throws MPIException { if (datatype.bufferType.getCode() == type.getCode() ) { return numEls; } else { System.out.println("This status object doesn't contain any numEls" + "of this datatype"); //maybe throw an exception here ...is it really an exception? return 0; } } COM: <s> retrieve number of basic elements from status </s>
funcom_train/13392222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceElement getNamedService(String serviceName) { ServiceElement foundService = null; synchronized (services) { for (Iterator it = services.iterator(); it.hasNext();) { ServiceElement sElem = (ServiceElement) it.next(); if (sElem.getName().equals(serviceName)) { foundService = sElem; break; } } } return (foundService); } COM: <s> get the service with the provided name </s>
funcom_train/32823563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBeCallsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Method_beCalls_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Method_beCalls_feature", "_UI_Method_type"), ModelPackage.eINSTANCE.getMethod_BeCalls(), true, null, null, null)); } COM: <s> this adds a property descriptor for the be calls feature </s>
funcom_train/24121143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_SETVIEWPORTORG); WMFConstants.writeLittleEndian(out, y); WMFConstants.writeLittleEndian(out, x); } COM: <s> writes the content of the set viewport org record to a stream </s>
funcom_train/39813545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringAt(int row, int column) { TableCellRenderer renderer = getCellRenderer(row, column); if (renderer instanceof StringValue) { return ((StringValue) renderer).getString(getValueAt(row, column)); } return StringValues.TO_STRING.getString(getValueAt(row, column)); } COM: <s> returns the string representation of the cell value at the given </s>
funcom_train/46377208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate () { if (embeddedPeer != null) { // OWL issue #74 - make sure to call validate on the AWT event // thread SwingUtilities.invokeLater(new Runnable() { public void run() { if (embeddedPeer != null) { embeddedPeer.validate(); } } }); embeddedPeer.repaint(); } } COM: <s> re lay out the contents of this window </s>
funcom_train/1797265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShowDeleted(Boolean showDeleted) { if (showDeleted == null) { showDeleted = false; } // check if setting to existing value if (!this.showDeleted.equals(showDeleted)) { // set to new value for customer parameter this.showDeleted = showDeleted; setStringCustomParameter("showdeleted", !showDeleted ? null : showDeleted.toString()); } } COM: <s> sets the should tombstones be returned </s>
funcom_train/51812377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSerializeNoParms() throws Exception { serializer.serialize(oos, runMethod); ObjectInputStream ois = new ObjectInputStream( new ByteArrayInputStream( bytesOut.toByteArray())); Method method = serializer.deserialize(ois); assertEquals("Methods not the same", runMethod, method); } COM: <s> test that verifies serialization with a no parameter method </s>
funcom_train/5460965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readText(InputStream input, int firstByte) throws IOException { StringBuilder buffer = new StringBuilder(); int b = firstByte; while (b != LESS_THEN && b != -1) { buffer.append((char) b); b = input.read(); } tokenHandler.text(buffer.toString()); return b; } COM: <s> reads text from the stream and supplies the token to the token handler </s>
funcom_train/16486354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationGlobalNavigation getGlobalNavigation() throws FusionGWException { if( global != null ) return global; try { global = (ApplicationGlobalNavigation) kernel.getObject( registry.getAttribute( "org.fusiongw.navigation.global" ).toString() ); global.init( kernel ); return global; } catch( Exception e ) { throw new FusionGWException( e ); } } COM: <s> get the global navigation </s>
funcom_train/3666018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item newString(final String value) { key2.set('S', value, null, null); Item result = get(key2); if (result == null) { pool.put12(STR, newUTF8(value)); result = new Item(index++, key2); put(result); } return result; } COM: <s> adds a string to the constant pool of the class being build </s>
funcom_train/8904388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeState(Connection connection) { System.out.println("State change from: " + Manager.getInstance().testConnectionState().getClass().getName() + " to: " + connection.getClass().getName()); Manager.getInstance().changeState(connection); } COM: <s> this is used to update the managers reference on the current state </s>
funcom_train/49262965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(final LanguageEntry entry, final LanguageEntry[] parameters) { if (entry == null) { return UNRECOGNIZED_STRING; } if (parameters != null) { String[] stringParams = new String[parameters.length]; for (int i = 0; i < parameters.length; i++) { stringParams[i] = get(parameters[i]); } } return get(entry.getCls(), entry.getEntry()); } COM: <s> gets a value for the given entry with other language entries as parameters </s>
funcom_train/18458713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Block getBlock(String gameName, long id) { if (gameName != null) { Block b = DatabaseManager.getInstance().getBlock(gameName, id); if (b == null && id == 0) { b = new Block(gameName, 0); DatabaseManager.getInstance().persist(gameName, b); } return b; } return guid2block.get(new Long(id)); } COM: <s> returns a block with the given id </s>
funcom_train/3898300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveDown() { if(canMoveDown()) { // Save parent DataComponent parent = getParent(); // Move down in the Data Model int index = parent.indexOfChild(this); parent.removeChild(this); parent.addChildAt(this, index + 1); if(getDataModel() != null) { getDataModel().fireDataComponentMoved(this); } } } COM: <s> move this component down </s>
funcom_train/43866519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void waitMsecs(int maxWaitTime) { // int time; // synchronized (this) { // try { // time = new Random().nextInt(maxWaitTime); // print("Waiting " + String.valueOf(time) + "msecs"); // wait(time); // } catch (InterruptedException ex) { // Logger.getLogger(WSNode.class.getName()).log(Level.SEVERE, null, ex); // } // } // } COM: <s> a simple function that waits </s>
funcom_train/18644003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimestamp() { // Check if timestamp has been initialized if (m_timestamp == -1) { m_timestamp = 0; if (m_eventElement.hasAttribute(AbstractServiceTracker.TIMESTAMP_ATTR)) { String val=m_eventElement.getAttribute( AbstractServiceTracker.TIMESTAMP_ATTR); try { m_timestamp = Long.parseLong(val); } catch(Exception e) { logger.severe("Unable to parse '"+ AbstractServiceTracker.TIMESTAMP_ATTR+ "' service tracker event field value '"+ val+"': "+e); } } } return(m_timestamp); } COM: <s> this method returns the timestamp associated with the </s>
funcom_train/43421487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Day getDayAt(Point point) { double x = point.getX(); int index = (int) ((x - INSET_LEFT) / xStep); if ((x - INSET_LEFT < 0) | (index >= days.size())) return null; return (Day) days.get(index); } COM: <s> returns day represented by column at specified point </s>
funcom_train/19780569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date modtime(String remoteFile) throws IOException, FTPException { String reply = control.sendCommand("MDTM " + remoteFile); lastValidReply = control.validateReply(reply, "213"); // parse the reply string ... Date ts = tsFormat.parse(lastValidReply.getReplyText(), new ParsePosition(0)); return ts; } COM: <s> get modification time for a remote file </s>
funcom_train/4918446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReferenceMarshall() throws Throwable { // Create the marshaller XmlMarshaller marshaller = this.createReferenceMarshaller(); // Create the root object RootObject object = new RootObject(); // Marshall the object marshaller.marshall(object, new WriterXmlOutput(this.writer)); // Validate the output assertEquals( "Incorrect XML", "<root char=\"a\"><root char=\"a\"><root char=\"a\"></root></root></root>", this.writer.toString()); } COM: <s> ensure able to marshall a reference </s>
funcom_train/36427934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String crypt(String keyName, String toBeCrypted) throws Exception { KeyObject keyObject = this.getKey(keyName); if (keyName == null) { throw new NoSuchAlgorithmException("Key does not exist: "+keyName); } return keyObject.cryptToHex(toBeCrypted); } COM: <s> one method to get the crypted string from the given string and key </s>
funcom_train/20079211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(LoadConfig config) { LoadEvent evt = new LoadEvent(this, config, null); if (fireEvent(BeforeLoad, evt)) { lastConfig = config; lastConfig.sortField = sortField; lastConfig.sortDir = sortDir; getData(lastConfig, new DataCallback() { public void setResult(LoadResult result) { onReceiveResults(result); } }); } } COM: <s> loads the data using the specified configuation </s>
funcom_train/50158889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParentNodeExists(String key) { //prtln ("getNodeExists with " + key); String xpath = XPathUtils.decodeXPath(key); String parentXPath = XPathUtils.getParentXPath(xpath); if (docMap.nodeExists(parentXPath)) { //prtln (" ... node DOES exist"); return "true"; } else { // prtln (" ... node does not exist"); return ""; } } COM: <s> gets the parent node exists attribute of the schem edit form object </s>
funcom_train/10267076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String connect(String userID, String password) throws IOException { Map queryMap = new HashMap(); queryMap.put("userid", userID); queryMap.put("password", password); return executePost(_backEndURIStr + "/connect", queryMap); } COM: <s> returns a sessionhandle for use in all other engine access methods </s>
funcom_train/6346736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNick(String nick) { Object[] temp; if (nicks == null) { temp = new Object[1]; temp[0] = nick; nicks = temp; nickList.setListData(nicks); } else { temp = new Object[nicks.length + 1]; temp = copy(nicks, temp); temp[nicks.length] = nick; nicks = temp; Arrays.sort(nicks); nickList.setListData(nicks); } // else } // addNick COM: <s> adds a nick to the list </s>
funcom_train/11647381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configure() { if (!configured) { configured = true; // add the various rules addRule("betwixt-config", new ConfigRule()); addRule("betwixt-config/class", new ClassRule()); addRuleSet(new CommonRuleSet()); } // now initialize //setAttributesForPrimitives(true); getProcessedPropertyNameSet().clear(); getXMLIntrospector().getRegistry().flush(); } COM: <s> reset configure for new digestion </s>
funcom_train/39015420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCameraFov(float fov){ this.fov = fov; if(!camera.isParallelProjection()){ float aspect = (float) display.getWidth() / display.getHeight(); camera.setFrustumPerspective(fov, aspect, 0.1f, camera.getFrustumFar()); }else{ logger.warning("Fov value recorded but not applied (Parallel Projection)"); } } COM: <s> sets the new camera field of view </s>
funcom_train/36428054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void realClose() { close(); if (preparedStatement != null) { if (ls.isDisconnected) { ls.checkConnectionNoException(); } try { preparedStatement.close(); } catch (SQLException e) { ls.checkConnectionNoException(); } preparedStatement = null; } isReady = false; } COM: <s> really close the prepared statement and the result set if any </s>
funcom_train/50585615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TreeParent loadTree(TestSeries series) { TreeParent seriesTree = new TreeTestSeries(series.getQualifiedName(), true); seriesTree.setContent(series); Enumeration seriesEnu = series.getElements(); while (seriesEnu.hasMoreElements()) { ComplexTestSpecification cts = (ComplexTestSpecification) seriesEnu.nextElement(); seriesTree.addChild(createComplexTestSpecTree(cts)); } return seriesTree; } COM: <s> this method expose the hierarchy of an test sequence to an tree </s>
funcom_train/22208831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNodeTypes() { try { // map prefix "xtm" to XTM 1.0 namespace PrefixResolver pr = new XTMPrefixResolver((Node) domDocument.getDocumentElement()); iterateNodeTypeTable(pr); } catch (Exception ex) { ex.printStackTrace(); fail("Unexpected exception: " + ex.toString()); } } COM: <s> tries a number of xpath queries returning a single dom node </s>
funcom_train/7924552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFieldSortSingleSearcher() throws Exception { // log("Run testFieldSortSingleSearcher"); // define the sort criteria Sort custSort = new Sort(new SortField[] { new SortField("publicationDate_"), SortField.FIELD_SCORE }); Searcher searcher = new MultiSearcher(new Searchable[] { new CustomSearcher (index, 2)}); // search and check hits matchHits(searcher, custSort); } COM: <s> run the test using one custom searcher wrapped by a multi searcher </s>
funcom_train/3840314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setID(String id) { try { int liop; File df; df = new File(id); String fn = df.getName(); liop = fn.lastIndexOf("."); if (liop == -1) { _diceSetID = fn; } else { _diceSetID = fn.substring(0, liop); } } catch (Exception e) { _diceSetID = id; } } COM: <s> sets this dice set id </s>
funcom_train/8080812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double weight(Instance instance) throws Exception { int subset; if (m_isLeaf) return 1; subset = m_localModel.whichSubset(instance); if (subset == -1) return (m_localModel.weights(instance))[indeX]* m_sons[indeX].weight(instance); if (subset == indeX) return m_sons[indeX].weight(instance); return 0; } COM: <s> returns the weight a rule assigns to an instance </s>
funcom_train/18569832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToStringWithNullReturnType() { returnType = null; signature = new Signature(returnType, classType, methodName, argTypes); assertEquals("void org.virtualmock.call.Signature.myMethod(java.lang.String, java.lang.Integer)", signature.toString()); } COM: <s> test the to string method with a null return type </s>
funcom_train/2578095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ImageTitle)) { return false; } ImageTitle that = (ImageTitle) obj; if (!ObjectUtilities.equal(this.image, that.image)) { return false; } return super.equals(obj); } COM: <s> tests this code image title code for equality with an arbitrary </s>
funcom_train/13524212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStakesWithActor(){ assertEquals(2,org.getStakesWithActor(act1).size()); assertEquals(1,org.getStakesWithActor(act2).size()); assertEquals(0,org.getStakesWithActor(act3).size()); Iterator<Stake> stkIt; stkIt = org.getStakesWithActor(act1).iterator(); assertEquals(stk1, stkIt.next()); assertEquals(stk3, stkIt.next()); stkIt = org.getStakesWithActor(act2).iterator(); assertEquals(stk2, stkIt.next()); } COM: <s> test get stakes with actor actor </s>
funcom_train/9389474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reloadSdk() { // reload SDK mSdkManager.reloadSdk(mSdkLog); // reload AVDs if (mAvdManager != null) { try { mAvdManager.reloadAvds(mSdkLog); } catch (AndroidLocationException e) { // FIXME } } // notify adapters? mLocalSdkParser.clearPackages(); // TODO // notify listeners notifyListeners(); } COM: <s> reloads the sdk content targets </s>
funcom_train/11012592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test29206() { //the first check with blank workbook HSSFWorkbook wb = openSample("Simple.xls"); HSSFSheet sheet = wb.createSheet(); for(int i = 1; i < 400; i++) { HSSFRow row = sheet.getRow(i); if(row != null) { row.getCell(0); } } } COM: <s> bug 29206 npe on hssfsheet </s>
funcom_train/26018171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doTargetRefresh(SIPMessage sipMessage) { ContactList contactList = sipMessage.getContactHeaders(); /* * INVITE is the target refresh for INVITE dialogs. SUBSCRIBE is the target refresh for * subscribe dialogs from the client side. This modifies the remote target URI potentially */ if (contactList != null) { Contact contact = (Contact) contactList.getFirst(); this.setRemoteTarget(contact); } } COM: <s> do taget refresh dialog state updates </s>
funcom_train/24513605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getReplaceChoice() { String msg = "Replace this occurrence of '" + phrase + "'?"; return JOptionPane.showOptionDialog( this, msg, "Find and Replace", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, replaceOptions, null); } COM: <s> show an option window asking the user for a decision about what to </s>
funcom_train/330581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public boolean waitForLoader(long timeOut) { // long now = System.currentTimeMillis(); // try { // while (loaderRunning) { // Thread.sleep(10); // if (timeOut > 0) { // if (System.currentTimeMillis() > now+timeOut) { // break; // } // } // } // } catch (InterruptedException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } // return (!loaderRunning); // } COM: <s> wait for the data loader to complete </s>
funcom_train/44000896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONWriter array() throws JSONException { if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { this.push(null); this.append("["); this.comma = false; return this; } throw new JSONException("Misplaced array.",0); } COM: <s> begin appending a new array </s>
funcom_train/32756966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // force the number display as the format of either "0.0000" or "0.000E0" depending on the value NumberFormat fieldFormat = null; if (Math.abs(value) > 10000. || Math.abs(value) < 0.0001) fieldFormat = scientificFormat; else fieldFormat = floatFormat; return fieldFormat.format(value); } COM: <s> override the to string method </s>
funcom_train/18488453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToRepository(String key, LibraryPartInfo lib) { Object temp = null; temp = libraryCache.put(key, lib); if (temp != null) { String logMessage = "ERROR: - " + this +" - " + " - Dublicate library entry found it over writes the former one - " + key; VSCBLogger.logMessage(logMessage, VSCBLogger.ERROR); return; } } COM: <s> inits library cache adding entlries on by one </s>
funcom_train/35122795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyToXYItemRenderer(XYItemRenderer renderer) { if (renderer == null) { throw new IllegalArgumentException("Null 'renderer' argument."); } if (renderer instanceof AbstractRenderer) { applyToAbstractRenderer((AbstractRenderer) renderer); } renderer.setBaseItemLabelFont(this.regularFont); renderer.setBaseItemLabelPaint(this.itemLabelPaint); } COM: <s> applies the settings of this theme to the specified renderer </s>
funcom_train/10150741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAttributeExists(final Document document, final String docType) { // added for Defect #415. final java.util.List list = document.getRootElement().getAttributes(); for (int i = 0; i < list.size(); i++) { if (((org.jdom.Attribute) list.get(i)).getName().equals(docType)) { return true; } } return false; } COM: <s> checks for existing given attribute </s>
funcom_train/50154695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addActionMappingRules(Digester digester) { digester.addFactoryCreate("*/action-mapping", FindActionMappingObjectFactory.class); // this rule will work for global forwards too (i think!) digester.addFactoryCreate("*/forwards/forward", FindForwardObjectFactory.class); // FindForwardObjectFactory also accomplishes "setNext" type behavior } COM: <s> method add action mapping rules </s>
funcom_train/12127943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GrappaListener addGrappaListener(GrappaListener listener) { GrappaListener oldGL = grappaListener; grappaListener = listener; if(grappaListener == null) { if (oldGL != null) { removeMouseListener(this); removeMouseMotionListener(this); } setToolTipText(null); } else { if (oldGL == null) { addMouseListener(this); addMouseMotionListener(this); } String tip = graph.getToolTipText(); if(tip == null) { tip = Grappa.getToolTipText(); } setToolTipText(tip); } return(oldGL); } COM: <s> adds the specified listener to receive mouse events from this graph </s>
funcom_train/12555188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gaigsChangeHexNodeColors(String search, String replace){ for(int i = 0; i < num_nodes; i++){ if(my_nodeset[i].getHexColor().compareTo(search) == 0){ my_nodeset[i].setHexColor(replace); } } } COM: <s> changes any nodes in this code visual graph code with the color </s>
funcom_train/10240066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(final FieldSource source, final boolean suppressHeaders) { if (source != null && source.hasNext()) { if (suppressHeaders && source.isHeaderRow()) { source.next(); } while (source.hasNext()) { println(source.next()); } } } COM: <s> prints the entire contents of a field source to the output stream </s>
funcom_train/26447258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RoleMetaInfo getRoleAMetaInfo() throws MetaInfoException { // access the cache RoleMetaInfo res = this.roleACache; if (res == null) { // cache miss -> create a new instance res = this.createThisRoleAMetaInfo(); // allow navigation from the role to the association res.setAssociationMetaInfo(this); // update the cache this.roleACache = res; } return res; } COM: <s> accessor for the role a meta info </s>
funcom_train/3106726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int index) throws IloaException { Iterator<Map.Entry<String, Column>> entries = this.columnsList.entrySet().iterator(); while (entries.hasNext()) { Map.Entry<String, Column> entry = entries.next(); Column col = entry.getValue(); if (col.getPosition() == index) { return entry.getKey(); } } return ""; } COM: <s> return the name of the column </s>
funcom_train/8533765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLNode newNode(Object node) { XMLNode result = null; XMLDocument doc = getDocument(); if (node instanceof CharacterData) { result = new DomXmlText(doc, (CharacterData) node); } else if (node instanceof Element) { result = new DomXmlElement(doc, (Element) node); } return result; } COM: <s> creates and returns a new xml node wrapper for the specified dom node </s>
funcom_train/21633853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double gamma(final int n, final double[] g, final double[] grad) { int i; double denom, numer; numer = denom = 0.0; for (i = 0; i < n; i++) { denom += g[i] * g[i]; numer += (grad[i] - g[i]) * grad[i]; // Grad is neg gradient } if (denom == 0.0) { return 0.0; } else { return numer / denom; } } COM: <s> find correction for next iteration </s>
funcom_train/14518009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ICAAdminSessionLocal getCAAdminSession() { if (caadminsession == null) { try { ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome) getLocator().getLocalHome(ICAAdminSessionLocalHome.COMP_NAME); caadminsession = caadminsessionhome.create(); } catch (CreateException e) { throw new EJBException(e); } } return caadminsession ; } //getCAAdminSession COM: <s> gets connection to ca admin session </s>
funcom_train/51544639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String retour=""; retour += (m_serviceName!=null?m_serviceName:(m_addr!=null?m_addr.toString():"")); // retour += (m_serviceURL!=null?m_serviceURL+")":"No valid URL found)"); return retour; } COM: <s> returns the string representation used in the jtree of the service finder class </s>
funcom_train/51354281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removeContextPath(String uri, String contextPath) { String realUri = ""; if ((null == contextPath) || contextPath.length() == 0) { realUri = uri; } else { realUri = uri.substring(contextPath.length(), uri.length()); } return realUri; } COM: <s> remove the context path that may get assigned to the url </s>
funcom_train/15882951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowCount(int rowCount) { int old = getRowCount(); if (old == rowCount) { return; } dataVector.setSize(rowCount); if (rowCount <= old) { fireTableRowsDeleted(rowCount, old - 1); } else { justifyRows(old, rowCount); fireTableRowsInserted(old, rowCount - 1); } } COM: <s> sets the number of rows in the model </s>
funcom_train/49263205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() { //Group SqlServerGroup group = getGroup(); boolean newGroup = group == null; if (newGroup) { group = new SqlServerGroup(cbGroup.getText()); } if (newGroup) { SqlServerGroup.addGroup(group); } createServer().setParent(group); try { ServerSerializer.getInstance().save(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } ServerView.getInstance().updateTree(); close(); } COM: <s> saves the server after connection has been validated </s>
funcom_train/43245338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetECTwoStreetAddr1() { System.out.println("setECTwoStreetAddr1"); String eCTwoStreetAddr1 = ""; EmergencyContactDG4Object instance = new EmergencyContactDG4Object(); instance.setECTwoStreetAddr1(eCTwoStreetAddr1); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set ectwo street addr1 method of class org </s>
funcom_train/15494200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForClass(Vector classes, String className) { for (int index = 0; index < classes.size(); index++) { String testName = (String)classes.get(index); if (testName.equals(className)) { return; } } fail("The class [" + className + "] was not found."); } COM: <s> check for the class name </s>
funcom_train/14448366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopApplication() { ClientUtils.getData("closeApplication",Boolean.TRUE); if (calledAsApplet) { destroy(); try { JSObject js = JSObject.getWindow(this); js.call("closeFrame", new Object[] {}); } catch (Throwable ex) { } } else System.exit(0); } COM: <s> method used to destroy application </s>
funcom_train/16651884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killSelectedProcess() { if (selectedProcessInstance != null) { this.retrieveProcessInstances(); for (int i = 0; i < processInstances.size(); i++) { ProcessInstance select = processInstances.get(i); if (select.getId() == selectedProcessInstance.getId()) { this.killProcess(select); break; } } } else { log.warn("No process selected"); } } COM: <s> delete selected task instance and corresponding publication entity </s>
funcom_train/21851447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponent(GridComponent gc, CellConstraints cc) { GridComponent oldcomp = getGridComponent(cc.gridX, cc.gridY); if (oldcomp != null) { oldcomp.removeListener(this); m_form.remove(oldcomp); } gc.addListener(this); m_form.add(gc, cc); m_form.revalidate(); syncCellAssignments(); fireGridEvent(new GridViewEvent(this, GridViewEvent.CELL_CHANGED)); unitTest(); } COM: <s> sets the component at the given row and column </s>
funcom_train/28743966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer createNewSeq() throws SimsException { //String errMsg = clsName + ".createNewSeq(): "; Integer id; try { //Create Seq and return local object. local = this.createNewSeqLocal(); id = local.getId(); } catch (SimsException se) { //Propergate SimsException. throw se; } return id; } COM: <s> this method create a new seq object </s>
funcom_train/18473481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canDrillDown(Member member) { if (!isDrillable(member, false)) return false; Dimension dim = member.getLevel().getHierarchy().getDimension(); Quax quax = findQuax(dim); return (quax == null) ? false : quax.canDrillDown(member); } COM: <s> drill down is possible if code member code has children </s>
funcom_train/7614978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hitClip(int x, int y, int width, int height) { // TODO: Create package private method Rectangle.intersects(int, int, // int, int); return getClipBounds().intersects(new Rectangle(x, y, width, height)); } COM: <s> determines whether or not the specified rectangle intersects the current </s>
funcom_train/40927470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void detectConversionPlugins(final ConverterRegistry registry) { try { ClassLoaderSupport.getInstance().loadClass( "org.freehep.util.export.ExportFileType"); FreeHepInternalDetector.actuallyDetectConversionPlugins(registry); } catch (final ClassNotFoundException e) { FreeHepDetector.LOGGER.debug(e); } } COM: <s> detects if free hep is in the classpath </s>
funcom_train/4884666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand6 () { if (backCommand6 == null) {//GEN-END:|416-getter|0|416-preInit // write pre-init user code here backCommand6 = new Command ("Voltar", Command.BACK, 0);//GEN-LINE:|416-getter|1|416-postInit // write post-init user code here }//GEN-BEGIN:|416-getter|2| return backCommand6; } COM: <s> returns an initiliazed instance of back command6 component </s>
funcom_train/40742824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deselectCells(Point[] cells) { checkWidget(); if (cells == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); for (int i = 0; i < cells.length; i++) { if (cells[i] == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); } for (int i = 0; i < cells.length; i++) { selectedCells.remove(cells[i]); } updateColumnSelection(); redraw(); } COM: <s> deselects the given cells </s>
funcom_train/24112927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean skipUserData(final InputStream stream) throws IOException { final byte[] typeArray = getBytes(stream, 2); if (typeArray == null) { return false; } final int type = OvlConverterHelper.convertToInt(typeArray, 0, 2); if (type == 1) { // no user data return true; } return skipBytes(stream, 4); } COM: <s> skips the user data </s>
funcom_train/44121171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object pObject) { if (this == pObject) { return (true); } // if else if (pObject == null) { return (false); } // else if else if (pObject.getClass().equals(this.getClass())) { Element lOther = (Element) pObject; return (children.equals(lOther.children)); } // else if else { return (false); } // else } // Element.equals() COM: <s> indicates whether some other object is equal to this one </s>
funcom_train/49337900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRelativePosition() throws Exception { BodyTube tube = new BodyTube(); ParachuteHandler handler = new ParachuteHandler(tube, new WarningSet()); Parachute component = (Parachute) getField(handler, "chute"); handler.setRelativePosition(RocketComponent.Position.ABSOLUTE); assertEquals(RocketComponent.Position.ABSOLUTE, component.getRelativePosition()); } COM: <s> method set relative position rocket component </s>
funcom_train/28405493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSubmitEvent(String machine) { log.debug("building Submit Event "); Date ldate = new Date(); String message = "Command(" + id + ") was submitted by " + username + " on " + machine + " at " + ldate; SubmitEvent event = new SubmitEvent(this, id, ldate, message, machine, username, null); this.fireSubmitEvent(event); } COM: <s> code fire submit event code notify all listeners that have registered interest </s>
funcom_train/37036280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addApplicationParameter(ApplicationParameter parameter) { synchronized (applicationParameters) { ApplicationParameter results[] = new ApplicationParameter[applicationParameters.length + 1]; System.arraycopy(applicationParameters, 0, results, 0, applicationParameters.length); results[applicationParameters.length] = parameter; applicationParameters = results; } } COM: <s> add a new application parameter for this application </s>
funcom_train/32061587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FloatPoint2D getXYPos() { if (gamelocation instanceof SpaceObject) { return ((SpaceObject) gamelocation).getPos(); } else if (gamelocation instanceof FloatPoint2D) { return (FloatPoint2D) gamelocation; } else { Err.throwCNIE("gamelocation != (SpaceObject or FloatPoint2D)"); } // unreachable code, but needed for compiler to compile this method return new FloatPoint2D(0f, 0f); } COM: <s> returns the postion of the strategic loction in the galaxy map </s>
funcom_train/37022056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource getToolBase(Model model) { Resource r = null; ResIterator ri = getTools(model); if (ri != null) { try { if (ri.hasNext()) { r = ri.next(); } } catch (RDFException e) { e.printStackTrace(); } } return r; } COM: <s> get the base of the first tool </s>
funcom_train/3814791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JViewport getViewport() { Container p = getParent(); if (p instanceof JViewport) { Container gp = p.getParent(); if (gp instanceof JScrollPane) { JScrollPane scroller = (JScrollPane) gp; JViewport viewport = scroller.getViewport(); if (viewport == null || viewport.getView() != this) { return null; } else { return viewport; } } } return null; } COM: <s> finds the jviewport enclosing this component </s>
funcom_train/43393455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long addOthersSize(long plussSize) { this.allOthersSize += plussSize; // System.out.println("quota add allOthers : " + allOthersSize); this.allWorkflowSize = allOthersSize + allOutputsSize; // System.out.println("quota allWorkflowSize : " + allOthersSize); return allOthersSize; } COM: <s> increases the all others size </s>
funcom_train/7508435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetScreenName() throws AuthenticationException { System.out.println("getScreenName"); DefaultUser user = createTestUser("getScreenName"); String screenName = ESAPI.randomizer().getRandomString(7, DefaultEncoder.CHAR_ALPHANUMERICS); user.setScreenName(screenName); assertEquals(screenName, user.getScreenName()); assertFalse("ridiculous".equals(user.getScreenName())); } COM: <s> test of get screen name method of class org </s>
funcom_train/49045310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMassonTrichrome() { if (buttMassonTrichrome == null) { buttMassonTrichrome = new JRadioButtonMenuItem(); buttMassonTrichrome.setText("Masson Trichrome"); buttMassonTrichrome.setToolTipText("Masson Trichrome"); buttMassonTrichrome.addActionListener(this); buttMassonTrichrome.setActionCommand("parameter"); buttMassonTrichrome.setEnabled(true); } return buttMassonTrichrome; } COM: <s> this method initializes the option masson trichrome </s>
funcom_train/18032429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuEditImageFilter() { if (m_menuEditImageFilter == null) { m_menuEditImageFilter = new JMenuItem(); m_menuEditImageFilter.setText(Messages.getString("FBMenu.36")); //$NON-NLS-1$ m_menuEditImageFilter.setMnemonic(Messages.getString("FBMenu.37").charAt(0)); //$NON-NLS-1$ } return m_menuEditImageFilter; } COM: <s> returns the edit image filter item </s>
funcom_train/32369086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableEditMenuItems(boolean pShowEditableMenu) { // TODO Auto-generated method stub ArrayList<Menu> menus = getMenus(); for (int i = 0; i < menus.size(); i++) { Menu menu = (Menu) menus.get(i); MenuItem item = menu.get(MENU_ITEM_SAVE_TO_DB); if (item != null) { System.out.println("menu item save to data enabled = " + pShowEditableMenu); item.setEnabled(pShowEditableMenu); } } } COM: <s> enable disable edit related menu items </s>
funcom_train/5724704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof FolderInfo)) { return false; } final FolderInfo that = (FolderInfo) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an folder info instance and </s>
funcom_train/34083454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void add(String address, double dist) { HashMap<String,String> d = new HashMap<String,String>(); if(dist < 0) { d.put("stopCol", address); d.put("distanceCol", "NA"); } else { d.put("stopCol", address); d.put("distanceCol", Double.toString(round(dist))); } mList.add(d); } COM: <s> adds a stop a row to the view </s>
funcom_train/41171548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Object key, Object element) { //This is necessary to prevent multiple entries of the same element if (lookupMultimap.get(key).contains(element)) { fireChangeEvent(key); return true; } boolean b = lookupMultimap.put(key, element); fireChangeEvent(key); return b; } COM: <s> adds the element object to a list associated with the key </s>
funcom_train/6451958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delBel(Literal bel) throws RevisionFailedException { if (!bel.hasSource()) { bel.addAnnot(BeliefBase.TSelf); } List<Literal>[] result = brf(null, bel, Intention.EmptyInt); if (result != null && ts != null) { ts.updateEvents(result, Intention.EmptyInt); return true; } else { return false; } } COM: <s> if the agent believes in i bel i removes it calling brf </s>
funcom_train/28472095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringWithNumbers(){ StringBuffer tempBuffer = new StringBuffer(); if (fReplaced == false){ replaceArguments(); } int i = 1; for (String line : fBuffer) { tempBuffer.append(i + ":\t" + line + "\n"); i++; } return tempBuffer.toString(); } COM: <s> this method returns the buffer content as a string with every row being </s>
funcom_train/48391546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addShowValueHandler(com.smartgwt.client.widgets.form.fields.events.ShowValueHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.form.fields.events.ShowValueEvent.getType()) == 0) setupShowValueEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.form.fields.events.ShowValueEvent.getType()); } COM: <s> add a show value handler </s>
funcom_train/20847148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String replaceCurrentUrlPosition(URL url, String newFile) { String parentPath = url.getPath(); int sep = parentPath.lastIndexOf( '/' ); if ( sep == 0 ) return toExternalForm( url, url.getPath() + newFile ); else if ( sep > 0 ) return toExternalForm( url, parentPath.substring( 0, sep+1 ) + newFile ); return null; } COM: <s> replace last file position in the given url with new file </s>
funcom_train/5570499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJOKButton() { if (jOKButton == null) { jOKButton = new JButton(); jOKButton.setText("Vadid and Close"); // Generated jOKButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { getConfig(); JavaChessBoard.jTextField1.setText(Baseconfig.getConfig()[1]); JavaChessBoard.jBaseTextField1.setText(Baseconfig.getConfig()[2]); dispose(); } }); } return jOKButton; } COM: <s> this method initializes j okbutton </s>
funcom_train/44453315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText( String resource, String encoding ) { String result = ""; try { result = new String( ResourceBundle.getBundle( bundle ).getString( resource ).getBytes( encoding ), "UTF-8" ); } catch( java.io.UnsupportedEncodingException uee ) { /*REMOVE System.err.println( "UNSUPPORTED ENCODING EXCEPTION: " + res );*/ } return result; } COM: <s> gets the text attribute of the resource formatter object </s>