__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22536406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IDialogListItem getEnvironmentElement(String id){ IDialogListItem environmentElement = null; boolean notFound = true; if(getEnvironmentElements() != null){ int i = 0; while((notFound) && (i < environmentElements.size())){ if((environmentElements.get(i).getID().compareTo(id) == 0)){ environmentElement = environmentElements.get(i); notFound = false; } i ++; } } return environmentElement; } COM: <s> retrieve the environment element lightweight version of an environment that </s>
funcom_train/32140133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildArchive(String archiveName, File script, File meta) { String[] files = new String[] {script.getAbsolutePath(), meta.getAbsolutePath()}; String[] names = new String[] {DashboardModule.scriptFileName, DashboardModule.metaFileName}; ZipArchive.zipFiles(archiveName, files, names); ZipArchive.compressFile(archiveName + DashboardModuleFileFilter.DashboardModuleExtension, archiveName); } COM: <s> this method will create the module archive by first zipping the </s>
funcom_train/51299689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getGroupId(int id) { String sql = "SELECT group_id from goods WHERE id = " + id; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); if (res.next()) { return res.getInt("group_id"); } } catch (Exception e) { e.printStackTrace(); } finally { DBAccessor.getInstance().releaseConnection(res); } return 0; } COM: <s> get id of group good belongs to </s>
funcom_train/44594651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int retrieveClosingAngleBracketPosition(int start) { this.scanner.resetTo(start, this.compilationUnitSourceLength); this.scanner.returnOnlyGreater = true; try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameGREATER: return this.scanner.currentPosition - 1; default: return start; } } } catch(InvalidInputException e) { // ignore } this.scanner.returnOnlyGreater = false; return start; } COM: <s> this method is used to retrieve the end position of the block </s>
funcom_train/6206162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IFile getWebXMLFile() { IProject project = getGaijinProject().getProject(); String webRoot = getGaijinProject().getFolderManager().getWebRootFolder().getProjectRelativePath().toString(); String webXML = webRoot + IPath.SEPARATOR + IResourceNames.WEB_XML_FILE; return project.getFile(webXML); } COM: <s> get the ifile handle to the web </s>
funcom_train/44626287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMockFile(/*@ non_null */ String filename, /*@ non_null */String content) { try { addMockFile(filename,new TestJavaFileObject(new URI("file:///" + filename),content)); } catch (Exception e) { fail("Exception in creating a URI: " + e); } } COM: <s> used to add a pseudo file to the file system </s>
funcom_train/37764487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridModel getMonthlyMonthsWM() { GridModel model = (GridModel) getWidgetCache().getModel("monthlyMonths"); if (model == null) { model = new GridModel(); populateMonthlyMonths(model); getWidgetCache().addModel("monthlyMonths", model); } return model; } COM: <s> getter for property monthly months </s>
funcom_train/22102878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EscalationAction getAction(Integer id) { List a = getActions(); for (Iterator i=a.iterator(); i.hasNext(); ) { EscalationAction ea = (EscalationAction)i.next(); if (ea.getAction().getId().equals(id)) return ea; } return null; } COM: <s> find an escalation action based on the id of its associated action </s>
funcom_train/1303330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mark() { final int[] storedState = new int[curInfo.length]; for (int i = 0; i < curInfo.length; ++i) storedState[i] = curInfo[i]; states.addLast(storedState); strings.addLast(capturedString.toString()); } COM: <s> mark this instances current state </s>
funcom_train/1535790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLabelForPicking(Renderer renderer, Drawable3D[] drawHits){ for(int i=0; i<Drawable3D.DRAW_TYPE_MAX; i++) for (Iterator<Drawable3D> iter = lists[i].iterator(); iter.hasNext();) { Drawable3D d = iter.next(); renderer.pickLabel(d, drawHits); /* loop++; renderer.glLoadName(loop); d.drawLabel(renderer,false,true); drawHits[loop] = d; */ } //return loop; } COM: <s> draw objects labels to pick them </s>
funcom_train/51163594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log_out_and_exit(int status) { // Log out the corresponding session for all but one window. for (int i = 0; i < window_count - 1; ++i) { data_builder.logout(false, 0); } // Log out the remaining window and exit with `status'. data_builder.logout(true, status); } COM: <s> log out of all sessions and exit </s>
funcom_train/46055184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getItemsAsHash(String org) { Hashtable hash = new Hashtable(); List itemList = getDocument().getRootElement().getChildren(ITEM_NODE); Iterator itemListElement = itemList.iterator(); while (itemListElement.hasNext()) { Element anItem = (Element) itemListElement.next(); hash.put(anItem.getAttributeValue(ITEM_IDENTIFIER), anItem.getText()); } return hash; } COM: <s> method to get all item identifiers under a given organization </s>
funcom_train/20788971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CPolyLine quadTo(double ctrlx1, double ctrly1, double xEnd, double yEnd) { initIfEmpty(); ((GeneralPath) shape).quadTo((float) ctrlx1, (float) ctrly1, (float) xEnd, (float) yEnd); lastPoint.setLocation((float) ctrlx1, (float) ctrly1); currentPoint.setLocation((float) xEnd, (float) yEnd); repaint(); return this; } COM: <s> adds a quadric curve segment to this polyline </s>
funcom_train/7616424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void firePropertyChangeImpl(String propertyName, Object oldValue, Object newValue) { PropertyChangeSupport pcs; synchronized (componentLock) { if (propertyChangeSupport == null) { return; } pcs = propertyChangeSupport; } pcs.firePropertyChange(propertyName, oldValue, newValue); } COM: <s> fire property change impl </s>
funcom_train/22260645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleCoreException(CoreException exception, Shell shell, String title, String message) { IStatus status = exception.getStatus(); if (status != null) { ErrorDialog.openError(shell, title, message, status); } else { MessageDialog.openError(shell, "HXDT internal error", exception.getLocalizedMessage()); } } COM: <s> displays an error message when a core exception occured </s>
funcom_train/16312919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean localeIsRTL() { boolean markIsRTL; String language = Locale.getDefault().getLanguage().toLowerCase(); /* * Hardcode for future - if somebody will translate marks to RTL * language. */ if ("some_RTL_language_code".equals(language)) { markIsRTL = true; } else { markIsRTL = false; } return markIsRTL; } COM: <s> returns whether the current locale is a right to left language or not </s>
funcom_train/49704513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumDocs() throws NoIndexActiveException, SearchTimeoutException, SearcherException { IndexRepository ir = currentIndexRepository.get(); if (null == ir) { throw new NoIndexActiveException(); } IndexSearcher searcher = ir.getIndexSearcher(); try { return searcher.getIndexReader().numDocs(); } finally { ir.releaseIndexSearcher(searcher); } } COM: <s> returns the number of documents in the current index </s>
funcom_train/10345821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubjectDN(Principal nsubject, int encType) { if (nsubject instanceof codec.x501.Name) { subject_ = (codec.x501.Name) nsubject; } else { try { subject_ = new codec.x501.Name(nsubject.getName(), encType); } catch (Exception e) { System.out.println("Internal Error:"); e.printStackTrace(); return; } } set(5, subject_); } COM: <s> same as above but with an explicit name encoding </s>
funcom_train/5241345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllMatches(PointerTargetTreeNodeList.Operation opr) { List list = new ArrayList(); if (opr.execute(getRootNode()) != null) list.add(getRootNode()); if (getRootNode().hasValidChildTreeList()) getRootNode().getChildTreeList().getAllMatches(opr, list); return list; } COM: <s> walk the tree and perform the operation code opr code on each node </s>
funcom_train/14311064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveAndPaintWorm(final Worm worm) { // move the worm worm.move(); // and paint it. final int x = (int) (worm.x / 1000); final int y = (int) (worm.y / 1000); wormMatrix[x][y] = thisPlayerId; rgbPaint[0] = worm.player.color; final Graphics g = getGraphics(); g.drawRGB(rgbPaint, 0, 1, x, y, 1, 1, false); } COM: <s> moves the worm and updates the canvas </s>
funcom_train/11735446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasNonVirtualItemState(ItemId id) { if (cache.isCached(id)) { return true; } try { if (id.denotesNode()) { return persistMgr.exists((NodeId) id); } else { return persistMgr.exists((PropertyId) id); } } catch (ItemStateException ise) { return false; } } COM: <s> checks if this item state manager has the given item state without </s>
funcom_train/20597398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDependency(ValueConsumer consumer, ValueSource<?> source) { Scope consumerScope = consumer2Scope.get(consumer); if (consumerScope == null) { throw new IllegalArgumentException("Unregistered consumer"); //$NON-NLS-1$ } checkSourceVisibleInScope(source, consumerScope); addDependencyNoCheck(consumer, source); } COM: <s> adds a dependency of consumer on source </s>
funcom_train/34628135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFormatSection(Composite parent) { builderChooser = new BuilderChooser(parent); builderChooser.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { String fmt = builderChooser.getSelectedFormat(); if (fmt != null) { setOutputExtension(fmt); } }}); } COM: <s> create output file format section of the page </s>
funcom_train/12806585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldRichValue(String name) { if (xfa.isXfaPresent()) { return null; } Item item = fields.get(name); if (item == null) { return null; } PdfDictionary merged = item.getMerged(0); PdfString rich = merged.getAsString(PdfName.RV); String markup = null; if (rich != null) { markup = rich.toString(); } return markup; } COM: <s> retrieve the rich value for the given field </s>
funcom_train/25541002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { props.setProperty(MAIN_WDW_HEIGHT, frame.getHeight() + ""); props.setProperty(MAIN_WDW_WIDTH, frame.getWidth() + ""); props.setProperty(MAIN_WDW_UPPER_LEFT_X, frame.getX() + ""); props.setProperty(MAIN_WDW_UPPER_LEFT_Y, frame.getY() + ""); store(); } COM: <s> update the application properties and store them </s>
funcom_train/39025091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cursor loadCursor(final String name, final Point hotspot) { Cursor cursor = null; try { StringBuffer path = new StringBuffer(); path.append("com/DaLoneDrow/mapviewport/"); path.append(name); path.append(".png"); ClassLoader cl = getClass().getClassLoader(); InputStream is = cl.getResourceAsStream(path.toString()); final BufferedImage image = ImageIO.read(is); Toolkit tk = Toolkit.getDefaultToolkit(); cursor = tk.createCustomCursor(image, hotspot, N); } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } return cursor; } COM: <s> loads custom cursors </s>
funcom_train/31415637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatAsTemplate(String content, String style) { if (m_Styles.isDefinedInThisGroup(style)) { StringTemplate st = m_EmbeddedStyle.getInstanceOf(); st.setAttribute("style", style); st.setAttribute("content", content); return st.toString(); } else { return content; } }//formatAsTemplate COM: <s> formats the given content with the given style as </s>
funcom_train/13390472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void addCommonVariables(VariableExpander expander) { String val = OpStringUtils.getStringConfigVal( "net.assimilator.qa.core.jsbcodebaseprefix", null); expander.addVariable("codeBasePrefix", val); val = OpStringUtils.getGroupsAndLocatorsItem( "testGroupsAndLocators", null, "0"); expander.addVariable("group", val); } COM: <s> adds commonly used op string variables to a variable expander </s>
funcom_train/18870095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void internalBeginReporting(boolean insideReportingSequence) { // if (_programFile == null) { // return; // } OScriptProblemRequestorState state= new OScriptProblemRequestorState(); state._isInsideReportingSequence = insideReportingSequence; state._reportedProblems= new ArrayList<DefaultOScriptProblem>(); synchronized (getLockObject()) { _problemRequestorState.set(state); ++_stateCount; } } COM: <s> sets up the infrastructure necessary for problem reporting </s>
funcom_train/17284679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MovieTuple(String name, String category, String director, String lang ,String raters,String rating, String year, String length, String picture) { _name = name; _category = category; _director = director; _raters = Integer.parseInt(raters); _rating = Double.parseDouble(rating); _language = lang; _year = Integer.parseInt(year); _length = Integer.parseInt(length); //_ratings = new TreeSet<RatingTuple>(new CompartorUser()); _ratings=null; //_picture = picture; _picture = "documentation/moviePictures/"+name+".jpg"; } COM: <s> creates a new instance of movie tuple </s>
funcom_train/3156254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logType(Request request) { String type = request.getType(); if ((type == null) || (type.length() == 0)) { _logger.info("... Request has no type specification"); } else { _logger.info("... Request of type: " + type); } } COM: <s> logs the request type information to the logging sinks </s>
funcom_train/6460054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putItem (GenericFactoryBase fact, Identified item) { HashMap factoryCache = (HashMap)factoryMap.get (fact); if (factoryCache == null) { // make a new one factoryCache = new HashMap (); factoryMap.put (fact, factoryCache); } factoryCache.put (new Integer(item.getOid ()), item); } COM: <s> put an object by oid into a cache for its factory </s>
funcom_train/12560806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lRemoveCommand(Command cmd, int i) { super.lRemoveCommand(cmd, i); // restore the value of the original appearanceMode if (imgItem.numCommands < 1) { appearanceMode = Item.PLAIN; if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) { setContent0(nativeId, itemImageData, imgItem.altText, appearanceMode); } lRequestInvalidate(true, true); } } COM: <s> notifies l amp f of a command removal in the corresponding </s>
funcom_train/36243292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadProperties(String data){ boolean valid = true; String[] lines = StringUtils.split(data, "\n"); for(int i = 0; i<lines.length; i++){ String line = lines[i].trim(); if(line.startsWith("#") || line.equals("")) continue; String[] pair = StringUtils.split(line, "="); if(pair.length == 2){ valid &= fillField(pair[0].trim(), pair[1].trim()); } } return valid; } COM: <s> parses the ttp property file and fills internal fields </s>
funcom_train/51130244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlayerStats getStats(LeagueElementGroup leagueElementGroup) { for (int i = 0; i < playerStatsGroup.size(); i++) { PlayerStats tmp = playerStatsGroup.get(i); if (leagueElementGroup.equals(tmp.getOwner())) { return tmp; } } this.createStats(leagueElementGroup); return getStats(leagueElementGroup); // return null; } COM: <s> return stats for given league element group </s>
funcom_train/38251856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSequence(String rsNum) throws WebServiceException{ String[] snpIds = new String[] { rsNum }; GetSnpSequenceRequest request = new GetSnpSequenceRequest(_dataSource, snpIds); SnpSequenceHash hash = _proxy.getSequence(request); edu.mit.wi.omnigene.framework.bio.Sequence sequence = hash.getSequence(rsNum); return sequence.getSequence(); } COM: <s> gets flanking sequence from dbsnp rs number </s>
funcom_train/2952594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertPreserved(String[] inputs, String[] results) { StringBuffer inputSB = new StringBuffer(); StringBuffer resultSB = new StringBuffer(); for (int i = 0; i < inputs.length; i++) { inputSB.append(inputs[i]); } for (int i = 0; i < results.length; i++) { resultSB.append(results[i]); } assertEquals(inputSB.toString(), resultSB.toString()); } COM: <s> ensure the two string arrays represent the same run of text </s>
funcom_train/21827919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanup() throws ResourceException { if (m_logWriter != null) m_logWriter.println("[ManagedConnection] -> cleanup()"); ConnectionImpl connection; for (Iterator it = m_connections.iterator(); it.hasNext(); connection.invalidate()) connection = (ConnectionImpl)it.next(); m_connections.clear(); } COM: <s> the method managed connection impl </s>
funcom_train/39183363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RDFFormat getRDFFormat(byte format) { switch((int)format){ case OConstants.ONTOLOGY_FORMAT_N3: return RDFFormat.N3; case OConstants.ONTOLOGY_FORMAT_NTRIPLES: return RDFFormat.NTRIPLES; case OConstants.ONTOLOGY_FORMAT_RDFXML: return RDFFormat.RDFXML; default: return RDFFormat.TURTLE; } } COM: <s> given a string return the equivalent rdfformat </s>
funcom_train/4924776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testServletContextResourceIntegration() throws Exception { // Add the filter for handling requests this.context.addFilter(new FilterHolder( MockServletContextResourceFilter.class), "/*", FilterMapping.REQUEST); // Add the servlet to be filtered this.context.addServlet(new ServletHolder(MockHttpServlet.class), "/"); // Start the server this.server.start(); // Ensure can obtain template content from ServletContext this.assertHttpRequest("/template", "ServletContext Resource"); } COM: <s> ensure able to retrieve http template content from the </s>
funcom_train/13597015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnBrowse() { if (btnBrowse == null) { btnBrowse = new JButton(); btnBrowse.setText(Messages.getString("GeneralUI.ButtonBrowse")); // Generated //$NON-NLS-1$ btnBrowse.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setWorkspaceDir(); } }); } return btnBrowse; } COM: <s> this method initializes btn browse </s>
funcom_train/1441325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Status destroyStatus(long id) throws ApiException { requireCredentials(); String url = String.format("http://twitter.com/statuses/destroy/%d.json", id); PostMethod method = new PostMethod(url); String response = execute(method); return Status.newFromJsonString(response); } COM: <s> destroys the status specified by the required id parameter </s>
funcom_train/26370109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set ensureUserAndFolderExist(Object user, String folder) { if(!userDirectoryMaps.containsKey(user)) { userDirectoryMaps.put(user, new HashMap()); } Map dirMap = (Map) userDirectoryMaps.get(user); if (folder == null) return null; if(!dirMap.containsKey(folder)) { dirMap.put(folder, new HashSet()); } return (Set) dirMap.get(folder); } COM: <s> check if user and folder exist in user directory maps </s>
funcom_train/13680168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLabel(int i){ switch (i) { case PreferenceGetter.KEY: return GuiLabels.PREFS_KEY; case PreferenceGetter.COMMENT: return GuiLabels.PREFS_COMMENT; case PreferenceGetter.TYPE: return GuiLabels.PREFS_TYPE; case PreferenceGetter.DIRECTIVE: return GuiLabels.PREFS_DIRECTIVE; case PreferenceGetter.INSTR: return GuiLabels.PREFS_INSTR; case PreferenceGetter.ACCESS: return GuiLabels.PREFS_ACCESS; case PreferenceGetter.LABEL: return GuiLabels.PREFS_LABEL; case PreferenceGetter.NUMBER: return GuiLabels.PREFS_NUMBER; case PreferenceGetter.STRING: return GuiLabels.PREFS_STRING; default: return ""; } } COM: <s> returns label for syntax element type </s>
funcom_train/25520801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputStream openOutputStream() throws IOException { if (isClosed) { throw new IOException("RFCOMM Connection is already closed"); } else { if (out == null) { out = new BluetoothRFCommOutputStream(this); return out; } else if (out.isClosed()) { throw new IOException("Stream cannot be reopened"); } else { throw new IOException("Another OutputStream already opened"); } } } COM: <s> open and return an output stream for a connection </s>
funcom_train/10598577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recycle() { this.namespaces = null; this.validity = null; /* Make sure all threads completed their work */ this.pipe.recycle(); // Resolver can be nulled out when all threads completed processing // and released their Sources. this.resolver = null; this.processor = null; this.environment = null; this.attributes = null; super.recycle(); } COM: <s> p recycle this component instance </s>
funcom_train/37048264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateLayer(List gisAgents, String layerName) { Layer layer = this.getLayer(layerName); if (layer instanceof RepastOMLayer) { ((RepastOMLayer) layer).setAgentList(gisAgents); ((RepastOMLayer) layer).doPrepare(); return true; } return false; } COM: <s> update the layer </s>
funcom_train/5338492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertLine() { synchronized (lines) { char[] lastLine = lines[lines.length - 1]; for (int i = lines.length - 2; i >= cursorRow; i--) { lines[i + 1] = lines[i]; } lines[cursorRow] = lastLine; clearLine(lastLine); } redrawScreen(); } COM: <s> insert an empty new line at the cursor position </s>
funcom_train/12186423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyNamespacePrefixes(ContextAnnotatingProcess process) { if (this != process && process != null) { Iterator iterator = bufferedStartNamespacePrefixes.iterator(); while (iterator.hasNext()) { XMLNamespace ns = (XMLNamespace) iterator.next(); process.bufferedStartNamespacePrefixes.push(ns); } } } COM: <s> copy the buffered start name prefixes from this instance to the instance </s>
funcom_train/47725539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean isComplete(String filename, String username, Boolean remove) { Boolean isComplete = false; for(int i = 0; (i < completed.size()) && !isComplete; i++) { if(completed.get(i).getNick().equals(username) && completed.get(i).getFile().getName().equals(filename)) { isComplete = true; if(remove) { completed.remove(i); } } } return isComplete; } COM: <s> checks if a transfer with a given name and transferrer has completed </s>
funcom_train/13490395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Fact getQueryFact() { return buildFact ( IntArithmetic.EQUAL, buildComplexTerm (IntArithmetic.TIMES, "x", "y"), buildComplexTerm ( IntArithmetic.ABS, buildComplexTerm (IntArithmetic.PLUS, "x", "y"))); } COM: <s> get the query fact </s>
funcom_train/44705548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FormSectionEvent e) throws FormProcessException { FormData d = e.getFormData(); BigDecimal id; try { id = Sequences.getNextValue(); d.put(ITEM_ID, id); } catch (SQLException ex) { s_log.error("Error retrieving the sequence value", ex); throw new FormProcessException(ex.getMessage()); } } COM: <s> initialize the form populate the id widget for double click protection </s>
funcom_train/9081039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getElementsSize() { if (this.type != null && this.type.equals(MetricType.DISCRETE) && validRanges != null) { int size = 0; for (int i = 0; i < validRanges.size(); i++) { DiscreteRange range = (DiscreteRange) validRanges.get(i); int elementsSize = range.getRangeElements().size(); size = size + elementsSize; } return size; } else return -1; } COM: <s> return the number of element which compose this metric for a </s>
funcom_train/42236877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSlider getPositionSlider() { if (positionSlider == null) { positionSlider = new FmjSlider(); positionSlider.setOpaque(false); positionSlider.setValue(0); positionSlider.setMinimum(0); positionSlider.setMaximum(100); positionSlider.setEnabled(true); positionSlider.addChangeListener(new SliderListener()); } return positionSlider; } COM: <s> this method initializes position slider </s>
funcom_train/30075790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView sitesHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException { Map model = new HashMap(); model.put("sites", gpir.getSites()); return new ModelAndView("sitesView", "model", model); } COM: <s> custom handler for sites display </s>
funcom_train/42129464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final Object o) { if (o instanceof SiteNode) { SiteNode node = (SiteNode)o; if (path == null) { return -1; } else if (node.path == null) { return 1; } else { return path.compareTo(node.path); } } return -1; } COM: <s> compare this node to another node </s>
funcom_train/23393575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPlanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PlanEnactment_plan_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PlanEnactment_plan_feature", "_UI_PlanEnactment_type"), EnactmentPackage.Literals.PLAN_ENACTMENT__PLAN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the plan feature </s>
funcom_train/37721414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { for (int i=0; i<msgs.length; i++) { invokeStatusUpdate(SplashWindow.this.msgs[i]); Thread.sleep(SplashWindow.this.interval); } } catch (InterruptedException e) { log.warn("Splash sleep interrupted", e); } } COM: <s> thread of execution </s>
funcom_train/19416894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualsWithDifferentValue() throws Exception { final AttributeImpl attribute1 = new AttributeImpl("x", "y2", "3", this.annotation); final AttributeImpl attribute2 = new AttributeImpl("x", "y2", "4", this.annotation); assertFalse(attribute1.equals(attribute2)); } COM: <s> test with equal with different value </s>
funcom_train/39787920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasic() { Style charlieStyle = styleSheet.getStyle(Label.class, "charlie"); assertEquals(Boolean.FALSE, charlieStyle.getProperty("lineWrap")); Style deltaStyle = styleSheet.getStyle(Button.class, "delta"); assertEquals(Boolean.TRUE, deltaStyle.getProperty("lineWrap")); } COM: <s> test retrieval of boolean properties </s>
funcom_train/19972736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pressUp() { if (!longPressed) { // Cancel the long press handler. longPressHandler.removeCallbacks(longPress); // If we got here, rotate the cell -- except user input is ignored // while executing programmed moves. if (programmedMoves == null) cellRotate(focusedCell, 1); } } COM: <s> handle a screen or centre button release </s>
funcom_train/10749254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testThrowableThrowableInitCause() { NullPointerException nPE = new NullPointerException(); initCauseExc iC = new initCauseExc(nPE); assertTrue("Assert 0: The cause has not been set", iC.getCause() != null); assertTrue("Assert 1: The invalid cause has been set", iC.getCause() == nPE); } COM: <s> tests the throwable throwable constructor when the init cause method </s>
funcom_train/22548972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRangeSatisfiable(int low, int high) { // This must be synchronized so that downloaders writing // to the verifying file do not cause concurrent mod // exceptions. synchronized(_verifyingFile) { for(Interval interval : _verifyingFile.getVerifiedBlocks()) { if (low >= interval.low && high <= interval.high) return true; } } return false; } COM: <s> determines whether or not the given range is satisfied by this </s>
funcom_train/45382838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConnection() { ctgr.debug("Test Connection ..."); if (conn != null) try { if (!conn.containsModel(DEFAULT_MODEL_NAME)) { conn.close(); conn = null; model = getModel(); } } catch (Exception e) { ctgr.error(e); } } COM: <s> tests the status of connection </s>
funcom_train/10911792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup(FontInfo fontInfo, FontCollection[] fontCollections) { int startNum = 1; for (int i = 0, c = fontCollections.length; i < c; i++) { startNum = fontCollections[i].setup(startNum, fontInfo); } // Make any defined substitutions in the font info getFontSubstitutions().adjustFontInfo(fontInfo); } COM: <s> sets up the fonts on a given font info object </s>
funcom_train/459489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUserID() throws ATNAException { if (activeParticipantNode.hasAttribute("UserID") && !activeParticipantNode.getAttribute("UserID").equals("")) return activeParticipantNode.getAttribute("UserID"); else { throw new ATNAException("UserID is null", this); } } COM: <s> gets the value of the user id property </s>
funcom_train/44156884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeThirdInsert() { if (m_isDB2) { s_logger.debug("testing if port '" + DERBY_DEST_PORT + "' is up again"); } else { s_logger.debug("testing if server '" + ORACLE_SERVER_NAME + "' is up again"); } try { Name name = new Name(); name.setName("Third"); name = (Name) getDao().saveOrUpdate(name); } catch (Exception e) { fail("Database not reachable -> Test FAILED"); } } COM: <s> execute third store to check if database connection works after we </s>
funcom_train/18244106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChromatogramVerticalMagnification(double pMag) { if (pMag != this.chromatogramVerticalMagnification) { Iterator iter = this.listeners.iterator(); double oldMag = this.chromatogramVerticalMagnification; this.chromatogramVerticalMagnification = pMag; while (iter.hasNext()) { IAssemblyDisplayPreferencesChangeListener listener = (IAssemblyDisplayPreferencesChangeListener) iter.next(); listener.chromatogramVerticalMagnificationChange(this, pMag, oldMag); } } } COM: <s> describe code set chromatogram vertical magnification code method here </s>
funcom_train/554479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetFields() { selectId.setSelectedItem(OperatorsList.NO_SELECTION); selectStartTime.setSelectedItem(OperatorsList.NO_SELECTION); selectEndTime.setSelectedItem(OperatorsList.NO_SELECTION); selectComment.setSelectedItem(OperatorsList.NO_SELECTION); textId.setText(""); textStartTime.setText(""); textEndTime.setText(""); textComment.setText(""); } COM: <s> resets all text fields and combo boxes to their default empty value </s>
funcom_train/45486379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton5Del() { if (jButton5Del == null) { jButton5Del = new JButton(); jButton5Del.setBounds(new Rectangle(951, 115, 64, 26)); Font font = new Font("Serif", Font.BOLD, 16); jButton5Del.setFont(font); jButton5Del.setForeground(Color.red); jButton5Del.setText("5"); } return jButton5Del; } COM: <s> this method initializes j button5 del </s>
funcom_train/3371054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAccessibleSelection(int i) { TreeModel model = JTree.this.getModel(); if (model != null) { if (i == 0) { Object[] objPath = {model.getRoot()}; TreePath path = new TreePath(objPath); JTree.this.removeSelectionPath(path); } } } COM: <s> removes the specified selected item in the object from the objects </s>
funcom_train/47435591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContieneClasePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramaClases_contieneClase_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramaClases_contieneClase_feature", "_UI_DiagramaClases_type"), AgroEcoPackage.Literals.DIAGRAMA_CLASES__CONTIENE_CLASE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the contiene clase feature </s>
funcom_train/26052870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean logout(ASUser user) { logger.debug("Response Action: Logging Out User " + user.getAccountId()); logger.fatal("INTRUSION - Multiple intrusions observed by AppSensorUser:" + user.getAccountName() + ", UserID:" + user.getAccountId() + ", Action: Logging out malicious account"); user.logout(); return true; } COM: <s> logout the currently logged in user </s>
funcom_train/3998617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shouldAllowCreatingABooleanOnlyFromTrueOrFalse() { specify(new Block() { public void run() throws Throwable { exec.execute("boolean case not_boolean"); } }, should.raise(CommandNotFoundException.class)); specify(target.booleanCaseValue, should.equal(null)); } COM: <s> booleans constructor would convert foo to false but </s>
funcom_train/48258225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int ifExistDept(List depts, int organ_id) { if (depts == null) return -1;// if the list is a null list,return -1 int point = 0; Depts dept = null; while (point < depts.size()) { dept = (Depts) (depts.get(point)); if (dept.getOrgans().getId() == organ_id) return dept.getId(); point++; } return -1; } COM: <s> returns the order in the depts of the br </s>
funcom_train/3022004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Container getTypeOrPackage(MouseEvent mevt, Container component) { if (component instanceof UMLLine || component instanceof JLabel) { Point loc = component.getLocation(); mevt.translatePoint(loc.x, loc.y); return (Container)component.getParent(); } return component; } COM: <s> gets the type or package attribute of the drag panel adapter object </s>
funcom_train/37073950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCodingDNA() { String cdna = get_cDNA(); // i think this gives the coding cdna. String codingSeq = get_ORF(cdna); // if no translation start is set (eg restults) get_ORF returns "" //if (codingSeq.equals("")) return cdna; //else return codingSeq; } COM: <s> calls get orf with the cdna </s>
funcom_train/42982086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean Eat(Position pos, cPacman pacman){ for(int i=0;i<FoodList.size();i++){ if(FoodList.get(i).getPosition().equals(pos)){ FoodList.get(i).Eat(pacman); FoodList.remove(i); return true; } } return false; } COM: <s> eats the food on a given position </s>
funcom_train/26290034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { Zone result = (Zone) super.clone(); result.units = (LinkedList) units.clone(); ListIterator iter = result.units.listIterator(); while(iter.hasNext()) { Unit unit = (Unit) ((Unit) iter.next()).clone(); try { unit.setProperty("zone", result, null); } catch(ExecutionException x) { throw new IllegalStateException("Error occurred while improperly executing a script."); } iter.set(unit); } return result; } COM: <s> creates a deep copy of itself </s>
funcom_train/2883491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendMessage(String recipient, String subject, String text, PacketExtension ext) { Message message = new Message(recipient); message.setSubject(subject); message.setBody(text); message.setType(Message.Type.NORMAL); if (ext != null) { message.addExtension(ext); } return sendMessage(message); } COM: <s> send a text message if connected </s>
funcom_train/10514309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getReplaceValue() { if (property != null) { return properties.getProperty(property); } else if (value != null) { return value.getText(); } else if (Replace.this.value != null) { return Replace.this.value.getText(); } else { //Default is empty string return ""; } } COM: <s> get the replacement value for this filter token </s>
funcom_train/8078504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRadiuses(String fromTo) { int i = fromTo.indexOf(".."); String from = fromTo.substring(0, i); setMinRadius(Double.valueOf(from).doubleValue()); String to = fromTo.substring(i + 2, fromTo.length()); setMaxRadius(Double.valueOf(to).doubleValue()); } COM: <s> sets the upper and lower boundary for the radius of the clusters </s>
funcom_train/51782748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupOldStructure() { if (model != null) { model.removeModelListener(this); for (UmlDiagram diagram : model.getDiagrams()) { ((GeneralDiagram) diagram).removeNameChangeListener(this); } } structureFolder.removeAllChildren(); sequenceFolder.removeAllChildren(); nodeStructureChanged(structureFolder); nodeStructureChanged(sequenceFolder); } COM: <s> removes the old structures </s>
funcom_train/23949618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyEditActionListeners() { activeTableClickListener = new SingleAndDblClickListener() { @Override protected void handlePreSingleClick(MouseEvent mouseEvent) { } @Override protected void handleSingleClick(MouseEvent mouseEvent) {} @Override protected void handleDoubleClick(MouseEvent mouseEvent) { handleRowDblClickEvent(mouseEvent); } }; dataGridTable.addMouseListener(activeTableClickListener); } COM: <s> attaches listeners to the internal table to track editing requests </s>
funcom_train/3673672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double activateFunction(double value,int flag) { if(flag==0){ return (1.0/(1.0+Math.exp(-value))); } else return ((1.0/(1.0+Math.exp(-value))) * (1-(1.0/(1.0+Math.exp(-value))))); //if } COM: <s> algorythmus the sigmoide function uses as activation function </s>
funcom_train/44011470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetLineAmount() { System.out.println("setLineAmount"); double lineAmount = 0.0; TransLineBO instance = new TransLineBO(); instance.setLineAmount(lineAmount); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set line amount method of class edu </s>
funcom_train/18440216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int users() { int count = -1; String sql = "SELECT count(*) FROM user;"; try { CachedRowSet rs = SQLHelper.executeResultSet(sql); if (rs.next()) { count = rs.getInt(1); } rs.close(); } catch (Exception e) { log.error("users(): " + e.getMessage()); } return count; } COM: <s> determine the number of users registered </s>
funcom_train/41265489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XmppBaseStanza getNextInputPackage() throws InterruptedException { // wait until a new package has arrived while( this.getInputPackages().size() == 0 ) { Thread.sleep( 200 ); if( this.inputInterrupted ) { this.inputInterrupted = false; return null; } } // remove and return the first entry return this.getInputPackages().remove( 0 ); } COM: <s> returns the oldest input package </s>
funcom_train/29018970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear (int year) { checkWidget (); SYSTEMTIME systime = new SYSTEMTIME (); int msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_GETCURSEL : OS.DTM_GETSYSTEMTIME; OS.SendMessage (handle, msg, 0, systime); msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_SETCURSEL : OS.DTM_SETSYSTEMTIME; systime.wYear = (short)year; OS.SendMessage (handle, msg, 0, systime); lastSystemTime = null; } COM: <s> sets the receivers year </s>
funcom_train/35727667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean draw(Graphics2D g, int x, int y) { try { PICTInputStream in = new PICTInputStream(new ByteArrayInputStream(data)); in.readUnsignedShort(); Rect bounds = in.readRect(); AffineTransform tx = g.getTransform(); g.translate(-bounds.left+x, -bounds.top+y); PICTGraphics pg = new PICTGraphics(g); while (true) { PICTInstruction inst = in.readInstruction(); pg.executeInstruction(inst); if (inst instanceof PICTInstruction.OpEndPic) break; } g.setTransform(tx); return true; } catch (IOException ioe) { return false; } } COM: <s> draws this picture resource into an awt graphics2 d context </s>
funcom_train/41435597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serviceActive(ServiceID serviceID) { try { ReceivableService receivableService = resourceAdaptorContext .getServiceLookupFacility().getReceivableService(serviceID); if (receivableService.getReceivableEvents().length > 0) { object.serviceActive(receivableService); } } catch (Throwable e) { logger.warn("invocation resulted in unchecked exception", e); } } COM: <s> indicates a service was activated the entity will forward this </s>
funcom_train/35108726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodContour addMethodContour(MethodContourCreationRecord ccr, ContourID parentID) { MethodContour contour= factory.createMethodContour(ccr); if (parentID!=null) add(contour, getContour(parentID)); else add(contour,null); // TODO Plug-in change // updateThreadStacks(contour, ccr.thread()); return contour; } COM: <s> create and add a method contour to the contour model </s>
funcom_train/48390062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addTabSelectedHandler(com.smartgwt.client.widgets.tab.events.TabSelectedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tab.events.TabSelectedEvent.getType()) == 0) setupTabSelectedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tab.events.TabSelectedEvent.getType()); } COM: <s> add a tab selected handler </s>
funcom_train/22799668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create(SchemaSetupParams params) throws SQLException, IOException { Connection conn = createConnection(params, ""); Statement stmt = conn.createStatement(); // Create database createDatabase(stmt, params); conn = createConnection(params, params.getDatabase()); stmt = conn.createStatement(); // Creates plpgsql language createPlpgsql(stmt); // Create tables createTables(stmt); // Creating views and stored procedures createViewsProcedures(stmt); stmt.close(); closeConnection(conn); } COM: <s> creates database schema </s>
funcom_train/50576281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String setPrefsPane() { TuneologyPrefs.setChildValue(staticPrefs, "ejectAfter", ejectSwitch.isSelected() ? "true" : "false"); TuneologyPrefs.setChildValue(staticPrefs, "useSeqNum", seqNumSwitch.isSelected() ? "true" : "false"); return null; } COM: <s> writes the application data to the xml data </s>
funcom_train/27817430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String describeThreadGroup(ThreadGroup threadGroup) throws IOException { if (threadGroup == null) return "<null threadgroup>"; return ("Group: " + threadGroup.getName() + (threadGroup.isDaemon() ? " <i>(daemon)</i>" : "") + (threadGroup.isDestroyed() ? " <b>(destroyed)</b>" : "")); } COM: <s> returns a html string representation of the given thread group used for debugging </s>
funcom_train/33836824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processKeywordStart(char c) { String s = buffer.toString(); if (isAlpha(c)) { buffer.append(c); s = s + c; if (isKeyword(s)) { state = LexerState.KEYWORD; return; } if (isKeywordPart(s)) return; } state = LexerState.IDENTIFIER; processIdentifier(c); } COM: <s> automaton transition from keyword start state </s>
funcom_train/48663074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractResponse service(AbstractRequest request) { // ?todo Can I use a switch here instead of if-else statements? final AbstractResponse result; if(request instanceof SignIn) { result = doSignIn((SignIn)request); } else if(request instanceof Register) { result = doCreateAccount((Register)request); } else if(request instanceof Deregister) { result = doDeleteAccount((Deregister)request); } else { throw new RuntimeException("Request not handled: " + request.getClass().getName()); } return result; } COM: <s> this method is essentially a switch that demultiplexes the incoming </s>
funcom_train/28368849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String strip(String text) { if(!leaveBoldItal) text = removeBoldItal(text); if(!leaveIndents) text = removeIndents(text); if(!leaveLists) text = removeLists(text); if(!leaveStuffInBraces) text = removeStuffInBraces(text); if(!leaveHTML) text = removeHTML(text); if(!leaveHeadings) text = removeHeadings(text); if(!leaveSignatures) text = removeSignatures(text); if(!leaveHorizontals) text = removeHorizontals(text); if(!leaveLinks) text = removeLinks(text); return text; } COM: <s> strips wikitext of its formatting </s>
funcom_train/21718592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean announceRemoteCommand(EpicCommand command) throws EpicClientException { if(!isConnectedToEpicNetwork()){ throw new EpicClientException("The EPIC network service is currently not available."); } if(mAdHocCommandManager==null){ throw new EpicClientException("The command manager is not available."); } mAdHocCommandManager.registerCommand(command.getId(), command.getHumanReadableName(), command.getClass()); return true; } COM: <s> announces a command that can be executed from a remote host </s>