__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46937997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sceneChange(int[] outpix) { if (gradients == null) gradients = new short[imgWidth * imgHeight]; if (pixelsR == null) pixelsR = new int[imgWidth * imgHeight]; if (pixelsG == null) pixelsG = new int[imgWidth * imgHeight]; if (pixelsB == null) pixelsB = new int[imgWidth * imgHeight]; doubleGradients(outpix, gradients, imgWidth, imgHeight); return sceneChange(gradients, imgWidth, imgHeight); } COM: <s> determine if a scene change </s>
funcom_train/46760119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RecordItemStateModel getRecordItemState(final long recordItemStateId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ClinicalData.getRecordItemState(recordItemStateId, chain, call); }}; return (RecordItemStateModel) call(method, call); } COM: <s> same transaction return the single record item state model for the primary key </s>
funcom_train/1728787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLeaf(Object node) { /* * return false; */ if (node instanceof String) { return false; } File f = ((TreeFile) node).getFile(); if (getTopLevel(f) != -1) { return false; } if (getSubDirs(f).length == 0) { return true; } else { return false; } } COM: <s> a directory is a leaf if it has no subdirectories </s>
funcom_train/13453948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Insets getBorderInsets(Component c, Insets newInsets) { if (newInsets == null) newInsets = new Insets(1, 1, 1, 1); else { newInsets.top = 1; newInsets.left = 1; newInsets.bottom = 1; newInsets.right = 1; } return newInsets; } COM: <s> returns the border insets </s>
funcom_train/29606737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyFileChange() { Iterator lIter = fileChangeListeners.iterator(); while (lIter.hasNext()) { FileChangeListener l = (FileChangeListener) lIter.next(); FileChangeEvent ev = new FileChangeEvent(currentFile); l.fileChanged(ev); } return; } COM: <s> notifies all registered listeners of an update of the current file </s>
funcom_train/39314508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetScrollableTracksViewportHeight() { System.out.println("testGetScrollableTracksViewportHeight"); boolean expected = false; boolean actual = sp.getScrollableTracksViewportHeight(); assertEquals(expected,actual); System.out.println("Done testGetScrollableTracksViewportHeight"); } COM: <s> test of get scrollable tracks viewport height method of class scrollable picture </s>
funcom_train/2882280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String encodedReference(Object ref) throws Exception{ ByteArrayOutputStream os = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(os); oos.writeObject(ref); oos.close(); BASE64Encoder encoder = new BASE64Encoder(); String objRef64enc =encoder.encode(os.toByteArray()); os.flush(); os.close(); return objRef64enc; } COM: <s> encode a remote reference </s>
funcom_train/43370733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(String key) { try { return messages.getString(key); } catch (MissingResourceException e) { logger.warn("No " + messages.getLocale().toString() + " translation found for \"" + key + "\"."); // Do we want to prepend wit MISSING? Maybe just return key return "MISSING: " + key; } } COM: <s> retrieves localisation string </s>
funcom_train/18243048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Chromatogram fetchChromatogram(){ try { // return ChromatogramFacadeFactory // .getChromoatogram(name); return datastore.getChromatogramFacade().getChromoatogram(name); } catch (ChromatogramFacadeException e) { System.out.println("Unexpected failure retrieving chromatogram " + name); e.printStackTrace(); return null; } } COM: <s> fetch the chromatogram from the chromatogram </s>
funcom_train/41640936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PresentationSystem_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PresentationSystem_name_feature", "_UI_PresentationSystem_type"), CfcuiPackage.Literals.PRESENTATION_SYSTEM__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/18349662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTableNameForConcept(Concept concept) { if (concept.getName().length() <= maxTableNameLength && !isReservedWord(concept.getName())) { return concept.getName(); } else { return "c_" + concept.getConceptId(); } } COM: <s> given a concept returns the name of the table in database </s>
funcom_train/50300172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshRow() throws SQLException { if (rowUpdater != null) { rowUpdater.refreshRow(); fbFetcher.updateRow(rowUpdater.getOldRow()); // this is excessive, but we do this to keep the code uniform notifyRowUpdater(); } else throw new FBResultSetNotUpdatableException(); } COM: <s> refreshes the current row with its most recent value in </s>
funcom_train/28292876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setControlModeChoice(boolean iChoice) { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - setChoice"); System.out.println(" ::--> " + iChoice); } mControl_choice = iChoice; if (_Debug) { System.out.println(" :: SeqActivity --> END - setChoice"); } } COM: <s> sets the value of the control mode </s>
funcom_train/22277214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minItemHeight() { int i, count, minHeight, height; ListItem item; minHeight = 0; count = items.size(); for (i = 0; i < count; i++) { item = (ListItem)items.elementAt(i); height = item.minHeight(); if (height > minHeight) minHeight = height; } return minHeight; } COM: <s> returns the largest b min height b of all of the list views </s>
funcom_train/23389894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { executeCompiler(); } catch (CompilerException ce) { System.out.println(ce.getMessage() + "\n"); } catch (Exception e) { if (Debug.stackTracing()) { e.printStackTrace(); } else { System.out.println("ERROR: " + e.getMessage()); } } } COM: <s> the run method </s>
funcom_train/21637395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClientPluginInterface getClientPlugin(Plugin plugin) throws DomainException { try { return (ClientPluginInterface) Class.forName(plugin.getClientPlugin()).newInstance(); } catch (ClassNotFoundException e) { throw new DomainException(e); } catch (IllegalAccessException e) { throw new DomainException(e); } catch (InstantiationException e) { throw new DomainException(e); } } COM: <s> creates instance of client plugin for plug in </s>
funcom_train/36908923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createDefaultAccount(String login) throws DuplicatedIdentifierException, PersistenceException { try { this.accountDAO.getDefaultAccount(login); throw new DuplicatedIdentifierException(); } catch (UnknownEntityException e) { } final String defaultString = "default"; Account defaultAccount = new Account(); defaultAccount.setLogin(login); defaultAccount.setLabel(defaultString); defaultAccount.setAccount(defaultString); defaultAccount.setAgency(defaultString); this.accountDAO.addAccount(defaultAccount); } COM: <s> creates a default account for some user </s>
funcom_train/27829313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { QuoteSelectionPanel pane = new QuoteSelectionPanel(_quotedb); if (JOptionPane .showOptionDialog( _parent, pane, "Import dialog", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, null, null) == JOptionPane.OK_OPTION) { String instrument = pane.getSelectedInstrument(); if (instrument != null){ _engine.setMarketEngine( new ListMarketEngine( _quotedb.getQuotes(instrument), instrument)); } } } COM: <s> changes the instrument </s>
funcom_train/20240509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdExitAlertLogin() { if (cmdExitAlertLogin == null) {//GEN-END:|189-getter|0|189-preInit // write pre-init user code here cmdExitAlertLogin = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|189-getter|1|189-postInit // write post-init user code here }//GEN-BEGIN:|189-getter|2| return cmdExitAlertLogin; } COM: <s> returns an initiliazed instance of cmd exit alert login component </s>
funcom_train/4933296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncProjectModelFromGUI() { project.setProofExplanation(proofExplanationCheck.isSelected()); resultManagement.redirectStandardError(); // Parameter management for each engine project.setEulerArguments(runOptionsManagement.getEulerArguments()); project.setCwmArguments(runOptionsManagement.getCWMarguments()); } COM: <s> todo quick refactoring from run action codd cie but where does this </s>
funcom_train/1549556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doWriteObject(ObjectOutputStream outputStream) throws IOException { // Write the size so we know how many nodes to read back outputStream.writeInt(size()); for (Iterator itr = iterator(); itr.hasNext();) { outputStream.writeObject(itr.next()); } } COM: <s> serializes the data held in this object to the stream specified </s>
funcom_train/6439660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getDisplayIcon() { Icon i = super.getDisplayIcon(); CMPrjSetting setting = CMManager.getPrjSetting(getProject()); if (setting != null) { if (isReadOnly() && setting.isUsingCM()) { return CMManager.getCMIcon(); } } return i; } COM: <s> get icon to be displayed in nodes of this type br </s>
funcom_train/5341419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private static class SimpleListModel extends AbstractListModel { public int getSize() { throw new IllegalStateException(); } public Object getElementAt(int idx) { throw new IllegalStateException(); } public void fireContentsChanged(Object src, int a, int b) { super.fireContentsChanged(src, a, b); } } COM: <s> a simple list model useful for delegating to for action calls </s>
funcom_train/40619413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteEdge(String from, String label, String to) { Iterator<Arc> arcit = itsArcs.iterator(); while(arcit.hasNext()) { Arc arc = arcit.next(); if(getName(arc).equals(label)) { if(getName(arc.getTarget()).equals(to) && getName(arc.getSource()).equals(from)) { removeArc(arc); return; } } } } COM: <s> only needed for debugging </s>
funcom_train/10592034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calibrateLast() throws SAXException { /* * the current round is the last one if (a) there are no remaining * elements, or (b) the next one is beyond the 'end'. */ last = !hasNext() || atEnd() || (end != -1 && (begin + index + step > end)); } COM: <s> sets last appropriately </s>
funcom_train/35607204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRecursiveLabel(int row){ if(pnTxtTask[row].getComponentCount() == 2) // check whether "R" label add in, if there is, then component = 2 else = 1 pnTxtTask[row].remove(1); // 1=label, 0=txtTask since pnTxtTask only consist 2 component } COM: <s> remove label r when task delete or recursive schedule remove </s>
funcom_train/3711191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void goTile() { // if (indices != null && indices.length == 1) { // ManagedSpectrum msp = (ManagedSpectrum)(server.getSpectrumStorage().get (indices[0])); // controller.displayInSecondaryWindow (msp); // } if (indices != null && indices.length > 1) { controller.displayTiles(indices); } } COM: <s> tile selected spectra </s>
funcom_train/19538668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdentityName(String identity) { if (identity == null) { setIdentityImpl(null); } else { Token token = null; ZoneRenderer zr = MapTool.getFrame().getCurrentZoneRenderer(); if (zr != null) token = zr.getZone().getTokenByName(identity); setIdentityImpl(token); // For the name to be used, even if there is no such token identityName = identity; setCharacterLabel("Speaking as: " + getIdentity()); } HTMLFrameFactory.impersonateToken(); } COM: <s> sets the impersonated identity to code identity code which is a token name </s>
funcom_train/15949500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSpecificationPackages(Enumeration values) throws ModelVetoException { Vector lElems = new Vector(); while( values.hasMoreElements() ) { /* 1. fire Vetoable events */ Object lTemp = values.nextElement(); lElems.add(lTemp); fireAssociationAddedVetoable(SpecificationPackageInfo.ASSOCIATIONINFO_SpecificationPackages, (SpecificationPackage)lTemp); }/*while*/ /* 4 Add or change value */ values = lElems.elements(); while( values.hasMoreElements() ) { addSpecificationPackages((SpecificationPackage)values.nextElement()); }/*while*/ } COM: <s> add the value of specification packages </s>
funcom_train/13994684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMenuItems() { addAction(InternalFrame.RESTORE_ACTION); addAction(InternalFrame.MOVE_ACTION); addAction(InternalFrame.RESIZE_ACTION); addAction(InternalFrame.MINIMIZE_ACTION); addAction(InternalFrame.MAXIMIZE_ACTION); addSeparator(); addAction(InternalFrame.CLOSE_ACTION); addSeparator(); addAction(InternalFrame.NEXT_FRAME_ACTION); } COM: <s> initializes the menu items </s>
funcom_train/9785354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public ArrayList getHits(Rectangle rect) { foundHits.clear(); if (rect == null) return foundHits; DrawableIterator it = allDrawableList.getIterator(); while (it.hasNext()) { Drawable d = it.next(); GeoElement geo = d.getGeoElement(); if (geo.isEuclidianVisible() && d.isInside(rect)) { foundHits.add(geo); } } return foundHits; } COM: <s> returns array of geo elements whose visual representation is inside of </s>
funcom_train/26322086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView setActiveTab(HttpServletRequest request, HttpServletResponse response) throws ServletException { PageDefinition responsePage = (PageDefinition) request.getAttribute(WorkflowConstants.RESPONSE_PAGE); String actionName = (String) request.getAttribute(WorkflowConstants.ACTION_NAME); if (responsePage.getName() != actionName) { // resposnePage and actionName are different, so this page is part of the tutorial actionName = "tutorial"; } return new ModelAndView("", "currentTab", actionName); } COM: <s> this method will set the tab that should be highlighted </s>
funcom_train/38392021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getStripperHash() { final int filterSize = getFilters().size(); final Hashtable stripperHash = new Hashtable(filterSize); for (final Enumeration e = getFilters().elements(); e.hasMoreElements();) { LineStripper stripper = (LineStripper) e.nextElement(); stripperHash.put(stripper.getFirst(), stripper.getLast()); } return stripperHash; } COM: <s> gets the filter hash of the filter set </s>
funcom_train/4929771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearListContext() { Storage ctxParams = getRenderContextParams(); if ( ctxParams != null ) { ctxParams.setObject( getFields().makePath( LIST_OPTIONS ), null ); ctxParams.setObject( getFields().makePath( OPTION_EXCEPTION ), null ); ctxParams.setObject( getFields().makePath( DEFAULT ), null ); } } COM: <s> clears any information stored regarding the current list which should </s>
funcom_train/21437857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildName() throws ResourcesDbException { this.getBasetype().buildName(); GlycoCTExporter msdbexp = new GlycoCTExporter(GlycanNamescheme.MONOSACCHARIDEDB, this.getConfig(), this.getTemplateContainer()); this.setName(msdbexp.export(this)); } COM: <s> generate the monosaccharide db name of this monosaccharide object </s>
funcom_train/37071244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { try { checkDatabaseConstraints(); boolean old_obsolete_value = StringUtils.isTrue(getAttribute("is_obsolete")); // String old_replaced_by = getAttribute("replaced_by"); if (set_obsolete && ! old_obsolete_value) { doArticleObsoletion(); } else if (! set_obsolete && old_obsolete_value) { doArticleUnobsoletion(); } } catch (SQLException e) { throw new RuntimeException(e); } } COM: <s> either obsoletes or unobsoletes an article </s>
funcom_train/50080786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IMolecule getAsCDKMoleculeWithoutH(Connection dbconn) throws IOException, ClassNotFoundException, Exception { if (cdkMoleculeWithoutHs == null) { cdkMoleculeWithoutHs = getAsCDKMolecule(getMoleculeId(),dbconn); cdkMoleculeWithoutHs = (IMolecule)AtomContainerManipulator.removeHydrogens(getAsCDKMolecule(1,dbconn)); } return (cdkMoleculeWithoutHs); } COM: <s> gets this molecule as a cdk molecule object without the hs </s>
funcom_train/5854325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public Events getLastNWithMatchingMetadata(int n, Metadata metadata) { Events events = new Events(); HistoryItem thisHI; Event e; // Test bounds on this for loop. for (int i=history_items.size()-1, j=0; i>=0 && j<n; i--, j++) { thisHI = (HistoryItem) history_items.get(i); e = thisHI.event; if (e.doesMetadataMatch(metadata)) events.add(e); } return events; } COM: <s> get last n events with metadata exactly matching the given metadata items </s>
funcom_train/20881251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deSelectTie(int Ausgang) { if (Ausgang >= 1 && Ausgang <= matrixCountPorts) { // Generate Output-String return "0*" + Ausgang + "!"; } else { log.krit("CorssPoint: Input or output value is out of range(0.." + matrixCountPorts); return ""; } } // end deSelectTie COM: <s> deletes the connection from an input to an output </s>
funcom_train/15615891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Document buildResponseHeader(Result result) { Element rootElement = new Element("syracuse-result"); Document document = new Document(rootElement); rootElement.addContent(new Element("error-code").setText(Integer.toString(result.getErrorCode().ordinal()))); rootElement.addContent(new Element("message").setText(result.getMessage())); return document; } COM: <s> creates the generic part of the xml document </s>
funcom_train/29007083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dateAddWeeks(String strDate, int intNumberToAdd) { AmLog.pushMethodName(this, "dateAddWeeks"); String w_SL_DATE_OUTPUT = " "; w_SL_DATE_OUTPUT = dateAddDays(strDate, (intNumberToAdd * 7)); AmLog.popMethodName(); return w_SL_DATE_OUTPUT; } //end of dateAddWeeks COM: <s> this method add the number of weeks to the given date and returns </s>
funcom_train/51625401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadImages() throws IOException { InputStream urlStream; loader = new ImageLoader(); urlStream = ProgressManagerUtil.getProgressSpinnerLocation() .openStream(); final ImageData[] imageDataArray = loader.load(urlStream); images = new Image[imageDataArray.length]; for (int i = 0; i < imageDataArray.length; i++) { images[i] = new Image(getDisplay(), imageDataArray[i]); } urlStream.close(); } COM: <s> load the images from the loader </s>
funcom_train/39545052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireDOMSubtreeModifiedEvent() { AbstractDocument doc = getCurrentDocument(); if (doc.getEventsEnabled()) { DocumentEvent de = (DocumentEvent)doc; MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents"); ev.initMutationEvent("DOMSubtreeModified", true, // canBubbleArg false, // cancelableArg null, // relatedNodeArg null, // prevValueArg null, // newValueArg null, // attrNameArg MutationEvent.MODIFICATION); dispatchEvent(ev); } } COM: <s> fires a domsubtree modified event </s>
funcom_train/16951885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClusterStrategy setStrategy(ClusterStrategy newStrategy){ ClusterStrategy oldStrategy = this.strategy; this.strategy = newStrategy; if(DEBUG && DBUG_LVL >= MEDIUM) logger.logInfo("Replacing old strategy: \"" + oldStrategy.describe() + "\" with :\"" + newStrategy.describe()); return oldStrategy; } COM: <s> set the strategy for this cluster manager </s>
funcom_train/12167931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProjectContainerReader() throws Exception { String name = "mcs-project.xml"; String sourceXML = resourceLoader.getResourceAsString(name); Reader reader = new CharArrayReader(sourceXML.toCharArray()); ProjectConfigurationReader projectReader = new ProjectConfigurationReader(); String expectedLocation = name; RuntimeProjectConfiguration configuration = projectReader.readProject(reader, expectedLocation); checkConfiguration(configuration, expectedLocation); } COM: <s> test that the project configuration reader can correctly read a project </s>
funcom_train/10914727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endPageGroup() throws IOException { if (currentPageGroup != null) { currentPageGroup.endPageGroup(); tleSequence = currentPageGroup.getTleSequence(); document.addPageGroup(currentPageGroup); currentPageGroup = null; } document.writeToStream(outputStream); //Flush objects } COM: <s> helper method to mark the end of the page group </s>
funcom_train/46165103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Remember the starting time long tm = System.currentTimeMillis(); while (Thread.currentThread() == animator) { // Update the scene director.updateScene(foregroundCanvas.getMouseCoordinateX(), foregroundCanvas.getMouseCoordinateY()); // Delay for a while try { tm += delay; Thread.sleep(Math.max(delay, tm - System.currentTimeMillis())); } catch (InterruptedException e) { break; } } } COM: <s> controls the animation speed and sends calls to the director to update </s>
funcom_train/22498420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(final Graphics g) { if (pic != null) { int dWidth = pic.getIconWidth(); int dHeight = pic.getIconHeight(); final int scale = getScale(); dWidth = dWidth * scale / 100; dHeight = dHeight * scale / 100; g.drawImage(pic.getImage(), 0, 0, dWidth, dHeight, this); } } COM: <s> paints this component </s>
funcom_train/7981126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAppendLong() { buf.append((long)1); assertEquals("buffer is '1'", "1", buf.toString()); buf.append((long)234); assertEquals("buffer is '1234'", "1234", buf.toString()); } COM: <s> check that append long works </s>
funcom_train/11011218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFunction( String name, String clazzName ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { Class clazzInst = Class.forName( clazzName ) ; Object newInst = clazzInst.newInstance() ; if( newInst instanceof FreeRefFunction ) { addFunction( name, (FreeRefFunction)newInst ) ; } } COM: <s> used to add a udf to the evaluator </s>
funcom_train/46487835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNomina() throws Exception { System.out.println("nomina"); FichaMatricula nomina = fichasDao.getAll().get(0); File dirDestino = new File("d:/temp/nominas"); dirDestino.mkdirs(); instance.nomina(nomina, dirDestino); } COM: <s> test of nomina method of class ebadat </s>
funcom_train/49095916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endGame() { if (!SimpleBoard.getIsNetGame()) { String message = ""; if (IvoCheckers.getGame().gameHasBeenWon() == 1) { message = "Dark player wins!"; } else if (IvoCheckers.getGame().gameHasBeenWon() == 2) { message = "Light player wins!"; } else { message = "ERROR!"; } JOptionPane.showMessageDialog( null, message, "Game Over!", JOptionPane.INFORMATION_MESSAGE); } } COM: <s> ends the current game </s>
funcom_train/22359707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeAttributes(Addeable addeable) throws IOException { if (addeable == null || addeable.getAttributeSize() <= 0) return; write("ATTRIBUTES"); newLine(); List<String> keys = addeable.getAttributeKeys(); for (String key : keys) { String value = addeable.getAttribute(key); writeQuotedTag(value, key); } } COM: <s> writes all attributes to the stream </s>
funcom_train/16785500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel11() { if (jPanel11 == null) { jLabel9 = new JLabel(); jLabel9.setText("hostport: "); jLabel9.setForeground(Color.GRAY); jPanel11 = new JPanel(); jPanel11.setLayout(new BorderLayout()); jPanel11.add(jLabel9, BorderLayout.WEST); jPanel11.add(getJTextField4(), BorderLayout.CENTER); getJTextField4().setEnabled(false); } return jPanel11; } COM: <s> this method initializes j panel11 </s>
funcom_train/2451739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MCodeWriter queue(Comment comment) { if (comment != null) { comment.setText(comment.getText() + " >> see (ln,col) (" + this.lineNo + ", " + this.colNo + ")"); this.queue.add(comment); this.hasQueue = true; } return this; } COM: <s> this method allows those codeable objects to inject a comment without </s>
funcom_train/16711528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRequiredMethod() { final int parameterCount = getParameters().size(); // TODO : Additional logic to assign a no-parameter method as being required or otherwise if (parameterCount == 0) return false; int requiredParameterCount = 0; for (final ApplicationInterfaceMethodParameter parameter : getParameters()) { if (parameter.isRequiredParameter()) requiredParameterCount++; } return (parameterCount == requiredParameterCount); } COM: <s> determine if the method is required or otherwise </s>
funcom_train/20845930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSchemaInternal(String schemaIdentifier) { for (int i = 0; i < AVAILABLE_PROTOCOLS.length; i++) { if ((AVAILABLE_PROTOCOLS[i][0] != null) && (AVAILABLE_PROTOCOLS[i][0]).equalsIgnoreCase(schemaIdentifier)) { protocolNum = i; if (AVAILABLE_PROTOCOLS[i][1] != null) { defaultPort = Integer.parseInt(AVAILABLE_PROTOCOLS[i][1]); } return; } } } COM: <s> check schema identifier for default port </s>
funcom_train/41856928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MmiUri copyWithExtension(String newExtension) throws URISyntaxException { if ( newExtension == null || newExtension.indexOf('/') >= 0 ) { throw new URISyntaxException(newExtension, "newExtension is null or contains a slash"); } return new MmiUri(untilRoot, authority, version, topic, term, newExtension); } COM: <s> makes a clone except for the given extension </s>
funcom_train/22593573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasOptimus(FitnessCalculator fitnessCalculator) { int pos = 0; GeneticNode tree; if (optimusFound != null) return true; for (double fit : treesFitness) { if (fit == -1.0) { //if fitness was not calculated calculate fit = getFitness( fitnessCalculator, trees.get(pos)); } //return true if it is an optimus if (fit == 1.0) { optimusFound = trees.get(pos); return true; } pos++; } return false; } COM: <s> returns if population has or not optimus </s>
funcom_train/25442665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDatabaseName(int index, String name) { checkRunning(false); printWithThread("setDatabaseName(" + index + "," + name + ")"); serverProperties.setProperty(ServerConstants.SC_KEY_DBNAME + "." + index, name); } COM: <s> sets the external name url alias of the ith hosted database </s>
funcom_train/2408366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldUserName() { if (jTextFieldUserName == null) { jTextFieldUserName = new JTextField(); jTextFieldUserName.setBounds(new java.awt.Rectangle(140, 30, 100, 22)); jTextFieldUserName.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 14)); } return jTextFieldUserName; } COM: <s> this method initializes j text field user name </s>
funcom_train/26474994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Identifier getAttributeForColumn(Identifier attr) { String attr0, attr1; Identifier tableAttr = this.table.getRowsAttribute(); int depth = tableAttr.getDepth(); if (depth < attr.getDepth()) { int idx = 0; for (; idx < depth; idx++) { attr0 = attr.getName(idx); attr1 = attr.getName(idx); if (!attr0.equals(attr1)) return attr; } return attr.getSubpart(idx); } return attr; } COM: <s> gets the code identifier code for this code column code </s>
funcom_train/43279075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateUI() { synchronized (libraryModel) { LOGGER.debug("Updating Service Libary UI..."); treeCustomization.update(); Display.getDefault().asyncExec(new Runnable() { public void run() { if (!modelTree.isDisposed()) { modelTree.getTreeViewer().refresh(true); // if (updateStates) { // throw the selection event modelTree.getTreeViewer().fireSelectionChanged(); // } } } }); } } COM: <s> update the ui </s>
funcom_train/18656876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unmergeToolBar(JToolBar ActiveFrameToolBar){ for(Iterator Pos=this.MovedToolbarComponents.iterator();Pos.hasNext();ActiveFrameToolBar.add((JComponent)Pos.next())); this.MovedToolbarComponents.removeAllElements(); this.MainToolBar.updateUI(); } COM: <s> reverse the effect of the previous merge tool bar operation </s>
funcom_train/26317642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore() { if (typeName == null) { typeName = type.getName(); } else { type = EquipmentType.get(typeName); } if (type == null) { System.err.println("Mounted.restore: could not restore equipment type \"" + typeName + "\""); } } COM: <s> restores the equipment from the name </s>
funcom_train/32987570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSpectrumIds() throws TorqueException { List v = selectSpectra(); StringBuffer result = new StringBuffer(); for (int i = 0; i < v.size(); i++) { result.append(((DBSpectrum) v.get(i)).getSpectrumId() + ";"); } return (GeneralUtils.removeLastComma(result).toString()); } COM: <s> gets a string with the ids of all valid spectra of this molecule </s>
funcom_train/21105718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJCheckBox getChBS_User() { if (chBS_User == null) { chBS_User = new MJCheckBox(); chBS_User.setText("User:"); chBS_User.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); } return chBS_User; } COM: <s> this method initializes ch bs user </s>
funcom_train/33012042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean stream(int buffer) { try { int bytesRead = oggInputStream.read(dataBuffer, 0, dataBuffer .capacity()); if (bytesRead >= 0) { dataBuffer.rewind(); boolean mono = (oggInputStream.getFormat() == OggInputStream.FORMAT_MONO16); int format = (mono ? AL.AL_FORMAT_MONO16 : AL.AL_FORMAT_STEREO16); al.alBufferData(buffer, format, dataBuffer, bytesRead, oggInputStream.getRate()); check(); return true; } } catch (IOException e) { e.printStackTrace(); } return false; } COM: <s> reloads a buffer </s>
funcom_train/25870411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void credit(int userAccountNumber, double amount) { double availableBalance = getBalanceAfterCredit(userAccountNumber, amount); //insert Transaction info TransactionVO transaction = new TransactionVO(userAccountNumber, TransactionVO.DEPOSIT_TYPE, amount, availableBalance, ATMUtils.getCurrentDateTime()); insertTransaction(transaction); } COM: <s> deposit credit an amount to account with specified account number </s>
funcom_train/34569080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActionList(ActionDef[] list) throws ModuleException{ if (list != null) { for (ActionDef action:list) { // if (actionList.containsKey(action.getName())) { // ServerLogger.warn("The Action "+action.getName()+" exists. Verify your definition file.",logger); // } actionList.put(action.getName(),action); // else { // actionList.put(action.getName(),action); // } } } } COM: <s> setting the action list </s>
funcom_train/34899348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Access create(User user, int permission, ATAQSProject proj) throws DAOException{ Access acc = null; try{ begin(); acc = new Access(user, permission, proj); s.save(acc); commit(); close(); } catch (HibernateException e) { rollback(); throw new DAOException("Could not create access for user: " + user.toString() + "Permissions: " + permission,e); } return acc; } COM: <s> create an access object </s>
funcom_train/2763917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePreset(ConnectionPreset preset) { if (preset == null || !presets.contains(preset)) { return; } int oldLastIdx = presets.size()-1; presets.remove(preset); ConnectionPreset newPreset = null; ConnectionPreset oldPreset = currentPreset; if (presets.size() > 0) { newPreset = presets.get(presets.size()-1); } this.currentPreset = newPreset; firePropertyChanged(CURRENT_PRESET_PROPERTY, oldPreset, newPreset); fireIntervalRemoved(presets.size()-1, oldLastIdx); } COM: <s> removes a connection from the preset model </s>
funcom_train/21437310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics2D g2d, Residue node, boolean selected, boolean on_border, Rectangle par_bbox, Rectangle cur_bbox, Rectangle sup_bbox, ResAngle orientation) { paint(g2d,node,selected,true,on_border,par_bbox,cur_bbox,sup_bbox,orientation); } COM: <s> draw a residue on a graphic context using the specified </s>
funcom_train/35721235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireInputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) { List listener= fTextInputListeners; if (listener != null) { for (int i= 0; i < listener.size(); i++) { ITextInputListener l= (ITextInputListener) listener.get(i); l.inputDocumentAboutToBeChanged(oldInput, newInput); } } } COM: <s> informs all registered text input listeners about the forthcoming input change </s>
funcom_train/20100582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void autoLogin(Long userId) { // try { // User user = userManager.get(userId); // // UserSessionASO userSessionASO = new UserSessionASO(); // userSessionASO.setUser(user); //// loginService.login(user); // _logger.info(user.getUsername() + " has been auto-logged-in."); // // _sessionStateManager.set(UserSessionASO.class, userSessionASO); // } // catch (Exception e) { // throw new IllegalStateException(e); // } } COM: <s> automatically logs you in as the given user </s>
funcom_train/48959858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public Errors link(TrackerUser user, DefaultIssue linkedIssue, Link type) { if ((linkedIssue != null) && (type != null)) { if (addLink(new Interlink(this, linkedIssue, type))) { createActivity(ActivityType.ISSUE_LINK, user); return null; } return Errors.ISSUE_LINK_EXISTED; } return Errors.MISSING_INFO; } COM: <s> adds the link to the collection if able </s>
funcom_train/42291428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getLerQRCodeButton() { if (lerQRCodeButton == null) { lerQRCodeButton = new JButton(); lerQRCodeButton.setText(LER_CODIGO); lerQRCodeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { lerQRCodeButton.setEnabled(false); Thread worker = new Thread() { public void run() { controller.leQRCode(); } }; worker.start(); } }); } return lerQRCodeButton; } COM: <s> this method initializes ler codigo button </s>
funcom_train/29962788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSelectedElement() { if ( this.getSelectionMode() == MULTIPLE_SELECTION ) throw new UnsupportedOperationException("getSelectedElement cannot be used on an enumeration with use multiple selection"); String[] selections = this.getSelectedElements(); String selection = null; if ( selections != null ) { if ( selections.length >= 1 ) { selection = selections[0]; } } return selection; } COM: <s> return the selected element or null if no selection has been found </s>
funcom_train/7595431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fieldChanged(BigInteger parentId, K oldkey, K newkey) throws KeyAlreadyInIndexException { if (containsKey(newkey)) throw new KeyAlreadyInIndexException("Cannot change value from "+oldkey+" to "+newkey+" as "+newkey+" already in Index"); V value = remove(oldkey); put( newkey, value); } COM: <s> the listener for field changed events which updates this index </s>
funcom_train/3596664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintTimeMarker(Graphics g) { int width = getWidth()-2; int pos = (int)((double)(width-1)*currentTime/maxTime); Rectangle rect = new Rectangle(pos,1,0,getHeight()-3); g.setColor(Color.BLACK); g.drawRect(rect.x,rect.y,rect.width,rect.height); } COM: <s> p paints a black line at the current time </s>
funcom_train/3839950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void roomOpened(RoomInformation ri) { int i; String player; /* Updating lists. */ player = ri.getCreator(); _inGameUsers.add(player); _hallUsers.remove(player); for (i = 0; i < _hallUsers.size(); i++) { player = _hallUsers.elementAt(i); _playername_clientchannel.get(player) .sendHallRoomOpening(ri); } _nlogger.debug("A new room was created: " + ri.getName()); } COM: <s> sends a notification to hall users that a new room has been created </s>
funcom_train/31679381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLObjectWriter setOutput(Writer out) throws XMLStreamException { if ((_outputStream != null) || (_writer != null)) throw new IllegalStateException("Writer not closed or reset"); _xml._writer.setOutput(out); _writer = out; _xml._writer.writeStartDocument(); return this; } COM: <s> sets the output writer for this xml object writer </s>
funcom_train/18965744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(BitSet other) { int pos = Math.min(myNumWords, other.getNumWords()); long[] thisArr = myBits; long[] otherArr = other.getBits(); while (--pos >= 0) { if ((thisArr[pos] & otherArr[pos]) != 0) { return true; } } return false; } COM: <s> returns true if the sets have any elements in common </s>
funcom_train/45644028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initAlphabetComposites() { AbstractAlphabet[] alphas = AlphabetsManager.getInstance().getAlphabets(); for (int i=0; i < alphas.length; i++) { alphabetCombo.add(alphas[i].getName()); if (alphas[i].isDefaultAlphabet()) { alphabetCombo.setText(alphas[i].getName()); } } filterCheckBox.setSelection(AlphabetsPlugin.getDefault().getFilterChars()); filter = filterCheckBox.getSelection(); } COM: <s> initializes the alphabet composites </s>
funcom_train/46077515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumWalkabouts(int num) { Sprite[] res = new Sprite[num]; int count = 0; //Copy old walkabouts if (walkabouts != null) { for (; count<walkabouts.length && count<num; count++) { res[count] = walkabouts[count]; } } //Init new sprites for (; count<num; count++) { res[count] = new Sprite(count); } walkabouts = res; } COM: <s> resizes the walkabouts array keeping old entries </s>
funcom_train/5804900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void checkHost(Event e) throws InsufficientInformationException { if (e == null) { throw new NullPointerException("e is null"); } if (e.getHost() == null || e.getHost().length() == 0) { throw new InsufficientInformationException("host for event is unavailable"); } } COM: <s> ensures the given event has a host </s>
funcom_train/4231034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); if (shape == SHAPE_CIRCLE) { d.width += d.width / 8; d.height += d.height / 2; } else if (shape == SHAPE_ROUNDED) d.width += d.height / 5; else if (isRichText) { textPane.setSize(ZERO_DIMENSION); return textPane.getPreferredSize(); } else if (valueComponent != null) return valueComponent.getPreferredSize(); return d; } COM: <s> overrides the parents implementation to return a slightly larger </s>
funcom_train/32757170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PersistentStore loadArchiveConfiguration() { final URL configurationURL = getClass().getResource( "resources/archiveConfiguration.xml" ); final DataAdaptor configurationAdaptor = XmlDataAdaptor.adaptorForUrl( configurationURL, false ).childAdaptor( "ArchiveConfiguration" ); final DataAdaptor persistentStoreAdaptor = configurationAdaptor.childAdaptor( "PersistentStore" ); return new PersistentStore( persistentStoreAdaptor ); } COM: <s> load the archive configuration file </s>
funcom_train/647492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeGeneByIdentity(Gene gene) { int size = size(); if (size < 1) { return false; } else { for (int i = 0; i < size; i++) { if (geneAt(i) == gene) { m_genes.remove(i); return true; } } } return false; } COM: <s> removes the given gene from the collection of genes </s>
funcom_train/783328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHandler(Handler handler) { // Anonymous loggers can always remove handlers if (this.isNamed) { LogManager.getLogManager().checkAccess(); } if (null == handler) { return; } initHandler(); synchronized (this) { this.handlers.remove(handler); } } COM: <s> removes a handler for this logger </s>
funcom_train/11708833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Node getFirstChildByName(Node node, String name) { NodeList children = node.getChildNodes(); for (int c = 0; c < children.getLength(); ++c) { Node n = children.item(c); if (n.getNodeName().equals(name)) return n; } return null; } COM: <s> gets the first child with a given name </s>
funcom_train/45863925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(int maxLaps, int mapIdx, int playerIdx) { playerLaps[2] = timerGlyph[maxLaps]; playerLapsLine.setGlyphs(playerLaps, 0, 3); this.maxLaps = maxLaps; playerTMapLine.set((char) (FIRST_MAP_ICON + mapIdx)); this.playerIdx = playerIdx; } COM: <s> initialises the hud for a new race </s>
funcom_train/49267237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateTour(){ // pd = ProgressDialog.show(this, "Working..", getString(R.string.generate_tour), true, false); // Thread thread = new Thread(this); // thread.start(); //handler.sendEmptyMessage(0); sysC.generateTour(myCurrentPosition, 7); drawTour(); } COM: <s> p trigger the generate tour method in the system controller p </s>
funcom_train/36060333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSorts(QueryData qd) { Expression[] orderBys = qd.compilation.getExprOrdering(); if (orderBys == null) { return; } for (Expression expr : orderBys) { Query.SortDirection dir = getSortDirection((OrderExpression) expr); String sortProp = getSortProperty(qd, expr); qd.primaryDatastoreQuery.addSort(sortProp, dir); } } COM: <s> adds sorts to the given </s>
funcom_train/43245075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSponsorTypeOptions() throws Exception { System.out.println("getSponsorTypeOptions"); String securitytoken = secToken; org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl(); String[] expResult = null; String[] result = instance.getSponsorTypeOptions(securitytoken); assertTrue(result.length>0); } COM: <s> test of get sponsor type options method of class org </s>
funcom_train/43886879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTileWidth(final int imageIndex) throws IOException { if (!isInitialized) initialize(); final SubDatasetInfo sdInfo = sourceStructure .getSubDatasetInfo(retrieveSubDatasetIndex(imageIndex)); final long[] chunkSize = sdInfo.getChunkSize(); // TODO: Change this behavior if (chunkSize != null) { final int rank = sdInfo.getRank(); return (int) chunkSize[rank - 2]; } else return Math.min(512, sdInfo.getWidth()); } COM: <s> returns the width of a tile in the given image </s>
funcom_train/36670676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String join(ArrayList<String> strings,String separator){ String output = ""; int i; for(i = 0; i < strings.size(); i++){ output += strings.get(i); if(i != strings.size() - 1){ output += separator; } } return output; } COM: <s> joins a list of strings with the specified separator </s>
funcom_train/12075614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupState(Component component, boolean isSelected, boolean cellHasFocus) { state=Style.ALL; if (cellHasFocus) { state |= Style.FOCUSED; } else if ( component!=null && !component.isFocusable()) { // can be DISABLED only if not FOCUSED state |= Style.DISABLED; } if (isSelected) { state |= Style.SELECTED; } } COM: <s> use this if this component is a renderer </s>
funcom_train/1491096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HSSFCell getCell(HSSFSheet sheet, int row, int col) { HSSFRow sheetRow = sheet.getRow(row); if (sheetRow == null) { sheetRow = sheet.createRow(row); } HSSFCell cell = sheetRow.getCell((short) col); if (cell == null) { cell = sheetRow.createCell((short) col); } return cell; } COM: <s> gets a cell at the specified row and column </s>
funcom_train/43572814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { switch (((Annotated) this.getUserObject()).getStructureType()) { case Structure.ATTRIBUTE: return ((AttributeDecl) this.getUserObject()).getName(); case Structure.ELEMENT: return ((ElementDecl) this.getUserObject()).getName(); case Structure.GROUP: return choiceToString((Group) this.getUserObject()); default: return ((Annotated) this.getUserObject()).toString(); } } COM: <s> return the either the name of the element or attribute represented by </s>