__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/28592293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void testSize() { // size should be zero to start assertEquals(0, collection.size()); // use helper function and add one item addOneItem(); // size should be 1 assertEquals(1, collection.size()); // use helper function and add 15 more items addManyItems(); // size should be 16 assertEquals(16, collection.size()); } COM: <s> test that the size works as expected </s>
funcom_train/25422434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResourceLink(ResourceLink resourcelink) { if (resourcelink == null) return; if (_link == null) _link = new LinkedList<String>(); if (resourcelink.getUrl() != null && resourcelink.getUrl().length() > 0) _link.add(resourcelink.getUrl()); } COM: <s> adds the resource link </s>
funcom_train/12558590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } ListSelectionModel lsm = (ListSelectionModel)e.getSource(); if (!lsm.isSelectionEmpty()) { int selectedRow = lsm.getMinSelectionIndex(); siteTableRowSelected(selectedRow); } } COM: <s> handles table selection changes </s>
funcom_train/565086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(final Object value) throws DevFailed { for (int i = 0; i < group.get_size(true); i++) { final int arginType = group.get_device(i + 1).command_query(commandName).in_type; InsertExtractUtils.insert(inData[i], arginType, value); } } COM: <s> insert a single value for all commands </s>
funcom_train/5341078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel addToPanel(JComponent comp, boolean opaque) { JPanel panel = new JPanel(new GridLayout()); panel.add(comp); panel.setMaximumSize(comp.getMaximumSize()); panel.setPreferredSize(comp.getPreferredSize()); return panel; } COM: <s> adds the specified component within a possibly opaque jpanel </s>
funcom_train/21160704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getMDeckGlassWeightEdit() { if (mDeckGlassWeightEdit == null) { mDeckGlassWeightEdit = new JTextField(); mDeckGlassWeightEdit.setBounds(new Rectangle(345, 105, 76, 20)); mDeckGlassWeightEdit.setToolTipText(LanguageResource.getString("WeightCalculatorDialog.23")); //$NON-NLS-1$ mDeckGlassWeightEdit.setEditable(false); } return mDeckGlassWeightEdit; } COM: <s> this method initializes m deck glass weight edit </s>
funcom_train/10532715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAnnotatedInheritedProperty() throws Exception { String theBirthplace = _subcontrol.getBirthplace(); assertNotNull(theBirthplace); assertEquals("ExtensibleControl", theBirthplace); _subcontrol.setBirthplace("JUNIT"); assertEquals("JUNIT", _subcontrol.getAnnotatedInheritedPropertyByContext()); } COM: <s> tests getting setting a property declared on super control interface </s>
funcom_train/786620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColor(double val) { if ( val < minValue ) { return palette[0]; } else if ( val >= maxValue ) { return palette[palette.length-1]; } else { int idx = (int)(palette.length * (val-minValue)/(maxValue-minValue)); return palette[idx]; } } COM: <s> returns the color associated with the given value </s>
funcom_train/48150848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShift(double s) { shift = s; //super.setDomain(new Domain(s, s+5, 0.1, 1)); double upperBound = 1.0/rate + 5.0/rate; // getMean() + 4*getSD(); super.setParameters(shift, upperBound + shift, 0.01 * (upperBound), CONTINUOUS); //System.out.println("ExponentialDistribution setShift shift = " + shift); } COM: <s> this method sets the shift parameter </s>
funcom_train/3465023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocumentFrame newEmptyChildFrame() { DocumentFrame documentFrame = new DocumentFrame(); documentFrame.setDocument(new Score()); documentFrame.setSize(500, 300); mdiPane.add(documentFrame); documentFrame.show(); mdiPane.setSelectedFrame(documentFrame); return documentFrame; } COM: <s> create a new document frame initialized with a default score object </s>
funcom_train/16464054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadUnicodeMessages() throws Throwable { String messagePdu = IncomingTextSmsTestData.UCS2_MESSAGES[0].getMessagePdu(); String badHexLength = messagePdu.substring(0, messagePdu.length()-1); try { new CIncomingMessage(badHexLength, 0, null); fail("Expected MessageDecodeException"); } catch(MessageDecodeException ex) {} String badStart2 = messagePdu.substring(2); try { new CIncomingMessage(badStart2, 0, null); fail("Expected MessageDecodeException"); } catch(MessageDecodeException ex) {} } COM: <s> test some unicode messages that have been slightly mangled </s>
funcom_train/42824265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawText(List<String> lines, String header) { int startX = getX() + TBSGraphics.padding.width; TBSGraphics.drawCenteredString(getGraphics(), header, startX, getStringY(), 0, TBSGraphics.textHeight, TBSGraphics.selectedPromptTextColor); startX += buttonHeaderWidth; for (String line : lines) { drawString(line, startX, getStringY()); incrementStringY(); } incrementStringY(TBSGraphics.padding.width); } COM: <s> draws an array of strings to the screen plus a header </s>
funcom_train/20241877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdOkInvestimento() { if (cmdOkInvestimento == null) {//GEN-END:|231-getter|0|231-preInit // write pre-init user code here cmdOkInvestimento = new Command("Salvar", Command.OK, 0);//GEN-LINE:|231-getter|1|231-postInit // write post-init user code here }//GEN-BEGIN:|231-getter|2| return cmdOkInvestimento; } COM: <s> returns an initiliazed instance of cmd ok investimento component </s>
funcom_train/48792269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEntityContext(EntityContext entityContext) { super.setEntityContext(entityContext); Context context = null; try { context = new InitialContext(); dataSource = (javax.sql .DataSource) context .lookup("java:comp/env/MfgDataSource"); } catch (NamingException e) { debug.printStackTrace(e); throw new EJBException("Failure looking up DataSource " + e); } } COM: <s> method set entity context </s>
funcom_train/33608026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLongitudinalGraph(LongitudinalGraph lGraph) { if (this.longGraph != lGraph) { LongitudinalGraph oldGraph = this.longGraph; this.longGraph = lGraph; setTime(longGraph.getMinimumTime()); setBaseGraph(longGraph.slice(time, false)); pcs.firePropertyChange($LONGITUDINAL, oldGraph, longGraph); } } COM: <s> sets the longitudinal graph </s>
funcom_train/2609843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setState(State newState) { System.out.println("change state " + state + "->" + newState); boolean transition = newState != state; if (transition && state != null) { state.eventExit(); } state = newState; if (transition && state != null) { state.eventEnter(); } } COM: <s> set the new state </s>
funcom_train/31873052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void createSamples() { for (int i=0;i<this.resources.length;i++) { this.resources[i].samples = new ArrayList<List<IntStack>>(); if (this.resources[i].available) for (int j=0;j<this.samples;j++) this.resources[i].samples.add(addIO(i)); } }*/ COM: <s> create a couple of random samples for every task available </s>
funcom_train/37619558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); Separator sep = new Separator(", "); buffer.append('{'); int limit = size(); for (int i = 0 ; i < limit ; i++) { if (get(i)) { buffer.append(sep).append(i); } } buffer.append('}'); return buffer.toString(); } COM: <s> converts the bit vector to a string </s>
funcom_train/40321942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void built(int lines){ if(gameOptions != null){ this.totalBuiltLines += lines; long oldPoints = this.points; this.points += gameOptions.getScoringOptions().getPoints()[lines - 1]; if((oldPoints + 1) / gameOptions.getLevelChangePoints() < (this.points + 1) / gameOptions.getLevelChangePoints()){ // We changed the level this.speed++; } } else throw new UnsupportedOperationException("This status is not meant to be changed."); } COM: <s> alters the status given the user has built lines </s>
funcom_train/36959155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTooltipAffordanceString() { if (fBindingService == null || !RubyPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE)) return null; String keySequence= fBindingService.getBestActiveBindingFormattedFor(IRubyEditorActionDefinitionIds.SHOW_RDOC); if (keySequence == null) return null; return Messages.format(RubyHoverMessages.RubyTextHover_makeStickyHint, keySequence == null ? "" : keySequence); //$NON-NLS-1$ } COM: <s> returns the tool tip affordance string </s>
funcom_train/34341202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getDeposito() { if (Deposito == null) {//GEN-END:|33-getter|0|33-preInit // write pre-init user code here Deposito = new TextField("Deposito", null, 16, TextField.ANY);//GEN-LINE:|33-getter|1|33-postInit // write post-init user code here }//GEN-BEGIN:|33-getter|2| return Deposito; } COM: <s> returns an initiliazed instance of deposito component </s>
funcom_train/16461420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() { if (LOG.isDebugEnabled()) { LOG.debug("commitTransaction"); } try { HibernateUtil.getCurrentOrNewSession().getTransaction().commit(); } catch (final HibernateException e) { try { getUserTransaction().commit(); LOG.debug("Using JTA", e); } catch (Exception ex) { throw new RuntimeException("Unable to commit transaction", e); } } } COM: <s> commits the transaction </s>
funcom_train/46759606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationPanelTreeModel getApplicationPanelTreeModel(final Long id, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SecurityData.getApplicationPanelTree(id, call); }}; return (ApplicationPanelTreeModel) call(method, call); } COM: <s> returns the panel tree entry for the given id </s>
funcom_train/7255353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDownloadDetails(Download d, int uploadLimit, int downloadLimit){ if(d==null) throw new IllegalArgumentException("Download should not be null."); Map props = new HashMap();//Map<String,Integer> props.put(TORRENT_UPLOAD_LIMIT, new Integer(uploadLimit) ); props.put(TORRENT_DOWNLOAD_LIMIT, new Integer(downloadLimit) ); torrentLimits.put(d,props); } COM: <s> save the upload download limits of this download object before the test started </s>
funcom_train/39915904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTextField33() { System.out.println("setTextField33"); TextField tf = null; Page1 instance = new Page1(); instance.setTextField33(tf); // 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 text field33 method of class timesheetmanagement </s>
funcom_train/8484780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATTable base_parameters() throws InterpreterException { Class[] paramTypes = javaMethod_.getParameterTypes(); AGSymbol[] paramNames = new AGSymbol[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { paramNames[i] = AGSymbol.jAlloc(Evaluator.valueNameOf(paramTypes[i])); } return NATTable.atValue(paramNames); } COM: <s> the parameters of a wrapped method are represented as symbols </s>
funcom_train/7278798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Injector createInjectorAndInitialize(Module... modules) { Injector injector = LimeTestUtils.createInjector(modules); // testConnectionFactory = injector.getInstance(TestConnectionFactory.class); messageRouterImpl = (MessageRouterImpl) injector.getInstance(MessageRouter.class); messageRouterImpl.start(); return injector; } COM: <s> helper method to configure the injector and return it </s>
funcom_train/49608762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pathology getPathology(String username,EntityManager em,int id) throws Throwable { try { Pathology vo = JPAMethods.find(username, em, Pathology.class, id); if (vo==null) throw new Exception("No Pathology found having id: "+id); return vo; } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> retrieve a specific facility type </s>
funcom_train/35298826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processThumbnailProgress(float percentageDone) { if (progressListeners == null) { return; } int numListeners = progressListeners.size(); for (int i = 0; i < numListeners; i++) { IIOWriteProgressListener listener = (IIOWriteProgressListener)progressListeners.get(i); listener.thumbnailProgress(this, percentageDone); } } COM: <s> broadcasts the current percentage of thumbnail completion to </s>
funcom_train/22215900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterCreate(Object id, Connection conn) { this.isNew = false; this.changes.clear(); this.oldProperties.clear(); this.properties.put(this.getInfoType().getPkField().getName(), id); // reload real data after create // this makes sure many relations are created as well. this.properties = this.infoAccess.getData(this, conn); } COM: <s> update state of this bean after is was inserted into persistent storage </s>
funcom_train/12709891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultTree getTableList() { if (tableList == null) { tableList = new DefaultTree(); tableList.setCellRenderer(CheckboxTreeCellRenderer.getInstance()); tableList.setCellEditor(new CheckboxTreeCellEditor(tableList)); tableList.setRootVisible(false); tableList.setEditable(true); } return tableList; } COM: <s> getter method for component database view </s>
funcom_train/26491872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String trimLength(String str, int maxLength, boolean appendDots) { if ( str != null && str.length() > maxLength) { if ( appendDots ) { return str.substring(0, maxLength-3) + "..."; } else { return str.substring(0, maxLength); } } else { return str; } } COM: <s> trim the length of str to max length </s>
funcom_train/46477870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDomainsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SecurityContextModel_Domains_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SecurityContextModel_Domains_feature", "_UI_SecurityContextModel_type"), SecurityContextPackage.Literals.SECURITY_CONTEXT_MODEL__DOMAINS, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the domains feature </s>
funcom_train/19699389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewDir(Menu dir, Directory parent) { Directory parentDir = parent; if (parentDir == null) { parentDir = selectedDir; } parentDir.setCount(parentDir.getCount() + 1); parentDir.setLeaf(false); DefaultMutableTreeNode parentNode = findDirectoryNode(parentDir.getMenuId(), (DefaultMutableTreeNode) getRoot()); addDir(SessionManagement.getUsername(), parentNode, dir); } COM: <s> adds a new directory in the specified place </s>
funcom_train/29722706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonTest() { if (jButtonTest == null) { jButtonTest = new JButton(); jButtonTest.setText("Test"); jButtonTest.setFont(new Font("Dialog", Font.PLAIN, 12)); jButtonTest.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { onTestButton(); } }); } return jButtonTest; } COM: <s> this method initializes j button test </s>
funcom_train/16619258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLegendPosition(String position) { this.legendPosition = LEGEND_UPPER_RIGHT; if (position.equalsIgnoreCase("upper_right")) { this.legendPosition = LEGEND_UPPER_RIGHT; } else if (position.equalsIgnoreCase("upper_left")) { this.legendPosition = LEGEND_UPPER_LEFT; } else if (position.equalsIgnoreCase("none")) { this.setShowLegend(false); } } COM: <s> sets the legend position </s>
funcom_train/24533124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appliedList(EStructuralFeature feature, List values, int index, boolean isTouch, IExpression expression, boolean testValidity) { Iterator iter = values.iterator(); while (iter.hasNext()){ if (expression.isValid()) { int mark = expression.mark(); try { applied(feature, iter.next(), index, isTouch, expression, testValidity); if (index != -1) index++; } finally { expression.endMark(mark); } } else break; // Expression has gone invalid, so don't go any further. } } COM: <s> apply all of the values in the list </s>
funcom_train/17458336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getVolume() throws MPDConnectionException, MPDPlayerException { try { return (Integer.parseInt(mpd.getStatus(MPD.StatusList.VOLUME))); } catch (MPDResponseException re) { throw new MPDPlayerException(re.getMessage(), re.getCommand()); } } COM: <s> returns the current volume of the player </s>
funcom_train/17904908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasFocusedTabPane() { if (northTabPane != null && northTabPane.isFocused()) { return true; } else if (southTabPane != null && southTabPane.isFocused()) { return true; } else if (scrollingTabPane != null && scrollingTabPane.isFocused()) { return true; } return false; } COM: <s> indicates whether this tab container has the focused tab pane </s>
funcom_train/43388051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getInstance(String name) { try { return Beans.instantiate(classLoader, name); } catch (Throwable th) { diagnoseInstantiationException(classLoader, name, th); System.err.println(""); if (name.indexOf('\\') >= 0) { System.err.println(" Note that file names in manifests must use forward " + "slashes \"/\" \n rather than back-slashes \"\\\""); } return null; } } COM: <s> get a new bean instance given its name </s>
funcom_train/35995482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokeMethod(String method) { if (getMethodScope() == null) unableToFindMethod(method); else { IMethodScope scope = getMethodScope(); IInterpretedMethod currentMethod = scope.getCurrentMethod(); if (currentMethod.isStatic()) { IInterpretedClass currentClass = currentMethod .getInterpretedClass(); invokeMethod(currentClass, method); } else { IInterpretedClassInstance currentClassInstance = scope .getCurrentClassInstance(); invokeMethod(currentClassInstance, method); } } } COM: <s> invoke the method in this class corresponding to the supplied method </s>
funcom_train/32354795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkOut(File file) { setPropertyValue(file.getFileBO().getWSItem(), FileConstants.LOCKED, String.valueOf(true)); setPropertyValue(file.getFileBO().getWSItem(), FileConstants.CHECKOUT_USER, String.valueOf(file .getCheckoutUser())); MenuController.getInstance().setCheckinAllowed(true); MenuController.getInstance().setCheckoutSerialAllowed(false); return true; } COM: <s> status change on tra ser server for selected file s set to locked </s>
funcom_train/34733939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView createVacancyListModelAndView() { // view is our vacancy list view ModelAndView modelAndView = new ModelAndView(vacancyListView); // add common model data to ModelAndView addCommonModelData(modelAndView); // add collection of vacancies to ModelAndView Collection<? extends Vacancy> vacancies = getVacancies(); modelAndView.addObject("vacancies", vacancies); return modelAndView; } COM: <s> construct model and view for vacancy list page </s>
funcom_train/34635433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeImageRef(Element e) { Chapter chapter = getActiveChapter(); de.tu.depth.fragments.Image img = getDepthImage(e); if (chapter != null && img != null) { List<ImageRef> imgRefs = repository.getImageReferences(img); for (ImageRef ref : imgRefs) { if (ref.getChapter().equals(chapter)) { repository.removeReference(ref); break; } } } } COM: <s> removes the image ref that is related to the given element </s>
funcom_train/39802723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void moveMatchByHighlighter() { AbstractHighlighter searchHL = getConfiguredMatchHighlighter(); // no match if (!hasMatch()) { return; } else { ensureInsertedSearchHighlighters(searchHL); table.scrollCellToVisible(lastSearchResult.foundRow, lastSearchResult.foundColumn); } } COM: <s> configures the match highlighter to the current match </s>
funcom_train/48613773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteSharedInboxFile(SharedInboxFile inboxFile) { VersionedFile vf = inboxFile.getVersionedFile(); FileCollaborator fileCollaborator = vf.getCollaborator(inboxFile.getSharedWithUser()); vf.removeCollaborator(fileCollaborator); versionedFileDAO.makePersistent(vf); userFileSystemService.makeSharedInboFileTransient(inboxFile); securityService.deletePermissions(vf.getId(), CgLibHelper.cleanClassName(vf.getClass().getName()), fileCollaborator.getCollaborator()); } COM: <s> delete shared inbox file </s>
funcom_train/45209950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tellStartElement(String name, Attributes attributes) { // Generate node // attributes need to be copied, as they might be reused by parser XMLAST e = new XMLStartAST(tokenManager.getTypeForTag(name), name, new AttributesImpl(attributes)); // Link it link(e); // this will be the new current container treeStack.push(e); } COM: <s> tells this adapter to created and link </s>
funcom_train/47891595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean buildJST(CodeBase codebase, CritickMode mode) { try { if(mode.shouldParse()) { reportProgress("Parsing CodeBase"); PackageDecl.clear(); codebase.parse(callback); Benchmark.printTime("Parsing"); } if(mode.shouldBuildJST()) { reportProgress("Building JST"); codebase.buildJST(callback); Benchmark.printTime("JST"); } } catch (Throwable e) { Logger.reportError("Parser/JST threw Exception", e); return false; } return true; } COM: <s> parses the code base and builds the corresponding jst model </s>
funcom_train/16596623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getChbMostrarUnidades() { if (chbMostrarUnidades == null) { chbMostrarUnidades = new JCheckBox(); chbMostrarUnidades.setText(PluginServices.getText(this,"mostrar_unidades")); chbMostrarUnidades.setSelected(fframescalebar.isShowNameUnits()); chbMostrarUnidades.setPreferredSize(new java.awt.Dimension(150, 24)); } return chbMostrarUnidades; } COM: <s> this method initializes chb mostrar unidades </s>
funcom_train/12300874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRecorderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IOType_recorder_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IOType_recorder_feature", "_UI_IOType_type"), SchemaPackage.Literals.IO_TYPE__RECORDER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the recorder feature </s>
funcom_train/22959330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recreateAllColors(){ for (int i = 0; i < appearances.length; i++) { Appearance appearance = appearances[i]; float responseLevel = computeResponseLevel(i); appearance.getMaterial().setAmbientColor(computeAmbientColor(responseLevel, i)); appearance.getMaterial().setDiffuseColor(computeDiffuseColor(responseLevel, i)); } } COM: <s> refreshes colors in all appearances </s>
funcom_train/50259477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void incrementGroupIndex() { int sepCount = ((TDBuilder) batchPresentation.getGrouppedFields()[groupIndex].getTDBuilder()).getSeparatedValuesCount(items[itemIndex], env); separatedValueNum[groupIndex]++; if (separatedValueNum[groupIndex] != sepCount) { return; } separatedValueNum[groupIndex]--; setGroupIndex(groupIndex + 1); } COM: <s> increments group index in group state </s>
funcom_train/24475872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeObject(RegistryService regService, BeanObject application) throws GfacException { ApplicationBean appDesc = (ApplicationBean) application; regService.removeAppDesc(new QName(appDesc.getObjectNamespace(),appDesc.getApplicationName()).toString(), appDesc.getHostName()); } COM: <s> to remove application </s>
funcom_train/49995940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTotal() { SensorDataSummaries summary = this.projectSummary.getSensorDataSummaries(); BigInteger numInstances; if (summary == null) { return 0; } else { numInstances = summary.getNumInstances(); if (numInstances == null) { return 0; } } return numInstances.intValue(); } COM: <s> returns the total number of sensor data instances sent on this day </s>
funcom_train/51788004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRoleActivityModelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Interaction_roleActivityModel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Interaction_roleActivityModel_feature", "_UI_Interaction_type"), RAMPackage.Literals.INTERACTION__ROLE_ACTIVITY_MODEL, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the role activity model feature </s>
funcom_train/26388978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getOption(int index, int defaultValue) { int result = defaultValue; String val = getOption(index, (String) null); if (val != null) { try { result = Integer.parseInt(val); } catch (NumberFormatException e) { // Couldn't convert to an integer, return default result = defaultValue; } } return result; } COM: <s> return an integer option </s>
funcom_train/1959741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAnimation(DrawPanel drawPanel) throws NetSimException{ ownerPCNode = drawPanel.getPCNode(getParentElement().getAttributeValue("node")); if (ownerPCNode == null){ throw new NetSimException("Node "+getParentElement().getAttributeValue("node")+" not found"); } label = new JLabel(); initializeLabel(drawPanel); anim_init = true; } COM: <s> initializes the event to be displayed on a panel as a animation </s>
funcom_train/28312171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getPlayersList() { if (playersList == null) { playersList = new JList(); playersList .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); playersList.setRequestFocusEnabled(false); playersList.setEnabled(true); Collections.sort(values); playersList.setListData(values.toArray()); } return playersList; } COM: <s> this method initializes j list </s>
funcom_train/2266559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setLocation(new java.awt.Point(0, 0)); jScrollPane.setBackground(new java.awt.Color(238, 238, 238)); jScrollPane.setViewportView(getJTable()); } return jScrollPane; } COM: <s> this method initializes j scroll pane </s>
funcom_train/19246475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final SourceFileExceptionList e) { if (e == null) { return; } for (int i = 0; i < e.size(); i++) { if (size() == 0) { initCause(e.get(i)); } if (!exceptions.contains(e.get(i))) { exceptions.add(e.get(i)); } } } COM: <s> add exceptions of given list if they are not already included </s>
funcom_train/9551464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRbtDeleteDomain() { if (RbtDeleteDomain == null) { RbtDeleteDomain = new JRadioButton("Delete Domain"); RbtDeleteDomain.setBounds(new Rectangle(320, 55, 110, 21)); RbtDeleteDomain.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateDmdUrl(); } }); } return RbtDeleteDomain; } COM: <s> this method initializes rbt delete domain </s>
funcom_train/50905118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClass(String classN) throws ClassNotFoundException { className = classN; //System.out.println("ClassName..."+classN); c = Class.forName(classN);//sslCL.getClassFromURL(url, className); try { cla = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } } COM: <s> loads the class through http https </s>
funcom_train/16791044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String xmlText(Object object) { try { Marshaller marshaller = this.context.createMarshaller(); StringWriter writer = new StringWriter(256); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(object, writer); return writer.toString(); } catch (JAXBException ex) { this.logger.error("Unable to represent " + object, ex); return ex.getMessage(); } } COM: <s> convert an object into xml for display </s>
funcom_train/49469620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeExpertiseObj(Expertise xp) throws Exception, RaciException { Db db = dbRW(); try{ db.begin(); _logger.info("Directory : removeExpertiseObj "+xp); checkUserCanAdmin(db); ExpertiseFactory.removeExpertise(db, xp, getCurrentUser()); db.commit(); return true; } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> remove this expertise </s>
funcom_train/25306448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dictionary getDictionaryFromName(String dicoName) { SitoolsSettings settings = (SitoolsSettings) getContext().getAttributes().get(ContextAttributes.SETTINGS); return RIAPUtils.getObjectFromName(settings.getString(Consts.APP_DICTIONARIES_URL), dicoName, getContext()); } COM: <s> get a dictionary from its name </s>
funcom_train/47901521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(SUBTOTAL_CATEGORY category, int toAdd) { Integer previousTotal = totals.get(category); if (previousTotal != null) { totals.put(category, previousTotal+toAdd); } else { totals.put(category, toAdd); } total += toAdd; } COM: <s> add to the total of a given category </s>
funcom_train/36148767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRow(int row, Vector<String> data) { int col = 0; for (Enumeration e = data.elements(); e.hasMoreElements();) { //setValueAt(new Cell((String)e.nextElement(), row, col), row, col); setValueAt((String)e.nextElement(), row, col); col++; } } COM: <s> sets the contents of the given row to the given data vector </s>
funcom_train/7518126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Modulo entity) { EntityManagerHelper.log("deleting Modulo instance", Level.INFO, null); try { entity = getEntityManager().getReference(Modulo.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent modulo entity </s>
funcom_train/5474933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField() { if (jTextField == null) { jTextField = new JTextField(); jTextField.setBounds(new java.awt.Rectangle(150,385,85,20)); jTextField.setEditable(false); jTextField.addFocusListener(new FocusAdapter(){ public void focusGained(FocusEvent e){ jTextField.setBackground(color_getfocus); } public void focusLost(FocusEvent ev){ jTextField.setBackground(color_lostfocus); } }); } return jTextField; } COM: <s> this method initializes j text field </s>
funcom_train/35284234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cellNoiseV(float x, float y, float z, float[] hashPoint) { int xi = (int) Math.floor(x); int yi = (int) Math.floor(y); int zi = (int) Math.floor(z); NoiseMath.hash(xi, yi, zi, hashPoint); } COM: <s> returns a vector point color in ca using point hasharray directly </s>
funcom_train/3177311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gedcomPropertyAdded(Gedcom gedcom, Property property, int pos, Property added) { log("Property "+added.getTag()+" (value "+added.getDisplayValue()+") added to "+property.getEntity()+" in "+gedcom.getName()); touchedEntities.add(property.getEntity()); } COM: <s> notification that a property has been added </s>
funcom_train/31097118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOutline(PDFOutline outline) { if (_subentries.size() > 0) { outline._prev = (PDFOutline)_subentries.get(_subentries.size() - 1); outline._prev._next = outline; } else { _first = outline; } _subentries.add(outline); outline._parent = this; incrementCount(); // note: count is not just the immediate children _last = outline; } COM: <s> add a sub element to this outline </s>
funcom_train/28501238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public CARS_ToolInstanceEvent createEventMessage( CARS_ToolInterface pInstance, Level pLevel, String pMessage, boolean pBlocking ) { CARS_DefaultToolInstanceEvent dte = new CARS_DefaultToolInstanceEvent( pInstance, EVENTTYPE_TOOLMESSAGE ); dte.mStringValue = pMessage; dte.mLevel = pLevel; dte.mBlocking = pBlocking; return dte; } COM: <s> factory method to create a event </s>
funcom_train/48705900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadXMPEntryType() throws Exception { String bibtex = "<bibtex:entrytype>ARticle</bibtex:entrytype>"; writeManually(pdfFile, bibtexXPacket(bibtexDescription(bibtex))); List<BibtexEntry> l = XMPUtil.readXMP(pdfFile.getAbsoluteFile()); assertEquals(1, l.size()); BibtexEntry e = l.get(0); assertNotNull(e); assertEquals(BibtexEntryType.ARTICLE, e.getType()); } COM: <s> is the xmpentry type correctly set </s>
funcom_train/1550251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void convertToMap() { delegateMap = createDelegateMap(); switch (size) { // drop through case 3: delegateMap.put(key3, value3); case 2: delegateMap.put(key2, value2); case 1: delegateMap.put(key1, value1); } size = 0; hash1 = hash2 = hash3 = 0; key1 = key2 = key3 = null; value1 = value2 = value3 = null; } COM: <s> converts the flat map data to a map </s>
funcom_train/38289663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(final String prefix, final String namespaceURI) { if (prefix == null) throw new NullArgumentException("prefix"); //$NON-NLS-1$ if (namespaceURI == null) throw new NullArgumentException("namespaceURI"); //$NON-NLS-1$ // unregister the prefix unregister(prefix); // register it prefixMappings.put(prefix, namespaceURI); Set<String> prefixes = namespaceMappings.get(namespaceURI); if (prefixes == null) { prefixes = new HashSet<String>(); namespaceMappings.put(namespaceURI, prefixes); } prefixes.add(prefix); } COM: <s> registers the prefix namespace binding </s>
funcom_train/39175865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object create() { Class c = null; try { c = Class.forName("gleam.executive.webapp.form." + name + "Form"); return c.newInstance(); } catch(Exception e) { System.err.println("Error instantiating class: " + c.getName()); throw new RuntimeException(e); } } COM: <s> create a new instance of the specified object </s>
funcom_train/4232852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initProgressWindow() { progressWindow = new ProgressWindow(UIUtilities.getMainFrame(), task.getTitle()); progressWindow.setStatus(task.getMessage()); progressWindow.setProgress(task.getProgress() / 100f); progressWindow.setVisible(true); } COM: <s> initialize the progress window with the properties of a task and display </s>
funcom_train/3391587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFieldHeader(FieldDoc field, boolean isFirst) { if (! isFirst) { writer.printMemberHeader(); writer.println(""); } writer.anchor(field.name()); writer.h3(); writer.print(field.name()); writer.h3End(); } COM: <s> write the field header for the given field </s>
funcom_train/5399949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int countSet(boolean bSet) { int counter = 0; for (Iterator i = entrySet().iterator(); i.hasNext();) { Map.Entry me = (Map.Entry) i.next(); Property property = (Property) me.getValue(); if (bSet == property.isSet()) { counter++; } } return counter; } COM: <s> counts properties in the map that have not been set </s>
funcom_train/9389262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Thread createTaskThread(String title, final ITask task) { if (task != null) { return new Thread(title) { @Override public void run() { task.run(ProgressTask.this); if (mAutomaticallyCloseOnTaskCompletion) { mDialog.setAutoCloseRequested(); } else { mDialog.setManualCloseRequested(); } } }; } return null; } COM: <s> creates a thread to run the task </s>
funcom_train/2759245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeClient(JmsConnectionMonitorClient client) { // try to remove the client from one of the handlers Iterator connectionHandlerIter = _connectionHandlers.iterator(); while(connectionHandlerIter.hasNext()) { ConnectionHandler connectionHandler = (ConnectionHandler) connectionHandlerIter.next(); connectionHandler.removeClient(client); } } COM: <s> removes the client from this monitor </s>
funcom_train/21974791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeEdit(EdaPart part, String attributeName, String newValue, String oldValue, String name){ EdaPartListEdit edit = new EdaPartListEdit(partList, part, attributeName, newValue,oldValue,name); undoManager.addEdit(edit); edit.doEdit(); if(getEda() != null){ getEda().updateUndoRedo(); } repaint(); } COM: <s> make an edit to change this part list </s>
funcom_train/45628719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setProjectName() { // If we don't have the project name try again if (projectName == null) { IPath path = new Path(projectSystemFile.getPath()); projectName = path.segment(path.segmentCount() - 2); description = IDEWorkbenchPlugin.getPluginWorkspace().newProjectDescription(projectName); // description.setNatureIds(new String[] { // Eclipse4SLNature.NATURE_ID }); description.setLocation(path.removeLastSegments(1)); } } COM: <s> set the name of the project based on the project file </s>
funcom_train/2901986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getExtensionsByExtPointName(String name) { List _extensions = new ArrayList(); List exts = getExtensions(); for (int i = 0; i < exts.size(); i++) { Extension e = (Extension) exts.get(i); if (name.equals(e.getExtensionPoint().getName())) { _extensions.add(e); } } return _extensions; } COM: <s> returns list of extensions wich are assigned to extension point with given name </s>
funcom_train/366481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFocus(Entity entity) { Iterator iter = m_focusSets.keySet().iterator(); while ( iter.hasNext() ) { FocusSet set = (FocusSet)m_focusSets.get(iter.next()); if ( set.contains(entity) ) return true; } return false; } // COM: <s> tests if the given entity is in any of this managers focus sets </s>
funcom_train/3560987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSonFatherIndex(int index) throws DbException { if (index >= 0 && index < sonIndexes.size()) { return ((Integer) sonIndexes.get(index)).intValue(); } else throw new DbException("Index out of bounds in getting a son table"); } COM: <s> returns the index that a son table uses to reference this table </s>
funcom_train/12159033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StyleValues infer(Styles styles, StyleValues inheritable) { MutablePropertyValues values = styles.getPropertyValues(); inheriter.inherit(values, inheritable); // Update the counters based on the styles. counterEngine.startElement(styles); // Evaluate any compiled values in the styles. propertyValuesEvaluator.evaluate(values); // Create a copy of the evaluated properties in case we need to inherit // from them. inheritableValues = values.createImmutablePropertyValues(); styles.iterate(this); propertyValueTranslator.translate(values); return inheritableValues; } COM: <s> infer the values in styles that have not been explicitly set </s>
funcom_train/50368345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChildMenu() { // Create the menu with a mnemonic cutMenu = new JMenuItem("Cut", KeyEvent.VK_C); // Specify the action for this menu item cutMenu.addActionListener(action); // add an accelerator key cutMenu.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.CTRL_MASK)); // Grab the root menu JPopupMenu root = applet.getCtxMenu(); // and add to it root.addSeparator(); root.add(cutMenu); } COM: <s> create a submenu item and attach it to the applet context menu </s>
funcom_train/5068468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open( File file ){ try { Date from = new Date(); tree.setEditable(false); setOpenedFile( null ); Property prop = PDIManager.read( file ); treeModel.setRoot( prop ); setOpenedFile( file.getAbsolutePath() ); tree.updateUI(); tree.setEditable(true); tree.setVisible(true); Date to = new Date(); long duration = to.getTime() - from.getTime(); setStatus("Opened file in " + duration + " milliseconds."); } catch (Exception e) { showError( e ); } } COM: <s> parses and shows a file </s>
funcom_train/34141044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String cleanMarkup(String markup) { String noDivOrSpan = mStripDivSpanPattern.matcher(markup).replaceAll(""); String noEntities = mStripEntitiesPattern.matcher(noDivOrSpan).replaceAll(" "); String tagsClosed = mCloseTagPattern.matcher(noEntities).replaceAll("$1/>"); return String.format(XML_TEMPLATE, tagsClosed); } COM: <s> process html to remove markup that cant be handled by the sax parser </s>
funcom_train/48152083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCoinCount(int n){ Coin coin; if (n < 0) n = 0; if (n > coinCount){ for (int i = coinCount; i < n; i++){ coin = new Coin(probability, size, headColor, tailColor, textColor); coin.setToolTipText("Coin " + (i + 1)); add(coin); } } else if (n < coinCount) for (int i = n; i < coinCount; i++) remove(n); coinCount = n; revalidate(); } COM: <s> this method sets the number of coins </s>
funcom_train/46696106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullSetAlgorithmName() { System.out.println("setAlgorithmName"); BasicIODescriptor instance = new BasicIODescriptor(); String s = instance.getAlgorithmName(); instance.setAlgorithmName(null); assertNotNull(instance.getAlgorithmName()); assertSame(s,instance.getAlgorithmName()); } COM: <s> test of set algorithm name method of class basic iodescriptor </s>
funcom_train/35895171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String changeProductName(String productName){ String newName = productName; if("3G Talk & Text +".equalsIgnoreCase(getString(productName))){ newName = "3G Talk &amp; Text +"; }else if("2G Talk & Text +".equalsIgnoreCase(getString(productName))){ newName = "2G Talk &amp; Text +"; } return newName; } COM: <s> change with amp </s>
funcom_train/22026962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void select(ActionEvent e) { if(search == null) { try { search = new SearchWindow(); search.addActionListener(handler); search.setActionCommand("foundURLs"); search.setLocation(50,50); search.setVisible(true); } catch(java.io.FileNotFoundException excp) { JOptionPane.showMessageDialog(URLBuilder.this, excp.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } else search.setVisible(true); } COM: <s> open up the search window </s>
funcom_train/21015297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawFilledScaledBox ( final double p[] ) { viewBox ( p [0], p [1] ); final double d = graphicsXPoint ( p [0] ); final double e = graphicsYPoint ( p [1] ); g2.fillRect ( (int) d - 3, (int) e - 3, 6, 6 ); } COM: <s> draws a filled box arround the given point </s>
funcom_train/38628634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPosition() { int value = getRaw(); if (value < getMinNegativePwm()) { return 0.0; } else if (value > getMaxPositivePwm()) { return 1.0; } else { return (double)(value - getMinNegativePwm()) / (double)getFullRangeScaleFactor(); } } COM: <s> get the pwm value in terms of a position </s>
funcom_train/38318639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void delete (File f) { if (f.isDirectory()) { File[] af= f.listFiles(); for (int i= 0; i < af.length; i++) { delete(af[i]); } } if (!f.delete()) { throw new BuildException( new StringBuffer("Could not delete file '"). append(f.getAbsolutePath()). append("'.").toString() ); } } COM: <s> forced deletion of a file or directory recursive </s>
funcom_train/35414251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getOriginalPane() { if (originalPane == null) { originalPane = new JPanel(); originalPane.setLayout(new GridBagLayout()); originalPane.setBounds(new Rectangle(5, 5, 400, 500)); originalPane.setBorder(BorderFactory.createTitledBorder(null, "Original", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null)); originalPane.add(getOrignalImageLabel(), null); } return originalPane; } COM: <s> this method initializes original pane </s>
funcom_train/51378317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPageCount() { if (pageLimit == 0) { return 1; } else { int pageCount = (int) (this.getTotalRecordCount() / pageLimit); int mod = (int) (this.getTotalRecordCount() % pageLimit); if (mod != 0 || pageCount == 0) { pageCount++; } return pageCount; } } COM: <s> get the number of pages using recorg pagination that exist for this record </s>