__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3558655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Container getContentPane() { if (contentPane == null) { if (getFrame() != null) { contentPane = getFrame().getContentPane(); } else if (getApplet() != null) { contentPane = getApplet().getContentPane(); } } return contentPane; } COM: <s> returns the content pane wether were in an applet or application </s>
funcom_train/27944185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncodeHtml_newlineNonsense1() { encodeHtmlTester( "Hi.\nHello!\rHow are you?\n\rI hope you are fine.", // \n\r is not right...so it turns to 2 newlines "Hi.<br/>Hello!<br/>How are you?<br/><br/>I hope you are fine." ); } COM: <s> plain text with mixed unix winblows mac newlines </s>
funcom_train/5856056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean subscribe(Output[] outs) { if (client != null && my_id != null) { Metadata[] mds; String id = my_id; if (outs == null) { printError("Error subscribing: no outputs provided."); return false; } for (int i=0; i<outs.length; i++) { mds = outs[i].getAllMetadata(); id = my_id + my_id_counter; my_id_counter++; client.subscribe(id, mds); } return true; } else return false; } COM: <s> subscribes each output in an array one single policy to input source s </s>
funcom_train/44011610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSession() { System.out.println("setSession"); Session s = null; TransactionBO instance = new TransactionBO(); instance.setSession(s); // 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 session method of class edu </s>
funcom_train/14462089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBorderDiag(int t){ Iflag = 0; Iflag |= ((short) icvTop); Iflag |= ((short) icvBottom << 7); Iflag |= ((short) t << 14); Iflag |= ((short) dgDiag << 21); Iflag |= ((short) mystery << 25); Iflag |= ((short) fls << 26); this.udpateBordersAndPattern(); } COM: <s> set the diagonal border for this format </s>
funcom_train/7255138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NetworkConnection createConnection( ConnectionEndpoint target, MessageStreamEncoder encoder, MessageStreamDecoder decoder, boolean connect_with_crypto, boolean allow_fallback, byte[][] shared_secrets ) { return NetworkConnectionFactory.create( target, encoder, decoder, connect_with_crypto, allow_fallback, shared_secrets ); } COM: <s> create a new unconnected remote network connection for outbound initiated connections </s>
funcom_train/41511488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(ConfigResponse other, boolean overWrite) { Set entrySet = other.attributes.entrySet(); for (Iterator i = entrySet.iterator(); i.hasNext();) { Entry entry = (Entry) i.next(); if (overWrite || this.attributes.get(entry.getKey()) == null) { this.attributes.put(entry.getKey(), entry.getValue()); } } } COM: <s> merge the values from another config response into this object </s>
funcom_train/42567052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime(int time) throws InvalidTimeException { // take advantage of integer arithmetic int hour = (int)(time / 100); int minute = time - (hour * 100); // make sure the time is valid if(!checkTime(hour, minute, NEITHER)) { throw new InvalidTimeException(hour, minute, NEITHER); } // if no errors were found, set the time this.time = time; } COM: <s> set the time in 24 hour notation </s>
funcom_train/33517117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int checkReferences() { int i = 0; for (Object obj = null; (obj = this.rq.poll()) != null;) { i++; this.internalMap.remove(((SoftValue<K,V>)obj).getKey()); } return i; } COM: <s> checks soft references and cleans any that have been placed on </s>
funcom_train/3399734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } } COM: <s> detect java type customizations placed directly on simple types rather </s>
funcom_train/24420636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTranslate() throws ParserConfigurationException, SAXException, IOException, TransformerException { final StreamSource source = new StreamSource( ClassLoader.getSystemResourceAsStream("IKATP.xml")); final DOMResult result = new DOMResult(); Component2CellMLModel.translate(source, result); IdenticalTransformerInstance.transform( new DOMSource(result.getNode()), new StreamResult(new OutputStreamWriter(System.out))); } COM: <s> test method for </s>
funcom_train/25197731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runTest(String s1, String s2, String result) throws Exception { p.push(new TString(s1, null)); p.push(new TString(s2, null)); new Concat("*").execute(p, null, null); assertEquals(result, p.popUnchecked().getValue()); assertNull(p.popUnchecked()); } COM: <s> apply tt concat tt on two strings and check the result </s>
funcom_train/28763361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsssubheadredofont(String newVal) { if ((newVal != null && this.csssubheadredofont != null && (newVal.compareTo(this.csssubheadredofont) == 0)) || (newVal == null && this.csssubheadredofont == null && csssubheadredofont_is_initialized)) { return; } this.csssubheadredofont = newVal; csssubheadredofont_is_modified = true; csssubheadredofont_is_initialized = true; } COM: <s> setter method for csssubheadredofont </s>
funcom_train/7930261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readExt(Element element, MimeType type) { NodeList nodes = element.getChildNodes(); for (int i=0; i<nodes.getLength(); i++) { Node node = nodes.item(i); if (node.getNodeType() == Node.TEXT_NODE) { type.addExtension(((Text) node).getData()); } } } COM: <s> read element named ext </s>
funcom_train/32061394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doTaskforceMovements() { // Move taskforces in game for (Taskforce tf : taskforces) { tf.move(this); if (tf.isInSystem()) { tf.getOwner().infodb .addStarsystemToExploredList(tf.getSystem()); } } // remove unwanted / unneeded taskforces (needed after tf move!) removeRemovalMarkedTaskforces(); } COM: <s> move all the taskforces during a turn </s>
funcom_train/549922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCommand(ICommand command) { if (exists(command)) return; if (deviceList != null) { deviceList.add(command.getDevice()); } adapters.add(new CommandAdapter(command, adapters.size())); fireTableRowsInserted(adapters.size(), adapters.size()); } COM: <s> adds a command in the table if it is not already present </s>
funcom_train/5679704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean justConnect(URL node) throws FadaException { boolean OK = false; Logger logger = null; logger = Logger.getLogger(getClass()); try { OK = stub.justConnect(node); } catch (Exception e) { FadaException fex = new FadaException( "Unable to call justConnect on " + node); throw (FadaException) fex.fillInStackTrace(); } return OK; } COM: <s> adds a node to the list of neighbors for this node </s>
funcom_train/51038070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSelectedRowsList() { ArrayList l = new ArrayList(); if (table != null && !table.isDisposed()) { TableItem[] tis = table.getSelection(); for (int i = 0; i < tis.length; i++) { TableRowSWT row = (TableRowSWT) getRow(tis[i]); if (row != null && row.getDataSource(true) != null) l.add(row); } } return l; } COM: <s> returns an list of all selected table row swt objects </s>
funcom_train/18655691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue(String key) { String str; String returnValue = null; ListIterator lit = configuration.listIterator(); while (lit.hasNext()) { str = (String)lit.next(); if (isKey(str,key)) returnValue = strValue(str); } return returnValue; } COM: <s> searches the loaded configuration list for an occurance of a specified </s>
funcom_train/8222861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(ConversationID id, String method, HttpUrl url) { Object[] row = new Object[] { new Date(), id, method, url, null }; _rows.add(row); fireTableRowsInserted(_rows.size() - 1, _rows.size() - 1); } COM: <s> adds the row </s>
funcom_train/1798966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetadataRegistry register(ElementKey<?, ?> key) { if (key != null) { Class<? extends Element> elementType = key.getElementType(); if (Element.class == elementType) { build(key); } else { registerClass(elementType); } } return this; } COM: <s> registers the metadata for an element key </s>
funcom_train/38524257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ignorableWhitespace(char[] buf, int offset, int len) throws SAXException { if (ignoreWhiteSpace) return; String s = new String(buf, offset, len); if (s != null && current != null) { if (current.getValue() != null) current.setValue(current.getValue() + s); else current.setValue(s); } } COM: <s> by default it ignores white space </s>
funcom_train/51783172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMemString() { long free = Runtime.getRuntime().freeMemory(); long total = Runtime.getRuntime().totalMemory(); long used = total - free; used /= (1024 * 1024); total /= (1024 * 1024); return String.format("used: %dM total: %dM ", used, total); } COM: <s> creates the memory information string </s>
funcom_train/7510978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemOpenMass() { if (jMenuItemOpenMass == null) { jMenuItemOpenMass = new JMenuItem(); jMenuItemOpenMass.setText(Messages.getString("MainFrame.menu.openmass")); //$NON-NLS-1$ registerAction(jMenuItemOpenMass, Actions.NOT_IMPLEMENTED); } return jMenuItemOpenMass; } COM: <s> this method initializes j menu item open mass </s>
funcom_train/8039313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFQNOfCategoryClass() { Category root = Logger.getRootLogger(); Priority info = Level.INFO; String catName = Logger.class.toString(); LoggingEvent event = new LoggingEvent( catName, root, info, "Hello, world.", null); assertEquals(catName, event.fqnOfCategoryClass); } COM: <s> tests logging event </s>
funcom_train/18065022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getTypeComboBox() { if (this.typeComboBox == null){ this.typeComboBox = new JComboBox(); this.typeComboBox.addItem("BIGINT"); this.typeComboBox.addItem("CHAR"); this.typeComboBox.addItem("DATE"); this.typeComboBox.addItem("INTEGER"); this.typeComboBox.addItem("NUMERIC"); this.typeComboBox.addItem("TIMESTAMP"); this.typeComboBox.addItem("VARCHAR"); } return typeComboBox; } COM: <s> get type combo box method initializes variable type combo box </s>
funcom_train/38259096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Substitution getSubstitution() { Substitution value = null; // if the type of THIS is Factor if (TYPE == 1) { value = ((Factor)this.clause).getSubstitution(); } // if the type of THIS is Resolvent if ((TYPE == 2) || (TYPE == 0)) { value = ((Resolvent)this.clause).getSubstitution(); } return value; } COM: <s> returns the coresponding substitution object </s>
funcom_train/51590161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Bundle findBundle(String symbolicName) { for (int i = 0; i < context.getBundles().length; ++i) { Bundle b = context.getBundles()[i]; if (b.getHeaders().get("Bundle-Name") != null && b.getHeaders().get("Bundle-Name").equals(symbolicName)) { return b; } } return null; } COM: <s> search runtime to see if bundle with passed name exists </s>
funcom_train/41593282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypeCodePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_POCDMT000040Custodian_typeCode_feature"), getString("_UI_PropertyDescriptor_description", "_UI_POCDMT000040Custodian_typeCode_feature", "_UI_POCDMT000040Custodian_type"), V3Package.eINSTANCE.getPOCDMT000040Custodian_TypeCode(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the type code feature </s>
funcom_train/16912954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getExcitatoryInputs() { double retVal = 0; if (excitatoryInputs.size() > 0) { for (Synapse synapse : excitatoryInputs) { Neuron source = synapse.getSource(); // Will not work with spiking, or negative activations? retVal += source.getActivation() * synapse.getStrength(); } } return retVal; } COM: <s> returns net input to this neuron source activations times weights from </s>
funcom_train/12071299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTraceType () { if (!surface.startsWith("*")) { throw new IllegalArgumentException("getTraceType() on edu.upenn.cis.treebank node that isn't a trace"); } StringTokenizer st = new StringTokenizer(surface, "-"); return st.nextToken(); } COM: <s> returns the type of this trace such as or t </s>
funcom_train/13916538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHashCode(Object[] record) { if (record == null) return 0; int result = 1; for (int element : this.miHashFields) { ETLInPort port = this.mInPorts[element]; int hash; if (port.isConstant()) hash = port.getConstantValue().hashCode(); else { Object obj = record[port.getSourcePortIndex()]; hash = obj == null ? 0 : obj.hashCode(); } result = 31 * result + hash; } return result; } COM: <s> gets the hash code </s>
funcom_train/18485590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWellFormed() throws IOException { if (!m_parsedMode) { try { checkWellFormedness(); } catch (SAXException saxe) { //nothing wrong here. //document is just not well-formed. } catch (ParserConfigurationException pce) { throw new IOException(pce.getMessage()); } } return m_parsedMode; } //}}} //{{{ serialize() COM: <s> indicates if the document is well formed </s>
funcom_train/38865189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefault(String ursicode) { con = null; stmt = null; ursi=ursicode; name="unknown"; saoID=(byte)0; saoName="unknown"; unit=""; layer=""; factor=getScaling(ursicode); description=""; warnLo=WARNLO; warnHi=WARNHI; errorLo=ERRORLO; errorHi=ERRORHI; found=false; } COM: <s> create a default ursi code object when the database is not accessible </s>
funcom_train/16651744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEqual(Institute i1, Institute i2) { if (i1 == null && i2 == null) { return true; } if (i1 == null || i2 == null) { return false; } if (i1.getCeraId().equals(i2.getCeraId())) { return true; } if (i1.getStringIdentifier().trim() .equals(i2.getStringIdentifier().trim())) { return true; } return false; } COM: <s> compares to institutes </s>
funcom_train/50872961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetVariables() { OMBinding binding = new OMBinding(); Vector variables = new Vector(); variables.add( new OMVariable( "a" ) ); binding.setVariables( variables ); assertTrue( ((OMVariable) binding.getVariableAt( 0 ) ).getName().equals( "a" ) ); } COM: <s> test of set variables method of class nl </s>
funcom_train/22782962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { if (index != e.getLastIndex()) { index = e.getLastIndex(); // cosmetic correction on upscrolling Rectangle rect = table.getCellRect(index, 1, true); rect.add(table.getCellRect(index - 1, 1, true)); // make cell visible table.scrollRectToVisible(rect); } } } COM: <s> move scrollpane to right position </s>
funcom_train/1097110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRemainingDeployments() throws MalformedURLException { if (!getDeployments().isEmpty()) { for (Iterator<String> iter = getDeployments().keySet().iterator(); iter.hasNext();) { fireRemoveEvent(new File(getScanDir(), iter.next()).toURI().toURL(), null); } } } COM: <s> convenience method for firing remove scan events for any entries not </s>
funcom_train/26206137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { assertIsInvalidated(); // load JOB map properties getName(); getInitialCapacity(); getExtentCapacity(); // create empty map // TODO: This is a bug, because the id of this map changes at // deletePersistent/createPersistent. // NOTE: This map may be referenced by other JobCapable objects. deletePersistent(); createPersistent(0); } COM: <s> removes all entries from this map </s>
funcom_train/14093544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckExpectedID() throws XMLException { IXMLTestCase tc = m_fixture.getTestCase(); Element e = m_fixture.newElement("impltest", new String[] { "expectedrefid", "data" }); m_abstractAssertTagHandler = new ImplAssertTagHandler(e, tc); m_abstractAssertTagHandler.checkExpected(); } COM: <s> check the expected id </s>
funcom_train/42875088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeServiceListener(String type, ServiceListener listener) { type = type.toLowerCase(); List<ServiceListener> list = serviceListeners.get(type); if (list != null) { synchronized (this) { list.remove(listener); if (list.size() == 0) { serviceListeners.remove(type); } } } } COM: <s> remove listener for services of a given type </s>
funcom_train/7601677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Panel getJPList() { if (jPList == null) { jPList = new Panel(); jPList.setLayout(new BoxLayout(getJPList(), BoxLayout.X_AXIS)); jPList.setMinimumSize(new Dimension(150, 200)); jPList.setPreferredSize(new Dimension(150, 260)); jPList.add(getJLFileList(), null); } return jPList; } COM: <s> this method initializes j plist </s>
funcom_train/23713299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getActorIdWithoutDomain() { if (!actorID.startsWith("/")) { int index = actorID.indexOf("."); String id = actorID; if (index != -1) { id = actorID.substring(0, index); } int i = id.indexOf("/", 1); if (i != -1) { return id.substring(i); } } return actorID; } COM: <s> gets the actor id without the actor domain address </s>
funcom_train/2324527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sort() { if (!isSorted) { // IMPORTANT: TO DO : replace mergeSort with quickSort! // currently it is mergeSort because JDK 1.2 can't be imported into // VisualAge. buffer.sort(); // this.buffer.mergeSort(); this.isSorted = true; } } COM: <s> sorts the receiver </s>
funcom_train/14166245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initRandomSequence(){ //generate an ArrayList containing all indices ArrayList randseq = new ArrayList(); for (int i=0;i<numPatterns;i++){ randseq.add(new Integer(i)); } //generate random permutation of the indices Collections.shuffle(randseq); Iterator iter = randseq.iterator(); int i=0; while(iter.hasNext()){ this.randomPatternSequence[i] = ((Integer) iter.next()).intValue(); i++; } } COM: <s> initializes the random sequence for pattern delivery </s>
funcom_train/9585563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TrillianCryptReqRvCmd(RecvRvIcbm icbm) { super(icbm); TlvChain chain = getExtraTlvs(); Tlv pTlv = chain.getLastTlv(TYPE_MODULUS); if (pTlv != null) modulus = getBigIntFromHexBlock(pTlv.getData()); else modulus = null; Tlv gTlv = chain.getLastTlv(TYPE_PUBLICVALUE); if (gTlv != null) publicValue = getBigIntFromHexBlock(gTlv.getData()); else publicValue = null; } COM: <s> creatse a new trillian encryption session request from the given incoming </s>
funcom_train/50537204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V remove(Object key) { V retval=get(key); if(send_message) { try { MethodCall call=new MethodCall(REMOVE, key); disp.callRemoteMethods(null, call, update_mode, timeout); } catch(Exception e) { throw new RuntimeException("remove(" + key + ") failed", e); } } else { return _remove(key); } return retval; } COM: <s> removes the key and its corresponding value from this map </s>
funcom_train/28116747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addError(Test test, Throwable error) { Throwable cause = null; if (error instanceof JMSException) { cause = ((JMSException) error).getLinkedException(); } else if (error instanceof NamingException) { cause = ((NamingException) error).getRootCause(); } _coverage.failed(test, error, cause); } COM: <s> an error occurred </s>
funcom_train/24112762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean equals(final double value1, final double value2, final int decimalPlaces) { final double factor = Math.pow(10.0, decimalPlaces); final long long1 = Math.round(value1 * factor); final long long2 = Math.round(value2 * factor); return (long1 == long2); } COM: <s> returns whether or not two double values are equal when considering the </s>
funcom_train/49404005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportMemoryStats(final String stage) { System.gc(); final Runtime runtime = Runtime.getRuntime(); log.info(stage + " freeMemory: " + runtime.freeMemory() + "; totalMemory: " + runtime.totalMemory() + "; maxMemory: " + runtime.maxMemory()); } COM: <s> print out some quick jvm memory stats </s>
funcom_train/17899605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode getNodeFromRoot(Object userObject) { int childCount = root.getChildCount(); for (int i = 0; i < childCount; i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)root.getChildAt(i); if (node.getUserObject() == userObject) { return node; } } return null; } COM: <s> returns the tree node from the root node with the </s>
funcom_train/28501071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Node getNodeByString( Session pSession, String pValue ) throws Exception { Node n = null; try { n = pSession.getNodeByUUID( pValue ); } catch (Exception e) { if (pValue.startsWith("/")) { n = pSession.getRootNode().getNode( pValue.substring(1) ); } } return n; } COM: <s> get node by string </s>
funcom_train/32831152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllDifferences_notEqualsInnerDifferentValues() { Difference result = reflectionComparator.getDifference(objectsInnerA, objectsInnerDifferentValue); Difference difference = getInnerDifference("string2", getInnerDifference("inner", result)); assertEquals("test 2", difference.getLeftValue()); assertEquals("XXXXXX", difference.getRightValue()); } COM: <s> test for objects with inner objects that contain different values </s>
funcom_train/20644500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BCNode getNodeWithId(BCNode parent, String s) { if (parent.getNID().equals(s)) return parent; Iterator/*<BCNode>*/ i = parent.getChildrens().iterator(); BCNode b = null; while (i.hasNext() && b == null) { b = getNodeWithId((BCNode) i.next(),s); } return b; } COM: <s> search the base tree for a partner id </s>
funcom_train/46061753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initScoreEasyForm() { scoreEasyForm = new EditScoreCalculationEasyForm("editscorecalcEasyForm", getTranslator(), stNode.getScoreCalculator(), assessableChildren); scoreEasyForm.addListener(this); score.put("scoreForm", scoreEasyForm); score.contextPut("isExpertMode", Boolean.FALSE); } COM: <s> initialize an easy mode score calculator form and push it to the score </s>
funcom_train/2294751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSiblings() { try { return getCms().readResource(getParamResource(), CmsResourceFilter.ALL).getSiblingCount() > 1; } catch (CmsException e) { LOG.error(e.getLocalizedMessage(getLocale()), e); return false; } } COM: <s> checks if this resource has siblings </s>
funcom_train/18811317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canAddFile(ICommodoreFile element) { boolean cannAddFile = bam.getMaxEntryCount() >= bam.getEntryCount() + 1; if (cannAddFile) { int fileLength = element.getProgramm().length; int freeSectors = 0; int freeBytes = freeSectors * 254; cannAddFile = freeBytes >= fileLength; } return cannAddFile; } COM: <s> checks if a file can be added to the disk </s>
funcom_train/15546623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(TableModel dataModel) { if ( getDBTableModel() != null ) { getDBTableModel().removeDBModelListener( this ); } super.setModel((DBTableModel) dataModel); if ( getDBTableModel() != null ) { getDBTableModel().addDBModelListener( this ); } } COM: <s> sets new model for this table </s>
funcom_train/22233593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bounds getBounds() { if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_BOUNDS_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("Node2")); } } else { // this will throw a SceneGraphCycleException if there is // a cycle checkForCycle(); } return ((Shape3DRetained)this.retained).getBounds(); } COM: <s> see parent class for the documentation on get bounds </s>
funcom_train/9199416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer twelveHourStyle(Integer aHour){ Integer result = aHour; if(aHour != null){ if (aHour == 0) { result = 12; //eg 12:30 am } else if (aHour > 12){ result = aHour - 12; //eg 14:00 -> 2:00 } } return result; } COM: <s> coerce the hour to match the number used in the 12 hour style </s>
funcom_train/33345888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canDisplay(ViewRequirement requirement) { final NakedObject collection = requirement.getNaked(); if (collection == null) { return false; } else { final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection); return facet != null && facet.size(collection) > 0; } } COM: <s> a collection tree can only be displayed for a collection that has elements </s>
funcom_train/44709309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addError(String name, String message) { ParameterData parameter; if (!m_parameterDataValues.containsKey(name)) { throw new IllegalArgumentException ("Attempt to set Error in Non-Existant ParameterData"); } parameter = (ParameterData) m_parameterDataValues.get(name); parameter.addError(message); m_isValid = false; } COM: <s> adds an error message to the parameter data object associated with </s>
funcom_train/7620390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAt(int index) { System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); System.arraycopy(mValues, index + 1, mValues, index, mSize - (index + 1)); mSize--; } COM: <s> removes the mapping at the given index </s>
funcom_train/42268260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDeletable(Long id) { Objectify ofy = ObjectifyService.begin(); ArboPage arboPage = ofy.get(ArboPage.class, id); if(arboPage.getIdUserInModif().intValue() != -1) return false; //delete all child for(Long childKey : arboPage.getIdChildArboPage()) { // if one is locked, its impossible to delete if(!isDeletable(childKey)) return false; } return true; } COM: <s> recursing to see a sub nodes is being modified </s>
funcom_train/937054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRenameWithDotDot() throws Exception { AbstractFile dir = VFS.resolveFile(prefix+testUtils.createTempName()); dir.mkdir(); oldFile=VFS.resolveFile(dir,"testFile"); testUtils.touchFile(oldFile); String path="../"+newFile.getName(); oldFile.rename(path); assertFalse("Old file should no longer exists", oldFile.exists()); assertTrue("New file should be exists: "+newFile.getPath(), newFile.exists()); } COM: <s> tests rename by passing a relative path begining with two dots </s>
funcom_train/33804684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(String identifier, Object... args) { Invocable invEngine = (Invocable) jsEngine; try { invEngine.invokeFunction(identifier, args); } catch (NoSuchMethodException ex) { logger.log(Level.WARNING, "No such method: " + identifier, ex); } catch (ScriptException ex) { logger.log(Level.WARNING, "ScriptException thrown!", ex); } } COM: <s> invokes a java script function </s>
funcom_train/49097932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getScreenCommand() { if (screenCommand == null) {//GEN-END:|56-getter|0|56-preInit // write pre-init user code here screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|56-getter|1|56-postInit // write post-init user code here }//GEN-BEGIN:|56-getter|2| return screenCommand; } COM: <s> returns an initiliazed instance of screen command component </s>
funcom_train/17850737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int extractTime(String value) throws IOException { // E.g. "200407101030" try { int hour = Integer.parseInt(value.substring(8, 10)); int minute = Integer.parseInt(value.substring(10, 12)); return hour * 60 + minute; } catch (Throwable thr) { throw new IOException("Illegal time value: '" + value + "'"); } } COM: <s> extracts the time from a xmltv time string </s>
funcom_train/51299695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildSqlQuery(String tableField, String searchText) { if (searchText.equals("")) return ""; searchText = getSQLText(searchText); boolean flag = searchText.contains("%") || searchText.contains("_"); if (flag) return " AND g." + tableField + " " + (!flag ? "= " : "LIKE '") + searchText + (!flag ? "" : "'"); return " AND g." + tableField + " = " + searchText; } COM: <s> sql query to search by mask </s>
funcom_train/49889907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyReconnection() { // Notify connection listeners of the reconnection. for (ConnectionListener listener : connection.getConnectionListeners()) { try { listener.reconnectionSuccessful(); } catch (Exception e) { // Catch and print any exception so we can recover // from a faulty listener e.printStackTrace(); } } } COM: <s> sends a notification indicating that the connection was reconnected successfully </s>
funcom_train/7614526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAscent(){ Paint p; AndroidGraphics2D g = AndroidGraphics2D.getInstance(); if(g == null) { throw new RuntimeException("AndroidGraphics2D not instantiated!"); } p = ((AndroidGraphics2D)g).getAndroidPaint(); return (int)p.ascent(); //return ascent; } COM: <s> returns ascent of this font peer </s>
funcom_train/39293989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DateType_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DateType_value_feature", "_UI_DateType_type"), CntPackage.Literals.DATE_TYPE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value feature </s>
funcom_train/43327532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double score(Residue a, Residue b) { Atom aa, ab; aa = a.atomSearch("CA"); ab = b.atomSearch("CA"); if ((aa==null) || (ab==null)) return 1000.0; // undefined atoms are 1000 a from everything else else return Atom.distance(aa,ab) - 10.0; } COM: <s> score is the distance between the residues </s>
funcom_train/40704960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void usersGetInfo(List<Long> uids, List<String> fields, AsyncCallback<List<UserInfo>> callback) { Json j = new Json (); j.putAsCommaSep ( "uids", uids ); j.putAsCommaSep ( "fields", fields ); callMethodRetList ( "users.getInfo", j.getJavaScriptObject (), UserInfo.class, callback ); } COM: <s> returns a wide array of user specific information for each user </s>
funcom_train/22791396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int selectRow(Ujo row) { UjoTableModel model = getModel(); if (row!=null) for (int i=0; i<model.getRowCount(); i++) { if (row==model.getRow(i)) { selectRow(i); return i; } } clearSelection(); return -1; } COM: <s> select an ujo </s>
funcom_train/5678877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConduit( ConduitInformation info) { // System.out.println( "ConduitTableModel.removeConduit( "+info.getCreator()+")"); for ( int i = 0; i < conduits.size(); i++) { if ( ((ConduitInformation)conduits.elementAt( i)).getCreator().equals( info.getCreator())) { conduits.removeElementAt( i); fireTableRowsDeleted( i, i); return; } } } COM: <s> remove a conduit </s>
funcom_train/30078756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getForeignIn(Element odeMessage) { Element fi = DOMUtils.findChildByName(odeMessage, FOREIGN_HEADER_IN); if (fi == null) { fi = odeMessage.getOwnerDocument().createElementNS(FOREIGN_HEADER_IN.getNamespaceURI(),FOREIGN_HEADER_IN.getLocalPart()); odeMessage.appendChild(fi); } return fi; } COM: <s> get the foreign in message extension if it exists otherwise create it </s>
funcom_train/26413033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw( Graphics g ) { g.setColor( GUIProperties.AUDIOPORTMODEL_COLOR ); g.fillRect( posX, posY, width, height ); g.setColor( GUIProperties.COMPONENTMODEL_USERNAME_COLOR ); g.setFont( GUIProperties.COMPONENTMODEL_USERNAME_FONT ); g.drawString( "AudioOUT", posX + 5, posY + 20 ); drawInputs( g ); } COM: <s> draw the component with input and output connectors </s>
funcom_train/50863618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unloadTowedVehicle() { Vehicle towed = getRover().getTowedVehicle(); if (towed != null) { towed.setReservedForMission(false); getRover().setTowedVehicle(null); towed.setTowingVehicle(null); tradingSettlement.getInventory().storeUnit(towed); } } COM: <s> unload any towed vehicles </s>
funcom_train/10951716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean taxApplies() { boolean taxApplies = false; Iterator<ShoppingCartItem> i = this.iterator(); while (i.hasNext()) { ShoppingCartItem item = i.next(); if (item.taxApplies()) { taxApplies = true; break; } } return taxApplies; } COM: <s> returns true when there are taxable items in the cart </s>
funcom_train/20080609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Button button) { if (fireEvent(Events.BeforeRemove, this, button)) { button.removeListener(Events.Click, listener); items.remove(button); if (rendered) { panel.remove(button); } fireEvent(Events.Remove, this, button); } } COM: <s> removes a button from the bar </s>
funcom_train/46655141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStyles() { this.setStyleName("quizzesSingleQuestion"); questionText.addStyleName("testQuestionText"); this.setWidth("100%"); this.setSpacing(5); questionPanel.setWidth("100%"); questionPanel.setSpacing(2); dataPanel.setSpacing(5); // table style DOM.setStyleAttribute(questionDataTable.getElement(), "fontSize", "x-small"); questionDataTable.addStyleName("testXSmallFont"); questionDataTable.addStyleName("testsTable"); } COM: <s> sets the styles </s>
funcom_train/8378332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocations(Iterable<? extends LatLon> locations, List<Integer> directions){ List<Position> positions = new ArrayList<Position>(); Position first = null; Iterator<Integer> direction = directions.iterator(); for(LatLon loc : locations){ Position temp = new Position(loc, 0); positions.add(temp); if(first != null){ directionsMap.put(first, new Couple<Position, Integer>(temp, direction.next())); } first = temp; } this.setPositions(positions); this.directions = directions; } COM: <s> b warning b locations </s>
funcom_train/28983135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getSettingsSMTPUserName () { if (settingsSMTPUserName == null) {//GEN-END:|83-getter|0|83-preInit // write pre-init user code here settingsSMTPUserName = new TextField ("User Name*:", null, 64, TextField.ANY);//GEN-LINE:|83-getter|1|83-postInit // write post-init user code here }//GEN-BEGIN:|83-getter|2| return settingsSMTPUserName; } COM: <s> returns an initiliazed instance of settings smtpuser name component </s>
funcom_train/6289835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public String toString() { StringBuffer buffer = new StringBuffer( this.size * 23 ); buffer.append( super.toString() ).append( "{\n" ); short[] values = values(); for (int i = 0; i < values.length; i++) { buffer.append( values[i] ); buffer.append('\n'); } buffer.append('}'); return buffer.toString(); }*/ COM: <s> returns string containing the string representations of all objects of this map </s>
funcom_train/50377605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPath getAbsolutePath() { try { if (getParentFolder() == null || getParentFolder().trim().length() == 0) { return getProject().getFile(getFilename()).getLocation(); } else { IFolder parentFolder = getProject().getFolder( Path.fromPortableString(getParentFolder())); return parentFolder.getLocation().append(getFilename()); } } catch (NullPointerException e) { return null; } } COM: <s> returns an absolute path to the diagram file </s>
funcom_train/2889884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SoapElement createSubscribeResponse() { SoapElement root = XomHelper.wsntElement(SUBSCRIBE_RESPONSE); SoapElement address = subscriptionEPR.toXomInNewNamespace(SUBSCRIPTION_REFERENCE, Constants.WSRF_WSNT_NAMESPACE, "wsnt", Constants.WS_ADDRESSING_NAMESPACE, "wsa"); root.addOrReplaceChild(address); return root; } COM: <s> create a subscription response which is an epr in a different namespace </s>
funcom_train/32056659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMouseDragged() { System.out.println("testMouseDragged"); Button b = new Button(); MouseEvent e = new MouseEvent(b, 1, 1, 1, 1, 1, 1,false); BasicMarqueeHandler bm = new BasicMarqueeHandler(); bm.mouseDragged(e); } COM: <s> this function tests mouse dragged function of vertex view class </s>
funcom_train/27823219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateNotify(KAONConnectionProxy.UpdateResultHolder updateResultHolder) throws KAONException { try { ObjectMessage message=m_topicSession.createObjectMessage(updateResultHolder); m_topicPublisher.publish(message); } catch (JMSException e) { throw new KAONException("Error in publishing JMS message.",e); } } COM: <s> publishes the notification about an ontology update to others </s>
funcom_train/24533028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMethodReturningABean(String method,String beanName) throws CodeGenException { BeanPart bean = getABean(beanName) ; if (bean == null || method == null) throw new CodeGenException("Invalid Bean Name "+beanName) ; //$NON-NLS-1$ fBeanReturns.put(method,bean); } COM: <s> the method returns an instance of bean name </s>
funcom_train/18145700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if(o instanceof Map.Entry) { Entry that = (Entry)o; return (this.getKey()==null ? that.getKey()==null : this.getKey().equals(that.getKey())) && (this.getValue()==null ? that.getValue()==null : this.getValue().equals(that.getValue())); } else return false; } COM: <s> compares the specified object with this entry for equality </s>
funcom_train/28960708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() throws GateException { System.out.println("equals"); AtomicPredicate AP2 = new AtomicPredicate("POS:[0,1]=NP"); AtomicPredicate AP4 = new AtomicPredicate("POS:[0,1]=NP"); assertEquals(true, AP2.equals(AP4)); } COM: <s> test of equals method of class vmp </s>
funcom_train/39563759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SyntaxTreeNode getPreviousSibling() { SyntaxTreeNode retval; SyntaxTreeNode myParent = (SyntaxTreeNode)getParent(); if (myParent == null) { retval = null; } else { retval = (SyntaxTreeNode)myParent.getChildBefore(this); // linear search } if (retval != null && !isNodeSibling(retval)) { throw new Error("child of parent is not a sibling"); } return retval; } COM: <s> returns the previous sibling of this node in the parents children </s>
funcom_train/10742903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int activeCount() { int count = numThreads; // Lock this subpart of the tree as we walk synchronized (this.childrenGroupsLock) { for (int i = 0; i < numGroups; i++) { count += this.childrenGroups[i].activeCount(); } } return count; } COM: <s> returns the number of threads which are children of the receiver </s>
funcom_train/22205659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getTopicTypes() { Collection ret = doQuery("select distinct type from t in class org.tm4j.topicmap.hibernate.TopicDataObject, type in t.types.elements where t.topicMap = ?", new Object[] { getTopicMap() }); return Collections.unmodifiableCollection(ret); } COM: <s> returns the topics which type other topics </s>
funcom_train/3619210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWidthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImageData_width_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImageData_width_feature", "_UI_ImageData_type"), EclipsesrsPackage.Literals.IMAGE_DATA__WIDTH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the width feature </s>
funcom_train/14654340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addContents() { listModel.clear(); System.out.println(" NameSession size = " + nameSession.size()); if (graphNames.size() > 0) { System.out.println("CONTENTS ADDED!!"); for (String graphName : graphNames) { if (!listModel.contains(graphName)) { listModel.addElement(graphName); } } } } COM: <s> add contents to list </s>
funcom_train/24374991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XConfigTransaction getRegisterTransaction() throws XdsInternalException { XConfigActor localRegistryConfig = (XConfigActor) repositoryConfig.getXConfigObjectWithName("registry", XConfig.XDSB_DOCUMENT_REGISTRY_TYPE); XConfigTransaction txn = localRegistryConfig.getTransaction("RegisterDocumentSet-b"); return txn; } COM: <s> this private utility method returns a transaction configuration definition for </s>
funcom_train/42395959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetJugadores() { System.out.println("setJugadores"); Vector<Jugador> jugadores = null; Partida instance = new Partida(); instance.setJugadores(jugadores); // 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 jugadores method of class model </s>
funcom_train/16849312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int x, int y) { // You have to set these directly, or you can mess up the grab // points by using set methods - VerticalGrabPoints and // HorizontalGrabPoints disable some methods. This method is // used to override them, for initialization purposes. this.x = x; this.y = y; setNeedToRegenerate(true); } COM: <s> for screen x y rendertype points to move the point location </s>