__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34608864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getArgumentCount() { if (line == null || line.lastIndexOf(" ") == -1) { return 0; } String args[] = line.split(" "); int length = args.length; if (length <= 1) { return 0; } else if (length <= 3) { return length - 1; } else { return 2; } } COM: <s> pop commandline at most has two arguments </s>
funcom_train/9552599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessageWithLocationStack() { final boolean locIsEmpty = (locationStack == null || locationStack.isEmpty()); if (super.getMessage() == null && !locIsEmpty) return getStackString(locationStack, "\t"); if (locIsEmpty) return super.getMessage(); return (super.getMessage() + "\n" + getStackString(locationStack, "\t")); } COM: <s> combines the error message with the location information if it was specified </s>
funcom_train/13276412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetIcon(boolean resetView) { if (this.controller.isPropertyEditable(FurnitureController.Property.ICON)) { try { if (resetView) { this.iconComponent.resetView(); } this.controller.setIcon(this.iconComponent.getIcon(400)); } catch (IOException ex) { ex.printStackTrace(); } } } COM: <s> resets the model icon </s>
funcom_train/45317469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doStopCampaign(CampaignNotifyMessage message) { try { String campaignName = message.getCampaign(); MainClass.getAsterisk().getCampaigns().get(campaignName).stop(); doPushCampaignStatus(message); } catch (Exception ex) { sendNotAcceptable("Unable to stop the campaign. " + ex.getLocalizedMessage()); } } COM: <s> stops a running campaign </s>
funcom_train/43100888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isLastTag(int ch) { if (ch == '<') { inTag = true; currentTag.setLength(0); } else if (ch == '>') { inTag = false; if (currentTag.toString().equals(endTagName)) { return true; } } else if (inTag) { currentTag.append((char) ch); } return false; } COM: <s> determines if the character is the last character of the last tag of </s>
funcom_train/18753373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node loadNotifications() { NotificationSetNode notifications = new NotificationSetNode(this.emsBean); // Clear main map this.notificationNodeMap.clear(); for (EmsNotification notification : emsBean.getNotifications()) { notificationNodeMap.put(notification.getName(), notification); } return notifications; } COM: <s> loads the notification nodes that are children of this mbean node </s>
funcom_train/2444846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static enum Action { /** * The existing file should be used, and the new file should be disregarded. */ USE_EXISTING, /** * The existing file should be deleted, and the new file should take its place. */ REPLACE_EXISTING, /** * The new file should be used, with a new name. The existing file should be kept in the * file store. */ RENAME_AND_USE_NEW } COM: <s> enumeration representing the possible outcomes of a file collision </s>
funcom_train/27822273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putValue(String name,Object newValue) { Object oldValue=getValue(name); if (oldValue==null) { if (newValue==null) return; } else { if (oldValue.equals(newValue)) return; } super.putValue(name,newValue); } COM: <s> sets a value under given name in this action </s>
funcom_train/7628023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMwiDontStore() { if (isMwi && mwiDontStore) { return true; } if (isCphsMwiMessage()) { // See CPHS 4.2 Section B.4.2.1 // If the user data is a single space char, do not store // the message. Otherwise, store and display as usual if (" ".equals(getMessageBody())) { ; } return true; } return false; } COM: <s> returns true if this message is a message waiting indication group </s>
funcom_train/44702112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCoordinatesString(String label) { int[] coordinates = (int[]) coordsTable.get(label); String coordinatesString = ""; if (coordinates != null) { for (int i = 0; i < coordinates.length - 1; i++) { coordinatesString += coordinates[i] + ","; } if (coordinates.length > 0) { coordinatesString += coordinates[coordinates.length - 1]; } } return coordinatesString; } //getCoordinatesString() COM: <s> returns a comma separated list of coordinates for an object </s>
funcom_train/20205466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cell setText(String text, int row, int column) { if (row <= 0) { throw new IndexOutOfBoundsException("row must be > 0"); } if (column <= 0) { throw new IndexOutOfBoundsException("column must be > 0"); } Cell cell = insertCell(row, column); cell.setText(text); return cell; } COM: <s> insert text at the given row and column </s>
funcom_train/10602327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean authenticate(String password) { getLogger().debug("LDAP Password: " + password); getLogger().debug("LDAP pw encypted: " + Password.encrypt(password)); getLogger().debug("LDAP orig encrypted pw: " + this.encryptedPassword); return this.encryptedPassword.equals(Password.encrypt(password)); } COM: <s> authenticate a user </s>
funcom_train/3107582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyDropDownload(DownloadRequest dr) { if (dr == null) throw new NullPointerException("dr was null."); SegmentManagerListener[] lists = (SegmentManagerListener[]) getListeners() .getListeners(SegmentManagerListener.class); for (int i = 0; i < lists.length; i++) { lists[i].dropDownload(dr); } } COM: <s> notify registered listeners to stop the given download request </s>
funcom_train/45186611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addArchiveActions(ToolBar toolBar) { openToolItem = ZXTapeToolSWT.addToolbarItem(toolBar, "open.gif", this); saveToolItem = ZXTapeToolSWT.addToolbarItem(toolBar, "save.gif",this); propertiesToolItem = ZXTapeToolSWT.addToolbarItem(toolBar, "properties.gif", this); } COM: <s> adds file actions to tool bar </s>
funcom_train/18787536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(MdaDocument document) { assert document != null; this.document = document; MetaModel model = document.getModel(); TreeConstructor constructor = new TreeConstructor(getNodeTypeFactory(), this); model.accept(constructor); setRoot(constructor.getRoot()); getValidationPanel().clear(); getMenuBar().documentChanged(document); } COM: <s> sets the document displayed in the explorer </s>
funcom_train/14245227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void spawnValidityChecker(Designer d) { _designer = d; _validityChecker = new Thread(this, "ValidityCheckingThread"); _validityChecker.setDaemon(true); _validityChecker.setPriority(Thread.currentThread().getPriority() - 1); _validityChecker.start(); } COM: <s> start a thread to delete old items from the to do list </s>
funcom_train/39106301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAllTestNodes(TestTreeNode node) { ArrayList result = new ArrayList(node.getChildCount()); for (Enumeration e = node.depthFirstEnumeration() ; e.hasMoreElements() ;) { node = (TestTreeNode)e.nextElement(); if (node.getUserObject() instanceof TestSpecification) result.add(node); } java.util.Collections.sort(result); return result; } COM: <s> this method returns all the test tree nodes starting at the node parameter </s>
funcom_train/11388879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToLoadedJobCache(Job job) { if(LOG.isDebugEnabled()) { LOG.debug("Adding "+job.getID()+" to loaded job cache"); } loadedJobCache.put(job.getID(), job); if (loadedJobCache.size() > loadedJobCacheSize ) { loadedJobCache.remove(loadedJobCache.firstKey()); } } COM: <s> adds an entry to the loaded job cache </s>
funcom_train/51098557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectParameter(ProcedureParameter parameter) { if (parameter == null) { return; } ProcedureParameterTableModel model = (ProcedureParameterTableModel) table.getModel(); java.util.List parameters = model.getObjectList(); int pos = parameters.indexOf(parameter); if (pos >= 0) { table.select(pos); } } COM: <s> selects a specified parameter </s>
funcom_train/51575631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSync(final boolean sync) { if (DEBUG) { System.err.println(this.getTitle() + java.util.ResourceBundle.getBundle("anecho/gui/guiBundle").getString("_frame_has_been_setSync:_") + sync); } inSync = sync; } COM: <s> the jamocha mud frame synchroniser </s>
funcom_train/42453007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildClassPath(Configuration config) { File f = new File(config.getLibraryDir()); File[] fFiles = f.listFiles(); StringBuffer cp = new StringBuffer("."); cp.append(File.pathSeparatorChar).append(config.getNewEntitiesDir()); if (fFiles != null) { for (File file : fFiles) { cp.append(File.pathSeparatorChar) .append(file.getAbsolutePath()); } } return cp.toString(); } COM: <s> puts all dependency libraries in the classpath </s>
funcom_train/41024287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJLeftButton() { if (jLeftButton == null) { jLeftButton = new JButton(); jLeftButton.setText("Turn Left"); jLeftButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Turn Left"); wheels.spinLeft(); } }); } return jLeftButton; } COM: <s> this method initializes j left button </s>
funcom_train/19960639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException{ cal.setTime(new java.util.Date(x.getTime())); saveObject(parameterIndex, cal); ps.setTime(parameterIndex, x, cal); } COM: <s> this implementation assumes that the time object has the time and </s>
funcom_train/28266808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isJmsAlive() { final int priority = 99; final int timeout = 1000; try { jmsTestPublisher.send(jmsTestPingmsg, javax.jms.DeliveryMode.NON_PERSISTENT, priority,timeout); return true; } catch (JMSException e) { RocketServer.log().severe(e.toString()); return false; } } COM: <s> pings jms returns true if alive false if thrown exception </s>
funcom_train/7807631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean finishLine(boolean sawNewline) throws IOException { processLine(line.toString(), sawReturn ? (sawNewline ? "\r\n" : "\r") : (sawNewline ? "\n" : "")); line = new StringBuilder(); sawReturn = false; return sawNewline; } COM: <s> called when a line is complete </s>
funcom_train/42954031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeDevice() { if (this.inputStream != null) { try { this.inputStream.close(); } catch (Throwable t) { } this.inputStream = null; } if (this.connection != null) { try { this.connection.close(); } catch (Throwable t) { } this.connection = null; } } COM: <s> closes the device </s>
funcom_train/19180580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getColumnName(TestObject guiObj, int col){ try { Object[] getColName = new Object[1]; getColName[0] = new Integer(col); return (String) guiObj.invoke("getColumnName", "(I)", getColName); } catch(Exception x){ return null; } } COM: <s> retrieve the column name for the provided zero based column number </s>
funcom_train/47165742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("InformationService".equals(portName)) { setInformationServiceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/5081531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isImportant(IWorkbenchPart part) { // Workaround for Bug# 69098 -- This should be removed when/if Bug# 70510 is fixed // We only want a palette page to be created when this view is visible in the current // perspective, i.e., when both this view and the given editor are on the same page. return viewInPage && part instanceof IEditorPart; } COM: <s> only editors in the same perspective as the view are important </s>
funcom_train/31296712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertAvailable(String[] keys) throws MissingConfigKeyException { List<String> missingList = new LinkedList<String>(); for (int i = 0; i < keys.length; i++) { String key = keys[i]; try { getResolvedString(key); } catch (MissingConfigKeyException mcke) { missingList.add(key); } } if (missingList.size() > 0) { throw new MissingConfigKeyException(_path.getPathString(), (String[]) missingList.toArray(new String[missingList .size()])); } } COM: <s> ensures that the specified keys are present </s>
funcom_train/31251734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getHeaderHTML() { String str = null; if (_headerTemplate != null) { //__lw.logDebugMsg("Loading header: " + _headerTemplate); str = _appTemplateLoader.loadTemplate(_headerTemplate); if (str == null || str.equals("")) { str = __csTemplateLoader.loadTemplate(_headerTemplate); } } if (str == null) str = ""; return str; } COM: <s> tries to load the template named by header template from </s>
funcom_train/13200487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unload(String resource) throws ResourceNotFoundException { if( jarEntryContents.containsKey( resource ) ) { if( logger.isTraceEnabled() ) logger.trace( "Removing resource " + resource ); jarEntryContents.remove( resource ); } else { throw new ResourceNotFoundException( resource, "Resource not found in local ClasspathResources" ); } } COM: <s> removes the loaded resource </s>
funcom_train/10626668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveBeanContextMembershipListenerBeanContextMembershipListener() { // Create BeanContext and BeanContextMembershipListener instances BeanContextSupport sup = new BeanContextSupport(); BeanContextMembershipListener l = getBeanContextMembershipListener(); sup.addBeanContextMembershipListener(l); sup.removeBeanContextMembershipListener(l); assertFalse("Listener should not be present", sup.bcmListeners .contains(l)); } COM: <s> test method remove bean context membership listener with </s>
funcom_train/23942779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double l1Error(double[] data, double[] dataEst) { double err = 0.0; int nonzeroes = 0; for (int t = 0; t < data.length; t++) { double d = data[t]; double dE = dataEst[t]; if (d > 0.0 && dE != 0.0) { err += Math.abs(d - dE); nonzeroes++; } } if (nonzeroes > 0) { return err / nonzeroes; } return 0.0; } COM: <s> returns the average l1 error between two time series </s>
funcom_train/47184746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testViewAccessLogNonRepresentativeView1() throws Exception { gen.clearAllTables(); gen.standardData(); WebConversation wc = login("23", "pw"); WebResponse wr = wc.getCurrentPage(); assertEquals("iTrust - Patient Home", wr.getTitle()); wr = wr.getLinkWith("Access Log").click(); assertEquals("iTrust - View My Access Log", wr.getTitle()); assertFalse(wr.getText().contains("Devils Advocate")); } COM: <s> verifies that a non representative is not shown a representee to select </s>
funcom_train/44789283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public Token getToken(int index) { Token t = this.token; for (int i = 0; i < index; i++) { if (t.next != null) { t = t.next; } else { t = t.next = this.token_source.getNextToken(); } } return t; } COM: <s> get the specific token </s>
funcom_train/34958966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Statistics checkStats(String subject, String target) { Statistics back = new Statistics(); for (int i = 0; i < aStat.size(); i++) { if ((aStat.get(i).getTarget().equals(target)) && (aStat.get(i).getSubject().equals(subject))) { return aStat.get(i); } } back.setSubject(subject); back.setTarget(target); aStat.add(back); return back; } COM: <s> check is this statistic table is already added if return else create a </s>
funcom_train/3369793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAccessibleChildSelected(int i) { // if i is a sub-menu and is pop-ed up, return true, else false MenuElement me[] = MenuSelectionManager.defaultManager().getSelectedPath(); if (me != null) { JMenuItem mi = JMenu.this.getItem(i); for (int j = 0; j < me.length; j++) { if (me[j] == mi) { return true; } } } return false; } COM: <s> returns true if the current child of this object is selected </s>
funcom_train/50428184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(BBNCPF cpt) { for (Enumeration e = cpf.keys(); e.hasMoreElements(); ) { Hashtable q = (Hashtable) e.nextElement(); BBNPDF pdf = (BBNPDF) cpf.get(q); pdf.add(new BBNConstant(cpt.get(q))); } } COM: <s> addition with another cpt </s>
funcom_train/22017249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeACL(IACLItem item) throws Exception { CallableStatement cs; try { if (item != null) { if (item instanceof ACLEntry) { String name = ((ACLEntry) item).getId(); cs = conn.prepareCall(NLS.bind(sqlDeleteTableAcl, tableName)); cs.setString(1, name); cs.executeUpdate(); cs.close(); } } conn.commit(); } catch (SQLException e) { logger.error(e, e); } } COM: <s> remove user or group from library acl </s>
funcom_train/34595659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) { PokemonMove move = entry.getMove(); if (move.getType().equals(m_type)) { move.setPower((int)((double)move.getPower() * m_factor)); } return entry; } COM: <s> boost the power of one type of move by 10 </s>
funcom_train/42775367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteTrack(String trackID){ //Set solo state of track to false trackGUIHashMap.get(trackID).getTrack().setSoloed(false); //Remove track from the track GUI hash map trackGUIHashMap.remove(trackID); //Remove MIDI track from track holder try{ TrackHolder.deleteTrack(trackID); } catch(MASException ex){ MsgHandler.critical(ex.getMessage()); } } COM: <s> deletes the specified track </s>
funcom_train/47979546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceContainer removePendingServiceByFileName(String fileName){ ServiceContainer pendingService = null; for ( ServiceContainer container : _pendingServices ) { if(container.getJarFile().getName().toLowerCase().equals( fileName.toLowerCase() )){ pendingService = container; } } if(null != pendingService && _pendingServices.remove( pendingService )) return pendingService; else return null; } COM: <s> removes a pending service container by the name of the jar file </s>
funcom_train/33601559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConsInfo findInfo(List l, int r) { ConsInfo ret = null; for (int i = 0; i < l.size(); i++) { ret = (ConsInfo) l.get(i); if (ret.round == r) { return ret; } } return null; } COM: <s> retrieves the tuple for the specified round given a list of tuples </s>
funcom_train/9279479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() throws SQLException { Connection conn = getConnection(); conn.setAutoCommit(false); Statement s = createStatement(); for (int i = 0; i < TABLES.length; i++) { s.execute("DELETE FROM " + TABLES[i][0]); } commit(); } COM: <s> sets up the connection for a test case and clears all tables </s>
funcom_train/46428052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void derivedTask(Task task) { if (task.aboveThreshold()) { float budget = task.getBudget().singleValue(); float minSilent = parameters.SILENT_LEVEL / 100.0f; if (budget > minSilent) report(task.getSentence(), false); // report significient derived Tasks newTasks.add(task); } } COM: <s> derived task comes from the inference rules </s>
funcom_train/167307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException { if (log.isDebugEnabled()) log.debug("attributeDecl: " + "eName=" + eName + ", aName=" + aName + ", type=" + type + ", mode=" + mode + ", value=" + value); } COM: <s> logs attribute details of elements when debugging </s>
funcom_train/15617069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String processNestedTemplates(ParserInput parserInput, ParserOutput parserOutput, String content) throws ParserException { int pos = content.indexOf("{{"); if (pos == -1) { return content; } pos = content.indexOf("}}", pos); if (pos == -1) { return content; } return JFlexParserUtil.parseFragment(parserInput, parserOutput, content, JFlexParser.MODE_TEMPLATE); } COM: <s> parsing is expensive so when testing for nested templates first do a </s>
funcom_train/7673575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RegisterSpec getSynchReg() { /* * We use the register that is just past the deepest possible * stack element. We don't need to do anything else special at * this level, since later passes will merely notice the * highest register used by explicit inspection. */ return RegisterSpec.make(getNormalRegCount(), Type.OBJECT); } COM: <s> gets the register spec to use to hold the object to synchronize on </s>
funcom_train/10681345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReplyPacket getClassBySignature(String classSignature) { CommandPacket commandPacket = new CommandPacket( JDWPCommands.VirtualMachineCommandSet.CommandSetID, JDWPCommands.VirtualMachineCommandSet.ClassesBySignatureCommand); commandPacket.setNextValueAsString(classSignature); return checkReply(performCommand(commandPacket)); } COM: <s> gets class reference by signature </s>
funcom_train/50896675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxPoolSize(int iMaxConnections) { if (iMaxConnections==0) { reapConnections(); poolsize = hardlimit = 0; } else { if (iMaxConnections<poolsize) throw new IllegalArgumentException("max pool size must be greater than or equal to prefered pool size "); reapConnections(); hardlimit = iMaxConnections; } } COM: <s> p set maximum concurrent open connections limit p </s>
funcom_train/24943261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getCareBitsAt(int position) { int careBits = 0; for (Port port : getDataPorts()) { final Value value = port.getValue(); // if ((position < value.size()) && (value.getBit(position) == // Bit.CARE)) if (position < value.getSize()) { final Bit bit = value.getBit(position); if (bit.isCare() && !bit.isConstant()) { careBits++; } } } return careBits; } COM: <s> gets the number of significant input bits at a given position </s>
funcom_train/5374575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setElements(float m11, float m12, float m21, float m22, float dx, float dy) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); // Gdip.Matrix_SetElements(handle, m11, m12, m21, m22, dx, dy); } COM: <s> modifies the receiver to represent a new transformation given all of </s>
funcom_train/40415357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualsObject() { Ace ace1 = new Ace(max, Right.READ); Ace ace2 = new Ace(max, Right.READ); assertNotSame(ace1, ace2); assertEquals(ace1, ace2); ace2 = new Ace(differentMax, Right.READ); assertFalse(ace1.equals(ace2)); assertFalse(ace2.equals(ace1)); } COM: <s> tests for equals method </s>
funcom_train/39260906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeRandomMove() { MeTTTaModel model = ((MeTTTaController)getParentNode()).getModel(); for (int i = 0; i < 9; i++) { if (!model.isPlayed(i)) { getParentNode().sendMessage(ISwingEntity.SWIG_ACTION_EVENT, "select" + i, this); break; } } } COM: <s> make a random move </s>
funcom_train/29060301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object deserialise(byte[] byteArray) { try { ObjectInputStream oip = new ObjectInputStream(new ByteArrayInputStream(byteArray)); return oip.readObject(); } catch (IOException e) { log.error("DESERIALISING could not be done - IOException"); } catch (ClassNotFoundException e) { log.error("DESERIALISING could not be done - ClassNotFoundException"); } return null; } COM: <s> p deserialises the given byte array to an object </s>
funcom_train/46439561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws FeedErrorException { final FeedJob feedJob = context.getFeedJob(); try { doPreEventPhases(); doBatchEventPhases(); doPostEventPhases(); feedJobManager.moveToCompleted(feedJob, context); } catch (Exception e) { handleFailure(feedJob, e); } finally { shutdown(); } } COM: <s> this method should contain the set of instructions necessary to perform </s>
funcom_train/25198768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNodeValue(Node node) { StringBuilder sb = new StringBuilder(); for (Node n = node.getFirstChild(); n != null; n = n.getNextSibling()) { if (n.getNodeType() == Node.TEXT_NODE) { sb.append(n.getNodeValue()); } } return sb.toString(); } COM: <s> get the accumulated text values of a node </s>
funcom_train/50774902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodWeavepoint getMethod(String signature) { if (StringUtil.containsWildcards(signature)) return null; String match = getFullName()+"."+signature; List result = getMethods(match, false); if (result.size() == 0) //throw new TypeNotFoundException(signature); return null; if (result.size() > 1) { // how does that happen?? System.err.println("Fatal error: ClassWeavepoint.getMethod() found more than one method (which should be impossible)"); System.exit(-1); } return (MethodWeavepoint)result.get(0); } COM: <s> returns the method with the given signature </s>
funcom_train/889141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node searchNode(NodeIterator aNodeIterator, String aString) throws ParserException { Node result = null; while (aNodeIterator.hasMoreNodes()) { Node node = aNodeIterator.nextNode(); if (node instanceof TagNode) { TagNode tag = (TagNode) node; if (aString.equals(tag.getTagName())) { result = node; break; } } } return result; } COM: <s> search a node by tag name </s>
funcom_train/28506270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTruckDock() { truckdock.setPosition(65.0f,0.0f,0.0f); truckdock.setColor(0.4f,0.4f,0.4f); truckdock.setSize(3.0f, 0.0f, 78.0f); } COM: <s> sets the parkingspot for trucks </s>
funcom_train/43244819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsInUse() { System.out.println("isInUse"); VistAConnection instance = new VistAConnection(); boolean expResult = true; boolean result = instance.isInUse(); 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 is in use method of class org </s>
funcom_train/5373769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection (int value) { checkWidget (); /* int [] max = new int [1], min = new int [1]; OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, min, max); value = Math.min (Math.max (min [0], value), max [0]); */ value = Math.min (Math.max (minimum, value), maximum); setSelection (value, false); } COM: <s> sets the em selection em which is the receivers </s>
funcom_train/46748142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAppointmentId(Long appointmentId) { if (!(this.appointmentId.longValue() == appointmentId.longValue())) { Long oldappointmentId= 0L; oldappointmentId = this.appointmentId.longValue(); this.appointmentId = appointmentId.longValue(); setModified("appointmentId"); firePropertyChange(String.valueOf(RESOURCEAPPOINTMENTS_APPOINTMENTID), oldappointmentId, appointmentId); } } COM: <s> appointment for this resource </s>
funcom_train/50862349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timePassing(double time) { /* String name = getBuilding().getBuildingManager().getSettlement().getName(); if (getProblemsBeingTreated().size() > 0) { Iterator i = getProblemsBeingTreated().iterator(); while (i.hasNext()) { HealthProblem problem = (HealthProblem) i.next(); logger.info(name + ": " + problem.toString() + " - cured: " + problem.getCured()); } } */ } COM: <s> time passing for the building </s>
funcom_train/46837263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonAccept() { if (jButtonAccept == null) { jButtonAccept = new JButton(); jButtonAccept.setBounds(new Rectangle(283, 316, 108, 25)); jButtonAccept.setText(EBIPGFactory.getLANG("EBI_LANG_INSTALL")); jButtonAccept.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { } }); } return jButtonAccept; } COM: <s> this method initializes j button accept </s>
funcom_train/8077306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration enumerateMeasures() { Vector newVector = new Vector(); if (m_SplitEvaluator instanceof AdditionalMeasureProducer) { Enumeration en = ((AdditionalMeasureProducer)m_SplitEvaluator). enumerateMeasures(); while (en.hasMoreElements()) { String mname = (String)en.nextElement(); newVector.addElement(mname); } } return newVector.elements(); } COM: <s> returns an enumeration of any additional measure names that might be </s>
funcom_train/45223383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCalltreerootData(Calltreeroot updatedCalltreeroot) { myUnit.getCalltreeroot().get(selectedCalltreerootIndex) .setName(updatedCalltreeroot.getName()); myUnit.getCalltreeroot().get(selectedCalltreerootIndex) .setDescription(updatedCalltreeroot.getDescription()); myUnit.getCalltreeroot().get(selectedCalltreerootIndex) .setComment(updatedCalltreeroot.getComment()); myUnit.getCalltreeroot().get(selectedCalltreerootIndex) .setEvents(updatedCalltreeroot.getEvents()); } COM: <s> update calltreeroot data </s>
funcom_train/44346494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompareCGResults compare(Concept entryPoint1, CG cg2, Concept entryPoint2) { try { CGOperations cgOperations = new CGOperations(); CompareCGResults compareCGResults = cgOperations.compare(this, entryPoint1, cg2, entryPoint2); cgOperations = null; return compareCGResults; } catch (Exception ex) { return null; } } COM: <s> compare two cgs cg1 and cg2 the operation starts by computing the generalization </s>
funcom_train/12192444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatchRemovedEntryEvent(CacheEntry entry) { RemovalListener[] list; synchronized (this) { // Get a reference to the array while synchronized. The array // contents are never modified so can be used while unsyncronized. list = listeners; } for (int i = 0; i < list.length; i++) { RemovalListener listener = list[i]; listener.entryRemoved(entry); } } COM: <s> dispatch the remove event to the listeners </s>
funcom_train/22403233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void networkNextPlayer() { if (!victory) { // // Go to the next player // currentPlayer++; // // Rotate around the end to the top // if (currentPlayer >= numPlayers) { currentPlayer = 0; } // // Skip over dead players // while (playerState.isDeadPlayer(getPloyPieceStateManager().getCurrentPieceState(), currentPlayer)) { currentPlayer++; if (currentPlayer >= numPlayers) { currentPlayer = 0; } } // // Send new player message to network // networkSetPlayer(currentPlayer); } } COM: <s> network request to go to next player </s>
funcom_train/47283723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createconnection() { try { Class.forName("com.mysql.jdbc.Driver"); //Loading driver String username = "root"; String password = ""; String mysqlurl = "jdbc:mysql://localhost:3306/mhrd"; con = DriverManager.getConnection(mysqlurl, username, password); //Creating connection with database } catch (Exception ex) { System.out.println(ex); } } COM: <s> method to create connection with database </s>
funcom_train/48423407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Matrix4f getBindMatrix(Vector3f tras, Vector3f rot) { Matrix4f bmatrix = null; Quaternion q = null; try { bmatrix = new Matrix4f(); bmatrix.setIdentity(); bmatrix.setTranslation(tras); q = buildQuat(rot); bmatrix.setRotationQuaternion(q); } catch (Exception Ex) { logger.log(Level.SEVERE, "Error, building BindMatrix.", Ex); } return bmatrix; } COM: <s> method that creates bind matrix from traslation vector and rotation </s>
funcom_train/13479368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInhabitant(Inhabitant person) { int climate = ((Planet)_planetoid).getClimate(); boolean canHaveFarmers = (climate != Planet.CLIMATE_BARREN) && (climate != Planet.CLIMATE_RADIATED) && (climate != Planet.CLIMATE_TOXIC); // FIXME: || (hasTechnology(BIOMORPHIC_FUNGI) int job = Inhabitant.PROFESSION_WORKER; if (getFood() <= 0 && canHaveFarmers) { job = Inhabitant.PROFESSION_FARMER; } addInhabitant(person, job); } COM: <s> add an inhabitant to the colonys list of inhabitants </s>
funcom_train/20042592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { acceptedCall = acc.accept(connectString) ; } catch (com.sun.star.lang.IllegalArgumentException e) { ex = e ; } catch (com.sun.star.connection.ConnectionSetupException e) { ex = e ; } catch (com.sun.star.connection.AlreadyAcceptingException e) { ex = e ; } } COM: <s> call code accept code method </s>
funcom_train/43408468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel5() { if (jPanel5 == null) { FlowLayout flowLayout11 = new FlowLayout(); jPanel5 = new JPanel(); jPanel5.setLayout(flowLayout11); flowLayout11.setAlignment(java.awt.FlowLayout.LEFT); jPanel5.add(getEditButton(), null); jPanel5.add(getDeleteButton(), null); jPanel5.add(getViewButton(), null); } return jPanel5; } COM: <s> this method initializes j panel5 </s>
funcom_train/13446199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean findNextValidParent() { log.fine("start"); if(parent == root) { // mark as invalid! parent = null; return false; } while(parent != null) { TreeStateNode newParent = (TreeStateNode)parent. getParent(); if(newParent != null) { nextIndex = newParent.getIndex(parent); parent = newParent; childCount = parent.getChildCount(); if(updateNextIndex()) return true; } else parent = null; } return false; } COM: <s> finds the next valid parent this should be called when next index </s>
funcom_train/6265013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertIntoDb() { StringBuffer insert = new StringBuffer(); Connection con = null; PreparedStatement pstmt = null; try { con = DbConnectionManager.getConnection(); pstmt = con.prepareStatement(INSERT_GROUP); pstmt.setString(1, name); pstmt.setString(2, description); pstmt.setInt(3, id); pstmt.executeUpdate(); } catch (SQLException sqle) { log.error("Error in DbGroup:insertIntoDb()-" , sqle); } finally { try { pstmt.close(); } catch (Exception e) { log.error("",e); } try { con.close(); } catch (Exception e) { log.error("",e); } } } COM: <s> inserts a new record into the database </s>
funcom_train/1026068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doCall( LClosure c, LValue[] args ) { settop(0); pushlvalue( c ); for ( int i=0, n=(args!=null? args.length: 0); i<n; i++ ) pushlvalue( args[i] ); prepStackCall(); execute(); base = (cc>=0? calls[cc].base: 0); } COM: <s> put the closure on the stack with arguments </s>
funcom_train/6512314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTemplateName(WikiSystem wiki, WikiPage page) { Properties props = wiki.getProperties(); String template = props.getProperty ("ViewPageAction.Template"); if (page != null) { if (props.getProperty (page.getTitle()) != null) template = props.getProperty (page.getTitle()); } return template; } COM: <s> which web macro template does this action use p </s>
funcom_train/24318769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doesUserExist(String username) throws Exception { boolean ret = false; if (caseInsensitiveOutput) { username = MiscUtilities.getCaseInsensitive(username, true); } UserQuery uQry = new UserQuery(); uQry.setQueryUserid(username); uQry.requireUniqueInstance(); ret = null != uQry.getNextDO(); return ret; } COM: <s> returns true if user with given username exists </s>
funcom_train/15865953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add( Jetdefs defs ){ this.getForms().putAll( defs.getForms() ); this.getActions().putAll( defs.getActions() ); this.getTemplates().putAll( defs.getTemplates() ); this.components.putAll( defs.getComponents() ); } COM: <s> method to get definitions from another def into this one </s>
funcom_train/19378963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean SQLTableExists(String list_name, String table_created) { boolean listExists = false; if (table_created.length() > 0) { String[] list = utils.parseValues(table_created, ';'); for (int i = 0; i < list.length; i++) { if (list[i].equals(list_name)) { listExists = true; break; } } } return listExists; } COM: <s> this method returns true if the sql table exists false otherwise </s>
funcom_train/50864144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double reviewingPhase(double time) { // If person is incapacitated, end task. if (person.getPerformanceRating() == 0D) endTask(); // Check if peer review phase in study is completed. if (study.isCompleted()) endTask(); if (isDone()) return time; // Peer review study. (No operation required for this) // Add experience addExperience(time); return 0D; } COM: <s> performs the study peer reviewing phase </s>
funcom_train/47507189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String htmlCleanUp(String s) { System.out.println("Inicio do UrlReader -> htmlCleanUp "); s = s.replaceAll("<[a-zA-Z0-9]*?>", "\n"); s = s.replaceAll("</CENTER>", "\n"); s = s.replaceAll("</[BIP]>", ""); System.out.println("Fim do UrlReader -> htmlCleanUp "); return s; } COM: <s> html clean up cleans html source to be deprecated </s>
funcom_train/38741758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteGroups(Long[] oids){ try{ return port.deleteGroups(Arrays.asList(oids),session.getSessionId()); }catch(Exception ex){ this.error = (ex instanceof SOAPFaultException)? ex.getMessage() : ex.getClass().getSimpleName()+": "+ ex.getMessage(); return false; } } COM: <s> removes a list of groups </s>
funcom_train/33608029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime(double time) { if (this.time == null || this.time != time) { double oldTime = this.time; this.time = time; setBaseGraph(longGraph.slice(time, false)); pcs.firePropertyChange($TIME, oldTime, time); } } COM: <s> sets the time slice of the longitudinal graph </s>
funcom_train/42850156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DFAState makeDFAState(TreeSet<NFAState> currentSet) { DFAState temp = findDFAState(currentSet); if (temp != null) { return temp; } temp = new DFAState(this.dfaCount); temp.setName(getSetString(currentSet)); dfaPowerSetStates.add(temp); ++dfaCount; return temp; } COM: <s> builds a dfastate for the given set of states </s>
funcom_train/20045518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _LabelControl() { final XInterface xTextLabel = (XInterface)tEnv.getObjRelation("LC"); testProperty("LabelControl", new PropertyTester() { protected Object getNewValue(String p, Object oldVal) { if (utils.isVoid(oldVal)) return xTextLabel ; else return super.getNewValue("LabelControl",oldVal); } }) ; } COM: <s> sets the new value code lc code relation if code null code </s>
funcom_train/20080451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(ExpandItem item, int index) { if (fireEvent(Events.BeforeAdd, this, item, index)) { items.add(index, item); item.parent = this; adopt(item); if (rendered) { renderItem(item, index); adjustExpandedSize(); updateStyles(); } fireEvent(Events.Add, this, item, index); } } COM: <s> inserts the item at the specified index </s>
funcom_train/51575030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disconnectMenu() { // This is where we actually disconnect the socket. // Is there a nicer way of saying good-bye? // Do we really need to close the socket?! We should get here because the // socket is already closed! Check this out! XXX // This guarantees that we've cleaned up after ourselves, too // Change the connection notice on the main window if applicable final MuckMain window = MuckMain.getInstance(); window.checkDisconnectMenu(); } COM: <s> set the proper states of our windows etc </s>
funcom_train/4644697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActualTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_actualTime_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Task_actualTime_feature", "_UI_Task_type"), TassooPackage.Literals.TASK__ACTUAL_TIME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the actual time feature </s>
funcom_train/18349214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == null) { return false; } if (!CapCommonRef.class.isAssignableFrom(o.getClass())) { return false; } CommonConceptKey other = ((CapCommonRef)o).getPK(); if (other == null) { return false; } return myKey.equals(other); } COM: <s> type equality is tested by key </s>
funcom_train/26454830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSetMaxEntries() { getCache().setMaxEntries(MAX_ENTRIES); assertEquals(MAX_ENTRIES, getCache().getMaxEntries()); // Specify an invalid capacity try { getCache().setMaxEntries(INVALID_MAX_ENTRIES); fail("Cache capacity set with an invalid argument"); } catch (Exception e) { // This is what we expect } } COM: <s> test the capacity setting </s>
funcom_train/4124864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLStreamWriter send() throws IOException { waitForAndSetNewQuestionId(); try { xmlOut = xof.createXMLStreamWriter(out); return xmlOut; } catch (Exception e) { logger.log(Level.WARNING, "Failed to send message", e); releaseQuestionId(); throw new IOException(e.toString()); } } COM: <s> starts a session for sending a message using streaming </s>
funcom_train/41468328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] b, int off, int len) throws IOException { if (len > b.length) len = b.length; int cnt = this.available(); if (cnt > len) cnt = len; if (b == null || off < 0 || len < 0 || off + len > b.length) throw new EOFException("Target byte array is null or bad off or len values"); System.arraycopy(this.buffer, this.start + this.pos, b, off, cnt); this.pos += cnt; return cnt; } COM: <s> fill the byte with bytes from the stream </s>
funcom_train/38155836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extractHolidayID() { String tempString = whereClause; System.out.println("Where clause: "+whereClause); if (whereClause != null && !whereClause.equals("EMPTY")) { tempString = tempString.substring(tempString.lastIndexOf("=")+1); HolidayID = Integer.parseInt(tempString.trim()); } } COM: <s> gets the holiday id from the where clause </s>
funcom_train/44810914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropDatabaseSchema() throws DataAccessException { logger.info("Dropping database schema for Hibernate SessionFactory"); HibernateTemplate hibernateTemplate = new HibernateTemplate(getSessionFactory()); hibernateTemplate.execute( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Connection con = session.connection(); Dialect dialect = Dialect.getDialect(getConfiguration().getProperties()); String[] sql = getConfiguration().generateDropSchemaScript(dialect); executeSchemaScript(con, sql); return null; } } ); } COM: <s> execute schema drop script determined by the configuration object </s>
funcom_train/3561702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(int row1, int row2) { compares++; for (int level = 0; level < sortingColumns.size(); level++) { Integer column = (Integer)sortingColumns.elementAt(level); int result = compareRowsByColumn(row1, row2, column.intValue()); if (result != 0) { return ascending ? result : -result; } } return 0; } COM: <s> compares two columns </s>
funcom_train/22028631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeShortArray(short[] s) throws IOException { byte[] b = new byte[2*s.length]; for(int i=0; i<s.length; i += 1) { int t = s[i]; b[2*i] = (byte) (t>>8); b[2*i + 1] = (byte) t; } write(b, 0, b.length); } COM: <s> write an array of shorts </s>