__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/8804597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(byte b) { int mask = (8 * (blockIndex & 3)); count += 8; block[blockIndex >> 2] &= ~(0xff << mask); block[blockIndex >> 2] |= (b & 0xff) << mask; blockIndex++; if (blockIndex == 64) { transform(); blockIndex = 0; } } COM: <s> add one byte to the hash </s>
funcom_train/19382846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() throws DataStoreException, java.sql.SQLException { for (int i = 0; i < getRowCount(); i++) { if (getRowStatus(i) == DataStore.STATUS_NEW_MODIFIED || getRowStatus(i) == DataStore.STATUS_MODIFIED || getRowStatus(i) == DataStore.STATUS_NEW) { setSelected(i, Constants.TRUE); } } super.update(); } COM: <s> updates the changes made to the organization rows into the database </s>
funcom_train/42273690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openRaiderHistoryPage(String name, String raidClass) { if(!initialized) { System.err.println("openRaiderHistoryPage() called before personalDkpWidget was initialized"); } tableHolder.clear(); vp.remove(tableHolder); vp.add(loadingImage); System.out.println("raiderWrapper " + name + " beginning to load: " + (System.currentTimeMillis() - RuruDkp.start) + "ms"); getRaiderWrapperByName(name, raidClass, RuruUtility.capFirstLetter(name)); } COM: <s> called from rurudkp </s>
funcom_train/1805280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean retrieveWorksheetList(SpreadsheetEntry spreadsheet) { WorksheetFeed feed; try { feed = service.getFeed( spreadsheet.getWorksheetFeedUrl(), WorksheetFeed.class); } catch (IOException e) { SpreadsheetApiDemo.showErrorBox(e); return false; } catch (ServiceException e) { SpreadsheetApiDemo.showErrorBox(e); return false; } this.worksheetEntries = feed.getEntries(); return true; } COM: <s> gets the list of worksheets from google spreadsheets </s>
funcom_train/10644088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayer(final Component c, final int layer, final int position) { int index = getIndexOf(c); if (index == -1 || index == insertIndexForLayer(layer, position)) { rememberLayerForComponent(c, layer); return; } addImpl(c, getObjectForLayer(layer), position); } COM: <s> sets the layer and the position for the specified component </s>
funcom_train/40484320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDownEffects() { for (Iterator<Effect> it = iterator(); it.hasNext();) { Effect theEffect = it.next(); if (theEffect instanceof ParallellCompositeEffect) ((ParallellCompositeEffect) theEffect).tearDownEffect(); else theEffect.tearDownEffect(); } } COM: <s> tears down all effects </s>
funcom_train/37503231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCreation() throws SAXException, IOException { CreationHandlerImpl h1 = new CreationHandlerImpl(); assertNull("initial", h1.getCreation()); parse("<creation/>", h1); assertNotNull("parsed", h1.getCreation()); } COM: <s> test of get creation method of class saga </s>
funcom_train/46663269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unsubscribe(final Object owner) { for (String event : handlers.keySet()) { List<Object[]> list = handlers.get(event); List<Object[]> listClone = new ArrayList<Object[]>(list); // duplicate list to get persisted iterator for (Object[] items : listClone) { if (items[0] == owner) list.remove(items); } } } COM: <s> unsubscribe all owners handlers </s>
funcom_train/25510342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileName() { if (project == null || project.getProjectFile() == null) { return "<not saved>"; } String f; try { f = project.getProjectFile().getCanonicalPath(); } catch (IOException e) { f = "<unable to determine the file name>"; } projectFileNameLabel.setToolTipText(f); return f; } COM: <s> gets the name path of the current project file as a string </s>
funcom_train/10912048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanGlyphsRecursively(int indexInOriginal) throws IOException { if (!subset.containsKey(indexInOriginal)) { composedGlyphs.add(indexInOriginal); } if (isComposite(indexInOriginal)) { compositeGlyphs.add(indexInOriginal); Set<Integer> composedGlyphs = retrieveComposedGlyphs(indexInOriginal); for (Integer composedGlyph : composedGlyphs) { scanGlyphsRecursively(composedGlyph); } } } COM: <s> scans each glyph for any composed glyphs </s>
funcom_train/34341879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getComandoSalir() { if (comandoSalir == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here comandoSalir = new Command("Salir", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return comandoSalir; } COM: <s> returns an initiliazed instance of comando salir component </s>
funcom_train/12656575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlaylistItem removeItemAt(int pos) { PlaylistItem item = cachedPlaylist.remove(pos); filteredPlaylist.remove(item); setModified((item == null) ? false : true); if (playMode == PlayMode.SHUFFLE) { removeFromShuffledList(item); } fireItemRemovedEvent(item); return item; } COM: <s> removes a playlist item at a given position from the playlist </s>
funcom_train/43903698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { if (hashCode == 0) { int code = (int) serialVersionUID; int index = 0; Comparable component; while ((component = getComponent(index)) != null) { code = (code * 37) + component.hashCode(); index++; } hashCode = code; } return hashCode; } COM: <s> returns a hash code value for this version </s>
funcom_train/22782774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Album createNewAlbum() { // ask for new name String msg = "Please enter the name of the new album: "; String title = "Create new Album"; int typ = JOptionPane.QUESTION_MESSAGE; String name = client.showInputDialog(msg, title, typ); if (name == null || name.equals("")) { // aborted return null; } return createNewAlbum(name); } COM: <s> process to create a new album </s>
funcom_train/11161598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJdbc() throws Exception { XmlConfigurator.loadConfiguration(getClass().getResourceAsStream("/test-jndi.xml")); checkJdbc(DEFAULT_ROOT); XmlConfigurator.destroyInitialContext(); XmlConfigurator.loadConfiguration(getClass().getResourceAsStream("/test-jndi2.xml")); checkJdbc(ALT_ROOT); } COM: <s> test for correctly configured and operational database connection </s>
funcom_train/12264864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRequestTimeoutMillis(long requesttimeout) { if (requesttimeout < HttpServerConnection.MIN_REQUEST_TIMEOUT_MILLIS) { LOG.warning("try to set request timeout with " + requesttimeout + ". This will be ignored because the value is smaller than the min request timout " + HttpServerConnection.MIN_REQUEST_TIMEOUT_MILLIS + " millis"); return; } this.requestTimeoutMillis = requesttimeout; } COM: <s> sets the message receive timeout </s>
funcom_train/12188879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnqualifiedVariableEvaluate() throws Exception { context.getCurrentScope().declareVariable( new ImmutableExpandedName("", "myVar"), result); Expression exp = compileExpression("$myVar"); assertTrue("Variable expression evaluation failed", exp.evaluate(context) == result); } COM: <s> ensures that an unqualified variable reference can be evaluated </s>
funcom_train/15452431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCommunityMembers(Community community, Collection members) { if (community != null) { Iterator itMembers = members.iterator(); while (itMembers.hasNext()) { User currentMember = this.accessControlController .getUser(((Integer) itMembers.next()).intValue()); // removing the community community.removeMember(currentMember); } } else { throw new AccessControlException(ErrorConstraints.COMMUNITY_NOT_FOUND); } } COM: <s> removes all members within the given collection from the community </s>
funcom_train/25186761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(boolean noArrays) { StringBuilder sb = new StringBuilder(); int skip = 0; for (String s : _path) { if (noArrays && ARRAY_OPEN.equals(s)) { skip = 3; } if (skip == 0) { sb.append(s); } if (skip > 0) { skip--; } } return sb.toString(); } COM: <s> returns string presentation of path optionally without arrays indexes i </s>
funcom_train/14130680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FileFilter snapshotFileFilter() { FileFilter fileFilter = new FileFilter(){ public boolean accept (File file){ String filename = file.getName(); return file.isDirectory() || filename.endsWith(".jpg"); } public String getDescription(){ return "*.jpg"; } }; return fileFilter; } COM: <s> defines the file filter for the save dialog </s>
funcom_train/48388280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addSectionHeaderClickHandler(com.smartgwt.client.widgets.layout.events.SectionHeaderClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.layout.events.SectionHeaderClickEvent.getType()) == 0) setupSectionHeaderClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.layout.events.SectionHeaderClickEvent.getType()); } COM: <s> add a on section header click handler </s>
funcom_train/37189184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean parseMultiColumns() { boolean yes = false; parseMultiColumns(";"); if(getCurvesCount()==0) { parseMultiColumns("\t"); } if(getCurvesCount()==0) { parseMultiColumns(":"); } if(getCurvesCount()==0) { parseMultiColumns(" "); } if(getCurvesCount()==0) { parseMultiColumns(","); } if(getCurvesCount()>0) { yes = true; } return yes; } COM: <s> return true if the parsing operation succeeded </s>
funcom_train/41457391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dsp newProcessor() throws InstantiationException, ClassNotFoundException, IllegalAccessException { Codec[] codecs = new Codec[classes.size()]; int i = 0; for (String fqn : classes) { Class codecClass = DspFactoryImpl.class.getClassLoader().loadClass(fqn); codecs[i++] = (Codec) codecClass.newInstance(); } return new Dsp(codecs); } COM: <s> creates new dsp </s>
funcom_train/18358323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderAllItems(MEVAStatusItem[] items) { for (int i = 0; i< items.length; i++) { MEVAStatusItem si = items[i]; JComponent aComponent = renderItem(si); //associate the component with the status Item itemToComponent.put(items[i],aComponent); // put the component into the layout this.add(aComponent); si.addStatusChangeListener(this); } } COM: <s> renders the items onto the panel </s>
funcom_train/42645951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDate getModDate() { Object tmp = attributes.get("ModDate"); if (tmp != null && tmp instanceof StringObject) { StringObject text = (StringObject) tmp; return new PDate(securityManager, text.getDecryptedLiteralString(securityManager)); } return null; } COM: <s> gets the date and time the document was most recently modified </s>
funcom_train/3526765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createHrefValue( String uri ) { String result = ""; Element href = new Element( E_HREF, DNSP ); href.addContent( uri ); try { result = xmlOut.outputString( href ); } catch( Exception x ) { x.printStackTrace(); } return result; } COM: <s> create href value </s>
funcom_train/45354508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getNotes() { if (notes == null) { notes = new JTextArea(); notes.setBounds(13, 155, 482, 88); notes.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { saveNotes(); } }); } return notes; } COM: <s> this method initializes j text area1 </s>
funcom_train/47183984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long add(PatientInstructionsBean bean) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); String statement = "INSERT INTO PatientSpecificInstructions " + "(VisitID,Modified,Name,URL,Comment) VALUES (?,?,?,?,?)"; ps = conn.prepareStatement(statement); ps = loader.loadParameters(ps, bean); ps.executeUpdate(); return DBUtil.getLastInsert(conn); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> add a new patient instructions record </s>
funcom_train/35299493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyCursorMoved() throws SQLException { checkforRowSetInterface(); if (listeners.isEmpty() == false) { RowSetEvent event = new RowSetEvent((RowSet)this); for (Iterator i = listeners.iterator(); i.hasNext(); ) { ((RowSetListener)i.next()).cursorMoved(event); } } } COM: <s> notifies all of the listeners registered with this </s>
funcom_train/34030020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone(){ CTXf xf = (CTXf)_cellXf.copy(); int xfSize = _stylesSource._getStyleXfsSize(); int indexXf = _stylesSource.putCellXf(xf); return new XSSFCellStyle(indexXf-1, xfSize-1, _stylesSource); } COM: <s> make a copy of this style </s>
funcom_train/31679509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws XMLStreamException { try { if (_inputStream != null) { _inputStream.close(); reset(); } else if (_reader != null) { _reader.close(); reset(); } if (_isFactoryProduced) { FACTORY.recycle(this); } } catch (IOException e) { throw new XMLStreamException(e); } } COM: <s> closes this reader and its underlying input then </s>
funcom_train/47691564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rescaleAlpha(int t) { // calculate scale coefficients for (int i = 0; i < num_states; i++) { scaleFactor[t] += alpha[t][i]; } scaleFactor[t] = 1 / scaleFactor[t]; // apply scale coefficients for (int i = 0; i < num_states; i++) { alpha[t][i] *= scaleFactor[t]; } } COM: <s> rescales forward variable alpha to prevent underflow br </s>
funcom_train/51544994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debug(Object[] o, String desc) { debug("Dumping Object Array: " + desc); if (o == null) { debug("null"); return; } for (int i = 0; i < o.length; i++) { if (o[i] instanceof Object[]) debug((Object[]) o[i], desc + " element " + i); else debug(" Element " + i + ": " + o[i]); } } COM: <s> writes the contents of an array to the log </s>
funcom_train/45248511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = dialog .convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = dialog .convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); composite.setLayout(layout); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); toolBar = createSupportToolbar(composite); // Add the buttons to the button bar. createButtonsForButtonBar(composite); composite.layout(); return composite; } COM: <s> this method creates button bar that is available on the bottom of the </s>
funcom_train/44301954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MtScreen createInstance() throws FatalException { Screen clone; try { clone = (Screen) getClass().newInstance(); // marche aussi pour classes derivees } catch (Exception x) { throw new FatalException(this, "Cannot clone a screen !!!", x); } return clone; } COM: <s> should be overload by sub classes </s>
funcom_train/17943274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryPanel addQuery(String nick, boolean select) { int index = indexOfTab(nick); if (index == -1) { QueryPanel queryPanel = new QueryPanel(this, nick); tabs.add(queryPanel, nick); if (select) tabs.setSelectedComponent(queryPanel); tabs.revalidate(); if (!select) doSoundHighlight(); return queryPanel; } else { Component component = tabs.getComponentAt(index); return (QueryPanel)component; } } COM: <s> on a query there should be created a new tab and a new </s>
funcom_train/2579187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ControlPoint)) { return false; } ControlPoint that = (ControlPoint) obj; if (this.x != that.x) { return false; } /*&& y == ((ControlPoint) obj).y*/; return true; } COM: <s> tests this point for equality with an arbitrary object </s>
funcom_train/19387511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addUndoableEdit(UndoableEdit edit) { if (!getFlag(UNDO_IN_PROGRESS)) { if (insideCompoundEdit()) { m_addedToCompoundEdits = true; return m_compoundEdit.addEdit(edit); } else { return m_undoManager.addEdit(edit); } } return false; }//}}} //{{{ beginCompoundEdit() COM: <s> allows subclasses to add additional undoable events </s>
funcom_train/30194996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(Collection c){ Iterator iter = c.iterator(); while(iter.hasNext()){ JxplElement el = (JxplElement)iter.next(); if(!contains(el)) return false; if(c instanceof JxplMultiset) if(getCount(el) < ((JxplMultiset)c).getCount(el)) return false; } return true; } COM: <s> contains all occurances of the following atoms </s>
funcom_train/18805236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { if (text == null) { throw new NullPointerException("TextTitle.setText(..): Text is null"); } if (!this.text.equals(text)) { this.text = text; notifyListeners(new TitleChangeEvent(this)); } } COM: <s> sets the title to the specified text and sends a </s>
funcom_train/16795100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createHeading(){ String head = ""; int sets = plot.storedData.size()/2; if (saveXValues) head += sets==1?"X\tY\t":"X0\tY0\t"; else head += sets==1?"Y0\t":"Y0\t"; if (plot.errorBars!=null) head += "ERR\t"; for (int j = 1; j<sets; j++){ if (saveXValues) head += "X" + j + "\tY" + j + "\t"; else head += "Y" + j + "\t"; } return head; } COM: <s> creates the headings corresponding to the showlist funcion </s>
funcom_train/21953858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton createImportKeysButton() { JButton returnValue = new JButton(); if (importKeysIcon != null) returnValue.setIcon(importKeysIcon); returnValue.setPreferredSize(new java.awt.Dimension(25,25)); returnValue.setMaximumSize(new java.awt.Dimension(25,25)); returnValue.setSize(25,25); return returnValue; } COM: <s> creates an import keys button </s>
funcom_train/29982658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSregServiceEndpoint() { String endpoint = null; if (getRegistrationEndpoint().equals("T")) { endpoint = Constants.TEST_SREG_WEB_SERVICES_PORT; } else if (getRegistrationEndpoint().equals("P")) { endpoint = Constants.PRD_SREG_WEB_SERVICES_PORT; } sstRegistrationsServiceSoapProxy.setEndpoint(endpoint); } COM: <s> set the soap services endpoint for central registration vendor to the </s>
funcom_train/534462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getChild(int parent, int childNumber) { if(childNumber >= d) return -1; int childLoc = ((this.d) * (parent - 1)) + (2 + childNumber); if(childLoc > this.size()) return -1; // the child at that place doesn't exist return childLoc; } COM: <s> gets the index of a child node given the index of the parent </s>
funcom_train/7686954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateElapsedTimeWidget(long timeElapsed) { // if (DBG) log("updateElapsedTimeWidget: " + timeElapsed); if (timeElapsed == 0) { mElapsedTime.setText(""); } else { mElapsedTime.setText(DateUtils.formatElapsedTime(timeElapsed)); } } COM: <s> updates m elapsed time based on the specified number of seconds </s>
funcom_train/49608775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertProvince(String username,EntityManager em,Province vo) throws Throwable { try { JPAMethods.persist(em, username, DefaultFieldsCallabacks.getInstance(), vo); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } finally { em.flush(); } } COM: <s> insert a province </s>
funcom_train/31106623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBaseName() { String prefix = getTagValue( EjbTags.BASE_NAME ); if (prefix == null) { prefix = getSrcClass().getName(); if (prefix.endsWith("Bean")) { prefix = prefix.substring( 0, prefix.length() - 4 ); } } return prefix; } COM: <s> get the base name for derived classes </s>
funcom_train/23790199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void recalcSelectRects() { boolean trigger = m_listenerManager.setDirty(null); Iterator<Point> iter = getSelectedCellCoordinates(); m_selectedRects.clear(); while (iter.hasNext()) { Point pt = iter.next(); Rectangle r = new Rectangle( m_columns[pt.x].x + 1, m_rows[pt.y].y + 1, m_columns[pt.x].width - 2, m_rows[pt.y].height - 2); m_selectedRects.add(r); } if (trigger) m_listenerManager.trigger(); } COM: <s> recalculates the selected cells rectangles </s>
funcom_train/18787861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validate(MetaClass clazz, ValidationResult results) { boolean sucess = true; if (clazz.booleanValueOfTag(UmlConstants.PERSISTENCE_TAG)) { if (!exists(clazz, OrmConstants.TABLE_NAME)) { sucess = false; addErrorMessage(results, ERROR_MISSING_TABLE, UmlConstants.PERSISTENCE_TAG, clazz.getQualifiedName()); } } return sucess; } COM: <s> the following rules are defined for the element </s>
funcom_train/8096809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConfiguredVariant() { m_Filter = getConfiguredFilterVariant(); Instances result = useFilter(); // Number of atytributes + instances shouldn't change assertEquals(m_Instances.numAttributes(), result.numAttributes()); assertEquals(m_Instances.numInstances(), result.numInstances()); } COM: <s> tests replace missing values center filter </s>
funcom_train/15490603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveComponents(Container target, int x, int y, int width, int height, int nmembers) { int x2 = 0; y += height / 2; for (int i=0; i<nmembers; i++) { Component m = target.getComponent(i); Dimension d = m.getSize(); if (i==0) x2 = x + (width - d.width)/2; m.setLocation(x2, y); y += vgap + d.height; } } COM: <s> centers the elements in the specified column if there is any slack </s>
funcom_train/44223169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDOMPanel(){ DOMViewer domViewerPanel = new DOMViewer(); domViewerPanel.setDocument(basePanel.get_canvas().getSVGDocument()); domViewerPanel.setSize(new Dimension(500, 300)); this.setTitle("View Dom Tree"); this.getContentPane().add(domViewerPanel, BorderLayout.CENTER); } COM: <s> create the panel for viewing the dom tree </s>
funcom_train/44748248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numberOfResults() { int count = 0; Set peakSet = peakMap.keySet(); for (Iterator it = peakSet.iterator(); it.hasNext();) { Vector o = (Vector) peakMap.get(it.next()); count += o.size(); } return count; } COM: <s> number of matches found </s>
funcom_train/15645328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocalDate calculate3rdWednesday(final LocalDate original) { final LocalDate firstOfMonth = original.withDayOfMonth(1); LocalDate firstWed = firstOfMonth.withDayOfWeek(MONTHS_IN_QUARTER); if (firstWed.isBefore(firstOfMonth)) { firstWed = firstWed.plusWeeks(1); } return firstWed.plusWeeks(2); } COM: <s> assumes that the month is correct get the day for the 2rd wednesday </s>
funcom_train/7372031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean disconnect(E from, E to) { markDirty(); boolean sawNull = false; if (mFromEdges.remove(from, to) == null) sawNull = true; if (mToEdges.remove(to, from) == null) sawNull = true; return !sawNull; } COM: <s> remove an edge from between two nodes </s>
funcom_train/15401209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rectangle getNormalizedRect(Rectangle r) { Rectangle result = new Rectangle(r); if (result.width < 0) { result.width = -result.width; result.x -= result.width; } if (result.height < 0) { result.height = -result.height; result.y -= result.height; } return(result); } COM: <s> utility function that takes an arbitrary rectangle with possibly </s>
funcom_train/35674912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckOnJaxbRoot() { try { CoxbBindingGenerator gen = new CoxbBindingGenerator(); gen.setJaxbPackageName("com.legstar.test.coxb.vararcom"); gen.setTargetDir(GEN_SRC_DIR); gen.execute(); } catch (RuntimeException e) { assertEquals("You must specify at least one JAXB root class name", e.getMessage()); } } COM: <s> generator should check on jaxb root name </s>
funcom_train/25471332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void selectProportional() { int ptr = 0, k = 0; double max = individual[0].getFitness(); max *= 1.05; while (ptr < size && size - ptr < 2*size - k) { double val = individual[k].getFitness(); if (Math.random() <= val/max) individual[ptr++] = individual[k++]; else k++; } // if (size-ptr >= 2*size-k) for ( ; ptr < size; ptr++) { individual[ptr] = individual[k]; ++k; } } COM: <s> individuals are kept proportionally to their fitness score </s>
funcom_train/4135902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addJournalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ArticleBibTexEntry_journal_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ArticleBibTexEntry_journal_feature", "_UI_ArticleBibTexEntry_type"), BibtexPackage.Literals.ARTICLE_BIB_TEX_ENTRY__JOURNAL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the journal feature </s>
funcom_train/25134753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getResource(String path) { if (_urlResourceBase != null) { try { return new URL(_urlResourceBase, path); } catch (MalformedURLException mue) { return null; } } else if (_classResourceBase != null) { return _classResourceBase.getResource(path); } else { return null; } } COM: <s> returns the path to a resource </s>
funcom_train/45452345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScoreInvalidIndicator() throws Exception { createEvaluation(); int testScore = 23; Instrument otherInstrument = new Instrument("other instrument"); Indicator otherIndicator = new Indicator(otherInstrument, "other indicator"); try { testEvaluation.setScore(otherIndicator, testScore); fail("Invalid indicator allowed to be scored"); } catch (IllegalArgumentException e) { } } COM: <s> test scoring an invalid indicator for an evaluation </s>
funcom_train/36817076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void opentable3(){ try{ ObjectInputStream in = new ObjectInputStream(new FileInputStream("temptable3.dat")); Vector rowData = (Vector)in.readObject(); Vector columnNames = (Vector)in.readObject(); tableModel.setDataVector(rowData, columnNames); //currentTable=jTable3; in.close(); jlblStatus.setText("Table #3 opened"); } catch(Exception ex){ ex.printStackTrace(); } } COM: <s> open temporary table 3 </s>
funcom_train/28983568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropValue(T value) { if (editableName == null) return; //Get the model bean M currentModel = view.getProxy().model().get(); //If model bean is null, do nothing if (currentModel == null) { return ; //Otherwise set the value of the named prop } else { currentModel.props().get(editableName).set(value); } } COM: <s> set the value displayed by a prop view which is the value </s>
funcom_train/34442266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long readLongAttr(Attributable elem, String attrName) { Attribute attr = elem.getAttribute(attrName); long res = -1; if (attr != null) { String asStr = attr.getValue(); try { res = Long.parseLong(asStr); } catch (NumberFormatException nfe) { //ignored } } return res; } COM: <s> given an element read in the value of a given attribute name </s>
funcom_train/25196600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void foldAt(int i) throws IOException { int endPointer = i; while (endPointer > 0 && Character.isWhitespace(buffer.charAt(endPointer - 1))) { endPointer--; } writer.println(buffer.substring(0, endPointer)); buffer.delete(0, i + 1); space = -2; } COM: <s> insert a newline near a column </s>
funcom_train/9216897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { if (!initialized) { // load the first map map = DenarisMapFactory.createMap("map1", 334, 13, DenarisMapFactory.DEFAULT_CELL_WIDTH, DenarisMapFactory.DEFAULT_CELL_HEIGHT); DenarisGameCanvas.getInstance().adjustGameHeightToMapHeight(map); player = new Player(map); map.setPlayerGroup(player); map.initialize(); setCurrentArea(1); initialized = true; } doFullRepaintToBuffer(DenarisGameCanvas.getInstance().getBuffer()); } COM: <s> initialize the game screen </s>
funcom_train/45239380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldRelacaoF84() { if (jNumberFloatFieldRelacaoF84 == null) { jNumberFloatFieldRelacaoF84 = new JNumberFloatField(); jNumberFloatFieldRelacaoF84.setLocation(new Point(330, 90)); jNumberFloatFieldRelacaoF84.setFont(new Font("Arial", Font.PLAIN, 12)); jNumberFloatFieldRelacaoF84.setSize(new Dimension(65, 20)); } return jNumberFloatFieldRelacaoF84; } COM: <s> this method initializes j number float field relacao f84 </s>
funcom_train/46760189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSqlParameter(final String sql, final List<ISParameter> qualifications, final ServiceCall call ) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return BaseData.sqlQuery(sql, qualifications, call); }}; return (List) call(method, call); } COM: <s> execute the hql with the specified parameters and return the matching models </s>
funcom_train/29572692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskDescription parseDescription(File file) { if (!TextFileLoader.checkFile(file)) { return null; } else { path = file.getParent()+File.separatorChar; List<TaskStep> steps = new ArrayList<TaskStep>(); List<String> entries = TextFileLoader.loadText(file); if (!checkStructure(entries)) { return new TaskDescription(); } else { for (String line:entries) { steps.add(parseTaskLine(line)); } return new TaskDescription(steps); } } } COM: <s> parses a given file into a task description </s>
funcom_train/46694417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullExecute() { System.out.println("execute"); Property property = null; NullPropertyQuery instance = new NullPropertyQuery(); instance.buildQuery(false); boolean expResult = false; boolean result = instance.execute(property); assertEquals(expResult, result); } COM: <s> test of execute method of class null property query </s>
funcom_train/4717588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPanRight() { SynMessage msg = new SYN().synth(1).voice(1).pan(100); assertEquals("Fi", msg.getTypetag()); assertEquals((SynMessage.MAX_32BIT), msg.getArguments()[1]); assertEquals("/SYN/ID1/V1/PAN", msg.getAddress()); } COM: <s> voice pan right </s>
funcom_train/3617414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void performValidation() { for(Iterator i=datatypes.getConfigsMgr().configs().iterator(); i.hasNext(); ) { DatatypeConfig config = (DatatypeConfig)i.next(); try { AccessorBuilder builder = AccessorFactory.processConfig(config); datatypes.validateConfigFor(config.dataclass, builder); } catch(NullPointerException e) { addErroneous(config.dataclass,L_INVALID); // note: this happens when builder is null but no // InvalidConfigException is raised } catch(InvalidConfigException e) { addErroneous(config.dataclass,L_INVALID); reportValidationError(e); } } } COM: <s> configs are not rejected here only validated </s>
funcom_train/20978755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMinimumSize(javax.swing.JProgressBar progress) { Dimension dimension = null; if (skina.getProgress() != null) { dimension = skina.getProgress().getMinimumSize(progress); } if ((dimension == null) && (skinb.getProgress() != null)) { dimension = skinb.getProgress().getMinimumSize(progress); } return dimension; } COM: <s> gets the minimum size attribute of the compound progress object </s>
funcom_train/38259107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPredicateResolvedUponName() { String value = ""; // if the type of this is Resolvent if ((TYPE == 2) || (TYPE == 0)) { value = this.problem.getLabel(((Resolvent)this.clause).getPredicateResolvedUpon()); } return value; } COM: <s> returns the coresponding predicate resolved upon string if current node has one </s>
funcom_train/44162771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void csActivateSentries(Tile tile, ChangeSet cs) { for (Unit u : tile.getUnitList()) { if (u.getState() == UnitState.SENTRY) { u.setState(UnitState.ACTIVE); cs.add(See.perhaps(), u); } } } COM: <s> activate sentried units on a tile </s>
funcom_train/28665795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputVerificationResult verifyKey(String key, Collection<KeyVerificator> verificators) throws ParseException { InputVerificationResult verificationResult = KeyVerificator.verify(key, currentAlphabet, verificators); if(! verificationResult.isValid()) { if(verificationResult.isStandaloneMessage()) { throw new ParseException(verificationResult.getMessage()); } else { String mask = Messages.ClassicAlgorithmCmd_notwellformedMsg; throw new ParseException(String.format(mask, verificationResult.getMessage())); } } return verificationResult; } COM: <s> verifies a string key against a set of verificators throwing a parse exception </s>
funcom_train/37609688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent evt) { oldclr = ccc.getColors(itmname.getSelectedIndex()); newclr = oldclr; redSlider.setValue(oldclr.getRed()); greenSlider.setValue(oldclr.getGreen()); blueSlider.setValue(oldclr.getBlue()); okb.setBackground(newclr); if (newclr.getGreen() < 128) okb.setForeground(Color.white); else okb.setForeground(Color.black); nob.setBackground(oldclr); if (oldclr.getGreen() < 128) nob.setForeground(Color.white); else nob.setForeground(Color.black); } // end itemStateChanged() COM: <s> refreshes the screen when the map item tt item event tt </s>
funcom_train/12164632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMarkupExtensionsIsNotExtracted() throws Exception { MarinerConfiguration config = createMarinerConfiguration(null, null, null, null); MarkupExtensionsConfiguration extensionsConfig = config.getPipelineConfiguration(). getMarkupExtensionsConfiguration(); assertNull("markup-extensions element should NOT have been parsed", extensionsConfig); } COM: <s> ensures that a </s>
funcom_train/19965165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont1() { if (font1 == null) {//GEN-END:|81-getter|0|81-preInit // write pre-init user code here font1 = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);//GEN-LINE:|81-getter|1|81-postInit // write post-init user code here }//GEN-BEGIN:|81-getter|2| return font1; } COM: <s> returns an initiliazed instance of font1 component </s>
funcom_train/9237159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getPosition(final FrameContainer item) { if (item instanceof GlobalWindow) { return 0; } else if (item instanceof Server) { return 1; } else if (item instanceof Raw) { return 2; } else if (item instanceof Channel) { return 3; } else if (item instanceof Query) { return 4; } else { return 5; } } COM: <s> returns an integer corresponding to the expected order of a frame </s>
funcom_train/8358489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTotalSum() { int newCount = ((Integer) spinnerCount.getValue()).intValue(); int newMass = orderedItem.getNewMass(); if (orderedItem.isMassEditableInOrder()) { newMass = ((Integer) spinnerMass.getValue()).intValue(); } totalSum.setText(String.format("%.2f грн.", orderedItem .getOrderedPriceBillAndCoins(newMass, newCount))); } COM: <s> updating total sum label based on selected count and mass </s>
funcom_train/3290590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String replace(scanpage sp, String command) { CommandHandlerInterface handler; String token; StringTokenizer tok = new StringTokenizer(command,"-\n\r"); token = tok.nextToken(); // log.error("MMEDIT->"+token+" "+commandHandlers); handler = (CommandHandlerInterface)commandHandlers.get(token); if (handler != null) return handler.replace(sp, tok); return ("Command not defined (MMEdit)"); } COM: <s> the hook that passes all replace and trigger related pages to the </s>
funcom_train/39348786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Address allocateArray(RVMArray array, int numElements, boolean needsIdentityHash, int identityHashValue, int alignCode) { numObjects++; BootImageWriter.logAllocation(array, array.getInstanceSize(numElements)); return ObjectModel.allocateArray(this, array, numElements, needsIdentityHash, identityHashValue, alignCode); } COM: <s> allocate an array object </s>
funcom_train/17774122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerExceptionHandler(ExceptionHandler xh){ eh = xh; if(jobs != null){ synchronized(jobs) { Iterator<Job> i = jobs.iterator(); // Must be in synchronized block while (i.hasNext()){ i.next().registerExceptionHandler(xh); } } } } COM: <s> registers an exception handler for all jobs in this queue </s>
funcom_train/29567993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValidationGroups() { Account act = getAccount(); String groups = null; if(act.getId() == null) { groups = "createInfo"; } else { groups = "editInfo"; } if(this.isChangeAccount()) { groups += ",editAccount"; } logger.info("getValidationGroups: " + groups); return groups; } COM: <s> used by the jsf integration validation telling what </s>
funcom_train/5395085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Container createContentPane() { // Create the content-pane-to-be. contentPane = new JPanel(new BorderLayout()); contentPane.setOpaque(true); // Add our operating buttons contentPane.add(createButtons(), BorderLayout.SOUTH); return contentPane; } COM: <s> creates the content pane for the gui </s>
funcom_train/26641570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { Constant c; try {c = cp.get(name);} catch (Exception e) { return "<<bad name index>>"; } if (!(c instanceof UTFConstant)) return "<<bad name constant>>"; return ((UTFConstant)c).getValue(); } COM: <s> return the name of the method </s>
funcom_train/19035781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFolders(PFIDCollection pfidCollection) { if(isConnected()) { try { synchronized(this) { this.getOutputStream().writeInt(ServerMessageCode.REMOVEFOLDERS.getIndex()); pfidCollection.sendData(this.getOutputStream()); this.getOutputStream().flush(); } } catch (IOException e) { this.messageFailed(e); } } } COM: <s> the folders to remove from the client </s>
funcom_train/1578286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireSelectionChanged(final SelectionChangedEvent event) { final Object[] listeners = selectionChangedListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i]; OutputManager.arun(new SafeRunnable() { public void run() { l.selectionChanged(event); } }); } } COM: <s> notifies any selection changed listeners that the viewers selection has </s>
funcom_train/49404613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IlluminaFileMap keep(final List<Integer> toInclude) { final IlluminaFileMap fm = new IlluminaFileMap(); for(final Integer tile : toInclude) { final File file = this.get(tile); if(file != null) { fm.put(tile, file); } } return fm; } COM: <s> return a file map that includes only the tiles listed </s>
funcom_train/50775279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireProgress(ProgressEvent evt) { if (evt == null) return; Vector oVec; synchronized(listeners) { oVec = (Vector)listeners.clone(); } Enumeration oEnum = oVec.elements(); while (oEnum.hasMoreElements()){ ProgressListener listener = (ProgressListener)oEnum.nextElement(); listener.progressPerformed(evt); } } COM: <s> fire an existing progress event to any registered listeners </s>
funcom_train/26148276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void place(Component comp) { int x, y, width, height; width = computeWidth(comp); height = computeHeight(comp); x = computeX(comp, width); y = computeY(comp, height); comp.setBounds(x, y, width, height); } COM: <s> positions a component according to the expressions </s>
funcom_train/16218545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeCollisionGroup(CollisionManager collisionGroup) { for (int i = 0; i < this.collisions.length; i++) { if (this.collisions[i] == collisionGroup) { this.collisions = (CollisionManager[]) Utility.cut(this.collisions, i); return true; // successfully removed } } return false; } COM: <s> removes specified collision group from this playfield </s>
funcom_train/43277104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void convert(final EnumLiteral literal, EEnum target) { EEnumLiteral ecoreLiteral = target.newELiterals(); ontologyEcoreMapping.put(literal, ecoreLiteral); ecoreLiteral.setName(literal.getValue()); // ecoreLiteral.setLiteral(literal.getValue()); ecoreLiteral.setLiteral(literal.getName()); ecoreLiteral.setValue(target.getELiterals().size() - 1); } COM: <s> convert ont reference to ecore reference </s>
funcom_train/10907267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColorSpaceOut(boolean fillNotStroke) { if (fillNotStroke) { // fill but no stroke return ("/Pattern cs /" + this.getName() + " scn \n"); } else { // stroke (or border) return ("/Pattern CS /" + this.getName() + " SCN \n"); } } COM: <s> get the pdf command for setting to this pattern </s>
funcom_train/16749603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoOverlayPoints() { if (points == null || points.size() == 0) return; if (points.size() == 1) { logger.debug("hopping to point"); OverlayPoint point = points.iterator().next(); mapWindow.gotoLonLat(point.getLongitude(), point.getLatitude()); } else { logger.debug("showing points"); mapWindow.gotoPoints(points); } } COM: <s> set the viewport to display the overlay points </s>
funcom_train/19455072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String asPrintString(java.sql.Timestamp timestamp) { String time = timestamp.toString(); String format = "'YYYY-MM-DD HH24:MI:SS'"; time = "'" + time.substring(0, time.lastIndexOf('.')) + "'"; return " to_date(" + time + ", " + format + ") "; } COM: <s> returns the given code java </s>
funcom_train/38808508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__float_getFloatValue() throws JHuPeDOMException { Attribute attr = jhupeDomFactory.newAttribute("test", "1.00000009999e+10f"); float flt = 1.00000009999e+10f; try { assertTrue("incorrect float conversion", attr.getFloatValue() == flt); } catch (DataConversionException e) { fail("couldn't convert to float"); } // test an invalid float attr.setValue("1.00000009999e"); try { attr.getFloatValue(); fail("incorrect float conversion from non float"); } catch (DataConversionException e) { } } COM: <s> test floats returned from attribute values </s>
funcom_train/26278832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cd(String child, short destination) throws IOException, JSmbGetException, InterruptedException{ child = Util.formatSmbPath(child, false); pwd = browser.cd(child, destination); if(!pwd.endsWith("/")){ pwd = pwd+"/"; } } COM: <s> changes directory on the remote connection </s>
funcom_train/31031292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPWordFields(CPWord pword) { txtPwuser.setText(Utility.getNonNullValue( pword.getPwuser()).toString()); pwdPWword.setText(Utility.getNonNullValue( pword.getPwword()).toString()); pwdConfirmPassword.setText(Utility.getNonNullValue( pword.getPwword()).toString()); txtUsername.setText(Utility.getNonNullValue( pword.getUsername()).toString()); } COM: <s> sets the pword frame field value from the corressponding pword </s>