__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1601699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression AppendTerm(Term term, TermOperator operator) { if (termList.size() == 0) { if (operator == TermOperator.ADD) { operator = TermOperator.NONE; } } else { if (operator == TermOperator.NONE) { operator = TermOperator.ADD; } } return new Expression(termList, operatorList, term, operator); } COM: <s> append a term to the expression </s>
funcom_train/42472753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeActionOnTree(Action action, boolean cascade) { TreeItem[] rootItems = tree.getItems(); if (rootItems == null || rootItems.length <= 0) { return; } for (int i = 0; i < rootItems.length; i++) { executeActionOnTreeItem(action, rootItems[i], cascade); } } COM: <s> execute the given </s>
funcom_train/2379196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (MainWindowFrame == null) { l= Locale.getDefault(); try{messages = ResourceBundle.getBundle("msg",l);} catch(MissingResourceException e) { l=Locale.US; messages = ResourceBundle.getBundle("msg",l); } MainWindowFrame = new JFrame(); MainWindowFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MainWindowFrame.setContentPane(getJContentPane()); MainWindowFrame.setTitle(messages.getString("apptitle")); MainWindowFrame.setSize(615, 335); } return MainWindowFrame; } COM: <s> this method initializes j frame </s>
funcom_train/38289173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ElementLoc getFirstAt(final DOMPoint ip, final QName qname) { if (ip == null) throw new IllegalArgumentException("ip is null");//$NON-NLS-1$ for (final ElementLoc loc : list) { final int cmp = ip.compareTo(loc.ip); if (cmp == 0) { if (qname == null) return loc; if (loc.nameList.hasRule(qname, true)) return loc; } if (cmp > 0) return null; } return null; } COM: <s> finds first elementloc bound to be inserted at given position </s>
funcom_train/34950279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAnyLeaf(ArrayListToSortedSet<Integer> triangleIndices) { boolean rtnVal = false; for (int i = 0; i < triangleIndices.size(); i++) { if (triangleIndices.get(i).intValue() >= this.start && triangleIndices.get(i).intValue() < this.end) { rtnVal = true; break; } } return rtnVal; } COM: <s> checks if this branch or one of its subbranches leaves contains any of </s>
funcom_train/48097967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _handleSearch(PrintWriter out) { Map root = new HashMap(); root.put("card", "foo"); try { Template temp = this.ftlconfig.getTemplate("search.ftl"); try { temp.process(root, out); } catch (TemplateException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> renders the search template search </s>
funcom_train/35461354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSingleBranchStructure() throws Exception { emitAndCheck( "Declare 1 Payroll, 4 Name, 5 Last char(20);", "" + " 01 Payroll." + LS + " 04 Name." + LS + " 05 R-Last PIC X(20)." ); } COM: <s> single branch structure </s>
funcom_train/35541650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithNamespace() { genSchemaAndParseInstance("http://legstar.com/test/coxb/", "<ws71Header xmlns=\"http://legstar.com/test/coxb/\">" + "<ws71HeaderId>hd12</ws71HeaderId>" + "<ws73InvoiceNo>" + "<ws73InvoicePref>pf12</ws73InvoicePref>" + "</ws73InvoiceNo>" + "</ws71Header>"); } COM: <s> test with a target namespace </s>
funcom_train/2800538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt(String pProperty) throws RaccoonException, NumberFormatException { try { /** Try to return the value of the property */ return Integer.parseInt(mProperties.getString(pProperty)); } catch (java.util.MissingResourceException e) { /** Property not found throwing exception */ throw new RaccoonException(ErrorCodes.RESOURCE_NOT_FOUND, getMissingPropertyMsg(pProperty), e); } } COM: <s> reads the value of the propery and converts it to a integer </s>
funcom_train/29561408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Score rhs) { if ( getNonMatches() < rhs.getNonMatches() ) { return 1; // lower value is earlier in sort order } if ( getNonMatches() > rhs.getNonMatches() ) { return -1; } if (total() > rhs.total()) { return 1; } if (total() < rhs.total()) { return -1; } return 0; } COM: <s> result of comparing two scores is that first they must score according </s>
funcom_train/47935942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(BundleContext context) throws Exception { // Service class name String clazz = DeviceHandler.class.getName(); ServiceReference sr[] = context.getAllServiceReferences(clazz, null); if(sr != null) { for (int i = 0; i < sr.length; i++) { // BINDS to the service requester DeviceHandler myDeviceHandler = (DeviceHandler) context.getService(sr[i]); myDeviceHandler.free(myDevice); } } } COM: <s> notify to all requesters that the device is disappearing </s>
funcom_train/2862355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataDir insertAfter(DataDir newDir) { if (parent == null) return null; // can add a sibling to the root node! if (next!=null) { next.prev=newDir; } else { parent.last_child = newDir; } newDir.next=next; newDir.parent=parent; newDir.prev=this; next=newDir; parent.count++; return newDir; } COM: <s> insert a new data dir tree after this data dir node </s>
funcom_train/50029138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNside2Npix() { int nside = 1; int npix = 0; PixToolsNested pt = new PixToolsNested(); npix = (int) pt.Nside2Npix(nside); assertEquals("Npix=" + npix, 12, npix, 1e-10); nside = 2; npix = (int) pt.Nside2Npix(nside); assertEquals("Npix=" + npix, 48, npix, 1e-10); } COM: <s> tests calculation of npixels from nside </s>
funcom_train/12710331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RepositoryEntryDescriptor getRepositoryDescriptor() { SaveToRepositoryDataModel theModel = bindingInfo1.getDefaultModel(); if (view.getNewEntryButton().isSelected()) { RepositoryEntryDescriptor theDesc = new RepositoryEntryDescriptor(); theDesc.setName(theModel.getNameForNewEntry()); return theDesc; } RepositoryEntryDescriptor theDesc = theModel.getExistingEntry(); theDesc.setName(theModel.getNameForExistingEntry()); return theDesc; } COM: <s> create a repository descriptor for the selected entry </s>
funcom_train/17857223
/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) { checkBoundInclusive(index); Iterator itr = c.iterator(); int csize = c.size(); modCount++; if (csize + size > data.length) ensureCapacity(size + csize); int end = index + csize; if (size > 0 && index != size) System.arraycopy(data, index, data, end, size - index); size += csize; for (; index < end; index++) data[index] = itr.next(); return csize > 0; } COM: <s> add all elements in the supplied collection inserting them beginning at </s>
funcom_train/9147232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDelta(long n) throws IOException { validatePositive(n); int numBits = mostSignificantPowerOfTwo(n); // 1 to 63 if (numBits > 63) { throw new IOException("numBits too large=" + numBits); } writeGamma(numBits+1); if (numBits > 0) writeLowOrderBits(numBits,n); } COM: <s> writes the bits for the elias delta code for the specified </s>
funcom_train/31016596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector XMLtoResults(Element xml) { if (xml == null) { return null; } Vector output = new Vector(); for (Node current = xml.getFirstChild(); current != null; current = current.getNextSibling()) { output.add(new ParseTuple((Element)current)); } return output; } COM: <s> decode the xml into a parse forest </s>
funcom_train/2292177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNiceName() { if (CmsStringUtil.isEmpty(m_niceName)) { // if the nice name is empty use the system name for display if (isExisting() && !isTemplateElement()) { // this element was not defined with the "template-elements" property return "* " + getName(); } else { return getName(); } } return m_niceName; } COM: <s> returns the nice name </s>
funcom_train/45256500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readCategory(IConfigurationElement element) { try { viewRegistry.add(new Category(element)); } catch (CoreException e) { // log an error since its not safe to show a dialog here WorkbenchPlugin.log( "Unable to create view category.", e.getStatus());//$NON-NLS-1$ } } COM: <s> reads the category element </s>
funcom_train/13717787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetItemCount() { System.out.println("testGetItemCount"); Assert.assertEquals(complete_rdd.getItemCount(0), 15); Assert.assertEquals(prev1.getItemCount(0), 1); Assert.assertEquals(prev2.getItemCount(0), 15); Assert.assertEquals(empty.getItemCount(0), 0); } COM: <s> test of get item count method of class be </s>
funcom_train/28643706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Agence findByName(String name) throws DaoException { Agence result = null; try { Map<String, Object> params = new HashMap<String, Object>(); params.put("name", name); result = initializeAgence((Agence)getSingleResult("AgencyByName", params)); } catch (Throwable ex) { throw new DaoException(ex); } return result; } COM: <s> retrieves an agency by name </s>
funcom_train/43106710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void edit(GarageSaleModel sale) { View.show((new EditGarageSaleView()).view( sale, d.category.getModels(), // pass a delegate to the view that takes in the updated garage // sale new D<GarageSaleModel>() { public void call(GarageSaleModel sale) { view(sale); } } )); } COM: <s> edit a garage sale </s>
funcom_train/23309354
/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 NtimePeriod)) { return false; } NtimePeriod that = (NtimePeriod) obj; if (!(this.start==that.getStart())) { return false; } if (!(this.end==that.getEnd())) { return false; } return true; } COM: <s> tests this number period instance for equality with an arbitrary object </s>
funcom_train/34105141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildFields() { this.fields = new Vector<FieldModel>(); Field[] fields = clazz.getFields(); for (Field field : fields) { int modifier = field.getAccessFlags(); String type = field.getType().toString(); this.fields.add(new FieldModel(field.getName(), modifier, type)); } } COM: <s> creates and stores a list of field models based on </s>
funcom_train/40515706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveProperties() { if (LOG.isInfoEnabled()) { LOG.info("Saving properties file."); } try { grupb.upf.util.Config.saveProperties(); } catch (IOException ex) { LOG.fatal("Error storing the configuration", ex); } } COM: <s> method to save the properties </s>
funcom_train/42045766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record copy() { Record copyRecord = new Record(dataObjectClass); Set<String> propertySet = columnMap.keySet(); for (String propertyName : propertySet) { RecordValue value = columnMap.get(propertyName); copyRecord.columnMap.put(propertyName, value.copy()); if (value.getKeySequence() > 0) { copyRecord.keyMap.put(value.getKeySequence(), propertyName); } } return copyRecord; } COM: <s> create a copy of this record with all the same property values </s>
funcom_train/38353044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndividualList process(IndividualList population) throws GraphException { // give start the population to start with start.putPopulation(population); // process all operators for (int i = initNodes.size()-1; i >= 0; i--) { ((Operator)initNodes.get(i)).activate(); } // get result of processing IndividualList result = finish.getResultPopulation(); if (result == null) { throw new NullPointerException("Graph/Finish node must not return null."); } return result; } COM: <s> propagates the individuals through the graph and creates a new </s>
funcom_train/19415740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IRCSession ircConnect() { try { String[] val; Message r; r = request("CONFIG","GETS IRCProxy nick,channel,server,port"); val = ((String) r.body).split("\n"); session = ircConnect(val[0], val[2], Integer.parseInt(val[3])); session.join(val[1]); } catch (UnknownHostException e) { e.printStackTrace(System.err); } catch (IOException e) { e.printStackTrace(System.err); } catch (MessageTimeoutException e) { e.printStackTrace(System.err); } catch (NullPointerException e) { e.printStackTrace(System.err); } return session; } COM: <s> connects to a irc network using default values for nick channel </s>
funcom_train/43467223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimple() { ToStringBuilder b = new ToStringBuilder(this); assertEquals("ToStringBuilderTest", b.toString()); try { b.toString(); TestUtil.unreachable(); } catch (NullPointerException ex) { // Can't invoke toString() twice! } } COM: <s> tests simple used of the to strin builder </s>
funcom_train/28207800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String s) { //"text" will never be null. if (s == null) { s = ""; //$NON-NLS-1$ } if (text.equals(s)) { return; } text = s; revalidate(); repaint(); //If the new text does not cause a new size, we still need to paint. } COM: <s> sets the labels text </s>
funcom_train/17723605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Connection getProxyConnection(ConnectionHandler invocationHandler) { if (mTrace.isDebugEnabled()) { mTrace.debug("get proxy connection"); } ProxyConnection proxyConn = (ProxyConnection) Proxy.newProxyInstance( ProxyConnection.class.getClassLoader(), new Class[] {ProxyConnection.class }, invocationHandler); return proxyConn; } COM: <s> get the proxy connection </s>
funcom_train/4875722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateNextItem() { assert getItemsCoords() != null : "getItemsCoords() is null"; assert getCurrentItmIndex() >= 0 && getCurrentItmIndex() <= getItemsCoords().size() : "getCurrentItmIndex() is incorrect"; setCurrentItmIndex((getCurrentItmIndex() + 1) % getItemsCoords().size()); } COM: <s> this method activates the next item of the map </s>
funcom_train/2813316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse() throws MoldException { try { SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); File f = new File(getConfigFileName()); parser.parse(f, this); } catch (Exception e) { throw new MoldException(e); } } COM: <s> parses the specified or default xml configuration file and interprets the </s>
funcom_train/25506106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getEast() { if (east == null) { GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.insets = new Insets(0, 0, 0, 5); gridBagConstraints3.gridx = 0; gridBagConstraints3.gridy = 0; east = new JPanel(); east.setLayout(new GridBagLayout()); east.add(getIsGridVisible(), gridBagConstraints3); } return east; } COM: <s> this method initializes east </s>
funcom_train/24531476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String getPathForBundleFile (String bundleName, String relativePath) { String key = bundleName+":"+relativePath; //$NON-NLS-1$ String result; if ((result=(String)fFilePath.get(key))==null) { result = getPathForBundleFile(Platform.getBundle(bundleName), relativePath); fFilePath.put(key,result) ; } return result; } COM: <s> get the path for file within the given bundle </s>
funcom_train/2877247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object doFunction() { java.util.Vector result = new java.util.Vector(); Object value; for (Enumeration e = context.keys(); e.hasMoreElements();) { Object key = e.nextElement(); value = context.get(key); if (value != null) { if (value instanceof ComponentDescription) ((ComponentDescription) value).setParent(null); result.add(value); } } return result; } COM: <s> creates a vector containing all the context elements </s>
funcom_train/9086712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(EquipmentDetails entity) { EntityManagerHelper.log("saving EquipmentDetails instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved equipment details entity </s>
funcom_train/7758524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readObject( ObjectInputStream s ) throws IOException, ClassNotFoundException { s.defaultReadObject(); MimeMediaType readType = MimeMediaType.valueOf( s.readUTF() ); type = readType.type; subtype = readType.subtype; parameters = readType.parameters; } COM: <s> read this object in for java serialization </s>
funcom_train/4250016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runWorld(int startTime, int endTime){ Scheduler schedule = Scheduler.getInstance(); setTime(startTime); while(getTime() <= endTime){ for(int index = 0; index < sensorLocations.size(); index++){ schedule.scheduleEvent(sensorLocations.get(index).getSensor(), time); //TODO - Add a wait here! } setTime(getTime() + 1); } } COM: <s> runs the main thread of the world </s>
funcom_train/34025073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasPicture(CharacterRun run) { if (run.isSpecialCharacter() && !run.isObj() && !run.isOle2() && !run.isData() && "\u0001".equals(run.text())) { return isBlockContainsImage(run.getPicOffset()); } return false; } COM: <s> determines whether specified character run contains reference to a picture </s>
funcom_train/20727170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void syncOpen() { Display display = XeclipPlugin.getDefault().getWorkbench().getDisplay(); display.syncExec(new Runnable() { public void run() { MessageDialog dialog = getDialog(); if (dialog != null) { dialog.setBlockOnOpen(true); dialog.open(); } else { log.log(new Status(IStatus.INFO, XeclipPlugin.PLUGIN_ID, XeclipPlugin.INIT_PROBLEM, message, null)); } } }); } COM: <s> opens synchronic the dialog </s>
funcom_train/19979365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void CHORD(String var_name) {//declaring a chord without initializing it if (variables.contains(var_name)){ //variable is declared Object o = variables.returnVariable(var_name); Error.alreadyDeclared(var_name, o.getClass().getName()); } else {//variable isn't already declared Chord chord = new Chord(); chord.initialized = false; variables.addVariable(var_name, chord); } } COM: <s> creates a new null chord called from chord </s>
funcom_train/13775156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long domainsProductCard() { int size = size(); if (size == 0) { return 0; } long total = _data[0].size(); for (int i = 1; i < size; ++i) { total *= _data[i].size(); } return total; } COM: <s> returns the cardinality of the cartesian product of the expression </s>
funcom_train/17999978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFileAttachmentsCount() { Set atts = getAttachments(); int count = 0; Attachment att; for (Iterator iter=atts.iterator(); iter.hasNext();) { att = (Attachment)iter.next(); //return only file attachments. Version not in attachment list if (att instanceof FileAttachment) { count++; } } return count; } COM: <s> return the number of file attachments </s>
funcom_train/23869590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void markPIPsAsUsed(ArrayList<PIP> pips){ for (PIP pip : pips){ setWireAsUsed(pip.getTile(), pip.getStartWire(), currNet); setWireAsUsed(pip.getTile(), pip.getEndWire(), currNet); markIntermediateNodesAsUsed(pip, currNet); } } COM: <s> examines the pips in the list and marks all of the resources </s>
funcom_train/18186923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (name == null) { throw new IllegalArgumentException("Parameter name cannot be null"); } this.name = name; final int lastPeriod = name.lastIndexOf('.'); final int length = name.length(); final String extension = name.substring(lastPeriod + 1, length); format = ImageFormat.valueOf(extension.toUpperCase()); if (format == null) { throw new IllegalArgumentException("Unknown image format: " + extension); } } COM: <s> changes the value of the code name code property </s>
funcom_train/4305031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void animate(double fromValue, double toValue, int duration) { int fFromValue = CoreMath.toFixed(fromValue); int fToValue = CoreMath.toFixed(toValue); setBehavior(new Tween(fFromValue, fToValue, duration)); } COM: <s> animates this property from the one double from value to another to value </s>
funcom_train/51788079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStartElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Role_startElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Role_startElement_feature", "_UI_Role_type"), RAMPackage.Literals.ROLE__START_ELEMENT, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the start element feature </s>
funcom_train/5584072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Key generateKey(int length, String keyname) { Block keyblock = new Block(length); for (int i=0; i<length; i++) { double random = Math.random(); if (random < 0.5) { keyblock = keyblock.setBit(i, new Bit(true)); } else { keyblock = keyblock.setBit(i, new Bit(false)); } } SingleKey newkey = new SingleKey(keyblock, keyname); return newkey; } COM: <s> generate a key with special key and filename </s>
funcom_train/34529905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CsvDataSource get(DataSourceConfiguration configuration) throws DataSourceException { CsvDataSource ds = new CsvDataSource(); ds.setName(configuration.getName()); // setup properties Collection<Property> properties = configuration.getProperties(); for (Property property : properties) { ds.setProperty(property.getName(), property.getValue()); } ds.initialise(); return ds; } COM: <s> returns a new csv data source object built from the given configuration </s>
funcom_train/45311025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeRules() { rules = new IRule[1]; WordRule wordRule = new WordRule(new CommentWordDetector(), attributeToken); StringTokenizer st = new StringTokenizer(todoTags, ";"); while (st.hasMoreTokens()) wordRule.addWord(st.nextToken(), attributeBoldToken); rules[0] = wordRule; setRules(rules); } COM: <s> factory method to build the rules to detect the todo tags </s>
funcom_train/17921574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setParameters(Property property, ParamList plist) { if (plist != null) { property.setEncoding(plist.getEncoding()); property.setCharset (plist.getCharset()); property.setLanguage(plist.getLanguage()); property.setValue (plist.getValue ()); property.setXParams (plist.getXParams ()); } } COM: <s> sets the parameters encoding charset language value for a given property </s>
funcom_train/5344958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flush(long now) throws IOException { buf.flip(); InterestWriteChannel chan = sink; chan.write(buf); // if we wrote anything, consider this flushed if (buf.position() > 0) { lastFlushTime = now; if (buf.hasRemaining()) buf.compact(); else buf.clear(); } else { buf.position(buf.limit()).limit(buf.capacity()); } } COM: <s> writes data to the underlying channel remembering the time we did this </s>
funcom_train/8984707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String imgSrc(String buttonFileName) throws javax.servlet.jsp.JspException { String contextPath = (String)this.pageContext.getServletContext().getAttribute(GlobalConstant.CONTEXT_PATH_KEY); return (contextPath + "/img/" + this.preference + "/common/" + buttonFileName); } COM: <s> create the image path of the calendar icon </s>
funcom_train/2536973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IFont getFont(String font, int size, MTColor color) { try { IFont returnFont = FontManager.getInstance().createFont(app, font, size, color); if (returnFont == null) throw new Exception(); return returnFont; } catch (Exception e) { e.printStackTrace(); } return FontManager.getInstance().createFont(app, "SansSerif", size, color); } COM: <s> gets an ifont by its filename size and color </s>
funcom_train/44074114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupDbColumnTranslators( ImportEntityDef entityDef ) throws SQLException { ImportColumnDef[] columns = entityDef.getColumns(); for ( int i = 0; i < columns.length; i++ ) { ColumnTranslator translator = columns[i].getTranslator(); if ( translator != null && translator instanceof DbColumnTranslator ) { ((DbColumnTranslator) translator).cleanup(); } } COM: <s> cleanup any db column translators </s>
funcom_train/44823017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDerivedCodeGenDirectory() { if (codeGenDirectory != null && codeGenDirectory.length()>0) { return codeGenDirectory; } else { DomainMetadata domain = (DomainMetadata) getParent(); if (domain != null) { return domain.getCodeGenDirectory(); } else { return null; } } } COM: <s> get code gen directory from this package or the domain </s>
funcom_train/37775864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCommentStyle() { //log.info("&&& PropertyRuleIntrospectorUsingWidgetModel.getCommentStyle(): m_sourcePropertyRuleIntrospector="+m_sourcePropertyRuleIntrospector); return m_sourcePropertyRuleIntrospector != null ? m_sourcePropertyRuleIntrospector.getCommentStyle() : null; } COM: <s> returns the comment type for the property </s>
funcom_train/16583214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultListModel getAllOriginalFields() { FieldDescription[] fields = tab.getModel().getModelo() .getFieldsDescription(); int num = fields.length; String names = ""; DefaultListModel dlm = new DefaultListModel(); dlm.add(0, PluginServices.getText(this, "none_field")); dlm.add(1, PluginServices.getText(this, "all_fields")); for (int i = 0; i < num; i++) { names = fields[i].getFieldName(); dlm.addElement(names); } return dlm; } COM: <s> this method returns the fields names of the original table </s>
funcom_train/45880941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDuplicateUsername(BaseUser user) { String userName = user.getCredential().getUsername(); if (userName != null && !StringUtil.isEmpty(userName)){ BaseUser userCheck = userDAO.loadByUsername(userName); if (userCheck != null && user.getId() != userCheck.getId()) return true; } return false; } COM: <s> private helper method to find a duplicate username </s>
funcom_train/48148426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initGUI() { // packControlPane(); JScrollPane fc = new JScrollPane(fControlPanel); JSplitPane fSOCRPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, fc, fPresentPanel); fControlPaneScrollBar = fc.getVerticalScrollBar(); fPresentPaneScrollBar = fPresentPanel.getVerticalScrollBar(); fSOCRPane.setOneTouchExpandable(true); setContentPane(fSOCRPane); // fireItemChanged(); } COM: <s> initialize gui however it dont have to create controlpane from scratch </s>
funcom_train/22278335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startFocus() { _setEditing(true); showInsertionPoint(); _selection._startFlashing(); if( isEditable() && _owner != null ) _owner.textEditingDidBegin(this); if( hasSelection() ) { Range r = selectedRange(); if( r.length > 0 ) dirtyRange(r); } else selectRange(new Range(0,0)); } COM: <s> focus management support method </s>
funcom_train/12547216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTransition(Transition trans) { transitions.remove(trans); List l = (List) transitionFromStateMap.get(trans.getFromState()); l.remove(trans); l = (List) transitionToStateMap.get(trans.getToState()); l.remove(trans); // Remove cached arrays. transitionArrayFromStateMap.remove(trans.getFromState()); transitionArrayToStateMap.remove(trans.getToState()); cachedTransitions = null; distributeTransitionEvent(new AutomataTransitionEvent(this, trans, false, false)); } COM: <s> removes a code transition code from this automaton </s>
funcom_train/7641343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileEntry getRoot() { if (mDevice != null) { if (mRoot == null) { mRoot = new FileEntry(null /* parent */, "" /* name */, TYPE_DIRECTORY, true /* isRoot */); } return mRoot; } return null; } COM: <s> returns the root element </s>
funcom_train/32018938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getJMenuRechercherUneNote() { if (jMenuRechercherUneNote == null) { jMenuRechercherUneNote = new JMenuItem("Rechercher une note",new ImageIcon(getClass().getResource("/Icon/zoom.png"))); jMenuRechercherUneNote.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.CTRL_MASK)); } return jMenuRechercherUneNote; } COM: <s> this method initializes j menu rechercher une note </s>
funcom_train/48559995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem9() { if (stringItem9 == null) {//GEN-END:|361-getter|0|361-preInit stringItem9 = new StringItem("\u0426\u0432\u0435\u0442 \u0433\u043B\u0430\u0437", null);//GEN-LINE:|361-getter|1|361-postInit }//GEN-BEGIN:|361-getter|2| return stringItem9; } COM: <s> returns an initiliazed instance of string item9 component </s>
funcom_train/32766242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set targets() { Set targetSet = new HashSet(); // add targets directly associated with the protocol and the target Set directTargets = targetDirectory.targets( source, _protocol ); targetSet.addAll( directTargets ); // add targets associated with the protocol but no target Set anonymousTargets = targetDirectory.targets( null, _protocol ); targetSet.addAll( anonymousTargets ); return targetSet; } COM: <s> get all targets associated with the source and protocol and just the protocol </s>
funcom_train/36046958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object savePreferences() { if (model != null && configuration != null) { try { TreeNode root = (TreeNode) model.getRoot(); if (root != null) { savePreferences(root, configuration); } } catch (Exception ex) { ex.printStackTrace(); } } return configuration; } COM: <s> get the preference values from the all components and save them into </s>
funcom_train/5823891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int encodeASN(byte[] buf, int offset, AsnEncoder encoder) throws AsnEncodingException { if (m_data == null) throw new AsnEncodingException("No data in octet string"); return encoder.buildString(buf, offset, typeId(), m_data); } COM: <s> encodes the asn </s>
funcom_train/22284602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout() { super.layout(); if (autoSize && iconImage != null) { int newWidth = height; int imgWidth = iconImage.getWidth(this); // only adjust to image width if we're at least square if (imgWidth > newWidth) { newWidth = imgWidth; } else { newWidth++; // adjust with one pixel for icons! } setSize(newWidth, height); //System.out.println("size == "+getSize()); } } COM: <s> this toolbar button resizes itself to the width </s>
funcom_train/10240062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(final CharSequence[] fields) { if (fields != null && fields.length > 0) { append(delimit(fields[0])); for (int i = 1; i < fields.length; i++) { append(getSeparator()).append(delimit(fields[i])); } } println(); } COM: <s> prints the elements of the array as a single line of separated fields </s>
funcom_train/19965247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getHelpMain1() { if (helpMain1 == null) {//GEN-END:|84-getter|0|84-preInit // write pre-init user code here helpMain1 = new Command("Help", Command.HELP, 0);//GEN-LINE:|84-getter|1|84-postInit // write post-init user code here }//GEN-BEGIN:|84-getter|2| return helpMain1; } COM: <s> returns an initiliazed instance of help main1 component </s>
funcom_train/1528149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calcAngleValue(double val) { // limit to [0, 2pi] double angVal = kernel.convertToAngleValue(val); rawValue = angVal; // if needed: change angle switch (angleStyle) { case ANGLE_ISCLOCKWISE: angVal = 2.0 * Math.PI - angVal; break; case ANGLE_ISNOTREFLEX: if (angVal > Math.PI) angVal = 2.0 * Math.PI - angVal; break; case ANGLE_ISREFLEX: if (angVal < Math.PI) angVal = 2.0 * Math.PI - angVal; break; } return angVal; } COM: <s> converts the val to a value between 0 and 2pi </s>
funcom_train/41705589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { if (img == hlImage) { return parent.imageUpdate(img, infoflags, x + X, y + Y, width, height); } else { return (infoflags & (ALLBITS | ERROR)) == 0; } } COM: <s> this method handles the updates from drawing the images </s>
funcom_train/24121696
/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_ESCAPE); WMFConstants.writeLittleEndian(out, escapeFunction); WMFConstants.writeLittleEndian(out, (short)(escapeData.length)); out.write(escapeData); } COM: <s> writes the content of the escape record to a stream </s>
funcom_train/8485390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJavaBaseMethodInvocation() { try { True.base_ifTrue_(success); True.base_ifFalse_(fail); True.base_ifTrue_ifFalse_(success, fail); False.base_ifTrue_(fail); False.base_ifFalse_(success); False.base_ifTrue_ifFalse_(fail, success); } catch (InterpreterException e) { e.printStackTrace(); fail("exception: "+e); } } COM: <s> tests the invocation of methods on natively implemented objects which thus </s>
funcom_train/15416466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandSecurity createCommandSecurity(String dftl) { String cn = GlobalProperties.get("ebean.server.commandsecurity", dftl); if (cn == null){ return null; } try { Class<?> cls = Class.forName(cn); return (CommandSecurity)cls.newInstance(); } catch (Exception ex){ throw new PersistenceException(ex); } } COM: <s> create a command security </s>
funcom_train/42062182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopDataListener() { synchronized (dataListener) { //stop thread if (dataListener.isAlive()) { stop = true; //commented out to prevent race condition: /* * Finder thread: Listener thread: * addSpot close * removeSpot removeSpot * terminate * join */ // try { // dataListener.join(); // } catch (InterruptedException e1) { // e1.printStackTrace(); // } } } } COM: <s> this method instructs the data listener thread to stop </s>
funcom_train/4717649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSynthRelParam() { SynMessage msg = new SYN().synth(1).param(1, 100).relative(); assertEquals("Ti", msg.getTypetag()); assertEquals((SynMessage.MAX_32BIT), msg.getArguments()[1]); assertEquals("/SYN/ID1/P1", msg.getAddress()); } COM: <s> set synth parameter relative </s>
funcom_train/3701733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireEvictionEvent(ResultItem ri) { ri.setStatus(ResultItem.EXPIRED); Iterator listeners = m_listeners.iterator(); while ( listeners.hasNext() ) { ItemCacheListener icl = (ItemCacheListener)listeners.next(); icl.itemEvicted(this, ri); } } // COM: <s> fire an eviction event to the listeners </s>
funcom_train/36186140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJAssociationsTableScrollPane() { if (jAssociationsTableScrollPane == null) { jAssociationsTableScrollPane = new JScrollPane(); jAssociationsTableScrollPane.setBounds(new Rectangle(5, 30, 339, 100)); jAssociationsTableScrollPane.setViewportView(getJAssociationsTable()); } return jAssociationsTableScrollPane; } COM: <s> this method initializes j associations table scroll pane </s>
funcom_train/3370720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundAt(int index, Color background) { Color oldBg = pages.get(index).background; pages.get(index).setBackground(background); if (background == null || oldBg == null || !background.equals(oldBg)) { Rectangle tabBounds = getBoundsAt(index); if (tabBounds != null) { repaint(tabBounds); } } } COM: <s> sets the background color at code index code to </s>
funcom_train/5090013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preview(){ try{ //marvinApplication.getPerformanceMeter().disable(); imageThumbnail = imageResetBuffer.clone(); MarvinImage imgOut = new MarvinImage(imageThumbnail.getWidth(), imageThumbnail.getHeight()); plugin.process(imageThumbnail, imgOut, null, MarvinImageMask.NULL_MASK, true); imgOut.update(); imageThumbnail = imgOut.clone(); //marvinApplication.getPerformanceMeter().enable(); } catch(Exception e){ e.printStackTrace(); } labelImage.setIcon(new ImageIcon(imageThumbnail.getBufferedImage())); } COM: <s> preview the plug in application </s>
funcom_train/22535719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleSelectionChanged(Object selectedItem) { if(selectedItem instanceof ILDModelObject) { InspectorManager.getInstance().setInput(LDVisualiserView.this, selectedItem); } // Highlight the selection's dependents fLabelProvider.setCurrentSelection(fCurrentLDState.getCurrentObject(), selectedItem); } COM: <s> handle the select changed </s>
funcom_train/41070834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessageLabelFontSize(int messageLabelFontSize) throws java.beans.PropertyVetoException { int oldMessageLabelFontSize = this.messageLabelFontSize; vetoableChangeSupport.fireVetoableChange(PROP_MESSAGELABELFONTSIZE, oldMessageLabelFontSize, messageLabelFontSize); this.messageLabelFontSize = messageLabelFontSize; propertyChangeSupport.firePropertyChange(PROP_MESSAGELABELFONTSIZE, oldMessageLabelFontSize, messageLabelFontSize); } COM: <s> set the value of message label font size </s>
funcom_train/10873658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void andNot(DocIdSetIterator iter) throws IOException { if (iter instanceof OpenBitSetIterator && iter.docID() == -1) { final OpenBitSetIterator obs = (OpenBitSetIterator) iter; andNot(obs.arr, obs.words); } else { int doc; while ((doc = iter.nextDoc()) < numBits) { clear(doc); } } } COM: <s> does in place and not of the bits provided by the </s>
funcom_train/45539116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IShowInTarget getShowInTarget() { return new IShowInTarget() { public boolean show(ShowInContext context) { ISelection sel= context.getSelection(); if (sel instanceof ITextSelection) { ITextSelection tsel= (ITextSelection) sel; int offset= tsel.getOffset(); IJSCElement element= fEditor.getElementAt(offset); if (element != null) { setSelection(new StructuredSelection(element)); return true; } } else if (sel instanceof IStructuredSelection) { setSelection(sel); return true; } return false; } }; } COM: <s> returns the code ishow in target code for this view </s>
funcom_train/9543716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { // int x = e.getX(); // int y = e.getY(); Component c = e.getComponent(); boolean change = false; for (int j = 0; j < NumVisX; j++) { if (c == HorizDrag[j]) { change = true; break; } } for (int j = 0; j < NumVisY; j++) { if (c == VertDrag[j]) { change = true; break; } } if (change) synchLabelAndCellSizes(); } COM: <s> handles cell resizing </s>
funcom_train/21792470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean reserveRoom( Reservation reservation ) { try { boolean makeReservation = HotelManager.reserve(reservation); return makeReservation; } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return false; } COM: <s> reserve a hotel room </s>
funcom_train/20079132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableViewerColumn getViewerColumn(int columnId) { TableColumn column = table.getColumnModel().getColumn(columnId); TableViewerColumn vc = (TableViewerColumn) column.getData(ViewerColumn.COLUMN_VIEWER_KEY); if (vc == null) { vc = new TableViewerColumn(this, column); } return vc; } COM: <s> returns the table viewer column for the specified column </s>
funcom_train/18898592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { Session session = interpreter.getSession(); if (session != null) { session.close(); } session = null; } catch (QueryException e) { if (log.isInfoEnabled()) { log.info("Couldn't close interpreter session", e); } } } COM: <s> closes the session underlying this bean </s>
funcom_train/42226025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand2() { if (okCommand2 == null) {//GEN-END:|86-getter|0|86-preInit // write pre-init user code here okCommand2 = new Command("Salvar", Command.OK, 0);//GEN-LINE:|86-getter|1|86-postInit // write post-init user code here }//GEN-BEGIN:|86-getter|2| return okCommand2; } COM: <s> returns an initiliazed instance of ok command2 component </s>
funcom_train/50214136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionCancel() { mustClose = true; PerfmeterConfig.this.firePropertyChange("configuration", null, null); // restore checkBoxes state for (int i = 0; i < jCheckBoxes.length; i++) jCheckBoxes[i].setSelected(checkBoxesStates[i]); mustClose = false; } COM: <s> this method initializes j button cancel </s>
funcom_train/39266302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeNotes() { try { scxmlOut.write("<notes>\n"); scxmlOut.write("<body xmlns=\"http://www.w3.org/1999/xhtml\">\n"); scxmlOut.write("<p>"); scxmlOut.write(timeNow.toString()); scxmlOut.write("This SCXML file has been generated by an early version of the Xholon SCXML exporter.\n"); scxmlOut.write("</p>"); scxmlOut.write("</body>\n"); scxmlOut.write("</notes>\n"); } catch (IOException e) { Xholon.getLogger().error("", e); //e.printStackTrace(); } } COM: <s> write notes in xhtml format </s>
funcom_train/3176102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property addProperty(String tag, String value) { try { return addProperty(tag, value, -1); } catch (GedcomException e) { // ugh, use a simple value here return addProperty(new PropertySimpleReadOnly(tag, value), -1); } } COM: <s> adds a sub property to this property </s>
funcom_train/7616041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D getStartPoint() { double a = Math.toRadians(getAngleStart()); return new Point2D.Double(getX() + (1.0 + Math.cos(a)) * getWidth() / 2.0, getY() + (1.0 - Math.sin(a)) * getHeight() / 2.0); } COM: <s> gets the start point of the arc as a point2 d </s>
funcom_train/35194992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataArray (E... arr) { // could use a hack with package-scope constructor to avoid redundant // powerless check here as a minor optimization, but this is simpler, // and more obviously correct. super(arr); Class arrType = arr.getClass().getComponentType(); if (!Utility.isSubtypeOf(arrType, Data.class)) { throw new IllegalArgumentException("DataArray component type " + arrType + " is not Data"); } } COM: <s> construct an immutable array with a copy of an existing array with </s>
funcom_train/18481061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColoringAttributes() { ColoringAttributes ca = new ColoringAttributes() ; ca.setColor(XVert.xvert(getTarget().getDiffuse())) ; if (getTarget().getSmooth()) { ca.setShadeModel(ColoringAttributes.SHADE_GOURAUD) ; } else { ca.setShadeModel(ColoringAttributes.SHADE_FLAT) ; } getContent().setColoringAttributes(ca) ; } COM: <s> sets the coloring attributes of the appearance object </s>
funcom_train/29887398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(double dx, double dy) { if (dx != 0 || dy != 0) { this.oldX = this.x; this.x += dx; this.oldY = this.y; this.y += dy; } // if (dx != 0) { // oldX = x; // x += dx; // } // // if (dy != 0) { // oldY = y; // y += dy; // } } COM: <s> moves this sprite as far as delta x dx and delta y dy </s>
funcom_train/40926388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMensajeVolverAtrasCommand() { if (mensajeVolverAtrasCommand == null) {//GEN-END:|58-getter|0|58-preInit // write pre-init user code here mensajeVolverAtrasCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|58-getter|1|58-postInit // write post-init user code here }//GEN-BEGIN:|58-getter|2| return mensajeVolverAtrasCommand; } COM: <s> returns an initiliazed instance of mensaje volver atras command component </s>