__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4193193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { try { Header hd=(Header)obj; if (hd.getName().equals(this.getName()) && hd.getValue().equals(this.getValue())) return true; else return false; } catch (Exception e) { return false; } } COM: <s> whether the header is equal to object i obj i </s>
funcom_train/3409139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("("); sb.append("Signer: " + signerCertPath.getCertificates().get(0)); if (timestamp != null) { sb.append("timestamp: " + timestamp); } sb.append(")"); return sb.toString(); } COM: <s> returns a string describing this code signer </s>
funcom_train/5342356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(String subroutine, String[] args) throws OSAException, IllegalStateException { if (ptr == 0) { throw (new IllegalStateException()); } int errorCode = ExecuteOSAScriptEvent(ptr, subroutine, args); if (errorCode < 0) { String msg = GetErrorMessage(ptr); int errorNum = GetErrorNumber(ptr); throw (new OSAException(msg, errorNum, errorCode)); } } COM: <s> executes a specific subroutine of the script with optional parameters </s>
funcom_train/11758287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(java.io.ObjectOutputStream out) throws IOException { HashMap bak00 = currentObjects; HashMap bak01 = currentObjects_inverse; try { currentObjects = null; currentObjects_inverse = null; out.defaultWriteObject(); } catch (IOException ex) { currentObjects = bak00; currentObjects_inverse = bak01; throw new IOException(); } currentObjects = bak00; currentObjects_inverse = bak01; } COM: <s> handling write object method is necessary in order to </s>
funcom_train/33282953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jsxFunction_doScroll(final String scrollAction) { if (((HtmlPage) getDomNodeOrDie().getPage()).isBeingParsed()) { throw Context.reportRuntimeError("The data necessary to complete this operation is not yet available."); } // Ignore because we aren't displaying anything! } COM: <s> simulates a click on a scrollbar component ie only </s>
funcom_train/27785379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add() { Thread thread = new Thread(new Runnable() { public void run() { StoredExpression storedExpression = ExpressionEditorDialog.showAddDialog(storedExpressions, Locale.getString("ADD_EQUATION")); if(storedExpression != null) { storedExpressions.add(storedExpression); setModel(model); model.fireTableDataChanged(); repaint(); } } }); thread.start(); } COM: <s> display a dialog asking the user to enter a new stored expression </s>
funcom_train/4363669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addField() { int len = fields.length; int pos=count; if (count >= len) { // expand header list array Field tmp[] = new Field[pos * 2]; System.arraycopy(fields, 0, tmp, 0, len); fields = tmp; } if (fields[pos] == null) { fields[pos] = new Field(); } count++; return pos; } COM: <s> create a new unitialized entry </s>
funcom_train/5399647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test002Bad() { form = getForm("form_string_dynamic_001"); field = form.getField("field_001_"); values.put("field_001_1", ""); values.put("field_001_3", ""); values.put("field_001_2", ""); assertFalse(MSG_001, validateForm(values)); printValues(); } COM: <s> field 001 dynamic field with all empty strings </s>
funcom_train/26292624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { String nameToUse = name; if (name == null) nameToUse = "~NO NAME~"; if (getParentScope() != null && !getParentScope().isDefaultOrBaseScope()) return getParentScope().getQualifiedName() + "." + nameToUse; else return nameToUse; } COM: <s> get the fully qualified name of the symbol </s>
funcom_train/12561354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateBoundsByScrollInd() { if (scrollInd != null && scrollInd.isVisible() ) { if (ScrollIndSkin.MODE == ScrollIndResourcesConstants.MODE_BAR ) { bounds[W] -= scrollInd.bounds[W]; if (ScreenSkin.RL_DIRECTION) { bounds[X] += scrollInd.bounds[W]; } } scrollInd.setBounds(); } } COM: <s> update bounds of layer depend on visability of scroll indicator layer </s>
funcom_train/12182036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ODOMEditorContext createEditorContext() throws Exception { ODOMEditorContext context = ODOMEditorContext. createODOMEditorContext(null, new MockFile(FILE), NULL_UR_MEMENTO_ORIGINATOR); ODOMElement document = createDocument(SINGLE_PANE_RUN); context.removeRootElement(context.getRootElement()); context.addRootElement(document, null); return context; } COM: <s> create an editor context for this test </s>
funcom_train/1690027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); addFastViews(layout); addViewShortcuts(layout); addPerspectiveShortcuts(layout); layout.addView("org.skyfree.ghyll.tcard.repository.RepoExplorer", IPageLayout.LEFT, 0.36f, editorArea); layout.addView("org.skyfree.ghyll.ui.property.GhyllPropertyView", IPageLayout.BOTTOM, 0.67f, editorArea); } COM: <s> creates the initial layout for a page </s>
funcom_train/19101394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkTokenRequisites(Object[][] o) { int k = o.length; for (int i = 0; i < k; i++) { Place p = (Place) o[i][0]; Arc a = (Arc) o[i][1]; int t = ((Integer) p.getAttribute("Tokens")).intValue(); int w = ((Integer) a.getAttribute("Weight")).intValue(); if (t < w) { return false; } } return true; } COM: <s> checks if all places have enough tokens </s>
funcom_train/46691229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadIntoTableItem(TableItem tableItem) { tableItem.setImage(0, getCompletionStatusImage()); tableItem.setImage(1, getPriorityImage()); tableItem.setText(2, getPostedDateStr()); tableItem.setText(3, getDueDateStr()); tableItem.setText(4, getCompletedDateStr()); tableItem.setText(5, getCategory()); tableItem.setText(6, getDescription()); tableItem.setData(this); } COM: <s> loads this to do item into the specified table item </s>
funcom_train/5525747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shiftPageUp () { for (int i=0; i<PageSize; i++) { if (CursorLine.previous()==null) break; CursorLine=CursorLine.previous(); } CursorPos=0; for (int i=0; i<PageSize; i++) { if (TopLine.previous()==null) break; TopLine=TopLine.previous(); } updateBlock(CursorLine,CursorPos); paintlines(); testCursor(); V.setVerticalScrollbar(); copy(); } COM: <s> same as page up with block extend </s>
funcom_train/5341519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canBeUnshared(LibraryTreeNode node) { if (node == null) return false; if (node == speciallySharedFilesNode) return false; if (node == incompleteFilesNode) return false; if (node == sharedFilesNode) return false; if (node.getParent() == null) return false; if (node.getParent() == sharedFilesNode) return true; return canBeUnshared((LibraryTreeNode)node.getParent()); } COM: <s> returns true if the given node is in the shared files subtree </s>
funcom_train/38520022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(Element root) { cells = new Vector(); Iterator cellIterator = root.getChild("cells").getChildren().iterator(); while(cellIterator.hasNext()) { Element cellRoot = (Element) cellIterator.next(); if(cellRoot.getName().compareTo("cell") == 0) { Cell c = new Cell(cellRoot); add(c); } } } COM: <s> loads all cell information from root </s>
funcom_train/21996087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportError(ActionErrors errors, String msg_id, Exception e) { String msg; if (e instanceof JRecException) msg = ((JRecException)e).getRootMessage(); else msg = e.getMessage(); log.warn("reportError: ", e); reportError(errors, msg_id, msg, null); } COM: <s> kludge stolen from jrec action </s>
funcom_train/2254409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoPostWithoutTimeOutSingleRequest() throws Exception { WebConversation wc = new WebConversation(); WebResponse wr = wc.getResponse("http://localhost:8080/controller/rest/polling/96e79218965eb72c92a549dd5a330112/1,2"); System.out.println(wr.getText()); } COM: <s> b situation4 b br </s>
funcom_train/42645724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserSpaceRectangle(Rectangle2D.Float rect){ if (userSpaceRectangle != null){ userSpaceRectangle = new Rectangle2D.Float(rect.x, rect.y, rect.width, rect.height); getEntries().put(Annotation.RECTANGLE_KEY, PRectangle.getPRectangleVector(userSpaceRectangle)); } } COM: <s> sets the users page rectangle for this annotation action instance </s>
funcom_train/37829755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPortal(final Player admin, final List<String> args) { sandbox.setZone(sandbox.getZone(admin)); int x = admin.getX(); int y = admin.getY(); Portal portal = instantiatePortal(args); setPortalName(args, portal); portal.setPosition(x, y); int destinationOffset = getDestinationOffset(args); portal.setDestination(args.get(destinationOffset), args.get(destinationOffset + 1)); // add entity to game sandbox.add(portal); } COM: <s> creates a portal </s>
funcom_train/574414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void exportFlatFile(String table, String file) throws StopAction { if(syntax != MYSQL){ throw new StopAction(Language.get(TAG+"onlyWithMySql")); } try { Statement stmt = Setup.getStatement(); String comando = "SELECT * INTO OUTFILE \"" + file + "\" FROM " + table; // Log.logDbCommands(comando); stmt.execute(comando); } catch (SQLException e) { e.printStackTrace(); throw new StopAction(""+e); } } COM: <s> esempio di path del file su netware sistema mysql export xxxxx </s>
funcom_train/27791075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGassServer(GassServerBean gassServer) { jobOutput = new StringBuffer(); if (jobOutputStream == null) { jobOutputStream = new JobOutputStream(this); } System.out.println("JSW: " + gassServer.toString()); gassServer.registerGassOutputStream(jobOutputStream); gassServer.registerGassErrorStream(jobOutputStream); System.out.println("The GASS server has been started OK!"); } COM: <s> specify a gass server to use to receive job output </s>
funcom_train/22014146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws Exception { // Properties prop = new Properties // Creates the thread Cron, wich generates the engine events loadConfig(); cron = new Cron(this, iTimeTableGenerationFrec); cron.setName("Cron"); cron.setDaemon(daemon); cron.start(); stoping = false; } COM: <s> initializes the crontab reading task table from configuration </s>
funcom_train/198326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getXMLElementForObject(Document d) { Element e = d.createElement(getClass().getName()); e.setAttribute("x", java.lang.Double.toString(x)); e.setAttribute("y", java.lang.Double.toString(y)); e.setAttribute("width", java.lang.Double.toString(width)); e.setAttribute("height", java.lang.Double.toString(height)); return e; } COM: <s> returns a w3 c dom element with the attributes of this grid ellipse </s>
funcom_train/8357663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getWorkspacePanel() { if (workspacePanel == null) { workspacePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, getWorkspaceTabs(), getQInfoPanel()); workspacePanel.setPreferredSize(new java.awt.Dimension(200,100)); workspacePanel.setBorder(new EtchedBorder()); workspacePanel.setDividerLocation(250); workspacePanel.setResizeWeight(1); } return workspacePanel; } COM: <s> this method initializes workspace panel </s>
funcom_train/15924267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrint(CodeWriter w, PrettyPrinter tr) { if (qualifier != null) { print(qualifier, w, tr); w.write("."); } w.write(kind + "("); w.begin(0); for (Iterator<Expr> i = arguments.iterator(); i.hasNext(); ) { Expr e = i.next(); print(e, w, tr); if (i.hasNext()) { w.write(","); w.allowBreak(0); } } w.end(); w.write(");"); } COM: <s> write the call to an output file </s>
funcom_train/51245674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int makeRowsEditable(int count, int regularCount) { for (int subCount = 0; subCount < regularCount; subCount++) { PreparedStatementArgPanelRow row = (PreparedStatementArgPanelRow) rows.get(count); row.setEnabled(true); count++; } return count; } COM: <s> makes a row editable </s>
funcom_train/26484910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExpression() { // I'd like to start observing the contents of the eval string as soon // as we are constructed, but the other expressions may not yet be defined // (for example, when reading in expressions from an XML file). That's why // we start observing contents when someone asks for the eval string. if (observedContents == null) startObservingContents(); return expr; } COM: <s> returns the expression string </s>
funcom_train/23677567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { FretboardNote note = findNote(e); if (note != null) { if (as.isSelected(note.getNote()) && !as.isSelected(note)) { as.removeNote(note.getNote()); as.addSelectedNote(note); eventManager.fireSelectionChanged(); } else { if (as.isSelected(note)) { as.removeSelectedNote(note); } else { as.addSelectedNote(note); } eventManager.fireSelectionChanged(); } } } COM: <s> handle note selection </s>
funcom_train/23742443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WebApplicationContext createWebApplicationContext(ServletContext servletContext, ApplicationContext parent) throws BeansException { MergeXmlWebApplicationContext wac = new MergeXmlWebApplicationContext(); wac.setParent(parent); wac.setServletContext(servletContext); wac.setConfigLocation(servletContext.getInitParameter(CONFIG_LOCATION_PARAM)); wac.setPatchLocation(servletContext.getInitParameter(PATCH_LOCATION_PARAM)); wac.setShutdownBean(servletContext.getInitParameter(SHUTDOWN_HOOK_BEAN)); wac.setShutdownMethod(servletContext.getInitParameter(SHUTDOWN_HOOK_METHOD)); customizeContext(servletContext, wac); wac.refresh(); return wac; } COM: <s> instantiate the root id web application context for this loader either the </s>
funcom_train/6254301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConnManager getConnectionManager() { synchronized (connectionMgrs) { if (connectionManager == null) { Reference ref = (Reference) connectionMgrs.get(this); connectionManager = (ref != null) ? (ConnManager) ref.get() : null; if (connectionManager == null) { connectionManager = connectionManagerFactory.create(this); connectionMgrs.put( this, new WeakReference(connectionManager)); } } return connectionManager; } } COM: <s> returns the connection manager for this endpoint </s>
funcom_train/4426451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void propagateVariables(EList<Var> variables) { for (Var var : variables) { for (Use use : var.getUses()) { Expression oldExpr = EcoreHelper.getContainerOfType(use, ExprVar.class); Expression initialValue = var.getInitialValue(); if (initialValue != null) { EcoreUtil.replace(oldExpr, IrUtil.copy(initialValue)); } } } } COM: <s> propagate the values of the given variables to their uses </s>
funcom_train/50577817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stringDump(String prefix) { String result = prefix + toString() + "\n"; System.out.println(toString(prefix)); if (children != null) { for (int i = 0; i < children.length; ++i) { SimpleNode n = (SimpleNode) children[i]; if (n != null) { result = result + n.stringDump(prefix + " "); } } } return result; } COM: <s> provides a method to dump the entire subtree of nodes to </s>
funcom_train/13487382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown(boolean closeConnection) { for (Entry<Axis, QueryAxis> entry : this.axes.entrySet()) { entry.getValue().tearDown(); } this.axes.clear(); this.clearListeners(); if (closeConnection) { try { this.connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } COM: <s> safely disposes of all underlying objects of this </s>
funcom_train/5382522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PerformanceStats createFailureStats(String contextName, long elapsed) { PerformanceStats failedStat = new PerformanceStats(event, blame, contextName); PerformanceStats old = (PerformanceStats) statMap.get(failedStat); if (old == null) statMap.put(failedStat, failedStat); else failedStat = old; failedStat.isFailure = true; failedStat.runCount++; failedStat.runningTime += elapsed; return failedStat; } COM: <s> creates a stats object representing a performance failure </s>
funcom_train/17458315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSongCount() throws MPDConnectionException, MPDDatabaseException { try { return (Integer.parseInt(mpd.getServerStat(MPD.StatList.SONGS))); } catch (MPDResponseException re) { throw new MPDDatabaseException(re.getMessage(), re.getCommand()); } catch (Exception e) { throw new MPDDatabaseException(e.getMessage()); } } COM: <s> returns the total number of songs in the database </s>
funcom_train/45331661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearOutputText() { txtConsoleOutput.setText(""); txtDebugOutput.setText(""); txtVerboseOutput.setText(""); txtErrorOutput.setText(""); removeAllTreeNodes(); updateDetailsPane(null, true); updateGlobalsPane(null); } COM: <s> clear everything on the display </s>
funcom_train/49050212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private boolean addIsSupplementary(HttpServletRequest request, String primaryURI, AccessibilityMetadataEditor equivMD) { request.setAttribute(AuthoringHttpConstants.IS_SUPPLEMENTARY,request.getParameter(AuthoringHttpConstants.IS_SUPPLEMENTARY)); return addIsSupplementaryByRequestAttribute (request, primaryURI, equivMD); } COM: <s> add supplementary using parameter information from request </s>
funcom_train/5576464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCurrentPlaylistName(){ SWIGTYPE_p_xmmsc_result_St result = Xmmsclient.xmmsc_playlist_current_active(xbo.connectionTwo); Xmmsclient.xmmsc_result_wait(result); String name[] = new String[1]; Xmmsclient.xmmsc_result_get_string(result, name); Xmmsclient.xmmsc_result_unref(result); return name[0]; } COM: <s> returns the name of the current playlist </s>
funcom_train/38388647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); composite.setFont(parent.getFont()); createResourcesGroup(composite); createOptionsGroup(composite); restoreResourceSpecificationWidgetValues(); // ie.- local restoreWidgetValues(); // ie.- subclass hook // if (initialResourceSelection != null) // setupBasedOnInitialSelections(); updateWidgetEnablements(); setPageComplete(determinePageCompletion()); setControl(composite); } COM: <s> non javadoc method declared on idialog page </s>
funcom_train/15408797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { doingShutdown = true; try { if (isActive) { synchronized (listenerThread) { try { listenerThread.wait(1000); } catch (InterruptedException e) { // OK to ignore as expected to Interrupt for shutdown. ; } } } listenerThread.interrupt(); serverListenSocket.close(); } catch (IOException e) { logger.log(Level.SEVERE, null, e); } } COM: <s> shutdown this listener </s>
funcom_train/49789948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChangeable() throws Exception { beginAtSitemapThenPageQuery("Home", "name=test1"); { String source = getLabelIDForText("current name"); assertLabeledFieldEquals(source, "test1"); // set it setLabeledFormElementField(source, "a new value"); } // reload beginAtSitemapThenPageQuery("Home", "name=test1"); // it hasn't changed { String source = getLabelIDForText("current name"); assertLabeledFieldEquals(source, "test1"); } } COM: <s> we can edit the target field and it will not change because </s>
funcom_train/45113801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitForBufferExecution(long timeout) throws Exception{ if(executor == null){ return; } try { executor.join(timeout); if(executor.isAlive()){ executor.interrupt(); throw new Exception("Wait for execution timeout"); } if(executor.isFailed()){ if(executor.getThrown() != null){ throw executor.getThrown(); } else if(executor.getAnalyzeException() != null){ throw executor.getAnalyzeException(); } } } finally { executor = null; } } COM: <s> wait for the execution buffer to end </s>
funcom_train/45457891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUpdate(DocumentEvent e) { int newNumLines = textArea.getDocument().getDefaultRootElement().getElementCount(); if (newNumLines < currentNumLines) { // Used to be <= // Adjust the amount of space the line numbers take up, if necessary. if (newNumLines/10 < currentNumLines/10) updateCellWidths(); currentNumLines = newNumLines; repaint(); } } COM: <s> called whenever a character is removed ie backspace delete in the </s>
funcom_train/5809466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char getServiceStatus(long nodeid, String ip, String svc) { JdbcTemplate template = new JdbcTemplate(getConnectionFactory()); String status= (String)template.queryForObject(RTCConstants.DB_GET_SERVICE_STATUS, new Object[] { new Long(nodeid), ip, svc }, String.class); if (status == null) return '\0'; return status.charAt(0); } COM: <s> get the ismanaged status for the node id ip address combination </s>
funcom_train/4122486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element diplomaticTrade(DummyConnection connection, Element element) { // TODO: make an informed decision DiplomacyMessage message = new DiplomacyMessage(freeColServer.getGame(), element); boolean accept = getAIPlayer().acceptDiplomaticTrade(message.getAgreement()); if (accept) { message.setAccept(); return message.toXMLElement(); } else { return null; } } COM: <s> handles an diplomatic trade message </s>
funcom_train/44222517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSelectBrainVolume(String name) { Enumeration en = this.buttonGroup.getElements(); while (en.hasMoreElements()) { JRadioButton rb = (JRadioButton) en.nextElement(); if (rb.getActionCommand().equals(name)) { rb.doClick(); break; } } } COM: <s> p select the given brain volume delineation </s>
funcom_train/20773737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(float initialDisparity, int initialTimestamp) { resetHistogram(); checkAreaRectangle = new Rectangle(0, 0, size, size); prevDisparities.clear(); setDisparity(initialDisparity, initialTimestamp); DisparityLimitEnabled = false; disparityLimit = - (int) (size*maxDisparityFractionChipsizeX); lastTimestamp = -1; } COM: <s> resets the instance </s>
funcom_train/21306041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton4() { if (jButton4 == null) { jButton4 = new JButton(new ImageIcon(getClass().getResource("/irudiak/g6.png"))); jButton4.setBackground(Color.blue); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (jButton4.getBackground()==Color.blue) jButton4.setBackground(Color.yellow); else jButton4.setBackground(Color.blue); } }); } return jButton4; } COM: <s> this method initializes j button4 </s>
funcom_train/19326395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float traitAzimuth(final FObj fobj, final FoContext context) { final PdAzimuth property = (PdAzimuth) getProperty( FoProperty.AZIMUTH); if (property != null) { return property.getValue(context, fobj); } return PdAzimuth.getValueNoInstance(context, fobj); } COM: <s> returns the azimuth property </s>
funcom_train/21015317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent ( Graphics g ) { super.paintComponent ( g ); if ( random && !randomized ) { randomValues ( ); randomized = true; } if ( showLegend ) { paintLegend ( ); } pieHeight = getHeight ( ) - 20; pieWidth = getWidth ( ) - legendWidth - 20; paintPieChart ( ); paintMark ( ); } COM: <s> calls the ui delegates paint method if the ui delegate is </s>
funcom_train/50353284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLogButtonPanel() { if (logButtonPanel == null) { logButtonPanel = new JPanel(); logButtonPanel.add(getClearLogButton(), null); logButtonPanel.add(getSaveLogButton(), null); } return logButtonPanel; } COM: <s> this method initializes log button panel </s>
funcom_train/31842753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WikiPage findWikiPage(String name, int version) { if (version == -1) return findWikiPage(name); List<WikiPage> wikis; wikis = em.createQuery("SELECT object(w) FROM WikiPage w WHERE " + "w.fullQualifiedName='"+name+"' AND w.version='"+version+"'").getResultList(); if (!wikis.isEmpty()) return wikis.get(0); return null; } COM: <s> finds the wikipage with the proper name and version </s>
funcom_train/45421592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer evaluateMethod(double[][] classifResults, double[] originResults,double[] classes,double[] accCLs){ double res; Integer correctClassif=0; //For all instances for(int i=0;i<classifResults.length;i++){ res=classify(classifResults[i],classes,accCLs); if(res==originResults[i]) correctClassif++; } return correctClassif; } COM: <s> return the number of correct classified instances from an origin source </s>
funcom_train/3366826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createScrollButton(int direction) { if (direction != SOUTH && direction != NORTH && direction != EAST && direction != WEST) { throw new IllegalArgumentException("Direction must be one of: " + "SOUTH, NORTH, EAST or WEST"); } return new ScrollableTabButton(direction); } COM: <s> creates and returns a jbutton that will provide the user </s>
funcom_train/48665707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadAgents() { AgentInstallationData[] aids = fAgentRepository.getInstalledAgents().values().toArray( new AgentInstallationData[0]); ListAgentData[] lstAgents = new ListAgentData[aids.length]; for(int i = 0; i < aids.length; ++i) { lstAgents[i] = new ListAgentData(aids[i]); } // present them in alphabetical order Arrays.sort(lstAgents); fAgentsList.setListData(lstAgents); } COM: <s> updates the agent list </s>
funcom_train/37504879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getModifier(String name) { float result = 0; Iterator i = getModifiers(); while (i.hasNext()) { Modifier modifier = (Modifier)i.next(); if (modifier.getName().equalsIgnoreCase(name)) { result += modifier.getValue(); } } return result; } COM: <s> get the accumulated modifiers for var name var </s>
funcom_train/26069177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDataBase() throws IOException { boolean dbExist = checkDataBase(); if (dbExist) { // do nothing - database already exist } else { // By calling this method and empty database will be created // into the default system path // of your application so we are gonna be able to overwrite that // database with our database. this.getReadableDatabase(); this.close(); try { copyDataBase(); } catch (IOException e) { throw new Error("Error copying database"); } } } COM: <s> creates a empty database on the system and rewrites it with your own </s>
funcom_train/3024967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePrimaryPrefix(ASTPrimaryPrefix prefix, String parameterName) { ASTName nameNode = (ASTName) prefix.jjtGetFirstChild(); if (nameNode.getNameSize() == 1) { updateLocalReferences(prefix, nameNode); } else if ((nameNode.getNameSize() == 2) && (nameNode.getNamePart(0).equals(parameterName))) { updateParameterReferences(prefix, nameNode); } } COM: <s> update the primary prefix </s>
funcom_train/27937017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParentLevelAccessor newParentLevelAccessor(UIHConfig uihConfig, HParentLevel hParentLevel) { // Subclass to access constructor. I don't want (yet) the constructor to be // public as people may be tempted to keep references on levels... return new ParentLevelAccessor(uihConfig, hParentLevel) {}; } COM: <s> create an accessor for a single parent level of a hierarchy </s>
funcom_train/31658358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initFormlets() { try { // Initialize formlet editor dependencies // First the base: FormletConfigurationSet fcs = formletsFormletStore .loadFormletConfigurations("formlets/formlets.rdf"); baseFormletsURI = fcs.getURL().toString(); // Now the Formulator formlets fcs = formletsFormletStore .loadFormletConfigurations("formlets/Formulator/formlets.rdf"); // Now the Form Formlets. fcs = formletsFormletStore .loadFormletConfigurations("formlets/Form/formlets.rdf"); } catch (Exception e) { unhandledException(e); System.exit(0); } formletConfigurationFormlet = formletsFormletStore .getFormlet(FORMLET_FORMLET); } COM: <s> inits the formlets </s>
funcom_train/3903820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCompletionSetByContentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DeliveryControlsType_completionSetByContent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DeliveryControlsType_completionSetByContent_feature", "_UI_DeliveryControlsType_type"), ImsssPackage.Literals.DELIVERY_CONTROLS_TYPE__COMPLETION_SET_BY_CONTENT, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the completion set by content feature </s>
funcom_train/9086705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Roles entity) { EntityManagerHelper.log("saving Roles instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved roles entity </s>
funcom_train/15493892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue() throws XMLConfigurationException { if (type == null) { throw new XMLConfigurationException( "The type has not been initialized"); } else if (XMLConfigurationType.STRING_VALUE == type.getType()) { return stringValue; } else { throw new XMLConfigurationException( "The value for [" + key + "]is not of type [string]."); } } COM: <s> the getter method for the string value </s>
funcom_train/46161314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterListSelectionListener(ListSelectionListener listener){ tableSelectionListeners.remove(listener); for(Component c : getComponents() ){ JViewport vp = (JViewport) ((JScrollPane) c).getViewport(); JTable tab = (JTable) vp.getView(); tab.getSelectionModel().removeListSelectionListener( listener); } } COM: <s> removes the listener from all tables in this metadata types table </s>
funcom_train/10260823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String translateCatalog(String catalogName) throws SQLException { if (useSchemaDefault && catalogName != null && catalogName.length() == 0) { ResultSet rs = executeSelect("SYSTEM_SCHEMAS", "IS_DEFAULT=TRUE"); if (rs.next()) { return rs.getString(2); } } return catalogName; } COM: <s> for compatibility when the connection property default schema true </s>
funcom_train/38481714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(){ switch( this.getType(this) ){ case parameter.INTEGER_TYPE : return (Integer)value; case parameter.FLOAT_TYPE : return (Float)value; case parameter.STRING_TYPE : return (String)value; case parameter.BOOLEAN_TYPE : return (Boolean)value; case parameter.VECTOR_TYPE : return (Vector)value; default : return value; } } COM: <s> returns the value of the parameter in a suitable object type </s>
funcom_train/28353896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initFromSelectedData() { int row = controller.summaryTable.getSelectedRow(); if (row < 0) { dumpErr("Select a row on the Controller tab first"); return; } String name = (String) (controller.summaryTable.getModel()).getValueAt(row,0); CavityData cd = (CavityData) controller.cavityDataMap.get(name); if(cd == null) { dumpErr("Whoa Joe, No data exists for the selected cavity"); return; } init(cd); } COM: <s> initialize from a uer selected cavity data set </s>
funcom_train/7790476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void blockFriend(UserData friend) { DatabaseFunctions db = null; friend.setBlocked(true); try { db = new DatabaseFunctions(); db.changeBlocked(friend.getUserID(), true); } catch (Exception e) { e.printStackTrace(); } super.setChanged(); super.notifyObservers(UpdatedType.BUDDY); super.setChanged(); super.notifyObservers(UpdatedType.BUDDY_BLOCK_MANAGER); return; } COM: <s> blocks a user and updates the view </s>
funcom_train/2628520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetWindow() { System.out.println("setWindow"); ComponentTypeWrapper instance = null; instance = new ComponentTypeWrapper(new ComponentType()); GUITypeWrapper expResult = EasyMock.createMock(GUITypeWrapper.class); EasyMock.replay(expResult); instance.setWindow(expResult); GUITypeWrapper result = instance.window; assertEquals(expResult,result); } COM: <s> test of set window method of class component type wrapper </s>
funcom_train/24532839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResolvedType resolveType(String name) { getMainTypeHierarchy(); // Force a refresh if needed. if (name.indexOf('.') == -1) { return resolveSimpleType(name); } ResolvedType rt = (ResolvedType) namesToResolvedTypes.get(name); if (rt != null) { return rt; } // Else resolve as complex NamesList names = decomposeName(name); return resolveType(names); } COM: <s> this is used when the string is known to be a type </s>
funcom_train/29784830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlElement getForm() { Node parentNode = thisElement; //iterate upwards until a form element is found or no more parent while((parentNode = parentNode.getParentNode()) != null) { if(parentNode.getNodeName().toUpperCase().equals("FORM")) { return (HtmlElement) selenium.constructHtmlObject((Element) parentNode); } } return null; } COM: <s> returns the form element containing this input </s>
funcom_train/4195077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCallTransferFailure(ExtendedCall call, String reason, Message notify) { printLog("onCallTransferFailure()",LogLevel.LOW); if (call!=this.call) { printLog("NOT the current call",LogLevel.LOW); return; } printLog("Transfer failed",LogLevel.HIGH); } COM: <s> callback function called when a call transfer is not sucessfully completed </s>
funcom_train/20889374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processQueryPacket(RumorRoutingQueryPacket packet) throws LayerException { RumorRoutingQueryAgent agent = packet.getQueryAgent(); LOGGER.info(packet.getSender().getId() + "->" + packet.getReceiver() + ": query " + packet.getQueryAgent() + " visits"); AgentContext context = new AgentContext(endpoint, operatingSystem, packet.getHistory()); agent.visitNode(context, rumorStorage, storage); } COM: <s> processes a query packet </s>
funcom_train/25365666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsAttackingPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Dialog_isAttacking_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Dialog_isAttacking_feature", "_UI_Dialog_type"), LeveleditorPackage.Literals.DIALOG__IS_ATTACKING, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is attacking feature </s>
funcom_train/26018912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (logger.isActivated()) { logger.info("Start the IMS module"); } // Start the service dispatcher serviceDispatcher.start(); // Start call monitoring callManager.startCallMonitoring(); if (logger.isActivated()) { logger.info("IMS module is started"); } } COM: <s> start the ims module </s>
funcom_train/48720303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String scan(String toScan) { if (toScan == null || toScan.length() == 0) return ""; StringBuffer bs = new StringBuffer(toScan.length() + 50); StringCharacterIterator sci = new StringCharacterIterator(toScan); String tmp = null; for (char c = sci.first(); c != CharacterIterator.DONE; c = sci.next()) { tmp = String.valueOf(c); if (hasKey(tmp)) tmp = (String) this.get(tmp); bs.append(tmp); } return (bs.toString()); } COM: <s> perform the filtering operation </s>
funcom_train/6407600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String command, int[] keyCode) { ArrayList<KeyCodes> list = keyMap.get(command); if(null == list) { set( command, keyCode ); return; } KeyCodes key = new KeyCodes(); key.keys = keyCode; list.add(key); } COM: <s> code add code adds a list of keycodes corresponding to a </s>
funcom_train/12694301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConf(Map kvMap) throws IOException { List lst = new ArrayList(); for (Iterator it = kvMap.entrySet().iterator(); it.hasNext(); ) { Map.Entry ent = (Map.Entry) it.next(); lst.add(ent.getKey()+" "+ent.getValue()+"\n"); } setConf(lst); } COM: <s> change the values of the configuration options stored in kv map </s>
funcom_train/49211224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAboutContentPane() { if (aboutContentPane == null) { JLabel aboutSrcLabel = new JLabel(); JLabel aboutVersionLabel = new JLabel(); aboutSrcLabel.setText("Source"); aboutVersionLabel.setText("Version"); aboutContentPane = new JPanel(); aboutContentPane.setLayout(new GridLayout(0,1)); aboutContentPane.add(aboutSrcLabel); aboutContentPane.add(getAboutSrcField()); aboutContentPane.add(aboutVersionLabel); aboutContentPane.add(getAboutVersionField()); } return aboutContentPane; } COM: <s> this method initializes about content pane </s>
funcom_train/18736192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final IMessageRenderer MESSAGE_LINE = new IMessageRenderer() { public String toString() { return "MESSAGE_LINE"; } public String renderToString(IMessage message) { if (null == message) { return "((IMessage) null)"; } return renderMessageLine(message, 8, 2, 74); } }; COM: <s> render message as line i </s>
funcom_train/26489670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleErrMsg() { String errMsg = request.getParameter("err"); if (errMsg!=null) { logDebug1("Error message: " + errMsg); DOMUtil.replaceFirstTextNode(getElement("err"), errMsg); } else { removeElement("error"); } } COM: <s> if there is a parameter named err display it in the text element </s>
funcom_train/41298695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToFPtree(FPtreeNode ref, int place, short[] itemSet, int support, FPgrowthHeaderTable[] headerRef) { if (place < itemSet.length) { if (!addToFPtree1(ref,place,itemSet,support,headerRef)) addToFPtree2(ref,place,itemSet,support,headerRef); } } COM: <s> searches through current list of child refs looking </s>
funcom_train/13333840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Selection getPickerSelection(PInputEvent event) { PCNode originNode = (PCNode) PiccoloUtil.getNodeOfClass( event.getPath(), OENode.class, OELink.class); if (originNode != null) { if (getSelection().getAllSelectedObjects().contains( originNode.getObject())) { return getSelection(); } else { return SelectionManager.createSelection(this, originNode .getObject(), RootAlgorithm.GREEDY, getLinkProviderDatabase()); } } else return null; } COM: <s> if the picked object from the given event is part of the selection </s>
funcom_train/3774538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object another) { if ((another != null) && (another instanceof WebdavResource)) { return compareToWebdavResource((WebdavResource) another); } String thisUrl = toString(); String anotherUrl = another.toString(); return thisUrl.compareTo(anotherUrl); } COM: <s> compare to the given another object </s>
funcom_train/34105134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calcSize(List<MemberModel> nodes) { int numNodes = nodes.size(); double averageWidth = 0; double sqrt = Math.floor(Math.sqrt(numNodes)); for (MemberModel node : nodes) { averageWidth += node.getWidth();// * 2.5; } averageWidth /= numNodes; width = new Double(averageWidth * 1.75 * sqrt).intValue(); height = width; } COM: <s> calculates the size of the diagram </s>
funcom_train/32778652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerFileOutput(FileOutput file) { if (file == null) { sendWarning("Can not register FileOutput! Command ignored.", "Experiment '" + getName() + "' method void register(OutputType file).", "The parameter given was a null reference.", "Make sure to only connect valid FileOutput at the Experiment."); return; } if (_registryFileOutput.contains(file)) return; // file already registered _registryFileOutput.add(file); } COM: <s> registers a custom file output at the experiment e </s>
funcom_train/32601610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transition addNewTransition(Object data, State steFrom, State steTo) { if (states.contains(steFrom) && states.contains(steTo)) { Transition NewTransitionToAdd = new Transition(data, steFrom, steTo); transitions.add(NewTransitionToAdd); return NewTransitionToAdd; } else { return null; } } COM: <s> constructor for the add new transition object </s>
funcom_train/13916237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setThreadGroups(ETLThreadGroup[] threadGroup) { for (int i = 0; i < threadGroup.length; i++) { ResourcePool.LogMessage(this, ResourcePool.DEBUG_MESSAGE, "Mapped " + this.name + " channel " + threadGroup[i].getPortName(i)); this.threadGroup.put(threadGroup[i].getPortName(i), threadGroup[i]); } } COM: <s> sets the thread groups </s>
funcom_train/37837530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute(final String[] params, final String remainder) { if (hasInvalidArguments(params, remainder)) { return false; } final RPAction alter = new RPAction(); alter.put("type", "alter"); alter.put("target", params[0]); alter.put("stat", params[1]); alter.put("mode", params[2]); alter.put("value", remainder); ClientSingletonRepository.getClientFramework().send(alter); return true; } COM: <s> executes a chat command </s>
funcom_train/8568769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean awaitTermination(long timeout, TimeUnit unit) { try { boolean finished = distributor.awaitTermination(timeout, unit); if (!finished) { distributor.shutdownNow(); } return finished; } catch (InterruptedException e) { distributor.shutdownNow(); Thread.currentThread().interrupt(); return false; } finally { distributor = null; } } COM: <s> waits for the service to complete shutdown </s>
funcom_train/37587226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void _copyFile(File fromFile, File toFile) throws IOException { // String text = FileOps.readFileAsString(fromFile); // FileOps.writeStringToFile(toFile, text); // String newText = FileOps.readFileAsString(toFile); // assertEquals("File copy verify", text, newText); // } COM: <s> copies from file to to file assuming both files exist </s>
funcom_train/40702630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void friendsGetMutualFriends(Long targetUid, AsyncCallback<List<Long>> callback) { Json j = new Json ().put ( "target_uid", targetUid ); friendsGetGeneric ( "friends.getMutualFriends", j.getJavaScriptObject (), callback ); } COM: <s> returns the facebook user ids of the mutual friends between the source </s>
funcom_train/22742297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nextVolume(boolean up) { int step = 16; int val = getVolume() / step; val *= step; if (up && getVolume() < 255) { setVolume(val + step); } else if (up == false && getVolume() > 0) { setVolume(val - step); } canvasPaint(PAINT_MODE_ALL); } COM: <s> move volume slider to next position </s>
funcom_train/11009774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getDisplayGuts() { CTSheetPr sheetPr = getSheetTypeSheetPr(); CTOutlinePr outlinePr = sheetPr.getOutlinePr() == null ? CTOutlinePr.Factory.newInstance() : sheetPr.getOutlinePr(); return outlinePr.getShowOutlineSymbols(); } COM: <s> get whether to display the guts or not </s>
funcom_train/50863334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPeerReviewTimeFinished() { boolean result = false; if (peerReviewStartTime != null) { MarsClock currentTime = Simulation.instance().getMasterClock().getMarsClock(); double peerReviewTime = MarsClock.getTimeDiff(currentTime, peerReviewStartTime); if (peerReviewTime >= PEER_REVIEW_TIME) result = true; } return result; } COM: <s> checks if peer review time has finished </s>
funcom_train/17897318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (ordinal == NULL_ORDINAL) { return ""; } String result; if (-999 <= yyyy && yyyy <= 9999) { result = MString.toLZ(yyyy, 4); } else { result = Integer.toString(yyyy); } result += "-" + MString.toLZ(mm, 2) + "-" + MString.toLZ(dd, 2); return result; } // end toString COM: <s> convert date to a human readable string </s>
funcom_train/50558425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadConfigFile() { try { xmlReader.setContentHandler(new CanyamoHandler()); logger.info("loading canyamo config from " + configDir); xmlReader.parse(configDir + "canyamo.xml"); } catch (Exception e) { logger.error(CanyamoMessages.get("error_loading_config"), e); } } COM: <s> loads config file </s>
funcom_train/22675077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "RFIDEvent(" + getEventStatus() + ", " + new Date(timeStamp) + ", " + RFIDMappings.getTagTypeName(tagType) + ", " + RFIDMappings.getTagMfrName(tagMfrID) + ", " + uid + ")"; } COM: <s> returns a string representation of the object </s>