__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45252733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFastViewSashBounds() { Rectangle bounds = getBounds(); int oppositeSide = Geometry.getOppositeSide(side); Rectangle newBounds = Geometry.getExtrudedEdge(bounds, -getSashSize(), oppositeSide); Rectangle oldBounds = sash.getBounds(); if (!newBounds.equals(oldBounds)) { sash.setBounds(newBounds); } } COM: <s> updates the position of the resize sash </s>
funcom_train/3032868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GdbiMiniFam getMiniFam(GdbiXref xref) { // TODO: cache new one, set not-all-defined GdbiMiniFam mfam = cacheMini.getMiniFam(xref); if ((mfam == null) && (xref != null) && (! xref.isnull())) mfam = cacheMini.putMiniFam(gedcom, xref); return mfam; } COM: <s> return the gdbi mini fam for this gdbi xref </s>
funcom_train/28340046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches( final Object object ) { final Comparable value = (Comparable)((ITableRecord)object).getValue( _key ); final int comparisonResult = value.compareTo( _value ); switch( _operation ) { case COMPARE_LESS_THAN: return comparisonResult < 0; case COMPARE_LESS_THAN_OR_EQUALS: return comparisonResult <= 0; case COMPARE_EQUALS: return comparisonResult == 0; case COMPARE_GREATER_THAN_OR_EQUALS: return comparisonResult >= 0; case COMPARE_GREATER_THAN: return comparisonResult > 0; default: return false; } } COM: <s> determine if the specified object is a match to this qualifiers criteria </s>
funcom_train/15908580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rebindActions() { //System.out.println("Rebinding actions for " + comp); Action[] actions = comp.getActions(); String name; boolean found; for (i=0; i<actionNames.length; i++) { name = actionNames[i]; // search name in Action array found = false; for (j=0; j<actions.length && !found; j++) found = name.equals(actions[j].getValue(Action.NAME)); if (found) boundActions[i] = actions[j-1]; else boundActions[i] = null; } } COM: <s> bind slots to actions in current component this may be a bit slow </s>
funcom_train/26151936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ZipFile getZipFile(String path) throws CoreException { try { return new ZipFile(path); } catch (IOException e) { WebAppPlugin.log(e, "getZipFile(String path) handling IOException"); //$NON-NLS-1$ String message = path + ": " + e.getMessage(); //$NON-NLS-1$ Status status = new Status( IStatus.ERROR, WebAppPlugin .getDefault() .getDescriptor() .getUniqueIdentifier(), IStatus.ERROR, message, e); throw new CoreException(status); } } COM: <s> returns a reference to the zip file for the given path </s>
funcom_train/39314753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFlattenLayer(){ tester.addActionPerformed(new ActionEvent(tester, 1, "poop")); tester.addActionPerformed(new ActionEvent(tester, 1, "poop")); tester.flattenLayer(); assertEquals(tester.holder.size(), 1); } COM: <s> test of flatten layer of class all layers </s>
funcom_train/17935563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getMacjMenuItem() { if (macjMenuItem == null) { macjMenuItem = new JRadioButtonMenuItem(); macjMenuItem.setText("Mac"); macjMenuItem.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent e) { setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel"); } }); } return macjMenuItem; } COM: <s> this method initializes macj menu item </s>
funcom_train/48499383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIssueIndexCronSchedule_admin () { String value = getProperty("application.issue.index.schedule"); if (value == null || value.equals("")) return "2|?"; // default schedule = fire every day at 2AM else { // We don't want to return the actual schedule but a more // readable String to be used in the administrator's setup // section. String hour = value.substring(4, value.indexOf('*')-1).trim(); String day = value.substring(value.lastIndexOf('*')+1).trim(); return hour + "|" + day; } } COM: <s> what is the quartz cron schedule which fires the issue index rebuild job </s>
funcom_train/35095552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gestureFinished(long when, Location where, GestureManager<?> manager) { if (jListPerformed.getModel() instanceof DefaultListModel) { ((DefaultListModel) jListPerformed.getModel()).addElement( when + " - Gesture Finished, " + where + ", detected by " + manager.getName()); } } COM: <s> called when a gesture is finished </s>
funcom_train/40412058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeAdd(T f) { String dataSourceId = f.getDataSourceId(); if (dataSourceId != null) { DataProviderObject dataSourceProvider = map.get(dataSourceId); if (dataSourceProvider != null) { f.setSingleDto(dataSourceProvider.addData(f)); } } } COM: <s> performs a data add operation </s>
funcom_train/14119143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(String password, String email) throws Exception { if (this.exists) { return; } // Is a new user for us. Register him this.user = new User(); user.setUsername(this.username); user.setPassword(password); user.setEmail(email); user.setActive(1); this.dao.addNew(user); } COM: <s> registers a new user </s>
funcom_train/4288317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClazzNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Analyzer_clazzName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Analyzer_clazzName_feature", "_UI_Analyzer_type"), AlternativesPackage.Literals.ANALYZER__CLAZZ_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the clazz name feature </s>
funcom_train/18103882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChars(char[] data) { synchronized (Display.LCDUILock) { try { buffer.getChars(0, buffer.length(), data, 0); } catch (IndexOutOfBoundsException e) { throw new ArrayIndexOutOfBoundsException(e.getMessage()); } return buffer.length(); } } COM: <s> copies the contents of the code text field code into a </s>
funcom_train/44436426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSecure(byte buffer[], int count, int valueOffset, boolean littleEndian){ if (size <= 4 && count <= (4 / size)) { buffer = new byte[4]; LONG.store(buffer, 0, valueOffset, littleEndian); valueOffset = 0; } return get(buffer, count, valueOffset, littleEndian); } COM: <s> this function converts the value offset to a value if it </s>
funcom_train/43014699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNamespace(int v) { if (Article_Type.featOkTst && ((Article_Type) jcasType).casFeat_namespace == null) { jcasType.jcas.throwFeatMissing("namespace", "org.apache.uima.mediawiki.types.Article"); } jcasType.ll_cas.ll_setIntValue(addr, ((Article_Type) jcasType).casFeatCode_namespace, v); } COM: <s> setter for namespace sets there are potentially several namespaces in a media wiki </s>
funcom_train/35443603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launch_show() { ui.button_launch.setText(tr("Close")); QModelIndex i = sortFilterProxyModel.mapToSource(ui.list.selectionModel().currentIndex()); m_current = m_model.at(i); m_current.widget().show(); m_current.widget().installEventFilter(this); // ui.description.stop(); } COM: <s> does the required stuff to show a launchable </s>
funcom_train/3380258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(200); buf.append("PKCS9 Attributes: [\n\t"); ObjectIdentifier oid; PKCS9Attribute value; boolean first = true; for (int i = 1; i < PKCS9Attribute.PKCS9_OIDS.length; i++) { value = getAttribute(PKCS9Attribute.PKCS9_OIDS[i]); if (value == null) continue; // we have a value; print it if (first) first = false; else buf.append(";\n\t"); buf.append(value.toString()); } buf.append("\n\t] (end PKCS9 Attributes)"); return buf.toString(); } COM: <s> returns the pkcs9 block in a printable string form </s>
funcom_train/29265289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRollback() throws Throwable { Connection connection = getConnection(); String bpNumber = null; try { LocalTransaction tx = connection.getLocalTransaction(); tx.begin(); bpNumber = Constants.createPersonBAPI(generateName(), connection, factory); tx.rollback(); Connection c1 = getConnection(); try { String returnedLastName = Constants.readPersonNameBAPI(bpNumber, c1, factory); assertTrue(returnedLastName == null || returnedLastName.length() == 0); } finally { c1.close(); } } finally { connection.close(); } } COM: <s> tests simple rollback of a local transaction </s>
funcom_train/33639548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(Graphable source) { super.setSource(source); //set source of traversal, creating queue if necessary if (m_active == null) m_active = buildQueue(getGraph()); else if (m_active.isEmpty()) m_active.clear(); m_active.enq(getSource()); } COM: <s> sets the source of the traversal and places it in the node queue </s>
funcom_train/46479185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDriverTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Driver_DriverType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Driver_DriverType_feature", "_UI_Driver_type"), IS1Package.Literals.DRIVER__DRIVER_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the driver type feature </s>
funcom_train/27864370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draggingVerticalSlider(int dy){ if (vslider.vy + dy + vsliderRS.getHeight() < upBt.vy - upBtRS.getHeight() && vslider.vy + dy - vsliderRS.getHeight() > downBt.vy + downBtRS.getHeight()){ vslider.move(0, dy); updateCameraVerticalPosition(); } } COM: <s> call this method when the vertical slider is manipulated e </s>
funcom_train/40386279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getSamlTimeout() { if (samlTimeout == null) { ValveConfiguration valveConfig = getValveConfig(); if (valveConfig != null) { samlTimeout = new Long(valveConfig.getSAMLConfig().getSamlTimeout()).longValue(); if (samlTimeout < 0) { samlTimeout = Long.MAX_VALUE; } } } return samlTimeout.longValue(); } COM: <s> reads the saml timeout defined in the config file </s>
funcom_train/25646442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean confirmRemoval() { String ttl = KendoResources.getString("dialog.removeTestSetItems.title"); String msg = KendoResources.getString("dialog.removeTestSetItems.message"); int i = JOptionPane.showConfirmDialog( parent, msg, ttl, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); return (i == JOptionPane.YES_OPTION); } COM: <s> displays a confirmation dialog for items removal </s>
funcom_train/1151529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ParseConfig ht) { useWords = ht.getOption("input.words", true); maxCharSeqLen = ht.getOption("input.gram", maxCharSeqLen); emptySkip = ht.getOption("input.empty.skip", false); emptySpecial = ht.getOption("input.empty.special", true); } COM: <s> initializes config params from the java system properties </s>
funcom_train/49155290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopApps() { Set<Map.Entry<String, JuicyApplication>> appsSet = globalConfiguration .getApps().entrySet(); Iterator<Map.Entry<String, JuicyApplication>> appIterator = appsSet .iterator(); while (appIterator.hasNext()) { Map.Entry<String, JuicyApplication> appEntry = appIterator.next(); stopApplication(appEntry.getKey()); } } COM: <s> this method resets all applications and adds them to the available apps </s>
funcom_train/34795637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void add(PropertyModule pm) { Module module = pm.getModule(); if (module.getClass().getAnnotation(Multi.class) != null) { try { Module m2 = module.getClass().newInstance(); PropertyModule pm2 = new PropertyModule(m2); selectedModules.add(pm2); } catch (InstantiationException e1) { e1.printStackTrace(); } catch (IllegalAccessException e1) { e1.printStackTrace(); } } else { selectedModules.add(pm); } } COM: <s> adds a new </s>
funcom_train/23794423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCountableLoop() { return (initialIteratorValue != null) && isConstant(initialIteratorValue) && (terminalIteratorValue != null) && isConstant(terminalIteratorValue) && (strideValue != null) && isConstant(strideValue) && (iteratorInstr != null) && ((iteratorInstr instanceof IntAdd) || (iteratorInstr instanceof IntSub)); } COM: <s> is this a countable loop of the form </s>
funcom_train/31669111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphicsComponent createGraphicsComponent() { VectorField field = null; try { field = new VectorField(getPlotPanel(),function1,function2, xSteps, ySteps); field.rescale(isVectorField); field.setVectorColor(vectorColor); } catch (UnacceptableVariableException ex){ errorMessage("Trouble creating VectorField\n"+ex.getMessage()); } catch (VariableUndefinedException ex){ errorMessage("Trouble creating VectorField\n"+ex.getMessage()); } return field; } COM: <s> this function will create the vector field object that will be plotted </s>
funcom_train/19913109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getDynamicExtendBox() { if (dynamicExtendBox == null) { dynamicExtendBox = new JCheckBox(); dynamicExtendBox.setText(LangageManager .getProperty("trackenum.digitextension")); dynamicExtendBox.setName("dynamicExtendBox"); } return dynamicExtendBox; } COM: <s> this method initializes j check box2 </s>
funcom_train/22103241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restartConfig() { try { MBeanServer server = MBeanUtil.getMBeanServer(); ObjectName objName = new ObjectName("hyperic.jmx:type=Service,name=ProductConfig"); server.invoke(objName, "restart", new Object[] {}, new String[] {}); } catch (Exception e) { throw new SystemException(e); } } COM: <s> restart the config service </s>
funcom_train/39543538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(GraphicsNodeKeyEvent evt) { if (!isDown) { isDown = true; dispatchKeyEvent("keydown", evt); } if (evt.getKeyChar() == KeyEvent.CHAR_UNDEFINED) { // We will not get a KEY_TYPED event for this char // so generate a keypress event here. dispatchKeyEvent("keypress", evt); } } COM: <s> invoked when a key has been pressed </s>
funcom_train/25419048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSelectedSearchOption() { if (_selectedSearchOption == null || "".equals(_selectedSearchOption)) { _selectedSearchOption = KeySearchTextOptions.exact.name(); } if(_selectedSearchOption.equals(KeySearchTextOptions.any.name())) { return KeySearchTextOptions.exact.name(); } return Val.chkStr(_selectedSearchOption); } COM: <s> gets the selected search option </s>
funcom_train/21174060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectConnection() { if ( !online ) { // Switch to nextCon if it is time if ( tryNextCon ) { con = nextCon; tryNextCon = false; online = true; System.out.println (name + ": selectConnection selected newly online connection"); } // otherwise, use the offline con if available else if ( offlineCon != null ) { con = setupDBConnection("localhost"); } } else { System.out.println (name + ": selectConnection called when already online"); } } COM: <s> selects the best connection to use </s>
funcom_train/27691658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(ServiceConfiguration cfg) { if (serviceConfiguration == null) { serviceConfiguration = cfg; } else { Debug.assert( serviceConfiguration != cfg, "A JavaProgramFactory is a singleton and may be part of one and only one service configuration. We appologize for the inconveniences."); } ProjectSettings settings = serviceConfiguration.getProjectSettings(); settings.addPropertyChangeListener(this); writer = new StringWriter(); sourcePrinter = new PrettyPrinter(writer, settings.getProperties()); } COM: <s> called by the service configuration indicating that all services </s>
funcom_train/13957615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EOAttribute attribute() { EOAttribute attribute = null; if (eoObject() != null) { EOEntity entity = EOUtilities.entityForObject(eoObject().editingContext(), eoObject()); attribute = entity != null ? entity.attributeNamed(propertyKey()) : null; } return attribute; } COM: <s> cover method for getting the attribute corresponding </s>
funcom_train/11949120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumBookColumns() throws SQLException { DatabaseMetaData dmd = this.connection.getMetaData(); ResultSet rs = dmd.getColumns("", "", "BOOKS", null); try { int returnVal = 0; while (rs.next()) { returnVal++; } return returnVal; } finally { rs.close(); } } COM: <s> returns the number of columns in the books table </s>
funcom_train/29667993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void testGetRemoteFileByHTTPErrorDestinationPermissions() { boolean result = false; URL remoteURL = getRemoteURL(remoteFile); // attempt to download the file File destination = new File(noWritePermissions); FileFetch f = new FileFetch(); try { f.downloadFile(remoteURL, destination); } catch (IOException ioe) { // expected behavior result = true; } TestCase.assertTrue(result); } COM: <s> tests for an error downloading to a directory without write permissions </s>
funcom_train/25314559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isBlocked(WorldObject worldObject) { Area blocked = worldObject.getBlockedArea(); for(Point tile:blocked.getContainedTiles(worldObject.getPosition())) { if(tile.x>=0 && tile.x<width && tile.y>=0 && tile.y<height){ if (this.blocked[tile.x][tile.y] == true) { return true; } } } return false; } COM: <s> checks whether there is enough space for a world object </s>
funcom_train/23011351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeDataStorage(){ try{ if(is!=null) is.close(); if(bis!=null) bis.close(); if(isa!=null) isa.close(); if(bisa!=null) bisa.close(); } catch (IOException e) { e.printStackTrace(); }finally{ is = null; bis = null; isa = null; bisa = null; } } COM: <s> closes the datastorage after reading is completed </s>
funcom_train/7495342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PluralRules forLocale(ULocale locale) { String rulesId = getRulesIdForLocale(locale); if (rulesId == null || rulesId.trim().length() == 0) { return PluralRules.DEFAULT; } PluralRules rules = getRulesForRulesId(rulesId); if (rules == null) { rules = PluralRules.DEFAULT; } return rules; } COM: <s> returns the plural rules for the the locale </s>
funcom_train/25501290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties buildProperties(List<ArgumentType> parameters) { logger.info("Processing properties..."); Properties properties = new Properties(); if (parameters == null || parameters.isEmpty()) { return properties; } Iterator<ArgumentType> argTypes = (Iterator<ArgumentType>) parameters.iterator(); ArgumentType argType = null; while (argTypes.hasNext()) { argType = argTypes.next(); properties.setProperty(argType.getName(), argType.getValue()); } logger.info("Properties rebuild."); return properties; } COM: <s> creates an instance of </s>
funcom_train/47515271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateThirdOfMean(){ for (int i = 0; i < mNumLvs; ++i) { mThresholds[i] = (Math.abs(mMaxValues[i]) + Math.abs(mMinValues[i])) / 6.0; if (Math.abs(mMaxValues[i]) < mThresholds[i] || Math.abs(mMinValues[i]) < mThresholds[i]) { mThresholds[i] = 0.0; } } } COM: <s> calculate the threshold value for each lv by finding </s>
funcom_train/20364331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WeightedChildSkill getChildSkillForBias(int n) { if ( resultInGroup(n) ) { throw new IllegalArgumentException("That bias value returns a group not a weighted child skill."); } int v=n; for ( WeightedChildSkill wcs : childSkills ) { v -= wcs.getWeighting().getValue(); if (v<0) { return wcs; } } throw new IllegalArgumentException("No skill for that value."); } COM: <s> for a random bias roll return the weighted child skill </s>
funcom_train/1116076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getDoneButton() { if (doneButton == null) { doneButton = new JButton(); ResourceHelper.setText(doneButton, "Done_(No_Delete)"); doneButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dtcommon(false); } }); doneButton.setIcon(new ImageIcon(getClass().getResource( "/resource/Properties16.gif"))); } return doneButton; } COM: <s> this method initializes done button </s>
funcom_train/28298512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPlayerIndex(TransSibPlayer player) { if (player!=null) { // compare of adresses is allowed here, because // players aren't cloned! int numP=getNrPlayers(); for (int i=0;i<numP;i++) { if (player==players[i]) return i; } } return -1; } COM: <s> returns the index of given player </s>
funcom_train/20749964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void listTypes(BufferedWriter out) throws IOException { out.write("Known Types\n"); for (Iterator<String> i = engine.getTypeNames(); i.hasNext(); ) { out.write("\t"); out.write(i.next()); if (i.hasNext()) out.write("\n"); } } COM: <s> list all of the different types that the engine knows about </s>
funcom_train/10503520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List sortModuleDescriptors() throws CircularDependencyException { Message.debug("Nbr of module to sort : " + moduleDescriptors.size()); Iterator moduleDescriptorsIterator = moduleDescriptors.iterator(); while (moduleDescriptorsIterator.hasNext()) { ModuleInSort next = (ModuleInSort) moduleDescriptorsIterator.next(); sortModuleDescriptorsHelp(next, next); } return sorted; } COM: <s> iterates over all modules calling sort module descriptors help </s>
funcom_train/3349835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupGDT(GDT gdt) { gdt.setBase(GDT.PROCESSOR_ENTRY, ObjectReference.fromObject(this) .toAddress()); // Clone TSS this.tss = new TSS32(); gdt.setBase(GDT.TSS_ENTRY, tss.getAddress()); // Create kernel stack tss.setKernelStack(new byte[VmThread.DEFAULT_STACK_SLOTS * VmX86Architecture32.SLOT_SIZE]); } COM: <s> setup the given gdt for use by this processor </s>
funcom_train/7609561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void gotoLabel(Integer label) { for (int indexInListing = 0; indexInListing < programListing.getLength(); indexInListing++) { LabelInstr labelInstr = (LabelInstr) programListing.getChildAt(indexInListing); if (label.equals(labelInstr.getNatCon())) { programCounter.setCurrentLine(indexInListing); return; } } throw new IllegalStateException("Label " + label + " does not exist: " ); } COM: <s> jump to a label </s>
funcom_train/1382175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getTabbedPaneClienti() { if (tabbedPaneClienti == null) { tabbedPaneClienti = new JTabbedPane(); tabbedPaneClienti.addTab("Fatturazione manuale", null, getPannelloFattura(), null); tabbedPaneClienti.addTab("Visualizzazioni Fatture Manuali", null, getPannelloViewFatture(), null); } return tabbedPaneClienti; } COM: <s> this method initializes tabbed pane clienti </s>
funcom_train/51634994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Composite doCreatePreviewPane(Composite composite, int numColumns) { createLabel(numColumns, composite, FormatterMessages.ModifyDialogTabPage_preview_label_text); final JavaPreview preview= doCreateJavaPreview(composite); fDefaultFocusManager.add(preview.getControl()); final GridData gd= createGridData(numColumns, GridData.FILL_BOTH, 0); gd.widthHint= 0; gd.heightHint=0; preview.getControl().setLayoutData(gd); return composite; } COM: <s> create the right side of the modify dialog </s>
funcom_train/40061288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reassessHolidays(EntityManager entityManager) { Query query = entityManager.createNamedQuery("HolidayRequest.findAll"); List<HolidayRequest> requests = query.getResultList(); for (HolidayRequest request : requests) { double oldCost = request.getHoursSpent(); double newCost = getHolidaySpend(entityManager, request, null); // Persist any changes if (oldCost != newCost) { entityManager.merge(request); } } } COM: <s> reassesses the spend on all holiday requests note that the method </s>
funcom_train/8083522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void storeOutputProperties() throws Exception { if (VERBOSE) System.out.println("Saving '" + getOutputFilename() + "'..."); m_OutputProperties.store( new FileOutputStream(getOutputFilename()), " Customises the list of options given by the GenericObjectEditor\n# for various superclasses."); } COM: <s> stores the generated output properties file </s>
funcom_train/9346448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPassword(String passwordToDecrypt) throws DfException { String actualPassword = ""; //Decrypt the password if it's encrypted try { actualPassword = RegistryPasswordUtils.decrypt(passwordToDecrypt); } catch (DfException e) { //Check if formatting exception was caught if(e.getCause() instanceof DfBase64FormatException) { //Assume that the password is not encrypted. actualPassword = passwordToDecrypt; }else{ throw e; } } return actualPassword; } COM: <s> decrypts the password </s>
funcom_train/1330719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object process(Object env, Class<?> clazz, MethodParameter methodParam) { if (env == null) { return null; } for (IConverter converter : converters) { if (converter.canConvert(clazz)) { return converter.unmarshal(env, clazz, this, methodParam); } } return new BeanConverter().unmarshal(env, clazz, this, methodParam); } COM: <s> processes a given object and deserializes it into a java object of a </s>
funcom_train/23267799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNroGiro() { System.out.println("setNroGiro"); int nroGiro = 0; Giros instance = new Giros(); instance.setNroGiro(nroGiro); // 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 nro giro method of class capa negocios </s>
funcom_train/16772683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void computeBandTables() { if ( saBands > 0 && saFFTSampleSize > 0 & fft != null ) { // -- Create band table. sabdTable = saBandDistribution.create( saBands, fft, saFFTSampleRate ); saBands = sabdTable.length; updateSpectrumAnalyserBandWidth(); // -- Resolve band descriptions. resolveBandDescriptions( sabdTable ); // -- Create gain table. sabgTable = saBandGain.create( fft, saFFTSampleRate ); // printTable( sabdTable ); } } COM: <s> computes and stores a band distribution and gain tables for the spectrum analyzer </s>
funcom_train/25686491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendParameters(String clusterName, String nodeName, int nParams, Vector paramNames, Vector paramValues) throws ApMonException, UnknownHostException, SocketException, IOException { sendTimedParameters(clusterName, nodeName, nParams, paramNames, paramValues, -1); } COM: <s> sends a set of parameters and thier values to the mon alisa module </s>
funcom_train/21850494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { System.out.println("IconProperty.................."); System.out.println(" embedded: " + isEmbedded()); System.out.println(" description: " + getDescription()); System.out.println(" path: " + getRelativePath()); System.out.println(" width: " + getIconWidth()); System.out.println(" height: " + getIconHeight()); } COM: <s> prints this value to the console </s>
funcom_train/15490386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteSlice(int n) { if (n<1 || n>nSlices) throw new IllegalArgumentException(outOfRange+n); if (nSlices<1) return; for (int i=n; i<nSlices; i++) { stack[i-1] = stack[i]; label[i-1] = label[i]; } stack[nSlices-1] = null; label[nSlices-1] = null; nSlices--; } COM: <s> deletes the specified slice were 1 n nslices </s>
funcom_train/37588019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _prepareToInterpret(String text) { _addNewline(); _notifyInteractionStarted(); _document.setInProgress(true); _toAddToHistory = text; // _document.addToHistory(text); //Do not add to history immediately in case the user is not finished typing when they press return } COM: <s> performs pre interpretation preparation of the interactions document and notifies the view </s>
funcom_train/25808461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeImpl(Uri executionUri, final String key,final boolean repeatLast){ if(sUriMatcher.match(executionUri)==EXECUTION_ID){ new AsyncTask<Uri, Void, AndroidLockableExecution>(){ @Override protected AndroidLockableExecution doInBackground(Uri... params) { return getAndroidLockableExecution(params[0]);} protected void onPostExecute(AndroidLockableExecution newBpi) { try { newBpi.resume(key,repeatLast); } catch (LockException e) { handleException(e); } } }.execute(executionUri); } } COM: <s> request to execute the </s>
funcom_train/50914033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOtherAtomId(String id) { String id1 = null; if (id != null) { String[] atomRefs2 = this.getAtomRefs2(); if (atomRefs2 != null) { if (id.equals(atomRefs2[0])) { id1 = atomRefs2[1]; } else if (id.equals(atomRefs2[1])) { id1 = atomRefs2[0]; } else { } } } return id1; } COM: <s> gets id of other atom in bond </s>
funcom_train/28125937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUniqueId() { Project p1 = getProjectFactory().createProject(_projectGroup); Project p2 = getProjectFactory().createProject(_projectGroup); assertFalse("IDs should not be the same.", p1.getId() == p2.getId()); } COM: <s> tests that two projects do not have the same id </s>
funcom_train/16392321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint( VisualGraphComponent vg, Graphics2D g2d ) { // Draw the node's fill color this.paintFill( vg, g2d ); // Draw the node's outline this.paintOutline( vg, g2d ); // Finally, paint the node's display text to describe the node this.paintText( vg, g2d ); } COM: <s> draw the tt visual vertex tt with the specified 2 d graphics context </s>
funcom_train/36117383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkTenantNodeNum(String tenantId){ Iterator<TenantBean> iter = tenantList.iterator(); TenantBean tenantInList = null; while(iter.hasNext()){ tenantInList = iter.next(); if(tenantInList.getTenantId().equals(tenantId)){ if(tenantInList.getCurrentNodeNum() < tenantInList.getMaxNodeNum()){ return true; } else{ log.info("Tenant with id " + tenantId + " can not get node!"); return false; } } } log.error("This tenant does not exist!"); return false; } COM: <s> check if tenant could add node called when addnode request received from trm </s>
funcom_train/26447700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generatePropertyDefaultConstant(PropertyMetaInfo aPropertyMI) { StringBuffer res = new StringBuffer(); res.append("public final static "); res.append(this.constructCompilableClassname(aPropertyMI.getType())); res.append(" "); res.append(aPropertyMI.getName().toUpperCase()); res.append(" = null;"); return res.toString(); } COM: <s> generates default values for all properties </s>
funcom_train/18742635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireUpdate() { Set<SimulatorListener> notified = new HashSet<SimulatorListener>(); for (Change change : this.changes) { for (SimulatorListener listener : new ArrayList<SimulatorListener>( this.listeners.get(change))) { if (notified.add(listener)) { listener.update(this, this.old, this.changes); } } } } COM: <s> notifies all registered listeners of the changes involved in the current </s>
funcom_train/50834946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pipeMsgEvent(PipeMsgEvent e) { final Message m = e.getMessage(); if (m == null) return; if(useMsgSplitter){ Message msg[] = new Message[1]; msg[0] = m; final Message[] ret = split.unwrap(msg); if (ret != null){ for(int i = 0; (i<ret.length) ; i++){ if(ret[i] != null){ if (messageListener != null) { messageListener.messageEvent(ret[i]); } else { messages.add(ret[i]); } } } } } else { if(messageListener != null){ messageListener.messageEvent(m); } else{ messages.add(m); } } } COM: <s> handler specified by code pipe msg listener code </s>
funcom_train/20780499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInterval(float T) { int idx = 1; // Find segment in which T lies while ((idx <= numXY) && (T > Tdata[idx])) { idx++; } if (idx > numXY) { // T not in parameter range return -1; } else return (idx-1); } COM: <s> returns the interval in which this parameter value lies </s>
funcom_train/42440698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stripVersionNumber(final String rawFileName) { if (!stripVersion) { return rawFileName; } // strip version String fileName = rawFileName; String ext = fileName.substring(fileName.length() - 4); int pos = fileName.lastIndexOf("-"); if (pos > -1) { fileName = fileName.substring(0, pos) + ext; } printDebug("add:" + fileName); return fileName; } COM: <s> strip the version number if the plugin parameter strip version is set to </s>
funcom_train/34716991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopShine() { for (int i = 0; i < ArticleMatrix.HEIGHT; i++) { for (int j = 0; j < ArticleMatrix.WIDTH; j++) { if (articleLabels[i][j].getIcon() != null) { articleLabels[i][j].stopShine(); } } } } COM: <s> stop article labels shining </s>
funcom_train/50940773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { boolean retValue; if ( obj != null && obj instanceof Category) { Category cobj = (Category)obj; if ( this.getName() != null ) { retValue = this.getName().equalsIgnoreCase(cobj.getName()); } else { retValue = false; } } else { retValue = false;//super.equals(obj); } return retValue; } COM: <s> compare names only type </s>
funcom_train/7508558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInterface() throws ConfigurationException { Key key = null; try { key = ObjFactory.make("java.security.Key", "Key"); assertFalse("Should not be reached - interface or abstract class", key != null); } catch(ConfigurationException ex) { Throwable cause = ex.getCause(); assertTrue( cause instanceof InstantiationException); } } COM: <s> test that instantiation exception is thrown as the root cause when the </s>
funcom_train/21953653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unloadMatchingFilters() { if (folderTableModel != null) { List allProxies = folderTableModel.getAllProxies(); for (int i = 0; i < allProxies.size(); i++) { MessageProxy mp = (MessageProxy) allProxies.get(i); mp.clearMatchedFilters(); } if (mMessageLoader != null) mMessageLoader.loadMessages(allProxies); } } COM: <s> unloads the matching filters </s>
funcom_train/3070454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initData(){ row = new String[]{"0","1","2","3","4","5","6","7","8","9","10"};//PersonData.getInstance().find(this.getKey()); phone = this.getPhone("Home"); //default } COM: <s> set up one row of data for the form </s>
funcom_train/39558854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAttempts() { try { XincoCoreUserServer instance = new XincoCoreUserServer(1); assertTrue(instance.getAttempts() >= 0); } catch (XincoException ex) { Logger.getLogger(XincoCoreUserServerTest.class.getSimpleName()).log(Level.SEVERE, null, ex); fail(); } } COM: <s> test of get attempts method of class xinco core user server </s>
funcom_train/35195118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntArray without(final int i) { final int[] newArr = new int[ints.length - 1]; System.arraycopy(ints, 0, newArr, 0, i); System.arraycopy(ints, i + 1, newArr, i, newArr.length - i); return new IntArray(newArr); } COM: <s> return a new code int array code that contains the same elements </s>
funcom_train/7424151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals (BehaviouralProfile profile) { if (!this.pn.equals(profile.getNet())) return false; boolean equal = true; for(Node n1 : this.pn.getNodes()) { for(Node n2 : this.pn.getNodes()) { equal &= this.getRelationForNodes(n1, n2).equals(profile.getRelationForNodes(n1, n2)); } } return equal; } COM: <s> checks equality for two behavioural profiles </s>
funcom_train/1838952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStartDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Topic_startDate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Topic_startDate_feature", "_UI_Topic_type"), MindmapPackage.Literals.TOPIC__START_DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the start date feature </s>
funcom_train/51412779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPopup(MouseEvent e) { TreeModel model = cmtCriteria.getModel(); jpmMCriteriaRoot.removeAll(); if(model == null) { //crittree is empty -> show root-create jpmMCriteriaRoot.add(jmiCreateRoot); }else { //else -> show root-delete jpmMCriteriaRoot.add(jmiDeleteRoot); } jpmMCriteriaRoot.show( e.getComponent(), e.getX(), e.getY() ); } COM: <s> shows the popupmenu </s>
funcom_train/39130382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Clip getClip() { try { synchronized (this) { return (Clip) AudioSystem.getLine(new Info(Clip.class, new AudioFormat( Encoding.PCM_SIGNED, AudioSystem.NOT_SPECIFIED, 16, 2, 4, AudioSystem.NOT_SPECIFIED, true))); } } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> creates a clip that can be used to play an audio input stream </s>
funcom_train/24195040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void searchNode(String text, List<Identifier> foundNodes, BTNode currentNode) { if (currentNode.getID().toString().toLowerCase().contains(text)) { foundNodes.add(currentNode.getID()); } for (BTNode child : currentNode.getChildren()) { searchNode(text, foundNodes, child); } } COM: <s> method that recursivelly perform the search starting from </s>
funcom_train/36427972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateKey() throws Exception { try { KeyGenerator keyGen = KeyGenerator.getInstance(getAlgorithm()); keyGen.init(getKeySize()); secretKey = keyGen.generateKey(); } catch (Exception e) { logger.warn("GenerateKey Error", e); throw e; } } COM: <s> generate a key from nothing </s>
funcom_train/14461167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCellType(){ if(this.isBlank)return TYPE_BLANK; if(this.isString)return TYPE_STRING; if(this.isDoubleNumber) return TYPE_DOUBLE; if(this.isFPNumber)return TYPE_FP; if(this.isIntNumber)return TYPE_INT; if(this.isFormula)return TYPE_FORMULA; if(this.isBoolean)return TYPE_BOOLEAN; return -1; } COM: <s> get the int val of the type for the valrec </s>
funcom_train/12549396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkMinAndMaxValues() { if (this.minValue == this.maxValue) { this.minValue = Integer.MIN_VALUE; this.maxValue = Integer.MAX_VALUE; return; } if (this.minValue > this.maxValue) { int tmp = this.minValue; this.minValue = this.maxValue; this.maxValue = tmp; } } COM: <s> check min and max values </s>
funcom_train/30172495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DownloadInfo getResourceDownloaded(byte[] id){ synchronized(resourcesDownloaded){ DownloadInfo di; for(int i=0;i<resourcesDownloaded.size();i++){ di = (DownloadInfo)resourcesDownloaded.get(i); if(di.matching(di.getID(),id)){ return di; } } } return null; } COM: <s> get resource downloaded </s>
funcom_train/49064200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBResult truncateDB() { establishConnection(); try { cs = conn.prepareCall("{call truncateDB}"); //execute and truncate data in DB cs.execute(); //close statement and connection cs.close(); conn.close(); dbResult.setSuccess(true); } catch (SQLException ex) { dbResult.setSuccess(false); dbResult.setError("Failed to truncate DB"); } return dbResult; } COM: <s> executes a stored procedure and remove all existing data from db </s>
funcom_train/29021282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getVariableIndex( final String name ) { final int count = variables.size(); int result = -1; for ( int index = 0; result == -1 && index < count; ++index ) { final Variable variable = variables.get( index ); if ( variable.getName().equals( name ) ) { result = index; } } return result; } COM: <s> gets the index of the named variable </s>
funcom_train/48338912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check(Tuple t) { FieldInfo fieldInfo = getFieldInfo(t); if (fieldInfo == null) { return true; } try { if (((fieldInfo.obj == null) || match.verifyType(fieldInfo.actualType)) && (match.compareEqual(fieldInfo))) { return false; } } catch (LhsNullException e) {} return true; } COM: <s> performs the not equal check </s>
funcom_train/29007556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyEditor(String propName, Class editClass) { java.util.Enumeration eNum = m_PropertyDescriptors.elements(); while (eNum.hasMoreElements()) { PropertyDescriptor pd = (PropertyDescriptor)eNum.nextElement(); if (pd.getName().equals(propName)) pd.setPropertyEditorClass(editClass); } } COM: <s> method to set a property editor class for a property </s>
funcom_train/7661564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor2() { Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE-1; ++i) ints[i] = new Integer(i); CopyOnWriteArrayList a = new CopyOnWriteArrayList(ints); for (int i = 0; i < SIZE; ++i) assertEquals(ints[i], a.get(i)); } COM: <s> new list contains all elements of initializing array </s>
funcom_train/39378687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDeploy(ServletContext servletContext) { ClickUtils.deployFile(servletContext, "click/control.js", "click"); ClickUtils.deployFile(servletContext, "click/extras-control.css", "click"); ClickUtils.deployFiles(servletContext, PROTOTYPE_RESOURCES, "click/prototype"); } COM: <s> deploys the controls static css and java script resources </s>
funcom_train/31878334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deliveryFailed(int seqnum, Message mess){ int[] i={seqnum}; StringBuffer buf = new StringBuffer(); for (int j=0; j<i.length; j++) buf.append(i[j]+" "); MBusLogger.log(MBusLogger.WARNING, "#######Delivery Failed: "+seqnum+"#################"); Address source = mess.getHeader().getSourceAddress(); AddressInterface ai = getInterfaceFor(source); ai.haltRetransmitter(seqnum); // removeACKs(i, mess, false); ai.notifyDeliveryFailed(mess); } COM: <s> this method is called by the retransmitter to indicate a </s>
funcom_train/12165403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String retVal = ""; retVal = "Type of request: " + getRequestTypeIdetifier() + "\n"; retVal += "Request ID: " + getRequestIdetifier() + "\n"; retVal += "Size of datablock: " + getSizeOfDatablock() + "\n"; retVal += "\n"; retVal += new String(getDatablock()) + "\n"; return retVal; } COM: <s> converts this scppacket to a string </s>
funcom_train/25440930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calcHorizontalScrollHeight(final Table table) { int horizontalScrollbarHeight; if (table.getSize().y > table.getClientArea().height + 5) horizontalScrollbarHeight = table.getHorizontalBar().getSize().y; else horizontalScrollbarHeight = 0; return horizontalScrollbarHeight; } COM: <s> calculates the height of the horizontal scrollbar in the table </s>
funcom_train/4534590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applySettings(FileTransferSettings settings) { pnlTypes.setBlockedTypes(settings.getBlockedExtensions()); pnlPeople.setBlockedPeople(settings.getBlockedJIDs()); pnlSize.setMaxFileSize(settings.getMaxFileSize()); pnlSize.setCheckFileSize(settings.getCheckFileSize()); pnlResponse.setCannedResponse(settings.getCannedRejectionMessage()); } COM: <s> populates all the gui controls with values from the supplied </s>
funcom_train/22389781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getDirectionX() { if ((Math.abs(n.getX()) < v) && (Math.abs(n.getY()) < v)) { return MathUtils.crossProduct(Constants.DEFAULT_Y_AXIS_VECTOR, n); } else { return MathUtils.crossProduct(Constants.DEFAULT_Z_AXIS_VECTOR, n); } } COM: <s> calculate and returns the x direction of the plane </s>
funcom_train/26263840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getMetaActionsOnInit() throws XavaException { Collection result = new ArrayList(); // Adding parents Iterator itParents = getParents().iterator(); while (itParents.hasNext()) { MetaController parent = (MetaController) itParents.next(); result.addAll(parent.getMetaActionsOnInit()); } // Ours Iterator it = metaActions.iterator(); while (it.hasNext()) { MetaAction metaAction = (MetaAction) it.next(); if (metaAction.isOnInit()) { result.add(metaAction); } } return result; } COM: <s> fathers actions are included </s>
funcom_train/35713105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doType(XSComplexTypeDefinition xsctd, CIBean bean) { bean.typeCategory = CIBean.TypeCategory.Complex; bean.abstraction = xsctd.getAbstract(); short contentType = xsctd.getContentType(); switch (contentType) { case XSComplexTypeDefinition.CONTENTTYPE_ELEMENT: doContentTypeElement(xsctd, bean); break; default: throw new ApplicationException( String.format( "Complex type definitions [%s] other than Element not yet supported for CIBean", xsctd)); } } COM: <s> handle complex type definitions </s>