__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/167317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Composite start(Serializer serializer, String id, Reader reference) { try { // model instanceを作成。 Conductor model = (Conductor) serializer.read(); model.addCalculationObserver(new Saver(model, serializer, reference)); model.addCalculationObserver(new Counter(id)); Thread thread = new Thread(model); // 計算を直ぐに開始し、計算終了後Threadを終了するようflagをセットする。 model.start(); model.exit(); // model threadを開始。 thread.start(); num = new Integer(num.intValue() + 1); return model; } catch (InstantiationException e) { throw new RuntimeException("Error instantiating a model from the xml.", e); } } COM: <s> creates the model instance and starts the calculation </s>
funcom_train/28426281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileObject getCurrentDirectory() { FileObject fileObj = null; if(currDir.equals("/")) { fileObj = new NativeFileObject("/", new File(rootDir), writePermission); } else { File file = new File(rootDir, currDir.substring(1)); fileObj = new NativeFileObject(currDir, file, writePermission); } return fileObj; } COM: <s> get the current directory </s>
funcom_train/30196995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHome() throws Exception { System.out.println("home"); /* ActionMapping mapping = null; ActionForm form = null; HttpServletRequest request = null; HttpServletResponse response = null; MenuIntervistatoreAction instance = new MenuIntervistatoreAction(); ActionForward expResult = null; ActionForward result = instance.home(mapping, form, request, response); assertEquals(expResult, result); */ } COM: <s> test of home method of class com </s>
funcom_train/37116577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAll(int startInclusive, int endInclusive) { checkRemoveModifiable(); if (startInclusive > endInclusive) { return false; } boolean changed = false; for (IntIterator it = iterator(); it.hasNext(); ) { int value = it.nextInt(); if (value >= startInclusive && value <= endInclusive) { it.remove(); changed = true; } } return changed; } COM: <s> removes all occurrences of a range of primitive values from this collection </s>
funcom_train/42709566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem2() { if (stringItem2 == null) {//GEN-END:|38-getter|0|38-preInit // write pre-init user code here stringItem2 = new StringItem("O\u00EDdo", "emite la nota para resolver su nombre y notaci\u00F3n");//GEN-LINE:|38-getter|1|38-postInit // write post-init user code here }//GEN-BEGIN:|38-getter|2| return stringItem2; } COM: <s> returns an initiliazed instance of string item2 component </s>
funcom_train/22964419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final protected String getContextPath(HttpServletRequest req) { String servletPath = req.getServletPath(); ServletContext servletContext = pageContext.getServletContext(); String realPath = servletContext.getRealPath(servletPath); int lastSlash = realPath.lastIndexOf(System.getProperty("file.separator")); if (lastSlash > -1) { String contextPath = realPath.substring(0, lastSlash + 1); return contextPath; } return ""; } COM: <s> returns the context path of a jsp or servlet including the last slash </s>
funcom_train/28664136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLowerLabel(Rectangle textSpace, GC myGC) { Point myTextPos = calcTextXY(lowerLabel, textSpace.x + textSpace.width / 2, textSpace.y + textSpace.height / 2, myGC.getFontMetrics()); gc.drawText(lowerLabel, myTextPos.x, myTextPos.y, true); } COM: <s> draws the lower label of the bar to your graph </s>
funcom_train/12561048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lSet(int itemNum, Item item) { itemLFs[itemNum] = (ItemLFImpl)item.itemLF; itemsModified = true; // current optimization: the new item is marked invalid, so when // the callInvalidate arrives, we'll know to update it and // the minimum set of neighbor Items. lRequestInvalidate(); } COM: <s> notifies look feel object of an item deleted in the corresponding </s>
funcom_train/3431557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeAbsolute(String uri) { if (uri == null) { uri = ""; } try { URL url = new URL(uri); return url.toString(); } catch (MalformedURLException mue) { try { URL fileURL = FileURL.makeURL(uri); return fileURL.toString(); } catch (MalformedURLException mue2) { // bail return uri; } } } COM: <s> attempt to construct an absolute uri </s>
funcom_train/44000910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void push(JSONObject jo) throws JSONException { if (this.top >= maxdepth) { throw new JSONException("Nesting too deep.",0); } this.stack[this.top] = jo; this.mode = jo == null ? 'a' : 'k'; this.top += 1; } COM: <s> push an array or object scope </s>
funcom_train/38251903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ Iterator it = this._contents.iterator(); SNPFileEntry entry; StringBuffer buffer = new StringBuffer(); while(it.hasNext()){ entry = (SNPFileEntry)it.next(); buffer.append(entry.toString()+"\n"); } return buffer.toString(); } COM: <s> contains all snp informations </s>
funcom_train/37648536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDuplicateUnregisterDefault() { RuleSet ruleSet = new RuleSet(); this.ruleSetManager.registerRuleSet(ruleSet); this.ruleSetManager.unregisterDefaultRuleSet(ruleSet); this.ruleSetManager.unregisterDefaultRuleSet(ruleSet); assertEquals("Default RuleSet not unregistered", 0, this.ruleSetManager.getDefaultRuleSets().size()); } COM: <s> unregistering twice the same default rule set has no effect </s>
funcom_train/39928268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTilesetAdded(TileSet tileset) { Iterator iterator = mapChangeListeners.iterator(); MapChangedEvent event = null; // int i=0; while (iterator.hasNext()) { if (event == null) event = new MapChangedEvent(this); ((MapChangeListener) iterator.next()).tilesetAdded(event, tileset); // System.out.println(i++); } } COM: <s> notifies all registered map change listeners about the addition of a </s>
funcom_train/11400733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { log("Started thread in "+System.getProperty("user.dir")); logSystemEnvironment(); while(stopFile == null || stopFile.exists()){ try { log("pausing..."); Thread.sleep(pause); } catch (InterruptedException e) { log("Exitting"); break; } } } COM: <s> this method performs the work of the service </s>
funcom_train/11379407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (running) { try { cleanUpInitializedJobsList(); selectJobsToInitialize(); if (!this.isInterrupted()) { Thread.sleep(sleepInterval); } } catch (InterruptedException e) { LOG.error("Job Initialization poller interrupted" + StringUtils.stringifyException(e)); } } } COM: <s> this is main thread of initialization poller we essentially do </s>
funcom_train/9931083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String processString() { if (!stringp) throw new RuntimeException(this.getClass().getName() + "[processString]" + "invalid call (not a String)"); try { process(); } catch (IOException e) { } return ((ByteArrayOutputStream) out).toString(); } COM: <s> encode the content of this encoder as a string </s>
funcom_train/1151093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand8() { if (itemCommand8 == null) {//GEN-END:|343-getter|0|343-preInit // write pre-init user code here itemCommand8 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|343-getter|1|343-postInit // write post-init user code here }//GEN-BEGIN:|343-getter|2| return itemCommand8; } COM: <s> returns an initiliazed instance of item command8 component </s>
funcom_train/9820267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint( UserDefinedNode udn) { udn.drawRect(0,0,boxWidth,boxWidth); udn.drawLine(corns[0],corns[0]+vertOffset,corns[1],corns[1]+vertOffset); udn.drawLine(corns[1],corns[0]+vertOffset,corns[0],corns[1]+vertOffset); addPorts(udn); } COM: <s> paint method for user defined schematic interface </s>
funcom_train/50847912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateShort() throws Exception { if (!isTestUpdates()) { return; } try { ResultSet rs = this.newUpdateableJdbcResultSet(); rs.next(); rs.updateShort("smallint_column", (short) 1); } catch (Exception e) { fail(e.toString()); } } COM: <s> test of update short method of interface java </s>
funcom_train/29313247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setROI(ROI roi) { assert(imagePlus != null); WindowManager.setTempCurrentImage(imagePlus); IJ.makeRectangle((int)roi.x, (int)roi.y, (int)roi.width, (int)roi.height); IJ.run("Duplicate...", "null"); imagePlus = WindowManager.getCurrentImage(); } COM: <s> set the roi of an image </s>
funcom_train/3077042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteBuild(BuildFacade buildFacade) { Build build = new Build(); build.setFacade(buildFacade); build.setSchedule(Luntbuild.getDao().loadSchedule(buildFacade.getScheduleId())); build.setId(buildFacade.getId()); Luntbuild.getDao().deleteBuild(build); } COM: <s> delete specified build </s>
funcom_train/36187909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set_bg_colour(Color c) { bg_colour = c; tmp_colour = c; // determine new colour of text if (tmp_colour.getGreen() + tmp_colour.getRed() + tmp_colour.getBlue() < 300) { text_colour = Color.white; } else { text_colour = Color.black; } } COM: <s> set the background colour </s>
funcom_train/10211959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { DStructure s = (DStructure)super.clone(); s.vars = new Vector(); for(int i=0; i<vars.size(); i++) { BaseType bt = (BaseType)vars.elementAt(i); s.vars.addElement(bt.clone()); } return s; } COM: <s> returns a clone of this code dsequence code </s>
funcom_train/25028087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public BigInteger valueOf(final Vector<BigInteger> c, final BigInteger x) { if (c.size() == 0) return BigInteger.ZERO; BigInteger res = c.lastElement(); for (int i = c.size() - 2; i >= 0; i--) res = res.multiply(x).add(c.elementAt(i)); return res; } COM: <s> evaluate the value of an integer polynomial at some integer argument </s>
funcom_train/51296222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRoleName(int roleRootId) { String sql = "SELECT name FROM role_group WHERE id = " + roleRootId; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); if (res.next()) return res.getString("name"); } catch (SQLException e) { e.printStackTrace(); } finally { DBAccessor.getInstance().releaseConnection(res); } return ""; } COM: <s> returns role by id </s>
funcom_train/26483583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void report(Attributes attributes) { String dtdVersionString = attributes.getValue("dtd-version"); dtdVersion = (dtdVersionString == null) ? DEFAULT_DTD_VERSION : Double.parseDouble(dtdVersionString); getReport().setName(attributes.getValue("name")); getReport().setTitle(attributes.getValue("title")); getReport().setAuthor(attributes.getValue("author")); } COM: <s> reads the report tag </s>
funcom_train/13478963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int radiusOfPlanet(Planet planet) { int radius = 5; switch(planet.getSize()) { case Planet.SIZE_HUGE : radius = 15; break; case Planet.SIZE_LARGE : radius = 13; break; case Planet.SIZE_MEDIUM : radius = 11; break; case Planet.SIZE_SMALL : radius = 9; break; case Planet.SIZE_TINY : radius = 7; break; } return radius; } COM: <s> calculates the radius of the planet in pixels </s>
funcom_train/26262597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startCellSpacer(LayoutElement element, String classType) { attributes.clear(); attributes.put(ATTR_CLASS, classType); attributes.put(ATTR_SRC, getRequest().getContextPath() + "/xava/images/spacer.gif"); write(LayoutJspUtils.INSTANCE.startTag(TAG_IMG, attributes)); write(LayoutJspUtils.INSTANCE.endTag(TAG_IMG)); } COM: <s> paints the cell left spacer </s>
funcom_train/44977656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findSheetNameFromExternSheet(short num){ String result=""; short indexToSheet = externSheet.getREFRecordAt(num).getIndexToFirstSupBook(); if (indexToSheet>-1) { //error check, bail out gracefully! result = getSheetName(indexToSheet); } return result; } COM: <s> finds the sheet name by his extern sheet index </s>
funcom_train/18052994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getJTextPaneDescription() { if (jTextPaneDescription == null) { jTextPaneDescription = new JTextPane(); jTextPaneDescription.setBounds(new Rectangle(228, 180, 186, 79)); jTextPaneDescription.setBackground(new Color(153, 153, 255)); jTextPaneDescription.setFont(new Font("Tahoma", Font.BOLD, 13)); jTextPaneDescription.setEditable(false); } return jTextPaneDescription; } COM: <s> this method initializes j text pane description </s>
funcom_train/280183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSaveAs() { SaveAsDialog saveAsDialog= new SaveAsDialog(getSite().getShell()); saveAsDialog.open(); IPath path= saveAsDialog.getResult(); if (path != null) { IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); if (file != null) { doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString()), new FileEditorInput(file)); } } } COM: <s> this also changes the editors input </s>
funcom_train/17394821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu createColorMenu(String title, String attribute) { CommandMenu menu = new CommandMenu(title); for (int i = 0; i < ColorMap.size(); i++) { menu.add(new ChangeAttributeAction(ColorMap.name(i), attribute, ColorMap.color(i), view)); } return menu; } COM: <s> creates the color menu </s>
funcom_train/19209694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stem( String term ) { if ( !isStemmable( term ) ) { return term; } // Reset the StringBuffer. sb.delete( 0, sb.length() ); sb.insert( 0, term ); sb = substitute( sb ); sb = this.stemTerm(sb); return sb.toString(); } COM: <s> stemms the given term to an unique tt discriminator tt </s>
funcom_train/28673011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConnection(ConnectionModel connectioin) { if (connectioin == null) { throw new IllegalArgumentException(); } if (connectioin.getSource() == this) { sourceConnections.remove(connectioin); firePropertyChange(PROP_SOURCE_CONNECTIONS, null, connectioin); } else if (connectioin.getTarget() == this) { targetConnections.remove(connectioin); firePropertyChange(PROP_TARGET_CONNECTIONS, null, connectioin); } } COM: <s> remove an incoming or outgoing connection from this shape </s>
funcom_train/43370555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAdaptorListPanel() { if (adaptorListPanel == null) { adaptorListLabel = new JLabel(); adaptorListLabel.setText("JLabel"); adaptorListPanel = new JPanel(); adaptorListPanel.setLayout(new FlowLayout()); adaptorListPanel.add(adaptorListLabel, null); adaptorListPanel.add(getAdaptorList(), null); } return adaptorListPanel; } COM: <s> this method initializes adaptor list panel </s>
funcom_train/4448491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { if(this.outstream == null) { throw new IllegalStateException("Cannot flush() after a close()!"); } this.cachedWriter.flush(); this.content = this.outstream.toByteArray(); log.debug("FLUSHED "+this.content.length); } COM: <s> called to flush any output in the cached writer to </s>
funcom_train/11007270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSlideShowWritesOutTheSame() throws Exception { assertSlideShowWritesOutTheSame(hssA, pfsA); // Some bug in StyleTextPropAtom rewriting means this will fail // We need to identify and fix that first //assertSlideShowWritesOutTheSame(hssB, pfsB); } COM: <s> ensure that simply opening a slideshow usermodel view of it </s>
funcom_train/19621727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getImdbId(String movieName, String year) { if ("google".equalsIgnoreCase(preferredSearchEngine)) { return getImdbIdFromGoogle(movieName, year); } else if ("yahoo".equalsIgnoreCase(preferredSearchEngine)) { return getImdbIdFromYahoo(movieName, year); } else if ("none".equalsIgnoreCase(preferredSearchEngine)) { return "Unknown"; } else { return getImdbIdFromImdb(movieName, year); } } COM: <s> retrieve the imdb matching the specified movie name and year </s>
funcom_train/38473037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean firePerspectiveChangeEvent(String current, String previous) { for (Iterator i = perspectiveChangeListeners.iterator(); i.hasNext();) { IPerspectiveChangeListener l = (IPerspectiveChangeListener)i.next(); if (!l.perspectiveChange(current, previous)) return false; } return true; } COM: <s> method fire perspective change event </s>
funcom_train/8079693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = m_ParamChar + " " + m_Lower + " "; switch ((int)(m_Lower - m_Upper + 0.5)) { case 1: result += "A"; break; case 2: result += "I"; break; default: result += m_Upper; break; } result += " " + m_Steps; if (m_RoundParam) { result += " R"; } return result; } COM: <s> returns a cvparameter as a string </s>
funcom_train/41379918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void performDefaults() { super.performDefaults(); // String author = fOverlayStore.getDefaultString(PreferenceMessages.IGCONFIG_authorOVERLAY); // String mail = fOverlayStore.getDefaultString(PreferenceMessages.IGCONFIG_mailOVERLAY); // String ref = fOverlayStore.getDefaultString(PreferenceMessages.IGCONFIG_refOVERLAY); // // authorText.setText(author); // mailText.setText(mail); // refText.setText(ref); } COM: <s> action to perform when the user clicks on restore defaults </s>
funcom_train/8124524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean purge(File file, boolean result) { Logger.trace("purge(file={})", file); if(file.isDirectory()) { for(File child : file.listFiles()) { result = purge(child, result); } } return file.delete() && result; } COM: <s> recursively delete the contents of a directory and the directory itself </s>
funcom_train/37866249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(FreeSpace node) { --size; if (node.previous == null) { if (node.next != null) { node.next.previous = null; header = node.next; } else header = null; } else { node.previous.next = node.next; if (node.next != null) node.next.previous = node.previous; else last = node.previous; } } COM: <s> remove a record from the list </s>
funcom_train/45260494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swap(Perspective oldPerspective, Perspective newPerspective) { int oldIndex = openedList.indexOf(oldPerspective); int newIndex = openedList.indexOf(newPerspective); if (oldIndex < 0 || newIndex < 0) { return; } openedList.set(oldIndex, newPerspective); openedList.set(newIndex, oldPerspective); } COM: <s> swap the opened order of old perspective with the new perspective </s>
funcom_train/51274338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void class_addclass() throws Exception { driver.get(executionpath + "/test/test.html"); executeNewScript("insert node <p/> as first into b:dom()//body"); executeNewScript("b:addClass(b:dom()//p,'class1')"); String value = executeNewScript("b:getClasses(b:dom()//p) = 'class1'"); Assert.assertEquals("true", value); } COM: <s> test the b add class function </s>
funcom_train/29369203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isShortcut(String type) { if (type != null && type.length() >= 2) { final String sndLetter = StringUtils.substring(type, 1, 2); if (StringUtils.isAlpha(sndLetter) && sndLetter.toLowerCase().equals(sndLetter)) { return false; } } return true; } COM: <s> eliminates shortcuts from being part of compositions </s>
funcom_train/2302702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void printComponent(Graphics gr) { Graphics2D g = (Graphics2D) gr; Rectangle c = g.getClipBounds(); g.translate(c.x, c.y); g.setColor(java.awt.Color.white); g.fillRect(0, 0, c.width, c.height); treeDrawer.draw(g, new Dimension(c.width, c.height)); }*/ COM: <s> prints the component </s>
funcom_train/22492529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeColumn(int columnIndex) { Iterator itr = dataStore.iterator(); synchronized (dataStore) { try { columns.remove(columnIndex); } catch (Throwable t) { return; } while (itr.hasNext()) { try { ArrayList lst = (ArrayList) itr.next(); lst.remove(columnIndex); } catch (Throwable t) { } } } fireTableStructureChanged(); } COM: <s> this will remove the desired column from this table model </s>
funcom_train/3308228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { for(int i = _freeConnections.size() ; i >= 0 ; i--) { try { ((PoolConnection)_freeConnections.remove(i)). getConnection().close(); } catch (SQLException e) { _log.logException(e); } } // clean up in use connections Iterator it = _inUseConnections.values().iterator(); while(it.hasNext()) { try { ((PoolConnection)it.next()).getConnection().close(); } catch (SQLException e) { _log.logException(e); } } _inUseConnections.clear(); } COM: <s> free all the connections in the pool </s>
funcom_train/19748382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object value) { //list.add( value ); // To correct a bug in digester, we need to check the object type // Digester doesn't call correct method according to object type ;-( if (value instanceof XmlAttribute) { add((XmlAttribute) value); } else { list.add(value); } } COM: <s> add an element in list </s>
funcom_train/2296131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initModelFolder(Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException { String master = root.attributeValue(APPINFO_ATTR_URI); if (master == null) { throw new CmsXmlException(Messages.get().container( Messages.ERR_XMLCONTENT_MISSING_MODELFOLDER_URI_2, root.getName(), contentDefinition.getSchemaLocation())); } m_modelFolder = master; } COM: <s> initializes the folder containing the model file s for this content handler </s>
funcom_train/37650102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite createGraphArea(Composite parent, Color bgColor, Color fgColor, Point coord, Point size) { Composite graphCanvas = new Composite(parent, SWT.NONE); GridData data = new GridData(GridData.FILL_VERTICAL); data.widthHint = size.x; data.heightHint = size.y; data.verticalSpan = numRows; graphCanvas.setLayoutData(data); graphCanvas.setSize(size); graphCanvas.setLayout(new FillLayout()); return graphCanvas; } COM: <s> creates a composite where the graph should be shown </s>
funcom_train/3422092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectList getActualEnumeration() { if (fActualEnumeration == null) { fActualEnumeration = new ObjectList () { public int getLength() { return (fEnumeration != null) ? fEnumeration.size() : 0; } public boolean contains(Object item) { return (fEnumeration != null && fEnumeration.contains(item)); } public Object item(int index) { if (index < 0 || index >= getLength()) { return null; } return fEnumeration.elementAt(index); } }; } return fActualEnumeration; } COM: <s> a list of actual enumeration values if it exists otherwise an empty </s>
funcom_train/35276570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilename(String filename) throws Exception { if (null == filename) { throw new Exception("Must supply valid filename."); } try { this.stream = new FileInputStream(filename); } catch (FileNotFoundException e) { throw new Exception("height file not found: " + filename); } } COM: <s> code set filename code sets the file to use for the raw data </s>
funcom_train/3934915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GalleryItemAdapter getSelected(ItemAdapter inSelected) throws VException { int lIndex = items.indexOf(inSelected.getTitle()); if (lIndex == -1) { lastSelected = null; return null; } GalleryItem lSelected = gallery.getItem(0).getItem(lIndex); gallery.setSelection(new GalleryItem[] {lSelected}); lastSelected = lSelected; return (GalleryItemAdapter)lSelected; } COM: <s> returns the specified items representation in the gallery </s>
funcom_train/20306558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResultSetIterator executeSQL(PreparedStatement ps, String opname, ResultSetIterator iterator) throws SQLException { if (ps.execute()) { ResultSet rs = ps.getResultSet(); iterator.reset(rs, ps, this, opname); return iterator; } else { returnPreparedSQLStatement(ps); return null; } } COM: <s> execute the given statement return null if the statement appears to be </s>
funcom_train/22401273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { // delete will remove the element from the owner clusters member list // therefore we use a temporary vector in case delete is being called // directly on the cluster's member lists (node or edge). Vector<T> tmpElements = new Vector<T>(elements); for(int i = 0; i<tmpElements.size(); i++) { tmpElements.get(i).delete(); } } COM: <s> delete all elements in the list removing them from the scene and </s>
funcom_train/18741246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeMatchFromConflictSet(ReteSimpleMatch m) { assert m != null; Collection<ReteSimpleMatch> c; if (this.conflictSetSearchTree == null) { c = this.conflictSet; } else { c = this.conflictSetSearchTree.getStorageFor(m); } assert c.contains(m); c.remove(m); assert !c.contains(m); } COM: <s> removes a given match from the conflict set </s>
funcom_train/1041222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void release() { log.info("running post process number of streams:" + inputStreams.size()); while (inputStreams.size() > 0) { InputStream is = (InputStream) inputStreams.remove(0); try { is.close(); log.info("closed stream"); } catch (IOException e) { log.warn("Error closing stream", e); } } } COM: <s> ensure that all opened input streams are closed </s>
funcom_train/34998868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void defineMessageText(String text) throws MessagingException { if (messageFormat == MESSAGE_TEXT) { this.message.setText(text); } else { String charset = this.config.getValue(ConfigKeys.MAIL_CHARSET); this.message.setContent(text.replaceAll("\n", "<br />"), "text/html; charset=" + charset); } } COM: <s> set the text contents of the email were sending </s>
funcom_train/37518475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void optimizeClass(String fileName) throws UnpositionedError { ClassInfo info; info = readClassFile(fileName); optimizeClass(info, options.optimize(), options.verbose()); writeClassFile(info, options.destination() == null ? fileName : options.destination() + File.separatorChar + org.multijava.util.Utils.splitQualifiedName(info.getName())[1] + ".class"); } COM: <s> reads optimizes and writes a class file </s>
funcom_train/3644911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(int bitIndex) { if (bitIndex < 0) { throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); } int unitIndex = unitIndex(bitIndex); if (unitIndex >= unitsInUse) { return; } bits[unitIndex] &= ~bit(bitIndex); if (bits[unitsInUse - 1] == 0) { recalculateUnitsInUse(); } } COM: <s> sets the bit specified by the index to code false code </s>
funcom_train/2862904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stripChars(String authoString) { StringBuffer returnString = new StringBuffer(); char ch; for (int i=0; i<authoString.length();i++) { ch = authoString.charAt(i); if (stripChars.indexOf(ch) == -1) { returnString.append(ch); } } return returnString.toString(); } COM: <s> removes specified characters from the string passed to it </s>
funcom_train/16937258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeResourceEnvRef(String name) { entries.remove(name); String type = null; synchronized (resourceEnvRefs) { type = (String) resourceEnvRefs.remove(name); } if (type != null) { support.firePropertyChange("resourceEnvRef", name + ":" + type, null); } } COM: <s> remove any resource environment reference with the specified name </s>
funcom_train/31292062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FormItem select() throws SemanticError { LOGGER.info("selecting next form item in dialog '" + id + "'..."); for (FormItem formItem : formItems) { /** * @todo Implement error throwing in case of an error while * evaluating the guard condition. */ if (formItem.isSelectable()) { return formItem; } } return null; } COM: <s> implementation of the em select em phase the next unfilled dialog </s>
funcom_train/18287137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isLibraryResource(IPath[] libraryPaths, IResource resource) { boolean isLibraryClass = false; for (int i = 0; i < libraryPaths.length; i++) { IPath libraryPath = libraryPaths[i]; if (libraryPath.isPrefixOf(resource.getFullPath())) { isLibraryClass = true; break; } } return isLibraryClass; } COM: <s> return a boolean indicating whether the specified resource is being </s>
funcom_train/22279088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decode(Decoder decoder) throws CodingException { rowCount = decoder.decodeInt(ROWCOUNT_KEY); columnCount = decoder.decodeInt(COLUMNCOUNT_KEY); horizGap = decoder.decodeInt(HORIZGAP_KEY); vertGap = decoder.decodeInt(VERTGAP_KEY); flowDirection = decoder.decodeInt(FLOWDIRECTION_KEY); } COM: <s> encodes the grid layout </s>
funcom_train/42088567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFieldEmpty() { for (int i = sizeY - 1; i >= 0; i--) { for (int j = sizeX - 1; j >= 0; j--) { if (field[i][j] != 0) { return false; } } } return true; } COM: <s> must be called if gameover to check is bonus needed </s>
funcom_train/31157357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImageIcon getSplashIcon() { ImageIcon icon = null; try { BufferedImage image = ResourceManager.loadImage("gfx/splash.png", Transparency.OPAQUE); icon = new ImageIcon(image); } catch (IOException e) { log.warn("Could not read splash image", e); } return icon; } COM: <s> fetches and returns the splash image as an code image icon code </s>
funcom_train/16678376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean stopSending() { // Disable periodical sending for (FastMap.Entry<String, Timer> e = periodicSenders.head( ), end = periodicSenders.tail( ); (e = e.getNext( )) != end;) { e.getValue( ).cancel( ); } periodicSenders.clear( ); // do not send old data after a reconnect toSend.clear( ); sending = false; return true; } COM: <s> stops to send data </s>
funcom_train/43828768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUniqueStreamString(){ return (getSite()+getVariable()+getSource()+getUnit()+ getOffsetValue()+getOffsetType()+getAggSpan().toString()+ getAggMethod()+getDuplicateID()).toLowerCase(); } COM: <s> returns a concatenated string that will uniquely identify </s>
funcom_train/1240549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBody(SOAPBody body) { if(this.body != null) { removeChild(this.body); } this.body = body; try { body.setParentElement(this); } catch (SOAPException ex) { // class cast should never fail when parent is a SOAPEnvelope log.fatal(Messages.getMessage("exception00"), ex); } } COM: <s> set the soap body </s>
funcom_train/38477759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() throws Exception{ if(!IKVM){ file.getParentFile().mkdirs(); FileOutputStream fos = new FileOutputStream(file); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(data); oos.flush(); oos.close(); } } COM: <s> save the data if it is a sun vm </s>
funcom_train/35567023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Token token){ DXFDataElement de = new DXFDataElement(token); m_list.add(de); if (! m_map.containsKey(de.m_gc)) m_map.put(de.m_gc, new ArrayList<String>()); List<String> values = m_map.get(de.m_gc); values.add(de.m_val); } COM: <s> stores an attribute from a token </s>
funcom_train/19973302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRow(String lab, View widget) { // Create the output fields. TableRow row = new TableRow(appContext); addView(row); // Add a label field to display the output name. TextView label = new TextView(appContext); label.setPadding(0, 0, 20, 0); label.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); label.setText(lab); row.addView(label); // Add the widget. row.addView(widget); } COM: <s> add a row to the gui containing a label and a widget </s>
funcom_train/541720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTimer(Thread t) { if (!timer) return; String method = getCaller(); int methodLength = method.length() - skip.length(); maxMethodName = maxMethodName < methodLength ? methodLength : maxMethodName; synchronized(threadMap) { Stack s = (Stack)threadMap.get(t); if (s == null) { s = new Stack(); threadMap.put(t, s); } s.push(new Timee(method)); } } COM: <s> code start timer code starts the timer for the caller of this method </s>
funcom_train/18199837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTierlabelAvailable(String animalName) throws StatementNotExecutedException { String query = "SELECT TierName " + "FROM " + databaseName + ".tierart " + "WHERE TierName = '" + animalName +"' " + "AND geloescht='N';"; try { ResultSet rs = executeSelect(query); if (rs.next()) { return true; } else { return false; } } catch (SQLException e) { log.error("MySQL Error occurred.", e); throw new StatementNotExecutedException(query); } } COM: <s> check if a specific animal name is available in the database or not </s>
funcom_train/51111750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query setParameter(int position, Object value) { // Positional parameters are designated by the question // mark(?) prefix followed by an integer. For example: ?1. String name = POSITIONAL_PARAM_PREFIX + Integer.toString(position); try { return setParameter(name, value); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Invalid positional parameter: " + position, e); } } COM: <s> bind an argument to a positional parameter </s>
funcom_train/44708193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser() { if (m_user == null) { try { m_user = User.retrieve(getUserID()); m_user.disconnect(); } catch (DataObjectNotFoundException nfe) { // Do nothing. Let m_user remain null. } } return m_user; } COM: <s> returns a user object for the current user </s>
funcom_train/16580287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCmbFormat() { if (cmbFormat == null) { cmbFormat = new JComboBox(); for (int i = 0; i <ModelTemplatePanel.formats.length; i++) { cmbFormat.addItem(ModelTemplatePanel.formats[i]); } cmbFormat.setSelectedItem(model.getFormat()); cmbFormat.setPreferredSize(new java.awt.Dimension(100,20)); } return cmbFormat; } COM: <s> this method initializes cmb format </s>
funcom_train/44324106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillRandomMap(Map map, int count, int maxLen, String charBase) { if (map == null) return; while (map.size() < count) { String key = newRandomString(maxLen, charBase); String value = newRandomString(maxLen, charBase); map.put(key, value); } } COM: <s> fills the give map with random strings </s>
funcom_train/14241455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseOutParams(MOperation op, String s) { s = s.trim(); String leftOver = s; int end = s.lastIndexOf(")"); if (end != -1) { java.util.StringTokenizer st = new java.util.StringTokenizer(s.substring(1,end), ","); while (st.hasMoreTokens()) { String token = st.nextToken(); MParameter p = parseParameter(token); if (p != null) op.addParameter(p); } leftOver = s.substring(end+1); } return leftOver; } COM: <s> parses the parameters with an operation </s>
funcom_train/51763977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParsedDocNoFileFound() throws ParserConfigurationException, SAXException, IOException { boolean foundCorrectException = false; try { DocumentReader.getParsedDoc(DocumentReader.getInputStream("youWillNeverFindThisPathAtAll3")); } catch (FileNotFoundException e) { foundCorrectException = true; } assertTrue("FileNotFoundException should be raised.", foundCorrectException); } COM: <s> tests that no file was available to parse </s>
funcom_train/2331971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeSortFromTo(int from, int to, ShortComparator c) { int mySize = size(); checkRangeFromTo(from, to, mySize); short[] myElements = elements(); cern.colt.Sorting.mergeSort(myElements, from, to + 1, c); elements(myElements); setSizeRaw(mySize); } COM: <s> sorts the receiver according to the order induced by the specified </s>
funcom_train/14023731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Relation rangeRestriction (Set t) { Relation r = new HashRel(); for (Iterator i1 = this.iterator(); i1.hasNext();) { Maplet m = (Maplet)i1.next(); for (Iterator i2 = t.iterator(); i2.hasNext();) { if (m.y().equals(i2.next())) r.add(m); } } return r; } COM: <s> returns a relation containing only those maplets of this relation </s>
funcom_train/27827078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println() { m_output.println(); if (m_currentStreamPosition==IN_TAG_ATTRIBUTES) m_currentStreamPosition=IN_TAG_ATTRIBUTES_AFTER_WS; if (m_currentStreamPosition==IN_TAG_BODY) m_currentStreamPosition=IN_TAG_BODY_START_LINE; } COM: <s> inserts a new line </s>
funcom_train/32128694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { // Not checking values here, since this equals is used by Vector // to check if it contains a given qualifier. A given qualifier // is present if the name matches, it does not matter if the // values are different. if (!(o instanceof CIMQualifier)) { return false; } CIMQualifier that = (CIMQualifier) o; if (!(value == null ? that.value == null : value.equals(that.value))) return false; return super.equals(o); } COM: <s> returns true if this qualifier is equal to the input </s>
funcom_train/24523641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void useItem(String id) { //Get the itemName. String itemName = nifty.getScreen("hud").findElementByName("itemName" + id).getRenderer(TextRenderer.class).getWrappedText(); //Check if the item isn't null. if(!itemName.equals("")) { this.itemSelected = true; this.itemName = itemName; } } COM: <s> uses the item </s>
funcom_train/37235516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TickUnit getCeilingTickUnit(TickUnit unit) { int index = Collections.binarySearch(this.tickUnits, unit); if (index >= 0) { return (TickUnit) this.tickUnits.get(index); } index = -(index + 1); return (TickUnit) this.tickUnits.get(Math.min(index, this.tickUnits.size() - 1)); } COM: <s> returns the tick unit in the collection that is greater than or equal </s>
funcom_train/25990773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLookups() throws Exception { // value equality //result = eval("key = 3; arr = []; arr[key] = 'one'; arr.store(3, 'two'); puts arr[key]"); //assertEquals("two", result); } COM: <s> test array store and array retrieve </s>
funcom_train/40463273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getSourceLanguage() { if (sourceLanguage == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here sourceLanguage = new TextField("source language", "en", 32, TextField.ANY);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return sourceLanguage; } COM: <s> returns an initiliazed instance of source language component </s>
funcom_train/26114489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateMachineStatus(String agentName, String status) { lock.lock(); try { machinesStatus.put(getMachineByName(agentName), status); if (status != null && status.equals(STATUS_IDLE)) { // if the machine's status is idle wake up the test loop System.out.println("Notify idle Agent " + agentName.toUpperCase()); idleMachineCondition.signalAll(); } } finally { lock.unlock(); } } COM: <s> update the agents status for tt agent conn runnable tt to call back </s>
funcom_train/32776904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getAttribute() { // Attribute bzw. ComparableAttribute erzeugen Attribute attr; Object attrValue = this.value; if (this.value instanceof PrimitiveWrapper) { attrValue = ((PrimitiveWrapper) this.value).getObject(); } if (Comparable.class.isAssignableFrom(attrValue.getClass())) { attr = new ComparableAttribute(this.name, (Comparable) attrValue); } else { attr = new Attribute(this.name, attrValue); } return attr; } COM: <s> returns the attribute described by this attribute description </s>
funcom_train/13864503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProperty(Property property) { if (property.getIsStatic()) { if (this.staticproperties == null) { this.staticproperties = new Vector(); } this.staticproperties.add(property); } else { if (this.properties == null) { this.properties = new Vector(); } this.properties.add(property); } } COM: <s> adds a property to this class </s>
funcom_train/12837234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserMessageTypeEnum getListSeverity() { if (hasFieldValidationErrorMessages()) { return UserMessageTypeEnum.FIELD_VALIDATION_ERROR; } if (hasGeneralErrorMessages()) { return UserMessageTypeEnum.GENERAL_ERROR; } if (hasWarningMessages()) { return UserMessageTypeEnum.WARNING; } if (hasInformationMessages()) { return UserMessageTypeEnum.INFORMATION; } return null; } COM: <s> iterates over the user messages and returns the severity level </s>
funcom_train/13258628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInputQueueStrategy(String text, final String property, Container cont) { // Creates a Map with Queue Strategies Names, then delegates addInputCombo to create // graphical components Map<String, String> distributions = new TreeMap<String, String>(); distributions.put(CommonConstants.QUEUE_STRATEGY_FCFS, CommonConstants.QUEUE_STRATEGY_FCFS); distributions.put(CommonConstants.QUEUE_STRATEGY_LCFS, CommonConstants.QUEUE_STRATEGY_LCFS); addInputCombo(text, property, cont, distributions); } COM: <s> adds an input field to chose a for a queue strategy </s>
funcom_train/7745788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String updateNextKeyStatement() { StringBuffer stringBufferStmt = new StringBuffer(); stringBufferStmt.append("UPDATE "); stringBufferStmt.append(ConfigurationRegistry.getInstance().getConfiguration().getKeyGeneratorTableName()); stringBufferStmt.append(" SET "); stringBufferStmt.append(ConfigurationRegistry.getInstance().getConfiguration().getKeyGeneratorColumnName()); stringBufferStmt.append(" = ?"); return stringBufferStmt.toString(); } COM: <s> get the statement to update the next key in the database </s>
funcom_train/13247647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFileChooser getFileChooser() { if (fileChooser == null) { fileChooser = new JFileChooser(); fileChooser.addChoosableFileFilter(getFileManager().getConverterFileFilter()); fileChooser.setFileView(getFileManager().getConverterFileView()); } return fileChooser; } COM: <s> returns the file chooser for this text converter </s>
funcom_train/35275080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeScene(final SceneRequest request) { enqueue(new Callable() { public Object call() throws Exception { if (request == currentSceneRequest) { if (closeCurrentScene()) { if (request.getRequester() instanceof SceneApplication) { camController.disable(); } currentSceneRequest = null; setCurrentFileNode(null); setWindowTitle("OpenGL Window"); } } return null; } }); } COM: <s> method to close a scene displayed by a scene request threadsafe </s>
funcom_train/5247875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(LogRecord record) { String loggerName = record.getLoggerName(); if(loggerName == null) { loggerName = "root"; } StringBuilder output = new StringBuilder() .append(loggerName) .append("[") .append(record.getLevel()).append('|') .append(Thread.currentThread().getName()).append('|') .append(format.format(new Date(record.getMillis()))) .append("]: ") .append(record.getMessage()).append(' ') .append(lineSep); return output.toString(); } COM: <s> a custom format implementation that is designed for brevity </s>