__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14052451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fits(Criterion criterion) { if (!loaded) { backEnd.loadMe(this); } boolean ret = false; if (criterion != null) { try { ret = criterion.evaluate(this); } catch (OperationNotSupportedException onse) { Logger.getLogger().log(onse); } } return ret; } COM: <s> check if this object fits the given criteria </s>
funcom_train/9279773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullStringPreparedStatement() throws SQLException { String nullString = null; try { // test null String in prepared statement PreparedStatement ps = prepareStatement(nullString); fail("preparedStatement(nullString) should have failed."); } catch (SQLException e) { assertSQLState("XJ067", e); } } COM: <s> testing null string in prepared statement </s>
funcom_train/43400086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { int button = e.getButton(); if (button == ACTION_BUT) { // first mouse button = action button if (currentAction != null) { currentAction.mouseClicked(e); } } else if (button == AUTOZOOM_BUT) { // third mouse button = zoom all button zoomAll(); } dragMode = DragMode.NONE; } COM: <s> the most important event is mouse clicked </s>
funcom_train/625489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testGetJMIObject() { // IModel iModel = new Model(); // // try { // iModel.getJMIObject(); // } catch (IllegalStateException e) { // return; // } // // fail("Illegal state expected"); // } COM: <s> tests the get jmiobject of the model interface </s>
funcom_train/12831995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDialogSettings getDigitalSignatureWizardSettings() { IDialogSettings workbenchSettings = XmlSecurityPlugin.getDefault().getDialogSettings(); IDialogSettings section = workbenchSettings.getSection("DigitalSignatureWizard"); // $NON-NLS-1$ if (section == null) { section = workbenchSettings.addNewSection("DigitalSignatureWizard"); // $NON-NLS-1$ } return section; } COM: <s> return the settings used for all digital signature wizard pages </s>
funcom_train/36004030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet executeQuery(String query){ try { Statement statement = connection.createStatement(); return (ResultSet) statement.executeQuery(query); } catch (Exception ex) { Logger.getLogger(DatabaseConnector.class.getName()).log(Level.SEVERE, null, ex); return null; }} COM: <s> executes the query on the database and returns the result </s>
funcom_train/2554576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getRequestedFile(HttpServletRequest request) { HttpSession session = request.getSession(false); File file = null; String id = (String) request.getParameter("fileId"); if (id != null) { Integer fileID = Integer.parseInt(id); file = getFileService().findByID(fileID); // session.setAttribute("file", file); } return file; } COM: <s> fixme need to add check to make sure user owns file </s>
funcom_train/23636096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExperimentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SimulationResult_experiment_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SimulationResult_experiment_feature", "_UI_SimulationResult_type"), CescsmodelPackage.Literals.SIMULATION_RESULT__EXPERIMENT, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the experiment feature </s>
funcom_train/45623171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSuccessFilePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_successFile_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_successFile_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_SuccessFile(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the success file feature </s>
funcom_train/33898020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mappingExists(IResource resource) { if (resource.isPhantom() || resource.getType() == IResource.PROJECT) { // !resource.isAccessible() excludes deleted files - but this is needed here return false; } IPath relativePath = resource.getProjectRelativePath(); return mappingExists(relativePath, resource.getType() == IResource.FOLDER); } COM: <s> check if given resource is in any included or excluded entries patterns </s>
funcom_train/16310152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractE_id_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractE_id_feature", "_UI_AbstractE_type"), PstlPackage.Literals.ABSTRACT_E__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the id feature </s>
funcom_train/10240612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetGetType() { String type = "Type"; JReleaseInfoProperty prop = new JReleaseInfoProperty(); prop.setType(type); assertNull("Default name must be null", prop.getName()); assertEquals(type, prop.getType()); assertNull("Default value must be null", prop.getValue()); } COM: <s> test set get of field type </s>
funcom_train/13312837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean ensureDefaultDatabase() { boolean success = false; try { this.createDatabase(SQLPersistence.DEFAULT_DATABASE_NAME); success = true; System.out.println("created default database: " + SQLPersistence.DEFAULT_DATABASE_NAME); } catch (DatabaseException dbe) { success = false; // System.out.println(dbe.toString()); } return success; } COM: <s> ensures the default database is created </s>
funcom_train/50083069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element provideXML() { Element extensions = new Element(EXTENSIONS, XScufl.XScuflNS); Element qsarDescriptors = new Element(QSARDESCRIPTORS, XScufl.XScuflNS); Element qsarDescriptor; for (Iterator<String> iter = this.selectedDescriptors.iterator(); iter .hasNext();) { String qsarDes = iter.next(); qsarDescriptor = new Element(QSARDESCRIPTOR, XScufl.XScuflNS); qsarDescriptor.addContent(qsarDes); qsarDescriptors.addContent(qsarDescriptor); } extensions.addContent(qsarDescriptors); return extensions; } COM: <s> provides the xml information for this processor </s>
funcom_train/51538285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int gePrevCursorIndex(int constraints, DynamicCharacterArray str, int cursor) { cursor--; if (((constraints & TextField.CONSTRAINT_MASK) == TextField.DECIMAL || (constraints & TextField.CONSTRAINT_MASK) == TextField.NUMERIC) && cursor == 1 && str.length() == 2 && (str.charAt(0) == '-' || str.charAt(0) == '.')) { cursor--; } return cursor; } COM: <s> get previous cursor position </s>
funcom_train/31560363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConstantString READLIST(MaverickString result) throws MaverickException { Object[] args = { this }; Object[] data = di.runCommand(Protocol.LIST_READLIST, args); isAfterLast = true; if (((Integer)data[0]).intValue() == 0) { result.set((ConstantString)data[1]); return ConstantString.RETURN_SUCCESS; } return ConstantString.RETURN_ELSE; } COM: <s> assigns the values in the select list to the variable </s>
funcom_train/41187531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findBaseURLAndURI(final String uri) { try { URL result = null; result = new URL(new URL(this.getBaseURL()), uri); return result.toString(); } catch (MalformedURLException e1) { XRLog.exception("The default NaiveUserAgent cannot resolve the URL " + uri + " with base URL " + this.getBaseURL()); } return null; } COM: <s> attempt to join the base url and uri </s>
funcom_train/28120066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image createImageIcon(String path, String description, Log log) { java.net.URL imgURL = this.getClass().getResource(path); Image image = null; if (imgURL != null) { ImageIcon icon = new ImageIcon(imgURL, description); if (icon != null) { image = icon.getImage(); } } else { log.error(BUNDLE.getString("gui.missing.icon") + ": " + path); } return image; } COM: <s> returns an image icon or null if the path was invalid </s>
funcom_train/17846049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFilterLabel(String name) { // avoid repainting during repeated filter updates if (name.equals(mCurrentName)) { return; } mCurrentName = name; mFilterLabel.setText("<html><body><b>" + mLocalizer.msg("filterActive", "Active Filter:")+ ":</b> "+name+"</body></html>"); } COM: <s> set the name of the filter </s>
funcom_train/44515515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class loadClass(String className) throws GenericEntityException { try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) { cl = this.getClass().getClassLoader(); } return (cl.loadClass(className)); } catch (Exception e) { throw new GenericEntityException( "Cannot load column class '" + className + "': " + e); } } COM: <s> p loads and returns the code class code of the given name </s>
funcom_train/36172494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openNetworkConnection() throws IOException { // Socket channels are safe for use by multiple concurrent threads. // this methods is bugged with IPv6 JDK 1.5 _01 and win32 sc = SocketChannel.open(remoteAddress); readBuffer = ByteBuffer.allocateDirect(RECEIVE_SIZE); readBuffer.order(ByteOrder.LITTLE_ENDIAN); writeBuffer = ByteBuffer.allocateDirect(RECEIVE_SIZE); writeBuffer.order(ByteOrder.LITTLE_ENDIAN); } COM: <s> open network connection and set up buffers </s>
funcom_train/39915934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetButton1() { System.out.println("getButton1"); Page1 instance = new Page1(); Button expResult = null; Button result = instance.getButton1(); 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 button1 method of class timesheetmanagement </s>
funcom_train/21956433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSearchField(int n) { GridBagConstraints gridBagConstraints21 = new GridBagConstraints(); gridBagConstraints21.gridx = 1 + (n % nrSearchPanelsPerRow); gridBagConstraints21.gridy = 1 + (n / nrSearchPanelsPerRow); gridBagConstraints21.weightx = 1; gridBagConstraints21.anchor = java.awt.GridBagConstraints.WEST; topSectionPanel.add(searchPanels.get(n), gridBagConstraints21); } COM: <s> adds a single search field to the search panel </s>
funcom_train/49435137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadData(PatientRecordFilter patientFilter, PatientRecordComparator patientComparator) { JDatabase database = new JDatabase(); database.open(JDatabase.PATIENT_DB_NAME); Vector dataset = database.getRecords(patientFilter, patientComparator, false); displayData(dataset); database.close(); database = null; dataset = null; } COM: <s> load patient records from rms </s>
funcom_train/3812870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Token t) { stateCount++; WordSequence ws = getWordSequence(t); WordStats stats = statMap.get(ws); if (stats == null) { stats = new WordStats(ws); statMap.put(ws, stats); } stats.update(t); } COM: <s> adds a word history for the given token to the word tracker </s>
funcom_train/28908249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void noteSymbolEntry(String pkgName, String symbolName, Long filePosition) { synchronized (entries) { Map<String, Long> symbolEntries = entries.get(pkgName); if (symbolEntries == null) { symbolEntries = newSymbolEntries(); entries.put(pkgName, symbolEntries); } symbolEntries.put(symbolName, filePosition); } } COM: <s> add an entry to the load map </s>
funcom_train/1386169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFormattedTextField getTxtUscite() { if (txtUscite == null) { txtUscite = new JFormattedTextField(getF2()); txtUscite.setBounds(new Rectangle(205, 105, 96, 26)); txtUscite.setForeground(Color.red); txtUscite.setHorizontalAlignment(JTextField.RIGHT); txtUscite.setValue(0); txtUscite.setFont(new Font("Dialog", Font.BOLD, 14)); } return txtUscite; } COM: <s> this method initializes txt uscite </s>
funcom_train/45918690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readReasonletContainerConfiguration(XMLConfiguration conf, Configuration res) { if( conf.configurationsAt(reasonletContainer).size() != 1) { return; } BeanDeclaration reasonletContainerConfigDecl = new XMLBeanDeclaration(conf, reasonletContainer); ReasonletContainerBeanConfig reasonletContainerBeanConfig = (ReasonletContainerBeanConfig) BeanHelper.createBean(reasonletContainerConfigDecl); res.setReasonletContainerBeanConfig( reasonletContainerBeanConfig ); } COM: <s> reads the i reasonlet container i configuration </s>
funcom_train/9869465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue2(Integer newVal) { if ((newVal != null && this.value2 != null && (newVal.compareTo(this.value2) == 0)) || (newVal == null && this.value2 == null && value2_is_initialized)) { return; } this.value2 = newVal; value2_is_modified = true; value2_is_initialized = true; } COM: <s> setter method for value2 </s>
funcom_train/3156015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String loadDbType(File dbLocation) throws IOException { File propsFile = new File(dbLocation, BinDatabaseConstants.DATABASE_PROPERTIES_FILE); Properties props = new Properties(); FileInputStream inStream = new FileInputStream(propsFile); props.load(inStream); return props.getProperty(BinDatabaseConstants.DATABASE_TYPE_KEY); } COM: <s> loads a database type identifier from the database properties file </s>
funcom_train/29970828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(TransformerException exception) throws TransformerException { LOG.info("Not-fatal error while endorsing."); LOG.error(exception); // If ACKing can handle the error, do not re-throw. // In the absence of a handler, we re-throw here. throw exception; } COM: <s> gets a non fatal error while endorsing </s>
funcom_train/48855741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BList getMoveHistory(String userName) { for (Iterator i = moveHistory.iterator(); i.hasNext();) { PlayerMoveHistory playerHistory = (PlayerMoveHistory) i.next(); if (playerHistory.playerName.equals(userName) == true) { return (BList) playerHistory.playerMoveHistory.createCopy(); } } return new BArrayList(); } COM: <s> gets the history of moves for a given player </s>
funcom_train/8093819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(double[] preds, double[] input) { int indx = 0; if (m_targetCategory != -1) { indx = m_targetCategory; } double result = m_coefficient; for (int i = 0; i < m_indexes.length; i++) { result *= input[m_indexes[i]]; } preds[indx] += result; } COM: <s> adds this predictor term into the sum for the </s>
funcom_train/12809197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseColor darker() { return new BaseColor(Math.max((int) (getRed() * FACTOR), 0), Math.max((int) (getGreen() * FACTOR), 0), Math.max((int) (getBlue() * FACTOR), 0)); } COM: <s> make this color darker </s>
funcom_train/7309977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initClassDefaults(UIDefaults table) { super.initClassDefaults(table); String UI_CLASSNAME_PREFIX = "com.jgoodies.plaf.plastic.PlasticXP"; Object[] uiDefaults = { "CheckBoxUI", UI_CLASSNAME_PREFIX + "CheckBoxUI", "RadioButtonUI", UI_CLASSNAME_PREFIX + "RadioButtonUI", }; table.putDefaults(uiDefaults); } COM: <s> initializes the plastic xp class defaults </s>
funcom_train/43468259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendValues(Object o, StringBuffer buf) { Iterator it = findAllFields(o); while (it.hasNext()) { Field f = (Field) it.next(); appendFieldName(f, o, buf); buf.append('='); appendFieldValue(f, o, buf); if (it.hasNext()) { buf.append(", "); } } } COM: <s> the values are a bit more complicated </s>
funcom_train/49318127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reset() { _imageProcessor.setDefaultColormap(); _imageProcessor.update(); // update the user interface to show the default settings _linearScale.setSelected(true); _colormapList.setSelectedValue(ImageColormap.DEFAULT_COLOR_LUT, true); _intensityList.setSelectedValue("Ramp", true); } COM: <s> reset the colormap to the default </s>
funcom_train/49920199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateConfig(ConfigForm oConfigForm) throws IServiceException { oLogger.info("updateConfig() : entry"); ContactPage oContactPage = new ContactPage(); copyProperties(oConfigForm, oContactPage); IContact.updateContactPage(oConfigForm.getSynonym(), oContactPage); oLogger.info("updateConfig() : ContactPage updated"); } COM: <s> updates new configuration data from configuration form to the contact </s>
funcom_train/14139710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { InputStreamReader isr = new InputStreamReader( is ); BufferedReader br = new BufferedReader( isr ); char[] buffer = new char[ 1024 ]; int size; while( (size = br.read( buffer )) != -1 ) { this.contents.append( buffer, 0, size ); if( this.debug ) { LOG.debug( String.valueOf( buffer, 0, size ) ); } } } catch( IOException ioe ) { ioe.printStackTrace(); } } COM: <s> reads from the input stream on a separate thread </s>
funcom_train/48496423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SalesOrder findWhereNameEquals(String CustomerName) throws SQLException ,Exception { SalesOrder[] ret = findByDynamicSelect(SQL_SELECT + " WHERE CustomerName = ? and MarkForDelete = ? ", new Object[] { CustomerName, new Boolean(false) }); return ret.length == 0 ? null : ret[0]; } COM: <s> returns all rows from the sales order table that match the criteria name </s>
funcom_train/12781249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean visitObjectRefAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) { return delegate.visitObjectRefAssignOp(n, v, a, pre, c, visitor); } COM: <s> visit an object ref op assignment node after visiting the rhs </s>
funcom_train/3482449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tokenize(List tokens) { if (pattern == null) return; // TODO: may want to see if p != pattern after tokenizing and skip it after // the first attempt. String p = pattern; for (Iterator iterator = tokens.iterator(); iterator.hasNext();) { Token token = (Token) iterator.next(); p = token.tokenize(p); } regex = Pattern.compile(p, getFlags()); } COM: <s> tokenize the pattern used by this rule using the specified list of tokens </s>
funcom_train/4837114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendClassName(StringBuilder buffer, Object object) { if (useClassName && object != null) { if (useShortClassName) { buffer.append(getShortClassName(object.getClass())); } else { buffer.append(object.getClass().getName()); } } } COM: <s> p append to the code to string code the class name </s>
funcom_train/20896133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmail() { System.out.println("setEmail"); String ad = ""; User instance = new User(); instance.setEmail(ad); // 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 email method of class it </s>
funcom_train/18050579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(byte[] source) { for (int i = sources.size() - 1; i >= 0; --i) { byte[] s = (byte[]) sources.elementAt(i); if (KeydbUtil.compare(source, s)) { sources.removeElementAt(i); }; }; sources.insertElementAt(source, 0); if (sources.size() > maxsize) { sources.removeElementAt(sources.size() - 1); } } COM: <s> add source to list or move to top </s>
funcom_train/43098985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent pce) { if (pce.getPropertyName().equals(Argo.KEY_USER_FULLNAME.getKey())) { designerName = pce.getNewValue().toString(); } else { critiqueASAP(pce.getSource(), pce.getPropertyName()); } } COM: <s> performs critique asap </s>
funcom_train/45026500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(IAction action) { IAction nextAction = this.getNext(); this.setNext(action); if (nextAction != null) { action.setNext(nextAction); nextAction.setPrevious(action); } action.setPrevious(this); promoteLinkChangeListener(action); } COM: <s> insert a new record entry after this </s>
funcom_train/43326457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public int nID() { int i,j; int id = 0; if ((seq==null) || (fold==null)) throw new IllegalArgumentException("nID called with unknown seq/fold"); for (i=0; i<sfArray.length; i++) { j = sfArray[i]; if (j != -1) { if (seq.monomer(i).type == fold.monomer(j).type) id++; } } return id; } COM: <s> returns the number of identical residues in the alignment </s>
funcom_train/3593980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void acceptTimeSpanChange(double start, double end) { //System.out.println("Span passed to media handler - passing on to media players"); Iterator it = playingHandlers.iterator(); while (it.hasNext()) { PlayingTimeHandler th = (PlayingTimeHandler) it.next(); th.pause(); th.acceptTimeChange(start); } /* it = playingHandlers.iterator(); while (it.hasNext()) { PlayingTimeHandler th = (PlayingTimeHandler) it.next(); th.acceptTimeSpanChange(start, end); } */ } COM: <s> accept a new time span from another registered time </s>
funcom_train/11021155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreatePreparer() { ViewPreparer preparer = factory.createPreparer("/my/url.do"); assertTrue("The preparer is not an UrlPreparer", preparer instanceof UrlPreparer); preparer = factory.createPreparer(MockViewPreparer.class.getName()); assertTrue("The preparer is not an class ViewPreparer", preparer instanceof MockViewPreparer); } COM: <s> test method for </s>
funcom_train/42536893
/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 BehDefCons))return false; if(o == this)return true; BehDefCons oo = (BehDefCons)o; return (((Object)first).equals(oo.first))&&(((Object)rest).equals(oo.rest)); } COM: <s> is the given object equal to this beh def cons </s>
funcom_train/19096550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(final int minCapacity) { final int oldCapacity = cache.length; if (minCapacity > oldCapacity) { final WeakReference oldData[] = cache; int newCapacity = (oldCapacity * 3)/2 + 1; if (newCapacity < minCapacity) newCapacity = minCapacity; cache = new WeakReference[newCapacity]; System.arraycopy(oldData, 0, cache, 0, size); } } COM: <s> increases the capacity of this tt node list tt instance if </s>
funcom_train/16670941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAttributes(Content content, Map attributeMappings) { Collection attributes = content.getAttributes(); // each attribute is checked in order to see if it must be changed for (Object attribute : attributes) { String name = ((Attribute) attribute).getName(); if (attributeMappings.containsKey(name)) { name = (String) attributeMappings.get(name); ((Attribute) attribute).setName(name); } } } COM: <s> updates the attributes according to the configuration plugin </s>
funcom_train/19104916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessageReceive(Message m) { // spawn a sending thread to send out the message if( myURL != null ){ //System.out.println("BT Transport: Attempting to send message..."); new Sender( deviceList, myURL, m.getData(), m.getAddress(), lock ).start(); } else{ // should not ever happen //System.err.println("BT Transport: Could not send message: Do not know own URL yet"); } } COM: <s> sends out the given message </s>
funcom_train/1067944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildTreeList(TreeItem classifierTree, Classifier classifier){ Iterator iter = classifier.allFeatures().iterator(); while(iter.hasNext()){ Element currentElement = (Element)iter.next(); if(currentElement instanceof Reception){ Signal currentSignal = ((Reception)currentElement).getSignal(); if(currentSignal != null){ TreeItem item = new TreeItem(classifierTree, SWT.NONE); item.setText(currentSignal.getQualifiedName()); item.setData(currentSignal); item.setImage(PapyrusPlugin.UML_LABEL_PROVIDER.getImage(currentSignal)); } } } } COM: <s> this method builds a reception tree widget for each classifier </s>
funcom_train/25258860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer write(Writer writer) throws JSONException { try { boolean commanate = false; Iterator<String> keys = this.keys(); writer.write('{'); while (keys.hasNext()) { if (commanate) { writer.write(','); } Object key = keys.next(); writer.write(quote(key.toString())); writer.write(':'); Object value = this.map.get(key); if (value instanceof JSONObject) { ((JSONObject) value).write(writer); } else if (value instanceof JSONArray) { ((JSONArray) value).write(writer); } else { writer.write(valueToString(value)); } commanate = true; } writer.write('}'); return writer; } catch (IOException exception) { throw new JSONException(exception); } } COM: <s> write the contents of the jsonobject as json text to a writer </s>
funcom_train/21189088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getEndTimeString(PauseBuilder builder) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY, builder.getEndTime() / 100); cal.set(Calendar.MINUTE, builder.getEndTime() % 100); cal.add(Calendar.MINUTE, 1); return timeFormatter.format(cal.getTime()); } COM: <s> returns a string representing the time following the end time of the given </s>
funcom_train/51502911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbRecalc() { if (jbRecalc == null) { jbRecalc = new JButton(); jbRecalc.setText("Neu berechnen"); jbRecalc.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { valueChanged=true; tbStat.setSelectedIndex(0); } }); } return jbRecalc; } COM: <s> this method initializes jb recalc </s>
funcom_train/45018397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXinstrumentName_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXinstrumentName_name_feature", "_UI_NXinstrumentName_type"), NexusPackageImpl.Literals.NXINSTRUMENT_NAME__NAME, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/43607194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(TypeObject type1, TypeObject type2) { assert_(type1); assert_(type2); if (type1 instanceof TypeObject_c) { return ((TypeObject_c)type1).equalsImpl(type2); } else { throw new InternalCompilerError("Unknown implementation of " + "TypeObject", type1.position()); } } COM: <s> returns true iff type1 and type2 represent the same type object </s>
funcom_train/10520124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getProperties() { Hashtable propertiesCopy = new Hashtable(); Enumeration e = properties.keys(); while (e.hasMoreElements()) { Object name = e.nextElement(); Object value = properties.get(name); propertiesCopy.put(name, value); } // There is a better way to save the context. This shouldn't // delegate to next, it's for backward compat only. return propertiesCopy; } COM: <s> returns a copy of the properties table </s>
funcom_train/39291268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConnectionAnchorName(ConnectionAnchor c) { Enumeration _enum = connectionAnchors.keys(); String key; while (_enum.hasMoreElements()) { key = (String) _enum.nextElement(); if (connectionAnchors.get(key).equals(c)) { return key; } } return null; } COM: <s> returns the name of the specified anchor </s>
funcom_train/28426499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTimeout(long currTime) { boolean bActive = true; int maxIdleTime = user.getMaxIdleTime(); if(maxIdleTime > 0) { long currIdleTimeMillis = currTime - lastAccessTime; long maxIdleTimeMillis = maxIdleTime * 1000L; bActive = currIdleTimeMillis <= maxIdleTimeMillis; } return !bActive; } COM: <s> it checks the request timeout </s>
funcom_train/7432425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUrl(String url) { try { this.url = Utils.createHttpURL(url); // remove double slashes in url like /DAV/files//document.txt this.url.setPath(removeDoubleSlashes(this.url.getPath())); } catch (URIException e) { throw new BuildException("Invalid uri!", e); } } COM: <s> set the base url </s>
funcom_train/36799310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNewScrambleCommand () { if (newScrambleCommand == null) {//GEN-END:|85-getter|0|85-preInit // write pre-init user code here newScrambleCommand = new Command ("New", "Scramble", Command.SCREEN, 3);//GEN-LINE:|85-getter|1|85-postInit // write post-init user code here }//GEN-BEGIN:|85-getter|2| return newScrambleCommand; } COM: <s> returns an initiliazed instance of new scramble command component </s>
funcom_train/5463133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compatibleWith(TriplePattern pattern) { boolean ok = subject instanceof Variable || pattern.subject instanceof Variable || subject.equals(pattern.subject); if (!ok) return false; ok = predicate instanceof Variable || pattern.predicate instanceof Variable || predicate.equals(pattern.predicate); if (!ok) return false; if (object instanceof Variable || pattern.object instanceof Variable) return true; return object.equals(pattern.object); } COM: <s> compare two patterns for compatibility i </s>
funcom_train/5343928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsBusy() throws BadPacketException { parseResults(); switch (_busyFlag) { case UNDEFINED: throw new BadPacketException(); case TRUE: return true; case FALSE: return false; default: Assert.that(false, "Bad value for busy flag: "+_pushFlag); return false; } } COM: <s> returns true if this has no more download slots </s>
funcom_train/4747812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpThemeList( final List<ThemeEntity> list) { if ( list.isEmpty() ) { System.out.println(""); return; } for ( ThemeEntity theme: list ) { System.out.print( "\n\tTheme: "+ theme + " Subthemes="+theme.getSubthemes()); dumpThemeList( theme.getSubthemes() ); } } COM: <s> prints a theme list on the server systems console </s>
funcom_train/18743778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ShiftPriorityAction getShiftPriorityAction(boolean up) { ShiftPriorityAction result = up ? this.raisePriorityAction : this.lowerPriorityAction; if (result == null) { result = new ShiftPriorityAction(this.simulator, up); if (up) { this.raisePriorityAction = result; } else { this.lowerPriorityAction = result; } } return result; } COM: <s> returns the priority up or down shifting action permanently associated with the simulator </s>
funcom_train/21875397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { if (debug >= 1) log("Finalizing database servlet"); // NOTE: We do not attempt to unload the database because there // is no portable way to do so. Real applications will have used // a real database, with no need to unload it // Remove the database from our application attributes getServletContext().removeAttribute(Constants.DATABASE_KEY); } COM: <s> gracefully shut down this database servlet releasing any resources </s>
funcom_train/37484861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { System.err.println("creando control tree"); composite = new Composite(parent, SWT.EMBEDDED| SWT.NO_BACKGROUND| SWT.FILL); frame = SWT_AWT.new_Frame(composite); X11Patch.getInstance().applyPatch(); mainPanel=new JPanel(new BorderLayout()); frame.add(mainPanel); mainPanel.setBackground(Color.white); getSite().getWorkbenchWindow().getPartService().addPartListener(partListener); } COM: <s> this is a callback that will allow us </s>
funcom_train/21995407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteRecs(Connection conn, Collection keys) throws DatabaseException { //TODO: put in transaction DeviceBindingDB db_db = DeviceBindingDB.getInstance(); SignalDB sig_db = SignalDB .getInstance(); String filter = getFilterForKeys(keys); db_db .delete(conn, filter); sig_db.delete(conn, filter); super.deleteRecs(conn, keys); } COM: <s> override delete record s for the given keys </s>
funcom_train/19052003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WWEStyleSheet getStyleSheet() { if (defaultStyles == null) { defaultStyles = new WWEStyleSheet(); try { InputStream is = WWEHTMLEditorKit.getResourceAsStream(DEFAULT_CSS); Reader r = new BufferedReader(new InputStreamReader(is)); defaultStyles.loadRules(r, null); r.close(); } catch (Throwable e) { // on error we simply have no styles... the html // will look mighty wrong but still function. } } return defaultStyles; } COM: <s> get the set of styles currently being used to render the html elements </s>
funcom_train/9869580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUltlogin(java.util.Date newVal) { if ((newVal != null && this.ultlogin != null && (newVal.compareTo(this.ultlogin) == 0)) || (newVal == null && this.ultlogin == null && ultlogin_is_initialized)) { return; } this.ultlogin = newVal; ultlogin_is_modified = true; ultlogin_is_initialized = true; } COM: <s> setter method for ultlogin </s>
funcom_train/42869223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance replaceSymbol(Symbol symbol, int depth, Transform matrix, AlphaTransform cxform, int ratio, int clipDepth) { Instance inst = new Instance(symbol, depth); if (matrix == null) { matrix = new Transform(); } Placement placement = new Placement(inst, matrix, cxform, null, ratio, clipDepth, frameNumber, false, true, null); placements.add(placement); return inst; } COM: <s> replace the symbol at the given depth with the new symbol </s>
funcom_train/34340185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getMiCobrador() { if (miCobrador == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here miCobrador = new TextField("ingresar n\u00BA de cobrador", null, 5, TextField.ANY);//GEN-LINE:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return miCobrador; } COM: <s> returns an initiliazed instance of mi cobrador component </s>
funcom_train/13869989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSaveAs() { SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); saveAsDialog.open(); IPath path = saveAsDialog.getResult(); if (path != null) { IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); if (file != null) { doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); } } } COM: <s> this also changes the editors input </s>
funcom_train/3934456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { super.update(); bounds = GraphConstants.getBounds(attributes); if (isLeaf() && bounds == null) { bounds = new Rectangle(10, 10, 200, 100); GraphConstants.setBounds(attributes, bounds); } recalculateColumnOffsets(); } COM: <s> overrides the parent method to udpate the cached points </s>
funcom_train/25369513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWrappedAlgorithm(Object algorithm) { if (!(algorithm instanceof com.sodad.weka.associations.Associator)) { throw new IllegalArgumentException(algorithm.getClass()+" : incorrect " +"type of algorithm (Associator)"); } setAssociator((com.sodad.weka.associations.Associator)algorithm); } COM: <s> sets the algorithm associator for this bean </s>
funcom_train/34424495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendIsAuthed(Client client, Client authedClient) { if (authedClient.authed) { client.send("ISAUTHED " + authedClient.getNick() + ": TRUE"); } else { client.send("ISAUTHED " + authedClient.getNick() + ": FALSE"); } } COM: <s> notify a client if another client is authed at the server </s>
funcom_train/25016463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearToLastExecExpired() { if( lastExec != null ) { for (Iterator<Occurrence> it = ocurrences.iterator(); it.hasNext();) { Occurrence oc = (Occurrence) it.next(); if(oc.time < lastExec.expires) { it.remove(); logDebug("Removed oc becouse it was before lastExecExpires "+(new Date(oc.time))); } else { break; } } if(ocurrences.size() == 0) { executeCount=0; occursSinceLastExec = 0; logDebug("Reset executeCount"); } } } COM: <s> eliminate any entries that occurred before the last exec expired date </s>
funcom_train/16628022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOffset(int offset) throws BadLocationException { if (offset<0 || (((offset+_length)>_document.getLength()) && _type!=DocumentEvent.EventType.INSERT)) { throw new BadLocationException("Offset out of range for this change/document combination",offset); } _offset=offset; } COM: <s> sets the offset of the change in the document </s>
funcom_train/35845227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkCollision(String before, String after) { boolean collision = (before != null && before.equals(shortName)) || (after != null && after.equals(shortName)); if (collision) { if (longName == null) { longName = getLongName(); } displayName = longName; } } COM: <s> if one of the given names equals the short name then </s>
funcom_train/34782023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int onOAMEnd() { if (isLCDEnabled()) { final CPU cpu = this.gameboy.getCPU(); if (isHBlankIRQEnabled() && (cpu.memory[0xff41] & 0x44) != 0x44) { cpu.requestIRQ(CPU.IRQ_LCDSTAT); } } this.mode = MODE_HBLANK; return HBLANK_PERIOD; } COM: <s> trigger h blank irq if necessary </s>
funcom_train/25187260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClear() { System.out.println("clear"); Path p = Path.parse("/a/b/c/d[35435]/e[[[[]/f"); assertEquals(6, p.getDepth()); p.clear(); assertEquals(0, p.getDepth()); } COM: <s> test of to string method of class path </s>
funcom_train/35168436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initConnection(Context ctx, String connfactory, String topic) { try { ConnectionFactory.getTopicConnectionFactory(ctx,connfactory); this.CONN = ConnectionFactory.getTopicConnection(); this.TOPIC = InitialContextFactory.lookupTopic(ctx, topic); this.SESSION = this.CONN.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE); this.SUBSCRIBER = this.SESSION.createSubscriber(this.TOPIC); log.info("created the topic connection successfully"); } catch (JMSException e) { log.error("Connection error: " + e.getMessage()); } } COM: <s> create the connection session and topic subscriber </s>
funcom_train/4674051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sellRINs(Invoice invoice) throws RINException, AuthorizationException { authorize("sellRINs(Invoice)"); if (invoice == null) throw new RINException("invoice can not be null"); RINFactory rinFactory = new RINFactory(); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx.begin(); rinFactory.sellRIN(invoice, em); tx.commit(); } COM: <s> selling rins given an empty invoice it will create a new invoice </s>
funcom_train/38778642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processCommandsForCharacterSet(String currentSet,String newSet) throws TextPrinterException { if (!currentSet.equals(newSet)) if (!newSet.equals("")) { String mappedSet=mapTableLookup(this.charSetValues,newSet); if (mappedSet!=null) { executeCommand(TextPrinter.CMD_SELECT_CHAR_SET,mappedSet); } } } COM: <s> enable new character set </s>
funcom_train/49130218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(int x, int y, int width, int height) { this.bounds.x = this.location.x = this.x = x; this.bounds.y = this.location.y = this.y = y; setWidth(width); setHeight(height); } COM: <s> set the location and size of the component state being animated </s>
funcom_train/38223956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runSentenceTest(Tokeniser tokeniser, SentenceMarker sentenceMarker, String text, String result) throws Exception{ // Tokenise the string List tokens = new ArrayList(); tokeniser.tokenise(text, 0, tokens); // Find the sentences Spans spans = new Spans(); sentenceMarker.mark(tokens, spans); assertEquals("mark sentence "+text,spans.toString(),result); } COM: <s> runs a test against the sentence marker </s>
funcom_train/26579415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public YUINavTreeLeaf ( String rootId , String variableNode, int Node,PersistenceManager manager) throws ClassNotFoundException, Exception { this.rootId = rootId; this.sId = rootId; this.moduleFunction = (ModuleFunction) manager.getById(ModuleFunction.class, rootId); this.Node=Node; this.variableNode=variableNode; this.pm = manager; } COM: <s> constructor for recursive only </s>
funcom_train/43328349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void enableWithProteins() { loadProteins.setEnabled(true); loadProteinsB.setBorder(buttonBorder); threadProteins.setEnabled(true); if (tr==null) { threadProteinsB.setBorder(greenBorder); saveProteins.setEnabled(false); print.setEnabled(false); nextProtein.setEnabled(false); } else { threadProteinsB.setBorder(buttonBorder); saveProteins.setEnabled(true); print.setEnabled(true); if (p.n() > 1) nextProtein.setEnabled(true); else nextProtein.setEnabled(false); prevProtein.setEnabled(false); } setShownProtein(0); showOptions.setEnabled(true); } COM: <s> enable various actions when proteins are there </s>
funcom_train/42642940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreationEventsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IText_creationEvents_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IText_creationEvents_feature", "_UI_IText_type"), DigitalHPSPackage.Literals.ITEXT__CREATION_EVENTS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the creation events feature </s>
funcom_train/4347804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char skipTo(char to) { char c; try { int startIndex = this.index; reader.mark(Integer.MAX_VALUE); do { c = next(); if (c == 0) { reader.reset(); this.index = startIndex; return c; } } while (c != to); } catch (IOException exc) { throw new JsonException(exc); } back(); return c; } COM: <s> skip characters until the next character is the requested character </s>
funcom_train/33606747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddToElement() { System.out.println("addToElement"); int position = 0; double value = 0.0; R2 instance = new R2(); instance.addToElement(position, value); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of add to element method of class r2 </s>
funcom_train/50221972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(ResetEventObject reo) throws IOException { if (st != null) { st.kill(true); resumeSimulatorThread(); } st = new MySimulatorThread(0.0); fireCount = 0; scp.setBreakpoint(BREAKPOINTATSTART); simulationRuntime = 0; scp.setTime(0.0); scp.setData(""); scp.setMessage("Ready"); notifyReset(); } COM: <s> reset the simulation </s>
funcom_train/34068402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Laptime getFastestLaptime() { //TODO don't loop all laps, store this value when it is set Laptime best = laptimes.get(0); // The current lap is not set, so it's not included in this calculation for (int i = 1; i < lap; i++) { if (laptimes.get(i).getTime() < best.getTime()) { best = laptimes.get(i); } } return best; } COM: <s> returns the fastest set lap time set by this contestant </s>
funcom_train/8630829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSQL() { StringBuilder buff = new StringBuilder(); if (primaryKey) { buff.append("PRIMARY KEY"); if (hash) { buff.append(" HASH"); } } else { if (unique) { buff.append("UNIQUE "); } if (hash) { buff.append("HASH "); } buff.append("INDEX"); } return buff.toString(); } COM: <s> get the sql snippet to create such an index </s>
funcom_train/20553154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextArea getDescriptionTextArea() { if (descriptionTextArea == null) { descriptionTextArea = new JTextArea(); descriptionTextArea.setFont(new Font("Dialog", Font.PLAIN, 12)); descriptionTextArea.setBackground(new Color(238, 238, 238)); descriptionTextArea.setWrapStyleWord(true); descriptionTextArea.setLineWrap(true); } return descriptionTextArea; } COM: <s> this method initializes description text area </s>
funcom_train/12837200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putValue(SessionKey key, Object value) throws SessionException { touch(); if (checkoutTable.contains(key.toString())) { throw new SessionException(key + " is checked out.", SessionException.ALREADY_CHECKEDOUT); } else { sessionDataHashtable.put(key.toString(), value); } } COM: <s> adds a value to the session </s>