__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45142264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws IOException { this.outputReader = new LineReader(this.fromProcess); this.errorReader = new LineReader(this.errorStream); this.outputReaderThread = new Thread(this.outputReader); this.errorReaderThread = new Thread(this.errorReader); outputReaderThread.start(); errorReaderThread.start(); } COM: <s> start handling of the streams </s>
funcom_train/21877971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getLastXformRevisions(String project, String maprefUri, int count) throws DepoException { WorkbenchProjDesc desc = Workbench.getWorkbenchProjectDescription(project); Model model = Workbench.archiveAllHistory() ? Workbench.getModelFinder(desc).getXformsArchiveModel() : Workbench.getModelFinder(desc).getXformsModel(); return getLastRevisions(project, maprefUri, count, model, "Xform"); } COM: <s> get the most recent revisions of this xform </s>
funcom_train/37002971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String serialize(Object obj, int timeout) throws IllegalArgumentException { if(obj==null) obj=Request.PHPNULL; ISession session = sessionFactory.getSession(JavaBridge.INTERNAL_PHPSESSION, ISession.SESSION_GET_OR_CREATE, timeout); String id = Integer.toHexString(getSerialID()); session.put(id, obj); return (String)castToString(id); } COM: <s> store the object in the session store and return the serial id </s>
funcom_train/18218911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SAXBuilder createDocumentBuilder() { SAXBuilder documentBuilder; documentBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true); documentBuilder.setEntityResolver(entityResolver); documentBuilder.setFeature("http://xml.org/sax/features/validation", true); documentBuilder.setFeature( "http://apache.org/xml/features/validation/schema", true); documentBuilder .setProperty( "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", schemaUrl); return documentBuilder; } COM: <s> creates a document builder that verifies the xml against the metric configuration </s>
funcom_train/46695265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrototype() { System.out.println("prototype"); NullGraphQuery instance = new NullGraphQuery(); NullGraphQuery result = instance.prototype(); assertEquals(result.getClass().getName(),instance.getClass().getName()); assertNotSame(instance,result); } COM: <s> test of prototype method of class null graph query </s>
funcom_train/48909193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfDireccion() { if (txfDireccion == null) { txfDireccion = new JTextField(); txfDireccion.setBounds(new Rectangle(87, 67, 304, 22)); txfDireccion.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) txfRepresentante.grabFocus(); } }); } return txfDireccion; } COM: <s> this method initializes txf direccion </s>
funcom_train/40532464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPaneDetails() { if (jTabbedPaneDetails == null) { jTabbedPaneDetails = new JTabbedPane(); jTabbedPaneDetails.setPreferredSize(new Dimension(0, 0)); jTabbedPaneDetails.addTab("Node Details", null, getJScrollPaneNodeDetails(), null); } return jTabbedPaneDetails; } COM: <s> this method initializes j tabbed pane details </s>
funcom_train/47142936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateCanGoNext() { TargetDataPanel panel = (TargetDataPanel)getComponent(); boolean result = panel.wsField.getText().trim().length() > 0 && panel.userField.getText().trim().length() > 0 && panel.projectComboBox.getSelectedIndex() >= 0; setCanGoNext(result); } COM: <s> updates the can go next property of this wizard step </s>
funcom_train/28600922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel getSelectionFilePanel() { if (selectionFilePanel == null) { selectionFilePanel = new JPanel(); selectionFilePanel.setLayout(new BoxLayout(getSelectionFilePanel(), BoxLayout.Y_AXIS)); selectionFilePanel.add(getFileSelectorPanel1(), null); selectionFilePanel.add(getFileSelectorPanel2(), null); selectionFilePanel.add(getFileSelectorPanel3(), null); selectionFilePanel.add(getFileSelectorXSLPanel(), null); } return selectionFilePanel; } COM: <s> this method initializes selection file panel </s>
funcom_train/8077268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteInstance(int index) throws Exception { boolean success = false; int pos = m_InstList.deleteOneIndex(index); if (pos >= 0) { m_Root.tidyUpAfterDelete(pos); success = true; } if (!success) { // make a new tree double [][] dummyRanges = null; buildKDTree(m_Instances, dummyRanges); } return success; } COM: <s> deletes one instance in the kdtree </s>
funcom_train/4966253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Synthesizer createSynthesizer() { try { debugPrint("Creating " + getEngineName() + "..."); synthesizer = Central.createSynthesizer(this); if (synthesizer == null) { System.out.println("Central created null synthesizer"); } else { synthesizer.allocate(); synthesizer.resume(); monitor = new Monitor(synthesizer, getEngineName()); debugPrint("...created monitor"); } } catch (Exception e) { e.printStackTrace(); } return synthesizer; } COM: <s> creates the synthesizer and its monitor </s>
funcom_train/51344515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logHttpdURL(final File file) { // delete in case old version exists. file.delete(); final String httpdURL = service.getFederation().getHttpdURL(); if (httpdURL != null) { try { final Writer w = new BufferedWriter(new FileWriter(file)); try { w.write(httpdURL); } finally { w.close(); } } catch (IOException ex) { log.warn("Problem writing httpdURL on file: " + file); } } } COM: <s> writes the url of the local httpd service for the </s>
funcom_train/24535953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getIvjJScrollPane() { if(ivjJScrollPane == null) { ivjJScrollPane = new JScrollPane() ; // Explicit Instance ivjJScrollPane.setViewportView(getIvjJTable()) ; // JVE Generated ivjJScrollPane.setBounds(10, 130, 329, 146) ; // JVE Generated } return ivjJScrollPane; } COM: <s> this method initializes ivj jscroll pane </s>
funcom_train/33281448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsxFunction_item(final Object index, final Object subIndex) { if (index instanceof Number) { return jsxGet_elements().jsxFunction_item(index); } final String name = Context.toString(index); final Object response = getWithPreemption(name); if (subIndex instanceof Number && response instanceof HTMLCollection) { return ((HTMLCollection) response).jsxFunction_item(subIndex); } return response; } COM: <s> retrieves a form object or an object from an elements collection </s>
funcom_train/9528185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatus(DataExtractionStatus newStatus) { //call inherited merge super.updateStatus(newStatus); if (newStatus.getSerializable(URI_DISTINCT_PREDICATES_LIST) != null) { status.setAttribute(URI_DISTINCT_PREDICATES_LIST, newStatus.getSerializable(URI_SELECTED_PREDICATES_LIST)); } if (newStatus.getSerializable(URI_SELECTED_PREDICATES_LIST) != null) { status.setAttribute(URI_SELECTED_PREDICATES_LIST, newStatus.getSerializable(URI_SELECTED_PREDICATES_LIST)); } } COM: <s> override any values of this status object with those from another status object </s>
funcom_train/4299600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWhereClausesCollidingWithAliases() throws SQLException { String sql = "select a.name from fruits a where a.id in (select b.fruit_id from trees b where b.id < 3) order by name"; String[] expected = new String[] { "golden delicious", "macintosh" }; compareResults(sql, expected, jdbcConnection); } COM: <s> as above with table aliases </s>
funcom_train/18517946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|26-getter|0|26-preInit // write pre-init user code here backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|26-getter|1|26-postInit // write post-init user code here }//GEN-BEGIN:|26-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/26020939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bitmap getFavicon(int position) { if (position < 0 || position > mCount) { return null; } mCursor.moveToPosition(position); byte[] data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX); if (data == null) { return null; } return BitmapFactory.decodeByteArray(data, 0, data.length); } COM: <s> return the favicon for this item in the list </s>
funcom_train/15452458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCommunityData(Community community, String name, String description, Policy policy, boolean isModerated) { community.setName(name); community.setDescription(description); community.setModerated(isModerated); if (policy.getVisibility() != Policy.RESTRICT) { policy.removeAllContacts(); policy.removeAllContactGroups(); policy.removeAllCommunities(); } community.setPolicy(policy); this.session.saveOrUpdate(community); } COM: <s> updates the community data </s>
funcom_train/2903672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLTag getXML(){ XMLTag parent = new XMLTag(null); parent.tag = "Item"; parent.level = 0; Vector v = new Vector(); parent.value = (Object)v; boolean any = false; if(exec != null){ XMLTag c = exec.getXML(); if(c != null){ c.reparent(parent); v.add(c); any = true; } } if(draw != null){ XMLTag c = draw.getXML(); if(c != null){ c.reparent(parent); v.add(c); any = true; } } if(bounds != null){ XMLTag c = bounds.getXML(); if(c != null){ c.reparent(parent); v.add(c); any = true; } } if(any){ return parent; } else{ return null; } } COM: <s> get xml tag of this data item </s>
funcom_train/22189228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue (String i_Param) { String sValue = null; Integer nLine = getLine (i_Param, false); if (nLine == null) return (null); String sLine = (String) m_configData.get(nLine.intValue()); int nIndex = sLine.indexOf ('='); if (nIndex > 0) { sValue = new String (sLine.substring (nIndex + 1)); sValue = sValue.trim(); } return (sValue); } COM: <s> get value get the value of the parameter </s>
funcom_train/5715148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeElement(FLGTourElement a_tourElement){ int l_index = this.m_tourElements.indexOf(a_tourElement); if(l_index >= 0) { this.m_tourElements.remove(l_index); this.fireTourChanged(new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, l_index, l_index)); } }//removeElement COM: <s> removes the given tour element </s>
funcom_train/37230308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void configure(PropertiesManager pm) throws IOException { Logger.getLogger("jrds").setLevel(pm.loglevel); if(pm.logfile!= null && ! "".equals(pm.logfile)) setOutputFile(pm.logfile); for(Map.Entry<Level, List<String>> e: pm.loglevels.entrySet()) { Level l = e.getKey(); for(String logName: e.getValue()) { Logger.getLogger(logName.trim()).setLevel(l); } } } COM: <s> this method prepare the log4j environment using the configuration in jrds </s>
funcom_train/31452845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void editLocationButtonActionPerformed(ActionEvent evt) { int index = locationsList.getSelectedIndex(); if (index > -1) { LocationInformation info = (LocationInformation) locationsList.getSelectedValue(); PublishingLocationDialog dialog = new PublishingLocationDialog(this, info); if (dialog.showDialog()) { LocationInformation newInfo = dialog.getLocationInformation(); locationsModel.setElementAt(newInfo, index); } } } COM: <s> shows a dialog to edit an already existing location entry </s>
funcom_train/3513861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (hint != null) { hint.hide(); hint = null; } window.dispose(); window = null; currentPopup = null; typedText = ""; if (PythonJeditPanel.isDebugEnabled() ) Log.log(Log.DEBUG, this, "Disposing popup"); getTextArea().requestFocus(); } COM: <s> dispose of this popup </s>
funcom_train/35110748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject removeAsFriend(int friendId) throws PlurkException { try { HttpGet method = (HttpGet) PlurkActionSheet.getInstance() .removeAsFriend(config.args() .name("friend_id").value(friendId).getMap()); return JsonUtils.toObject(executor.execute(method)); } catch (Exception e) { throw PlurkException.create(e); } } COM: <s> api friends fans remove as friend </s>
funcom_train/9565881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean signatureCoversWholeDocument(String name) { getSignatureNames(); name = getTranslatedFieldName(name); if (!sigNamesMap.containsKey(name)) return false; return ((int[]) sigNamesMap.get(name))[0] == reader.getFileLength(); } COM: <s> checks is the signature covers the entire document or just part of it </s>
funcom_train/26630962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); if (comp instanceof JRadioButton) { JRadioButton radio = (JRadioButton) comp; iButtonGroup.add(radio); } else { throw new IllegalArgumentException("Only a JRadioButton can be added to JRadioButtonPanel"); } } COM: <s> override add method to attach radio buttons to the button group </s>
funcom_train/26015975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void quitSession() { // Stop session Thread thread = new Thread() { public void run() { try { if (sipSession != null) { try { sipSession.removeSessionListener(sipSessionListener); sipSession.cancelSession(); } catch(Exception e) { } sipSession = null; } } catch(Exception e) { } } }; thread.start(); // Exit activity finish(); } COM: <s> quit the session </s>
funcom_train/26336082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getItemDesc( boolean identified ) { if( this.identified && identified ) { String bonus = " "+( this.magicBonus >= 0 ? "+" : "" ) + this.magicBonus; return super.getItemDesc( identified ) + bonus; } return super.getItemDesc( identified ); } COM: <s> description with magical bonus </s>
funcom_train/10386916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCurrentThreadCount() { if (executor!=null) { if (executor instanceof ThreadPoolExecutor) { return ((ThreadPoolExecutor)executor).getPoolSize(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor)executor).getPoolSize(); } else { return -1; } } else { return -2; } } COM: <s> return the amount of threads that are managed by the pool </s>
funcom_train/5402716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commentKey(String key) { for (Iterator iter = bundles.keySet().iterator(); iter.hasNext();) { Locale locale = (Locale) iter.next(); Bundle bundle = getBundle(locale); BundleEntry entry = getBundleEntry(locale, key); if (entry != null) { bundle.commentKey(key); fireModify(bundle); } } } COM: <s> comment bundle entries matching the code key code </s>
funcom_train/44508618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rebind(final String name, final Object object) throws NamingException { if (log.isDebugEnabled()) { log.debug("Rebinding JNDI object with name [" + name + "]"); } execute(new JndiCallback() { public Object doInContext(Context ctx) throws NamingException { ctx.rebind(name, object); return null; } }); } COM: <s> rebind the given object to the current jndi context using the given name </s>
funcom_train/18321888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getControlledObjectHandlers() { List controlledObjects = new LinkedList(); for (Iterator i = outgoingAssociations.iterator(); i.hasNext();) { Association association = (Association) i.next(); if (association.getTarget() instanceof ControlledObjectHandler) { controlledObjects.add(association.getTarget()); } } return controlledObjects; } COM: <s> returns all controlled object handlers </s>
funcom_train/51830120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getRecordButton() { if (recordButton == null) { recordButton = new JButton(); recordButton.setText(localization .getProperty("loc-RemoteControlTab-recordButton")); recordButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { camera.startStopRecording(); } }); } return recordButton; } COM: <s> this method initializes record button </s>
funcom_train/3890613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerGlobalActions() { final IActionBars bars = _ldEditor.getEditorSite().getActionBars(); getControl().addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { registerGlobalActions(bars); } public void focusLost(FocusEvent e) { unregisterGlobalActions(bars); } }); } COM: <s> register global actions on focus events </s>
funcom_train/12812593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateOnglets() { if( Database.getCachemeta().getCollection_names().length == 0 ) { onglets.setEnabled(false); } /* * When the tool, is started on DB with collection and the the config panel are user, * dlconf_panel is already enable. Thus we need another flag to load extended attributes */ else if( !onglets.isEnabled() || first_call ){ onglets.setEnabled(true); } } COM: <s> activate tab panel if there is at least one collection </s>
funcom_train/28999564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IEvent getCommandEvent(Command cmd, String eventClassName) { try { Class evtClass = Class.forName(eventClassName); IEvent evt = (IEvent) evtClass.newInstance(); evt.setEventName(StrataUtilityObject.getClassShortNameFor(evtClass)); evt.setEventType("Command"); evt.setObject(cmd); return evt; } catch (Exception e) { } return null; } COM: <s> given a command find the corresponding event or event topic </s>
funcom_train/2740054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String visit(Location location) { StringBuilder s = new StringBuilder(); Function f = location.getSignature(); /*if(notBelongsToMainAsm(f)) s.append(getAsmName(f) + "_"); s.append(f.getName());*/ s.append(getFunctionName(f)); Value[] values = location.getElements(); for (Value value: values) { s.append("_" + value.toString().toUpperCase()); } return s.toString(); } COM: <s> visit of a location </s>
funcom_train/9055331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateTable(long rowId, String title) { ContentValues args = new ContentValues(); args.put(KEY_DIVINGTABLES_TITLE, title); return mDb.update(DIVINGTABLES_DATABASE_TABLE, args, KEY_DIVINGTABLES_ROWID + "=" + rowId, null) > 0; } COM: <s> update the diving table title using the details provided </s>
funcom_train/3713870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getGraphicsAttributes() { HashMap<String,GraphicsAttributes> map = new HashMap<String,GraphicsAttributes>(); Map colors = getColors(); Enumeration ids = getSpectrumList(); while (ids.hasMoreElements()) { String id = (String)ids.nextElement(); GraphicsAttributes ga = buildGraphicsAttributes (colors, id); map.put(id, ga); } return map; } COM: <s> gets the graphics attributes associated with each element of the composite </s>
funcom_train/27849507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAll(int str, int dex, int con, int intl, int wis, int cha){ myStr.setBaseStat(str); myDex.setBaseStat(dex); myCon.setBaseStat(con); myInt.setBaseStat(intl); myWis.setBaseStat(wis); myCha.setBaseStat(cha); } COM: <s> a method to set all of the base ability scores </s>
funcom_train/43245184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpStreetAddr2() { System.out.println("getEmpStreetAddr2"); EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); String expResult = ""; String result = instance.getEmpStreetAddr2(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get emp street addr2 method of class org </s>
funcom_train/51633095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOffset(int offset) { try { IDocument document= getSourceViewer().getDocument(); fLine= document.getLineOfOffset(offset); fColumn= offset - document.getLineOffset(fLine); fElement= getElementAt(offset, true); fElementLine= getElementLine(document, fElement); } catch (BadLocationException e) { // should not happen JavaPlugin.log(e); clear(); } catch (JavaModelException e) { // should not happen JavaPlugin.log(e.getStatus()); clear(); } } COM: <s> store visual properties of the given offset </s>
funcom_train/13783517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractFromRootFolder(String folderName) { String result = null; if (rootName != null) { if (folderName != null && folderName.startsWith(rootName) && !folderName.equals(rootName)) { result = folderName.substring(rootName.length()); } return result; } return folderName; } COM: <s> extracs the folder from the root folder if exists </s>
funcom_train/41762799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { Context C = MeemiDroidApplication.getContext(); // Use MODE_WORLD_READABLE and/or MODE_WORLD_WRITEABLE to grant access to other applications SharedPreferences P = C.getSharedPreferences(MEEMI_CREDENTIALS_PREFS, Context.MODE_PRIVATE); SharedPreferences.Editor E = P.edit(); E.putString(MEEMI_USERNAME, UserName); E.putString(MEEMI_PASSWORD, Password); E.putString(MEEMI_HASHED_PASSWORD, HashedPassword); E.commit(); } COM: <s> this method saved the current credentials into the shared preferences </s>
funcom_train/33639541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(Graphable source) { //check that source node if of degree <= 2 if (((Node)source).getDegree() > 2) { throw new IllegalStateException( "Cannot start a no bifurcation traversal on a node that " + "bifurcates." ); } super.setSource(source); m_next = (Node)getSource(); } COM: <s> sets the source of the traversal </s>
funcom_train/46124043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setClassificationNodesIdsToRequest(ArticleSaveRequest request, List<Integer> leafClassificationNodeIds) { if(leafClassificationNodeIds != null){ request.setArticleClassificationLeafNodes(new ArticleClassificationNodes()); for(Integer nodeId : leafClassificationNodeIds){ request.getArticleClassificationLeafNodes().getNodeId().add(nodeId.longValue()); } } } COM: <s> set the leaf classifications nodes identifiers to the request object </s>
funcom_train/39350004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertCursorInBounds() { VM.assertions._assert(!region.isZero()); VM.assertions._assert(cursor.GE(BumpPointer.getDataStart(region)), "Cursor is below start of region"); VM.assertions._assert(cursor.LE(limit),"Cursor beyond end of region"); } COM: <s> assert that the cursor is within the bounds of the region </s>
funcom_train/26344805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringLong() { String fs = " "; String ts = " "; if (from_server != null) { fs = from_server.toStringLong(); } if (to_server != null) { ts = to_server.toStringLong(); } return from.export() + "\t\t" + to.export() + "\t\t" + modeFrom + "\t\t" + modeTo + "\t\t" + from_to + "\t\t" + fs + "\t\t" + ts; } COM: <s> used for exporting to file </s>
funcom_train/35353333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertIndexedOutputParam(CallableStatement stmt, StoredProcedureParam param) { try { stmt.registerOutParameter(param.paramNumber(), toOracleType(param.variableType())); } catch (SQLException e) { throw new StoredProcedureInvocationException("Cannot register output parameter " + param.paramName(), e); } } COM: <s> registers single indexed output parameter </s>
funcom_train/29767663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNameAndContentsBlankInName() { Map<String, String> tagPrefixes = new HashMap<String, String>(10); String tag1Contents = "Name with blanks xyz"; Tuple<String, String> nameAndContents = _tagParser.getNameAndContents(tag1Contents, 0, tagPrefixes, "TestCase", true); assertEquals("Name with blanks xyz", nameAndContents.getKey()); } COM: <s> tests if a tag name with blanks is correctly recognized </s>
funcom_train/26225692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printFlexRule(PrintWriter out, String prefix) { switch (type) { case LITERAL: case KEYWORD: case OPERATOR: printFlexRegex(out, value == null ? name : value); out.print("\t\t{ return "); out.print(TOKEN_PREFIX + (type == LITERAL ? prefix + name : name)); out.println("; }"); break; case OTHER: /* nothing */; } } COM: <s> prints flex rules for literals keywords and operators </s>
funcom_train/1617965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CallableStatement createCallableStatement(Connection conn) { StringBuffer storedProcName = new StringBuffer("call "); storedProcName.append(storedProc + "()"); CallableStatement cs = null; try { // set the first parameter is OracleTyep.CURSOR for oracel // stored procedure cs = conn.prepareCall(storedProcName.toString()); } catch (SQLException e) { throw new RuntimeException("createCallableStatement method Error : SQLException " + e.getMessage()); } return cs; } COM: <s> returns a callable statement </s>
funcom_train/42474545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeReaction(String equation) { if (equation == null) throw new NullPointerException("Parameter 'equation' must not be null."); for (Iterator<Reaction> it = reactions.iterator(); it.hasNext();) { Reaction reaction = it.next(); if (reaction.getTextualRepresentation().equals(equation)) { reactions.remove(reaction); return; } } } COM: <s> removes a reaction from the list of reactions </s>
funcom_train/43318010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerAspect (String aspect, String[] imports, String pluginid, String version) { if (aspect == null) throw new NullPointerException("aspect"); if (imports == null) throw new NullPointerException("imports"); if (pluginid == null) throw new NullPointerException("pluginid"); registeredAspects.put(aspect, pluginid); importsForAspects.put(aspect, imports); versionsForAspects.put(aspect, version); } COM: <s> register a new aspect to the system </s>
funcom_train/16849432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setHelpIDString() { BasicMapPanel map = (BasicMapPanel) seismoSurfer.getMapPanel(); CSH.setHelpIDString(map, "map"); InformationDelegator info = (InformationDelegator) map .getMapComponentByType(InformationDelegator.class); CSH.setHelpIDString(info, "infoBar"); } COM: <s> sets the help id string to some of the applet components </s>
funcom_train/4875848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(final AbstractGraphicButton button) { assert button != null : "button is null"; assert getButtons() != null : "getButtons() is null"; final boolean empty = getButtons().isEmpty(); final boolean insert = getButtons().add(button); if (empty) { setCurrentButtonIndex(DEFAULT_BUTTON); } else { LOGGER.info(LEAVE_CURRENT_ACTIVATED_BUTTON_INDEX_INFO); } return insert; } COM: <s> adds a code graphic button in the list </s>
funcom_train/49789667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testName1toName2() throws Exception { Frame page = assertHasFrame(root, "on-page"); InputTextField name1 = assertHasInputTextField(page, "name1"); InputTextField name2 = assertHasInputTextField(page, "name2"); Event onEdit = name1.getOnChange(); assertGenerated(onEdit); Operation update = assertHasOperation(name2, "update"); assertGenerated(update); assertHasNoRunAction(root, onEdit, update); } COM: <s> because sync1 is overridden name1 </s>
funcom_train/9298414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_107 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doOptions(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}"; COM: <s> protected final string text 106 nl nl t nl t </s>
funcom_train/2628524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsFollowedBy() { System.out.println("isFollowedBy"); EventWrapper other = null; EventWrapper instance = new EventWrapper(); int expResult = 0; int result = instance.isFollowedBy(other); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of is followed by method of class event wrapper </s>
funcom_train/41486357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Employee getEmployeeByName(String name) { Enumeration keys; String key; Employee employee; Employee match = null; boolean notFound = true; keys = employees.keys(); while (keys.hasMoreElements() && notFound) { //TODO: see if you can get rid of the type cast key = (String)keys.nextElement(); employee = employees.get(key); if (employee.getName().equals(name)) { notFound = false; match = employee; } } return match; } COM: <s> retreves and employee from the company roster based on </s>
funcom_train/45113622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanToCorsor() { for (int i = 0; i <= currentRow; i++) { if (i == currentRow) { for (int j = 0; j <= currentColumn; j++) { screen[i][j] = ' '; } } else { for (int j = 0; j < screenWidth; j++) { screen[i][j] = ' '; } } } } COM: <s> clean screen from the begining 0 0 to the current cursot position </s>
funcom_train/38535484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int resetIndexList(List<? extends CspGenericIndex> idxList) { int totalSize = 0; for (int i=0; i<idxList.size(); i++) { GenericIndex idx = (GenericIndex) idxList.get(i); totalSize += idx.size(); idx.reset(); } return totalSize; } COM: <s> updates a list of index objects to the first value in each index </s>
funcom_train/28354318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendNewSetpoints() { SCLCavity cav = controller.tuneSet.getCavity(); controller.cavitySetAction(cav, Controller.CAV_BEING_SET); CavityController tc = controller.getCavityController(cav); if(tc.setPhase(cavPhaseSetpoint)){ controller.cavitySetAction(cav, Controller.CAV_IS_SET); } else { controller.cavitySetAction(cav, Controller.CAV_SET_ERROR, "Error sending new phase"); } } COM: <s> send the new setpoints to the cavity </s>
funcom_train/20742296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onAttachmentModified(WikiPage page) { HistoryRecord historyRecord = new HistoryRecord(); historyRecord.setScope(HistoryRecord.SCOPE_WIKI); historyRecord.setMessage("HISTORY_ATTACHMENT_UPDATED"); historyRecord.setAuthor(securityService.getCurrentUser() != null ? securityService.getCurrentUser().getUsername() : ""); historyRecord.setRecordDate(new Date()); historyRecord.setPageName(page.getName()); historyRecord.setAttachment(true); historyRecordDao.save(historyRecord); } COM: <s> create history record on attachment update </s>
funcom_train/21848659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { setLayout(new BorderLayout()); add(createInfoTable(), BorderLayout.CENTER); // load the data try { Properties props = System.getProperties(); Enumeration names = props.propertyNames(); while (names.hasMoreElements()) { String name = (String) names.nextElement(); String value = props.getProperty(name); Object[] row = new Object[2]; row[0] = name; row[1] = value; m_model.addRow(row); } } catch (Exception e) { } } COM: <s> creates the components on this panel </s>
funcom_train/25701654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void menuSelected(MenuEvent evt) { if((view3d != null) && (view3d instanceof ViewConfig)) { elevationControl.setEnabled(true); ViewConfig vc = (ViewConfig)view3d; elevationControl.setSelected(vc.getConfigElevation()); } else { elevationControl.setEnabled(false); } } COM: <s> invoked when a menu is selected </s>
funcom_train/45539788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setStatusMessage(IStatus status) { if (status.isOK()) { setMessage(status.getMessage()); } else { switch (status.getSeverity()) { case IStatus.ERROR: setMessage(status.getMessage(), IMessageProvider.ERROR); break; case IStatus.INFO: setMessage(status.getMessage(), IMessageProvider.INFORMATION); break; case IStatus.WARNING: setMessage(status.getMessage(), IMessageProvider.WARNING); break; default: break; } } } COM: <s> sets this pages message based on the status severity </s>
funcom_train/2380604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateScrolledComposite(int width, int height) { ScrolledComposite parent = (ScrolledComposite)getControl().getParent(); parent.setMinHeight(height); parent.setMinWidth(width); parent.setSize(width, height); parent.getParent().layout(); // Forces correct Scroll Bars } COM: <s> calculate the scrolled composite parent scrollbars </s>
funcom_train/24434776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteProject(Long projectId) { boolean operationResult = false; try { Connection c = ConnectionSource.getConnection(); String sql = "DELETE FROM projects WHERE id=:id"; NamedParameterStatement s = new NamedParameterStatement(c, sql); s.setLong("id", projectId); int numAffected = s.executeUpdate(); if (numAffected == 1) operationResult = true; s.close(); c.close(); } catch (SQLException ex) { logger.error(ex.getMessage(), ex); } return operationResult; } COM: <s> deletes specified project </s>
funcom_train/36879116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint () { TreeMap<Integer,Integer> map = scanner.getMap (); int key = endOffset; int end = endOffset; while ( key >= startOffset ) { if ( map.containsKey ( key )) { int offset = key; int length = end - key; int type = map.get ( key ); doPaint ( offset, length, getSet ( type )); end = key; } key--; } } COM: <s> paint document range as specified by start offset and end offset </s>
funcom_train/12546667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object value, int row, int column) { if (column == 0) { return; } String[] values = parseValues((String) value, column); StringBuffer sb = new StringBuffer(); for (int i = 0; i < values.length; i++) { if (i != 0) sb.append(' '); sb.append(values[i]); } entries[row][column] = sb.toString(); fireTableCellUpdated(row, column); } COM: <s> sets the value at a particular row and column </s>
funcom_train/5511201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forAllFields(String template, Properties attributes) throws XDocletException { XClass clazz = getCurrentClass(); TreeMap setters = new TreeMap(getFields(clazz)); for (Iterator iterator = setters.keySet().iterator(); iterator.hasNext();) { curFieldName = (String) iterator.next(); XMethod field = (XMethod) setters.get(curFieldName); setCurrentMethod(field); generate(template); } } COM: <s> iterates the body for each field of the current form requiring validation </s>
funcom_train/7660980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWaitQueueLengthIMSE() { final Mutex sync = new Mutex(); final AbstractQueuedSynchronizer.ConditionObject c = (sync.newCondition()); try { sync.getWaitQueueLength(c); shouldThrow(); } catch (IllegalMonitorStateException success) { } catch (Exception ex) { unexpectedException(); } } COM: <s> get wait queue length throws imse if not synced </s>
funcom_train/1145209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getOberePanel() { if (oberePanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; radiusAusgabeL = new JLabel(); radiusAusgabeL.setText("Mit ## km Radius gibt es ## Bezirkskombinationen:"); oberePanel = new JPanel(); oberePanel.setLayout(new GridBagLayout()); oberePanel.add(radiusAusgabeL, gridBagConstraints); } return oberePanel; } COM: <s> this method initializes obere panel </s>
funcom_train/17984024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getDecorationBounds() { Rectangle r = super.getDecorationBounds(); r.x = getComponent().getWidth() - SIZE - 1; Insets insets = getComponent().getInsets(); if (insets != null) r.x -= insets.right; r.y = (getComponent().getHeight() - SIZE) / 2; return r; } COM: <s> position the decoration at the right edge of the text field </s>
funcom_train/459976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public MessageValidatorEngine getValidatorForNcpdp(ErrorRecorderBuilder erBuilder, String input, MessageValidatorEngine mvc, ValidationContext vc, RegistryValidationInterface rvi) { // if(EdiToXml.isEDI(input)){ // EdiToXml edx = new EdiToXml(input); // edx.run(); // input = edx.getGeneratedOutput(); // } return getValidatorForXML(erBuilder, input, mvc, vc, rvi); } COM: <s> start a new validation where input is known to be xml </s>
funcom_train/22187521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext context) throws Exception { super.start(context); // Register Vexi project type Platform.getAdapterManager().registerAdapters( new IAdapterFactory(){ /** The supported types that we can adapt to */ private final Class[] TYPES = {VexiProject.class}; public Class[] getAdapterList() { return TYPES; } public Object getAdapter(Object project, Class clazz) { if(project instanceof IProject && clazz == VexiProject.class ){ return new VexiProject((IProject)project); } return null; } }, IProject.class ); } COM: <s> this method is called upon plug in activation </s>
funcom_train/51043778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File determineASXFileLocation(DownloadManager dm) { debug("determineASXFileLocation"); EnhancedDownloadManager edm = DownloadManagerEnhancer.getSingleton().getEnhancedDownload( dm); File file; if (edm != null) { file = edm.getPrimaryFile().getFile(true); } else { file = new File(dm.getDownloadState().getPrimaryFile()); } return new File(file.getAbsolutePath() + ".asx"); } COM: <s> determine the location of the asx file </s>
funcom_train/31651601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getUsers() throws SQLException,IOException{ ArrayList u = new ArrayList(); for (int i=0;i<users.size();i++) { Integer id = (Integer)users.get(i); u.add(User.findByOID(id.intValue())); } return u; } COM: <s> returns a list of all users in the role </s>
funcom_train/40221801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed (java.awt.event.MouseEvent me) { // Attempting a DealFourCardMove Move m = new DealCardMove (deck, wastePile); if (m.doMove(theGame)) { theGame.pushMove (m); // Successful DealFour Move theGame.refreshWidgets(); // refresh updated widgets. } } COM: <s> coordinate reaction to the beginning of a drag event </s>
funcom_train/17587047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(PrintWriter writer, boolean RawHeader) { if (RawHeader) { writer.println(RAW_BANNER); } for (Map.Entry<String, String> e : dict.entrySet()) { String k = e.getKey(); String v = e.getValue(); if (v == null) v = ""; String annot = annotations.get(k); if (annot != null) writer.println(k + "\t" + v + "\t" + annot); else writer.println(k + "\t" + v); } } COM: <s> write this dictionary to the specified print writer </s>
funcom_train/5689581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invert() { AffineTransform at = AffineTransform.getTranslateInstance(bi.getWidth(), 0); at.scale(-1.0, 1.0); AffineTransformOp op = new AffineTransformOp(at, null); bi = op.filter(bi, null); } COM: <s> inverts the current jpg image object </s>
funcom_train/37586075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDocumentForFile() throws java.io.IOException { DummyGlobalModel dummy = new DummyGlobalModel(); try { dummy.getDocumentForFile(new File("")); } catch (UnsupportedOperationException e) { assertTrue("This message should never be seen", true); return; } fail("expected that UnsupportedOperationException is thrown"); } COM: <s> creates a new instance of dummy get documents calls </s>
funcom_train/8436230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int id(String relation, int i, int j) { if (i < 0 || j < 0) { throw new IllegalArgumentException("Cannot return ID of functional or unassigned argument!"); } int n = getFullModelSize(); return relationIdx.indexOf(relation) * n * n + i * n + j; } COM: <s> the id is a unique id of a relation in this model </s>
funcom_train/22526434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFoldedRolePart(FoldedRolePart foldedRolePart) { List<IRoleModel> copy = new ArrayList<IRoleModel>(); // Use copy to stop concurrent modification copy.addAll(foldedRolePart.getRoles()); for(IRoleModel role : copy) { foldedRolePart.removeRole(role); } fFoldedRoleParts.remove(foldedRolePart); } COM: <s> delete a folded role part actually removes ld role parts </s>
funcom_train/37775982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String value) { if (value != null) { m_title = MessageHelper.replaceTokens(pageContext, value); if (MessageHelper.hasTokens(value)) m_labelEditorLink = TagHelper.getLabelEditorLink(pageContext, value); } else m_title = value; } COM: <s> setter for the attribute title </s>
funcom_train/51792397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendItem(String stringPart, Image imagePart, int type) { //imagePart will be ignored in this version of CustomList if(stringPart != null) { MenuItem menuItem = new MenuItem(stringPart, type); items.addElement(menuItem); selectedIndex = 0; startIndex = 0; onResize(); } } COM: <s> new append method with items type specified </s>
funcom_train/35073084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addReportingTransactionId(BasicXmlDocument document) { if(this.reportingDetails != null && StringUtils.isNotEmpty(this.reportingDetails.getTransactionId())) { Element transid_el = document.createElement(AuthNetField.ELEMENT_TRANS_ID.getFieldName()); transid_el.appendChild(document.getDocument().createTextNode( this.reportingDetails.getTransactionId())); document.getDocumentElement().appendChild(transid_el); } } COM: <s> add a reporting trans id to the document request </s>
funcom_train/3412812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startProduction(ImageConsumer ic) { if (proxies == null) { proxies = new Hashtable(); } ImageFilter imgf = (ImageFilter) proxies.get(ic); if (imgf == null) { imgf = filter.getFilterInstance(ic); proxies.put(ic, imgf); } src.startProduction(imgf); } COM: <s> starts production of the filtered image </s>
funcom_train/4364248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNoCompressionUserAgent(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); noCompressionUserAgents = addREArray(noCompressionUserAgents, nRule); } catch (PatternSyntaxException pse) { log.error(sm.getString("http11processor.regexp.error", userAgent), pse); } } COM: <s> add user agent for which gzip compression didnt works </s>
funcom_train/51575684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(final int newX, final int newY, final int width, final int height) { // Grab the dimension information compPos.setLocation(newX, newY); super.setBounds(newX, newY, width, height); } COM: <s> this method is overridden to keep us up to date with the components </s>
funcom_train/41164072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoMenuType entity) { EntityManagerHelper.log("deleting CoMenuType instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoMenuType.class, entity.getMenuTypeId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co menu type entity </s>
funcom_train/1917605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String prettyPrint() { StringBuffer result = new StringBuffer(); result.append("GUID: " + GUID.getGuidDescription(guid)); result.append("\n Starts at position: " + getPosition() + "\n"); result.append(" Last byte at: " + (getChunckEnd() - 1) + "\n\n"); return result.toString(); } COM: <s> this method creates a string containing usefull information prepared to </s>
funcom_train/19326674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double traitVolume(final FObj fobj, final FoContext context) { final PdVolume property = (PdVolume) getProperty(FoProperty.VOLUME); if (property != null) { return property.getValue(context, fobj); } return PdVolume.getValueNoInstance(context, fobj); } COM: <s> returns the volume property </s>
funcom_train/12760566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addCookie(Cookie cookie){ if (cookie.hasExpired()) { logger.info("addCookie: removing [" + cookie.toString() +"]"); cookies.remove(cookie); return false; }else{ logger.info("addCookie: adding [" + cookie.toString() + "]"); return (cookies.put(cookie, cookie) == null); } } COM: <s> add a code cookie code in the cookie jar </s>
funcom_train/24519861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageHeader (DataInputStream din) throws IOException { int messageSize = din.readInt (); byte messageTypeBytes [] = new byte [MESSAGE_TYPE_SIZE]; din.read (messageTypeBytes, 0, MESSAGE_TYPE_SIZE); this.type = MessageType.fromString (new String (messageTypeBytes)); this.size = MESSAGE_TYPE_SIZE; this.dataSize = messageSize - this.size; } COM: <s> read in a message header </s>
funcom_train/23050580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String formatValue(T value) { if (this.value2String == null) { System.err.println("No mapping between value and string found"); return String.valueOf(value); } String text = this.value2String.get(value); if (text == null) { System.err.println("No mapping between value and string found"); return String.valueOf(value); } return text; } COM: <s> this method can be overriden or the format mapping must be initialized </s>
funcom_train/7758338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long bytesIntoLong(int offset) { if((offset < 0) || ((offset + 8) > IDFormat.IdByteArraySize)) throw new IndexOutOfBoundsException("Bad offset"); long result = 0L; for(int eachByte = 0; eachByte < 8; eachByte ++) result |= ((long)(bytes[eachByte + offset] & 0xff)) << ((7 - eachByte) * 8L); return result; } COM: <s> return the long value of a portion of the byte array </s>