__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24078116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lower(T element) { checkNotNull(element); final Integer oldRank = m_ranks.get(element); if (oldRank == null) { throw new IllegalStateException("Unknown object."); } final int oldR = oldRank.intValue(); checkState(oldR != m_byRanks.size(), "Can't lower object already at lowest rank."); put(element, oldR + 1); } COM: <s> lowers the given element by one rank </s>
funcom_train/22579423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getRemovedInterfaces(long devID) { Vector devIfs = null; String sqlString = null; // Create the SQL statement string to retrieve all removed DeviceInterface records. sqlString = new String ("SELECT * FROM "+I_TBL_NAME + " WHERE deviceID="+devID+" AND removed='true'"); System.out.println("\nDbDeviceInterface.getRemovedInterfaces:\n sqlString = "+sqlString); return getRecords(sqlString); } COM: <s> retrieve all the removed device interfaces for a specific device </s>
funcom_train/44157211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initPaths() throws MojoExecutionException { // rootSourceDirectory checks Assert.isTrue(rootSourceDirectory != null && rootSourceDirectory.isDirectory() && rootSourceDirectory.canRead(), "Given root source directory must be a readable directory!"); try { m_rootSourceDirectoryString = rootSourceDirectory.getCanonicalPath(); } catch (IOException e) { throw new MojoExecutionException( "Could not get canonical path for rootSourceDirectory."); } // targetDirectory checks Assert.notNull(targetDirectory, "No target directory given!"); targetDirectory.mkdirs(); } COM: <s> initializes the the paths </s>
funcom_train/18237789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkDatastoreDescriptionLabel(final String dataStoreDescription, LoginWindow loginWindow) throws ComponentNotFoundException, MultipleComponentsFoundException { getFinder().find(loginWindow, new Matcher() { public boolean matches(Component c) { return c.getClass().equals(JLabel.class) && dataStoreDescription.equals(((JLabel)c).getText()); } }); } COM: <s> finds the code jlabel code object that </s>
funcom_train/27779798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeDoc(long uid) { synchronized (array) { try { Object o = elementAt(uid); if (o instanceof DELETED) { return false; } del++; array.set((int) uid, new DELETED(o)); return true; } catch (ArrayIndexOutOfBoundsException x) { logger.log(Level.WARNING, "removeDoc in memory", x); return false; } } } COM: <s> remove the document with the given id from this data structure </s>
funcom_train/21935435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertFile(IFile selectedFile, IFolder destFolder, IProgressMonitor monitor) throws CoreException, IOException { if (!destFolder.exists()) { destFolder.create(false, true, monitor); } if (selectedFile.getName().endsWith(("aat"))) { convertAatFile(selectedFile, destFolder, outFileExtension); } else { //Do not process file. throw new ResourceNotCubicFileException(); } } COM: <s> starts the conversion of a file </s>
funcom_train/26492342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dumpLinks(int pid, int depth) { // Get the links Vector vLinks = getAllLinks(pid); // Write them! for (Enumeration eLinks = vLinks.elements(); eLinks.hasMoreElements(); ) { ObjectCrossLink currentLink = (ObjectCrossLink)eLinks.nextElement(); outputLink(currentLink, depth); } } COM: <s> dump the links in a given cat </s>
funcom_train/31357305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void broadcastMessage(String message, String nickname, String channel, String type) { event.send("SEND", "CHAT" + channel, 3, "SEND MESSAGE", new XMLObject[] { XMLFactory.createData("MESSAGE", message), XMLFactory.createData("NICKNAME", nickname), XMLFactory.createData("MESSAGE_TYPE", type)}); } COM: <s> broadcasts a message of the specified type </s>
funcom_train/37508232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTextImageHeight() { if (m_textImageHeight == null) { m_textImageHeight = new JTextField(); m_textImageHeight.setPreferredSize(new Dimension(50, m_textImageHeight.getPreferredSize().height)); } return m_textImageHeight; } COM: <s> returns the textfield for the image height </s>
funcom_train/101902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setFieldValidateButtons(JTextField field) { field.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { // hello stupid bug.. this isn't used on JTextFields for some awful reason } public void removeUpdate(DocumentEvent e) { validateForm(); } public void insertUpdate(DocumentEvent e) { validateForm(); } }); } COM: <s> makes this jtext field call our validate buttons method </s>
funcom_train/9890477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateText() { Set<Task> selected = SelectionHelper.getSelectedObjects(getSelectionProvider().getSelection(), Task.class); boolean finish = shallFinish(selected); String tooltip = Resources.getDefaultBundle().getString(finish ? TOOLTIP_FINISHED : TOOLTIP_NOT_FINISHED); String name = Resources.getDefaultBundle().getString(finish ? NAME_FINISHED : NAME_NOT_FINISHED); setText(name); setToolTipText(tooltip); } COM: <s> sets the action text depending on the current selection </s>
funcom_train/12225946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshFolderCombo(String location) { index.removeAllElements(); watchedFolders.removeAllItems(); for (int i = 0; i < watcherList.size(); i++) { if (location.equalsIgnoreCase(watcherList.get(i).getDirectoryLocation().substring(0, watcherList.get(i).getDirectoryLocation().lastIndexOf('/')))) { index.add(i); watchedFolders.addItem(watcherList.get(i).getTitleOfAnime()); } } } COM: <s> this method repopulates the folders combobox </s>
funcom_train/3413691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(E e) { typeCheck(e); int eOrdinal = e.ordinal(); int eWordNum = eOrdinal >>> 6; long oldElements = elements[eWordNum]; elements[eWordNum] |= (1L << eOrdinal); boolean result = (elements[eWordNum] != oldElements); if (result) size++; return result; } COM: <s> adds the specified element to this set if it is not already present </s>
funcom_train/32068651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addEmailMessageAttachment(EmailMessageAttachment emailMessageAttachment) { boolean addOk = getEmailMessageAttachments().add(emailMessageAttachment); if (addOk) { emailMessageAttachment.setEmailMessage((EmailMessage)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed email message attachment to the email message collection </s>
funcom_train/38543126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLayerAt(int position) { if ((position >= 0) && (position < this.layers.size())) { TableColorModel layer = (TableColorModel) this.layers .elementAt(position); layer.removeTableColorModelListener(this.layersListener); synchronized (this.layers) { this.layers.removeElementAt(position); } } } COM: <s> enables to remove the layer at a given depth from the model </s>
funcom_train/46378017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ContentCollection getUserRoot() { ContentRepositoryRegistry reg = ContentRepositoryRegistry.getInstance(); ContentRepository repo = reg.getRepository(loginInfo); try { return repo.getUserRoot(); } catch (ContentRepositoryException excp) { LOGGER.log(Level.WARNING, "Unable to find repository root", excp); return null; } } COM: <s> returns the content repository root for the current user or null upon </s>
funcom_train/44146098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDirectivesSwitch() throws IOException, DocumentTemplateException { File templateFile = getTestFile("textinput-directives-switch-template.odt"); Map model = new HashMap(); model.put("option", "2"); String actual = processTemplate(templateFile, model); assertEquals("output content", "Two", actual); } COM: <s> input fields for directive switch p </s>
funcom_train/33515799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Get addColumn(byte [] family, byte [] qualifier) { NavigableSet<byte []> set = familyMap.get(family); if(set == null) { set = new TreeSet<byte []>(Bytes.BYTES_COMPARATOR); } set.add(qualifier); familyMap.put(family, set); return this; } COM: <s> get the column from the specific family with the specified qualifier </s>
funcom_train/17576518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getOptionsMenu() { if (optionsMenu == null) { optionsMenu = new JMenu(); optionsMenu.setText("Options"); optionsMenu.add(getRepeatMenuItem()); optionsMenu.add(getMailCheckMenuItem()); optionsMenu.add(getSendMailMenuItem()); optionsMenu.add(new JSeparator()); optionsMenu.add(getLookAndFeelMenuItem()); // optionsMenu.add(new JSeparator()); optionsMenu.add(getShowConsoleMenuItem()); optionsMenu.add(getCheckMailMenuItem()); } return optionsMenu; } COM: <s> this method initializes j menu run </s>
funcom_train/42707803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getChecksum() { KlangProgressWindow prog = new KlangProgressWindow(parent); prog.calculateChecksumFor(parent.getCurrentChunk()); if (!(prog.getErrMsg().equals(""))) { JOptionPane.showMessageDialog(this, prog.getErrMsg(), KlangConstants.ERROR_TITLE, JOptionPane.ERROR_MESSAGE); } updatePanel(); } COM: <s> helper method to calculate checksums for a chunk </s>
funcom_train/18835101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAccounts(AccountOwner owner) throws DBException { Collection<GridBankAccount> c = accounts.values(); boolean errors = false; for(GridBankAccount gba : c) { if (gba.getAccountOwnerId().equals(owner.getOwnerId())) { owner.addAccount(gba); } } if (errors) { throw new DBException("Could not add one or more accounts to the " + "AccountOwner. Result should be checked."); } } COM: <s> adds the accounts from the store to the account owner </s>
funcom_train/15680383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCurrentFile(IThread t) { try { Object o = t.getLaunch().getSourceLocator().getSourceElement(t.getTopStackFrame()); if (o instanceof IFile) { return ((IFile) o).getLocation().toOSString(); } } catch (DebugException e) { LaunchUIPlugin.errorDialog(LaunchingMessages.JniDebugEventListener_error_2, e); } return null; } COM: <s> get the file of the top stack frame of a thread </s>
funcom_train/15416488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConnectionProcessor getRequestProcessor(String serviceKey) throws IOException { ConnectionProcessor handler = (ConnectionProcessor) processorMap.get(serviceKey); if (handler == null) { synchronized (processorMap) { handler = (ConnectionProcessor) processorMap.get(serviceKey); if (handler == null) { handler = createRequestHandler(serviceKey); processorMap.put(serviceKey, handler); } } } return handler; } COM: <s> gets a given service request handler based on the service key </s>
funcom_train/10499891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { if (isReference()) { return ((Archives) getCheckedRef()).size(); } dieOnCircularReference(); int total = 0; for (Iterator i = grabArchives(); i.hasNext(); ) { total += ((ResourceCollection) i.next()).size(); } return total; } COM: <s> sums the sizes of nested archives </s>
funcom_train/648287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { IOException x = null; while (stream != null || data != null || client != null) try { InputStream i; FtpDataSocket d; Ftp c; if (stream != null) { i = stream; stream = null; i.close(); } if (data != null) { d = data; data = null; d.close(); } if (client != null) { c = client; client = null; c.disconnect(); } } catch (IOException e) { x = e; } if (x != null) throw x; } COM: <s> close current data transfer and close data connection </s>
funcom_train/17711633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanel_Installed() { if (panel_Installed == null) { panel_Installed = new JPanel(); panel_Installed.setLayout(new BorderLayout()); panel_Installed.add(getPanel_InstalledTop(), BorderLayout.NORTH); panel_Installed.add(getJScrollPane(), BorderLayout.CENTER); } return panel_Installed; } COM: <s> this method initializes panel installed </s>
funcom_train/50268502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadJavadoc() { /*try{ setCurrentFile(javadoc); } catch(Exception e){ JOptionPane.showMessageDialog(this, "Couldn't load the file"+'\n' +javadoc,"Error",JOptionPane.WARNING_MESSAGE ); } if(!isVisible()) show();*/ } COM: <s> load the javadoc </s>
funcom_train/29781792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReturnCode cvsUpdate(String dir) { ReturnCode exitVal = ReturnCode.CVS_OK; try { List<String> command = new ArrayList<String>(); command.add("update"); command.add("-A"); exitVal = executeCvsCommand(command, dir); } catch (Throwable t) { t.printStackTrace(); } return(exitVal); } COM: <s> runs cvs update on a directory </s>
funcom_train/30009204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveAllPublishers() { System.out.println("removeAllPublishers"); Document instance = new Document(); int expResult = 0; int result = instance.removeAllPublishers(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of remove all publishers method of class papyrus </s>
funcom_train/32040616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreateNewPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StaffType_createNew_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StaffType_createNew_feature", "_UI_StaffType_type"), ImsldPackage.eINSTANCE.getStaffType_CreateNew(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the create new feature </s>
funcom_train/14451067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FKey getFKey(final Table t) { FKey r = null; for (FKey f : fkeys.values()) { if (t.equals(f.pkTable)) { if (r != null) { throw new DepecheException("Multiple foreign keys reference the given table"); } r = f; } } if (r == null) { throw new DepecheException("No foreign keys reference the given table"); } return r; } COM: <s> returns the foreign key that references the given table </s>
funcom_train/11105897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage(String key, Locale locale, Object params[]) { String message = getMessage(key, locale); if ((message == null) || (params == null) || (params.length < 1)) { return message; } synchronized (format) { format.applyPattern(message); message = format.format(params); } return message; } COM: <s> p retrieve the specified message string for the specified locale and </s>
funcom_train/22233697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRotationPoint(Point3f point) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_POINT_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("OrientedShape3D4")); if (isLive()) ((OrientedShape3DRetained)retained).setRotationPoint(point); else ((OrientedShape3DRetained)retained).initRotationPoint(point); } COM: <s> sets the new rotation point </s>
funcom_train/18808224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculateMean2() { final Number[] values = new Number[3]; values[0] = new Double(1); values[1] = new Double(2); values[2] = new Double(3); final double mean = Statistics.calculateMean(values); assertEquals(2.0, mean, 0.0000001); } COM: <s> a simple test for the calculate mean number method </s>
funcom_train/17489222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (ExitCommand == null) {//GEN-END:|30-getter|0|30-preInit // write pre-init user code here ExitCommand = new Command("Exit", "Exit", Command.EXIT, 99);//GEN-LINE:|30-getter|1|30-postInit // write post-init user code here }//GEN-BEGIN:|30-getter|2| return ExitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/23279026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LaunchResource getLaunchResource(long id){ List objects = getHibernateTemplate().findByNamedQueryAndNamedParam("launchResource.getbyId", "id", id); if (objects.size()!=1) return null; return (LaunchResource) objects.get(0); } COM: <s> returns the launch resource related to the given id </s>
funcom_train/11512576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSingletonPatternInSerialization() { final Object[] singletones = new Object[] { CloneTransformer.INSTANCE, ExceptionTransformer.INSTANCE, NOPTransformer.INSTANCE, StringValueTransformer.INSTANCE, }; for (final Object original : singletones) { TestUtils.assertSameAfterSerialization( "Singletone patern broken for " + original.getClass(), original ); } } COM: <s> test that all transformer singletones hold singleton pattern in </s>
funcom_train/21995226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play(Signal sig, Device device) throws RpcException { try { authorize(Signals.PLAY); getBus().play(sig, device); } catch (JRecSecurityException e) { throw new RpcException("security-problem playing signal", e); } catch (BusException e) { throw new RpcException("bus-problem playing signal", e); } } COM: <s> playback the signal for the specified device </s>
funcom_train/37444529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(final String characterEncoding) { String result; if (CString.isNullOrEmpty(query.toString())) { result = ""; } else { try { result = JSPUtil.encodeUrl(query.toString(), characterEncoding); } catch (final UnsupportedEncodingException exception) { // Return the query string unencoded result = query.toString(); } } return result; } COM: <s> creates a string representation of this query string that is encoded </s>
funcom_train/21502430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addColumnSizePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ArrayType_columnSize_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ArrayType_columnSize_feature", "_UI_ArrayType_type"), TypeSystemPackage.Literals.ARRAY_TYPE__COLUMN_SIZE, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the column size feature </s>
funcom_train/6424578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOnAnyChannel(IRCConnection connection, String nick) { Enumeration enum = connection.getChannels(); while (enum.hasMoreElements()) { if (((Channel) enum.nextElement()).isHere(nick)) { enum = null; return true; } } return false; } COM: <s> returns if a nick is on any channel on a specified server </s>
funcom_train/1652261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getPeerStatusCount(PeerNodeStatus[] peerNodeStatuses, int status) { int count = 0; for (int peerIndex = 0, peerCount = peerNodeStatuses.length; peerIndex < peerCount; peerIndex++) { if(!peerNodeStatuses[peerIndex].recordStatus()) continue; if (peerNodeStatuses[peerIndex].getStatusValue() == status) { count++; } } return count; } COM: <s> counts the peers in code peer nodes code that have the specified </s>
funcom_train/42717482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRegionsMap(String path) { if(currentRegions == null) { cRegionMapFile.setText(""); } else if (ObjectUtil.isBlank(path)) { cRegionMapFile.setText(""); currentRegions.map = null; } else { cRegionMapFile.setText(path); currentRegions.map = path; } } COM: <s> change regions map file </s>
funcom_train/3548530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAwardingBody(Collective awardingBody) { if (!super.getWorkProducersOfType(WorkProducerType.AWARDING_BODY).isEmpty()) { super.removeAllWorkProducersOfType(WorkProducerType.AWARDING_BODY); } super.addWorkProducer(WorkProducerType.AWARDING_BODY, awardingBody); this.awardingBody = awardingBody; } COM: <s> sets awarding body </s>
funcom_train/32778258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receive(desmoj.core.report.Reporter r) { if (r == null) return; // again nulls MLink tmp = linkOf(reporters); // get link in list of msgTypes if (tmp == null) return; // is null if type not registered here, so return??? for (int i = 0; i < tmp.clients.size(); i++) { // loop and ((MessageReceiver) tmp.clients.elementAt(i)).receive(r); } } COM: <s> receives a reporter and forwards it to all messagereceiver objects </s>
funcom_train/28342922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private BigDecimal toBigDecimal(java.sql.Timestamp timestamp) { BigDecimal seconds = new BigDecimal( timestamp.getTime() / 1000 ); BigDecimal nanoSeconds = new BigDecimal( timestamp.getNanos() ); return seconds.add( nanoSeconds.movePointLeft(9) ).setScale( 9, BigDecimal.ROUND_HALF_UP ); } COM: <s> convert a java </s>
funcom_train/2630420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransparency(final float newTransparency) { if (Math.abs(transparency - newTransparency) > TRANSPARENCY_RESOLUTION) { final float oldTransparency = transparency; transparency = newTransparency; invalidatePaint(); firePropertyChange(PROPERTY_CODE_TRANSPARENCY, PROPERTY_TRANSPARENCY, new Float(oldTransparency), new Float(newTransparency)); } } COM: <s> set the transparency used to paint this node </s>
funcom_train/11533031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanCurrentClass(ClassLoader loader, String currentClassName) { ClassReader cr; try { cr = new ExtendedClassReader(loader, currentClassName); cr.accept(_cp, 0); } catch (IOException e) { _logger.log(Level.SEVERE, "scanCurrentClass() ", e); } } COM: <s> scans one level of the inheritance hierarchy </s>
funcom_train/46454946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ControlElement addObject(Object object, String classname, String propList) { if(object instanceof DrawingPanel) { defaultDrawingPanel = (DrawingPanel) object; if(snapshotItem!=null) { snapshotItem.setEnabled(true); } if(videoItem!=null) { videoItem.setEnabled(true); } } return super.addObject(object, classname, propList); } COM: <s> adds an existing object to this control </s>
funcom_train/47534153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapByPosition(int song1, int song2) throws MPDServerException { String[] args = new String[2]; args[0] = Integer.toString(song1); args[0] = Integer.toString(song2); this.mpd.getMpdConnection().sendCommand(MPD_CMD_PLAYLIST_SWAP, args); this.refresh(); } COM: <s> swap positions of song1 and song2 </s>
funcom_train/45192487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendSetOptions(String options) { StringBuilder out = openScriptBuffer(); if (out != null) { out.append("wa.setOptions('"); out.append(elementId); out.append("','"); out.append(WUtil.escapeSQuote(options)); out.append("');\n"); } } COM: <s> send a set options command to the browser </s>
funcom_train/3173247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertLine(int indent, String tag, String value) { assertEquals("wrong indent", indent, it.getIndent()); if (tag!=null) assertEquals("wrong tag" , tag , it.getTag ()); assertEquals("wrong value" , value , it.getValue ()); } COM: <s> assert checks on current iterator line </s>
funcom_train/653580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocations (String s) { if ( DEBUG ) log ("SET locations = " + s); StringTokenizer tok = new StringTokenizer (s, ","); locations = new Vector (); while ( tok.hasMoreTokens() ) { locations.add (tok.nextToken().trim()); } } COM: <s> comma separated list of locations </s>
funcom_train/8916971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validate(int id) { int lock; try { for (int i = 0; i < size; i++) { // Throws an exception if validation fails ReadFieldAccess r = entries[i]; lock = LockTable.checkLock(r.getHash(), id); if (lock >= 0 && lock != r.getLock()) { // Other version: cannot validate return false; } } } catch (TransactionException e) { return false; } return true; } COM: <s> validate the transaction </s>
funcom_train/48665670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleParserNameChanged(ItemEvent e) { try { if(e.getStateChange() == ItemEvent.SELECTED) { String name = ((ParserNameData)fParserName.getSelectedItem()).name; setRulesPanelFor(name, null); } } catch(Exception ex) { UIExceptionMgr.userException(ex); } } COM: <s> changes the parser rules panel to match the newly </s>
funcom_train/28262621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(String name, int port) { try { registerRec = DNSSD.register(name, dnssdName, port, this); // Register the TXT records, if there are any if (txtRecord.size() > 0) { registerRec.getTXTRecord() .update(0, txtRecord.getRawBytes(), 0); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> register the service with the given name and port </s>
funcom_train/46921983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkPrefLevels(List lst) { for(int i=0; i<lst.size(); i++) { String value = ((String) lst.get(i)); // No selection made if(value.trim().equals(Preference.BLANK_PREF_VALUE)) { return false; } } return true; } COM: <s> checks that pref levels are selected </s>
funcom_train/34519534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void emit(edu.arizona.cs.mbel.ByteBuffer buffer, edu.arizona.cs.mbel.emit.ClassEmitter emitter){ for (int i=0;i<constraints.size();i++) ((Constraint)constraints.get(i)).emit(buffer, emitter); if (byref) buffer.put(ELEMENT_TYPE_BYREF); type.emit(buffer, emitter); } COM: <s> writes this signature to a buffer in raw binary form </s>
funcom_train/30461545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disableOther(){ for(int i=0; i<panel.getWidgetCount(); i++){ String menuChoice = ((HTML)(((FocusPanel) panel.getWidget(i)).getWidget())).getText(); if( !menuChoice.equals(MENU_20)){ FocusPanel fpanel = (FocusPanel) panel.getWidget(i); fpanel.clear(); fpanel.add( new HTML(DISABLE_MENU_ITEM + menuChoice)); } } } COM: <s> disable all menu items </s>
funcom_train/4209316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { this.writer = connection.writer; done = false; writerThread = new Thread() { public void run() { writePackets(this); } }; writerThread.setName("Smack Packet Writer (" + connection.connectionCounterValue + ")"); writerThread.setDaemon(true); } COM: <s> initializes the writer in order to be used </s>
funcom_train/33773715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig servletConfig) throws ServletException { log.info("Initialising GatekeeperServlet"); this.servletConfig = servletConfig; // Initialise required classes. transactionIdProvider = initTransactionIdProvider(); authorizer = initAuthorizer(); urlSigner = initUrlSigner(); bucketLister = initBucketLister(); isInitCompleted = true; } COM: <s> initialises the pluggable implementation classes for </s>
funcom_train/51206054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteRow(String ObjID) throws JException { try { String query = "DELETE FROM " + getData().getTableName() + " WHERE ObjID='" + ObjID + "'"; getData().executeQuery(query); } catch(Exception err) { throw new JException(this, "deleteRow", err, "ObjID: " + ObjID); } } COM: <s> delete a row from the table </s>
funcom_train/37739896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timeoutLoop() throws Exception { ProcessMgr mgr = defDir.processMgr("SystemTest", "timeoutLoop"); WfProcess proc = mgr.createProcess(requester); String procKey = proc.key(); proc.start(); assertTrue(stateReached(proc, "closed.completed")); ProcessData data = proc.processContext(); String path = (String)data.get("TransitionPath"); Long incr = (Long)data.get("increment"); assertTrue("I: " + incr + "; " + path, path.equals("PATH:start:loop:to:loop:to:loop:end")); procDir.removeProcess(proc); } COM: <s> test deadline execution in combination with loops </s>
funcom_train/39146927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createViewport() { IViewport viewport = windowCanvasPair.renderWindow.addViewport(camera, 0, 0.0f, 0.0f, 1.0f, 1.0f); IColourValue backgroundColour = new ColourValue(0f, 0f, 0f, 1f); viewport.setBackgroundColour(backgroundColour); backgroundColour.delete(); viewport.setOverlaysEnabled(false); viewport.setCamera(camera); camera.setAspectRatio((float) windowCanvasPair.canvas.getBounds().width / (float) windowCanvasPair.canvas.getBounds().height); } COM: <s> creates the ogre viewport </s>
funcom_train/1911596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatistics() { GEVAGraphStatistics statistics = model.getSeriesStatistics(seriesId); updateStatistic(lblMinimum, statistics.getExtremaMin()); updateStatistic(lblMaximum, statistics.getExtremaMax()); updateStatistic(lblMean, statistics.calcMean()); updateStatistic(lblMedian, statistics.calcMedian()); updateStatistic(lblStdDev, statistics.calcStandardDeviation()); } COM: <s> update all the gui fields with the statistics data taken from the </s>
funcom_train/3618354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { //To do: It is probably a good idea to throw an event instead of preforming action here //It would allow greater flexibility adaptee.appendLine2History('0', adaptee.getCurrentNote().getText()); adaptee.getCurrentNote().setText(""); } COM: <s> processes the event </s>
funcom_train/49455050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String where(Aggregate a, int nLevel) { StringBuffer wh = new StringBuffer(); for(int i=1; i<nLevel; ++i) { wh.append(" AND "); wh.append("d."); wh.append(a.fieldN); if (a.nLevels != 1) wh.append(i); wh.append(" IS NOT NULL"); } return wh.toString(); } COM: <s> additional text that should be part of the where clause </s>
funcom_train/9646215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTo(Rectangle2D r) { r.setRect( r.getX() - getLeft(), r.getY() - getTop(), r.getWidth() + getLeft() + getRight(), r.getHeight() + getTop() + getBottom() ); } COM: <s> adds the current insets to the specified rectangle2 d making the </s>
funcom_train/39551104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void documentLoadingCancelled(SVGDocumentLoaderEvent e) { if (nextDocumentLoader != null) { startDocumentLoader(); return; } documentLoader = null; if (afterStopRunnable != null) { EventQueue.invokeLater(afterStopRunnable); afterStopRunnable = null; return; } if (nextGVTTreeBuilder != null) { startGVTTreeBuilder(); return; } } COM: <s> called when the loading of a document was cancelled </s>
funcom_train/24357327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean appendToPath(Shape s) { // don't draw, just append the shape if BeginPath // opens a GeneralPath if (path != null) { // aplly transformation if set if (pathTransform != null) { s = pathTransform.createTransformedShape(s); } // append the shape path.append(s, false); // current path set return true; } // current path not set return false; } COM: <s> append the shape to the current path </s>
funcom_train/44602608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_fresh_expression_01() { compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {" + " Object x = new Object();\n" + " //@ requires \\fresh(x);\n" + " void m() {\n" + " }\n" + "}\n", "new X().m()", "", JMLEvaluationError.class); } COM: <s> jml fresh expression jml fresh expression </s>
funcom_train/39483829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ThreadInfo (JVM vm, int objRef) { init( vm, objRef); env = new MJIEnv(this); //threadInfos.set(objRef, this); // our ThreadInfo repository // there can only be one if (mainThread == null) { mainThread = this; currentThread = this; } } COM: <s> creates a new thread info </s>
funcom_train/3284594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFriendship (User u, String fname) { Vector<User> f = (Vector<User>) fshipList.get (fname); if (f == null) { f = new Vector<User> (); fshipList.put (fname, f); } f.addElement (u); } COM: <s> adds a friendship relation </s>
funcom_train/25829855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playerShoot(){ for(PlayerBullet b : playerBullets){ if(!b.isActive()){ b.moveTo(ship.getX() + ship.bounds.width() / 2 - 1, ship.getY()); b.setActive(true); return; } } } COM: <s> attempts to add a player bullet to the game </s>
funcom_train/46824596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAllowedMoves (int x1, int y1) { int player = getPieceColour(x1, y1); for (int x2 = 0; x2 < 8; x2++) { for (int y2 = 0; y2 < 8; y2++) { allowedMoves [y2 * 8 + x2] = moveChecker.checkMove (player, x1, y1, x2, y2); } } } COM: <s> updates the allowed moves for a particular piece </s>
funcom_train/45118775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadCompatibleEditor() { String userSelection = value; switch (currentProperty.getDataType()) { case DIRECTORY: userSelection = loadFileChooser(JFileChooser.DIRECTORIES_ONLY); break; case FILE: userSelection = loadFileChooser(JFileChooser.FILES_ONLY); break; case SEARCH_AND_LIST: userSelection = loadList(ListSelectionModel.SINGLE_SELECTION, true); break; case SEARCH_AND_MULTY_SELECT_LIST: userSelection = loadList(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION, true); break; case MULTY_SELECT_LIST: userSelection = loadList(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION, false); break; } setValue(userSelection); } COM: <s> check the property type and load a compatible editor </s>
funcom_train/2630388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisible(final boolean isVisible) { if (getVisible() != isVisible) { if (!isVisible) { repaint(); } visible = isVisible; firePropertyChange(PROPERTY_CODE_VISIBLE, PROPERTY_VISIBLE, null, null); invalidatePaint(); } } COM: <s> set the visibility of this node and its descendants </s>
funcom_train/17806144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNonVolatileStorage_gbPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PhysicalComponent_NonVolatileStorage_gb_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PhysicalComponent_NonVolatileStorage_gb_feature", "_UI_PhysicalComponent_type"), CtbPackage.Literals.PHYSICAL_COMPONENT__NON_VOLATILE_STORAGE_GB, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the non volatile storage gb feature </s>
funcom_train/37017374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentForegroundColor(Color color) { if (cellRenderer == null) return; cellRenderer.setForegroundColor(color); label.setForeground(color); label.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, label.getForeground())); } COM: <s> setter for content foreground color </s>
funcom_train/34105020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private KeyHandler getKeyHandler() { KeyHandler handler = new GraphicalViewerKeyHandler(getGraphicalViewer()); handler.setParent(getGraphicalViewer().getKeyHandler()); handler.put(KeyStroke.getPressed((char) 26, 122, SWT.CTRL), getActionRegistry().getAction(ActionFactory.UNDO.getId())); handler.put(KeyStroke.getPressed((char) 25, 121, SWT.CTRL), getActionRegistry().getAction(ActionFactory.REDO.getId())); return handler; } COM: <s> creates and returns a new key handler </s>
funcom_train/44690665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSeparator() { JPanel separator = new JPanel(); separator.setBackground(Color.black); // Setting the minimum size avoid to get a wide black line // when the dialog box is schrinked to a too small width. separator.setMinimumSize(new Dimension(1, 1)); separator.setPreferredSize(new Dimension(1, 1)); addRow(separator); } COM: <s> adds a horizontal separator between two set of controls </s>
funcom_train/4519588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { Object tempItem = combox.getSelectedItem(); if (((LineEnable) tempItem).isLineEnabled()) { combox.setSelectedItem(currentItem); } else { currentItem = tempItem; } if (!((SelectEnable) tempItem).isSelectEnabled()) { combox.setSelectedItem(currentItem); } else { currentItem = tempItem; } } COM: <s> the listener interface for receiving action events </s>
funcom_train/17827568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsValue(Object value) { boolean ok = false; for (Variable var : variables.values()) { if (value.equals(var.toString())) { ok = true; break; } } if (ok == false && parent != null) { ok = parent.containsValue(value); } return ok; } COM: <s> returns true if the manager contains the provided variable </s>
funcom_train/1448731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showShopsFees() throws Exception{ if (logger.isDebugEnabled()) { logger.debug("showShopsFees() - start"); //$NON-NLS-1$ } this.miscellaneousFees = MiscellaneousFeesServiceDelegator.getMiscellaneousFees(); if (logger.isDebugEnabled()) { logger.debug("showShopsFees() - end"); //$NON-NLS-1$ } return SUCCESS; } COM: <s> show shops fees </s>
funcom_train/39294095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDateSignedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContractType_dateSigned_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContractType_dateSigned_feature", "_UI_ContractType_type"), CntPackage.Literals.CONTRACT_TYPE__DATE_SIGNED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the date signed feature </s>
funcom_train/22202824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getResults(TologResultsSet results, int colNum) { ArrayList ret = new ArrayList(results.getNumRows()); for (int i = 0; i < results.getNumRows(); i++) { List row = results.getRow(i); ret.add(row.get(colNum)); } return ret; } COM: <s> returns the list of results in the specified column of </s>
funcom_train/8947817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValue(int channelNumber) throws InvalidChannelNumberException { if (Validator.validate(channelNumber, Validator.CHANNEL_NUMBER_VALIDATION) == false) { throw new InvalidChannelNumberException(channelNumber); } else { int returnValue = 0; try { // Perform the appropriate conversion to zero-based indexing and // return the data. returnValue = dmxValues[channelNumber - 1]; } catch (java.lang.NullPointerException e) { // No value set at present, return 0. returnValue = 0; } return returnValue; } } COM: <s> method to return a given value </s>
funcom_train/23999645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T evaluate(Object self, Object... arguments) { if (cachedExpression != null) { return evaluateCached(self, arguments); } try { return evaluate(self, findEnclosingMethod(), arguments); } catch (ClassNotFoundException e) { throw new JOCLRuntimeException(e); } } COM: <s> use the stack trace to find the method we are in </s>
funcom_train/20149185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupScreenDisplay(){ contentPanel.add(mainTable); mainTable.setWidget(0, 0, usernameLabel); mainTable.setWidget(0, 1, username); mainTable.setWidget(1, 0, passwordLabel); mainTable.setWidget(1, 1, password); contentPanel.add(errorLbl); buttonsTable.setWidget(0, 0, login); buttonsTable.setWidget(0, 1, cancel); contentPanel.add(buttonsTable); dialog.setWidget(contentPanel); dialog.setText("BannanForum Login"); } COM: <s> setting up the display of this screen </s>
funcom_train/41303119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setXCubedLabelsGrouped(boolean set) { _groupXCubedLabels = set; if (_groupXCubedLabels) { addToDragGroup(_xCubedLabelsDragGroupId, _xLabel); addToDragGroup(_xCubedLabelsDragGroupId, _twoLabel); addToDragGroup(_xCubedLabelsDragGroupId, _threeLabel); } else clearDragGroup(_xCubedLabelsDragGroupId); } COM: <s> syncs the formula label </s>
funcom_train/3740139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getGroupsListOfName(String groupName) throws GroupManagerException { List match = new LinkedList(); try { Session session = HibernateUtil.currentSession(); Criteria crit = session.createCriteria(Group.class); crit.add(Expression.eq("name", groupName)); crit.addOrder(Order.asc("id")); match = crit.list(); } catch (Exception e) { //logger e.printStackTrace(); throw new GroupManagerException(e.getClass()+" getGroupOfName("+groupName+")"); } return match; } COM: <s> returns list of groups of given name </s>
funcom_train/27720240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCurrentNormalBorderColor(BorderColor currentNormalBorderColor) { if (this.currentNormalBorderColor != null){ this.currentNormalBorderColor.stopListening(); } this.currentNormalBorderColor = currentNormalBorderColor; this.currentNormalBorderColor.startListening(); getNormalState().resetBorder(currentNormalBorderColor.getColor()); } COM: <s> setter for property current normal border color </s>
funcom_train/34522818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File crateTempHTMLFile(String html){ try{ File temp = File.createTempFile("tmp.",".html"); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(html); out.close(); return temp; } catch(Exception ex){ Log.error(ex); return null; } } COM: <s> create a temporary file containing html file </s>
funcom_train/138917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendCommentedKeyValues (PrintWriter out){ //any comment lines? if (commentLines!= null){ for (int i=0; i< commentLines.length; i++) out.println(commentLines[i]); out.println(); } //print key values, spaces flanking = are permitted Iterator<String> it = keyValues.keySet().iterator(); while (it.hasNext()){ String key = it.next(); String value = keyValues.get(key); out.println("# "+key +" = "+value); } } COM: <s> for appending archive into onto a text file </s>
funcom_train/43246148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCellPhone() { System.out.println("getCellPhone"); AddlDemographicsObject instance = new AddlDemographicsObject(); String expResult = ""; String result = instance.getCellPhone(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get cell phone method of class org </s>
funcom_train/11023493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddProperty3() { try { dynaClass.add(testProperty, String.class, true, true); fail("add(name, type, readable, writable) did not throw UnsupportedOperationException"); } catch (UnsupportedOperationException expected) { // expected result } } COM: <s> test add name type readable writable method </s>
funcom_train/13260662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public SimEntity getEntity(String name) { SimEntity ent, found = null; for (Iterator<SimEntity> it = entities.iterator(); it.hasNext();) { ent = it.next(); if (name.compareTo(ent.getName()) == 0) { found = ent; } } if (found == null) { System.out.println("SimSystem: could not find entity " + name); } return found; } COM: <s> finds an entity by its name </s>
funcom_train/33430395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIDString() { //TODO jaanus : oh crap! resolve this mess! return (map instanceof UnstreamedMap) ? ((UnstreamedMap) map).buildPath(x, y, zoom) : ((StreamedMap) map).buildStreamedPath(new MapTile[] { this }); } COM: <s> not part of public api </s>
funcom_train/8608034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disbandLegion(Legion legion) { for (Integer memberObjId : legion.getLegionMembers()) { if (getLegionMemberEx(memberObjId) != null) { this.allCachedLegionMembers.remove(getLegionMemberEx(memberObjId)); } } updateAfterDisbandLegion(legion); deleteLegionFromDB(legion); } COM: <s> this method will disband a legion and update all members </s>
funcom_train/2929542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNestedInterface() { Class class1 = (Class) findElement(Class.class, QFN_CLASS1); assertTrue(class1 + "::hasNestedClassifiers", class1.hasNestedClassifiers()); Class nestedInterface = (Class) findElement(Interface.class, ":package1:Class1:NestedInterface"); assertTrue(class1.NestedClassifier().contains(nestedInterface)); } COM: <s> tests that class1 has a nested interface nested interface </s>