__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37033095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { System.out.println("Email: " + email); System.out.println("Passes Form Check? " + formCheck); System.out.println("Passes DNS Check? " + dnsCheck); System.out.println("Passes Send Check? " + sendCheck); } COM: <s> a function for dumping the contents to system </s>
funcom_train/17962152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimeSeries createTimeSeries(final int series, final int count) { final TimeSeries result = new TimeSeries("Series " + series , Day.class); Day start = new Day(); for (int i = 0; i < count; i++) { result.add(start, Math.random()); start = (Day) start.next(); } return result; } COM: <s> creates a time series containing random daily data </s>
funcom_train/24041372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flip(final float proportionalLocationX, final float proportionalLocationY) { final ResizeHandle resizeHandle = getComponent().getResizeHandle(proportionalLocationX, proportionalLocationY); getSlide().getMainFrame().setObjectBeingDragged(resizeHandle); getSlide().setCursor(resizeHandle.getCursor()); } COM: <s> retrieves and sets as object being dragged the resize handle located with </s>
funcom_train/7468817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsMultiValued() { SpellCheckedMetadata meta = new SpellCheckedMetadata(); assertFalse(meta.isMultiValued("key")); meta.add("key", "value1"); assertFalse(meta.isMultiValued("key")); meta.add("key", "value2"); assertTrue(meta.isMultiValued("key")); } COM: <s> test for code is multi valued code method </s>
funcom_train/31695892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IterativeSimulation simulation() { // clear existing individuals in simulation: Individual[] individuals = simul_.getIndividuals(); for (int i = 0; i < individuals.length; i++) { Individual indiv = individuals[i]; simul_.remove(indiv); } // groups_ = new Vector(); for (Iterator iter = groups_.iterator(); iter.hasNext();) { Group group = (Group) iter.next(); insertGroup(group); } return simul_; } COM: <s> create a new simulation </s>
funcom_train/12385124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save( String fileName ) throws FileNotFoundException, UnsupportedEncodingException { if( fileName == null ) fileName = this.saveFileName; else this.saveFileName = fileName; if( fileName == null ) throw new FileNotFoundException("No file name"); PrintStream out = new PrintStream(fileName, XML_ENCODING_NAME); toXml( out, "" ); setSavingNeeded(false); } COM: <s> saves the document </s>
funcom_train/44950996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void splash() { pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int x = (int) (screenSize.getWidth() - getWidth()) / 2; int y = (int) (screenSize.getHeight() - getHeight()) / 2; setLocation(x, y); setVisible(true); } COM: <s> show the splash screen in the center of the screen </s>
funcom_train/21458025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignment(int id, String assignment) { PreparedStatement psUpdate = null; try { psUpdate = conn.prepareStatement("update resource set Status = ? where Resource_ID = " + id); psUpdate.setString(1, assignment); psUpdate.executeUpdate(); conn.commit(); } catch (SQLException sqle) { sqle.printStackTrace(); } } COM: <s> changes the status of a resource </s>
funcom_train/18513281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XmlFile getNewFile(String docType, File dtd, MessageDisplayer msgDis) { XmlFile file = new XmlFile(BASE_FILE_NAME + fileCreatedNb, docType, dtd .getAbsolutePath(), msgDis, editor); // tries to parse the dtd file.setXmlDisplay(editor.getXmlDisplaysManager().getXmlDisplay(file, msgDis)); return file; } COM: <s> creates a new xml file from scratch </s>
funcom_train/39429057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDifference() { BigDecimal budget = new BigDecimal(this.budget); BigDecimal actual = new BigDecimal(this.actual); if (BudgetAppData.getDefault().getBudget().isInflowCategory(category)) return actual.subtract(budget).doubleValue(); else return budget.subtract(actual).doubleValue(); } COM: <s> method get difference </s>
funcom_train/11371248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void opCopyBlock(DataInputStream in) throws IOException { OpCopyBlockProto proto = OpCopyBlockProto.parseFrom(vintPrefixed(in)); copyBlock(fromProto(proto.getHeader().getBlock()), fromProto(proto.getHeader().getToken())); } COM: <s> receive op copy block </s>
funcom_train/28549437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getMementoURL(String aPanelId) { URL result = null; result = SelectedGlossaryEntityCardView.class .getResource(getResourcePath(aPanelId)); if (result == null) { log.severe("Default viewConfig missing for " + getResourcePath(aPanelId)); } assert result != null; return result; } COM: <s> returns the url for the panel with a panel id </s>
funcom_train/30050536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllGadgetRatingScores(GadgetRatingScorePool allGadgetRatingScores) { this.allGadgetRatingScores=allGadgetRatingScores; clear(); Iterator<GadgetRatingScore> it = allGadgetRatingScores.getScores().iterator(); while (it.hasNext()) { GadgetRatingScore score = it.next(); addRating(score.getUserName(), score.getScore()); } } COM: <s> set a new value to all gadget rating scores </s>
funcom_train/20352109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void center() { Toolkit tk = Toolkit.getDefaultToolkit(); Dimension screenSize = tk.getScreenSize(); int screenHeight = screenSize.height; int screenWidth = screenSize.width; int frameHeight = this.getHeight(); int frameWidth = this.getWidth(); setLocation(screenWidth - frameWidth - (screenWidth - frameWidth) / 2, screenHeight - frameHeight - (screenHeight - frameHeight) / 2); } COM: <s> centralize the window </s>
funcom_train/17431886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Job parseInputOutput(String jobName, Tool tool, String inputPath, String outputPath) throws IOException { Job job = new Job(getConf(), jobName); initJob(job, tool, inputPath, outputPath); return job; } COM: <s> job namer input output path job </s>
funcom_train/18023909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderSelection(Graphics2D g2d) { try { for (int i = 0; i < active.size(); i++) { DragRenderer dr = ((MouseModule) active.get(i)).getDragRenderer(); getGlassPane().setDragRenderer(dr, dSelectionStart, dSelectionEnd); } } catch (RuntimeException e) { DasExceptionHandler.handle(e); } } COM: <s> call the render drag method of the active modules drag renderer </s>
funcom_train/7675094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DalvInsnList finishProcessingAndGetList() { if (reservedCount >= 0) { throw new UnsupportedOperationException("already processed"); } InsnFormat[] formats = makeFormatsArray(); reserveRegisters(formats); massageInstructions(formats); assignAddressesAndFixBranches(); return DalvInsnList.makeImmutable(insns, reservedCount + unreservedRegCount); } COM: <s> does final processing on this instance and gets the output as </s>
funcom_train/34673754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXMLRequest() throws Exception{ // get xml form String form = requestWSRPForm(registrationHandle, urlNxt, xmlContentType, productToRequest); boolean successProduct = form.contains(productContentTest); boolean successMime = form.contains(xmlContentType); assertTrue("\""+productContentTest+"\" Form content missing", successProduct); assertTrue("Mime type not "+xmlContentType, successMime); } COM: <s> test the xml mime type form request </s>
funcom_train/366460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(Node n) { nodeItemCheck(n); for ( int i=0; i < m_edges.size(); i++ ) { if ( n == ((Edge)m_edges.get(i)).getAdjacentNode(this) ) return i; } return -1; } // COM: <s> returns the index or position of a neighbor node </s>
funcom_train/43753028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWidgets(Widget...ws) { if (ws != null && ws.length != 0) { for(Widget w: ws) { if (w != null) { AxisWrapperPanel wrapper = new AxisWrapperPanel(); wrapper.setWidget(w); wrapper.addStyleName("AxisPanelWidgetWrapper"); getTarget().layoutPanel.add(wrapper); } } } } COM: <s> add widgets to the current target panel being built </s>
funcom_train/34783252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean useResourceExtension() { String resource = resourceNameField.getText(); if ((resourceExtension != null) && (resourceExtension.length() > 0) && (resource.length() > 0) && (resource.endsWith('.' + resourceExtension) == false)) { return true; } return false; } COM: <s> determines whether the resource extension should be added to the </s>
funcom_train/17963936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { this.chartArea.setRect(0.0, 0.0, 0.0, 0.0); this.plotArea.setRect(0.0, 0.0, 0.0, 0.0); this.plotInfo = new PlotRenderingInfo(this); if (this.entities != null) { this.entities.clear(); } } COM: <s> clears the information recorded by this object </s>
funcom_train/31682966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeContentsOutputStream() throws WebDAVException { // close any opened output stream if (openedOutputStream == null) { throw new WebDAVException(WebDAVStatus.SC_BAD_REQUEST, "No output stream is opened"); } try { openedOutputStream.close(); } catch (WebDAVException exc) { throw exc; } catch (java.io.IOException exc) { throw new WebDAVException(WebDAVStatus.SC_INTERNAL_SERVER_ERROR, "IO Error"); } openedOutputStream = null; } COM: <s> close any opened output stream on the contents of the managed resource </s>
funcom_train/21302936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EntriesType cloneEntriesType(EntriesType entries) { if (entries == null) { return null; } EntriesType clone = new EntriesType(); clone.setLevel( entries.getLevel() ); clone.setVersion( entries.getVersion() ); for (EntryType entry : entries.getEntry()) { clone.getEntry().add( cloneEntryType(entry) ); } return clone; } COM: <s> clones a entries type object </s>
funcom_train/26095840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State getSource() { if (source != null && source.eIsProxy()) { InternalEObject oldSource = (InternalEObject)source; source = (State)eResolveProxy(oldSource); if (source != oldSource) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, LTSPackage.TRANSITION__SOURCE, oldSource, source)); } } return source; } COM: <s> returns the value of the em b source b em reference </s>
funcom_train/16795675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getInterpolatedPixel(double x, double y) { if (interpolationMethod==BICUBIC) return getBicubicInterpolatedPixel(x, y, this); else { if (x<0.0) x = 0.0; if (x>=width-1.0) x = width-1.001; if (y<0.0) y = 0.0; if (y>=height-1.0) y = height-1.001; return getInterpolatedPixel(x, y, pixels); } } COM: <s> uses the current interpolation method bilinear or bicubic </s>
funcom_train/3118026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pasteAt(Point2D absPt) { GraphicalObjectGroup pasteDest = findPasteDestination(absPt); Point2D localPt = new Point2D.Double(); GraphicalObjectLib.absoluteToLocal(pasteDest, absPt, localPt); cmdqueue.doCommand(new DenimPasteCommand(pasteDest, localPt)); //repaint(); this.damage(DAMAGE_LATER); } COM: <s> pastes the clipboard contents at the given absolute location </s>
funcom_train/50141408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws ServiceRuntimeException, ServiceInitializationException { status = CONTEXT_STATUS_STARTING; log.info("Starting context..."); log.debug("Starting service manager..."); this.serviceManager.start(); log.debug("Service manager started."); status = CONTEXT_STATUS_RUNNING; log.info("Context started."); } COM: <s> starts the context </s>
funcom_train/12662850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Nodes{"); for (Iterator iter = nodes.values().iterator(); iter.hasNext();) { INodeEntry node = (INodeEntry) iter.next(); sb.append(node.toString()); sb.append(" "); } sb.append("}"); return sb.toString(); } COM: <s> prints values of node entries </s>
funcom_train/28874785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forceCompile() { setYellow(); packer.generate(Packer.TYPE_SID, song, "player.s", option.getTmpPath(), "TEMP", option.getTmpPath(), 0x0801, false, option.getA4Freq()); setGreen(); isCompiled=true; } COM: <s> force a compilation of tune </s>
funcom_train/48191077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPostgreSQLConnectionURLNoPort() throws Exception { // The correct connection URL for the PostgreSQL (with default port) String url = "jdbc:postgresql://" + HOST + ":5740" + "/" + DB; hcm.setDialect(POSTGRESQL); hcm.setDatabaseHost(HOST); hcm.setDatabasePort(""); hcm.setDatabaseName(DB); hcm.setConnectionURL(POSTGRESQL); assertEquals(url, hcm.getConnectionURL()); } COM: <s> test for building the correct connection url string with missed database </s>
funcom_train/50458313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object key) throws WalletException { if (key == null) { throw new NullPointerException("Key cannot be null."); } // make the hash of the key BigInteger hashKey = crypto.generateHash(key); // get the value and decrypt it BigInteger encryptedValue = (BigInteger) dataMap.get(hashKey); if (encryptedValue == null) { // looks like that isn't in here return null; } Object decryptedValue = crypto.decrypt(pbeKey, encryptedValue); return decryptedValue; } COM: <s> returns the object associated with the given key </s>
funcom_train/48526372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLast(NodeHandle handle) { // if (!(this instanceof SubscribeMessage)) System.out.println(this+".addLast("+handle+")"); if (handle == null) { return; } if ((!toVisit.contains(handle)) && (!visited.contains(handle))) { toVisit.addLast(handle); } } COM: <s> adds a node the the end of the to visit list </s>
funcom_train/49339801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTarget(Coordinates target) { this.target = target; // find the azimuth to the new coordinates // this is done once here when a new target is sent in, // and is also done regularly in the locationUpdated method if (locationIsValid) { directionPointerAzimuth = (int)currentCoords.azimuthTo(target); } navigating = true; blinker = new BlinkTimer(); blinker.start(); repaint(); } COM: <s> mutator to set the target coordinates which has the effect of </s>
funcom_train/47036713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void print(AntScript script) { if (type != null) { script.indent++; script.printStartTag(type); } for (Iterator iterator = singleConditions.iterator(); iterator.hasNext();) script.printString((String) iterator.next()); for (Iterator iterator = nestedConditions.iterator(); iterator.hasNext();) { Condition condition = (Condition) iterator.next(); condition.print(script); } if (type != null) { script.printEndTag(type); script.indent--; } } COM: <s> add this ant condition to the given ant script </s>
funcom_train/25819509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unequip(Actor a) { a.setAttack(a.getAttack() - attack); a.setDefense(a.getDefense() - defense); a.setSpeed(a.getSpeed() - speed); a.setMagicAttack(a.getMagicAttack() - magic); a.setMagicDefense(a.getMagicDefense() - magicDefense); a.setCastSpeed(a.getCastSpeed() - castSpeed); } COM: <s> unequips this equipment from an actor by subtracting this equipments </s>
funcom_train/25118926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResourceMeta getResourceDirectlyBySplitPath(String[] parts) { int l = parts.length; if (l < 2) return null; ResourceGroup r = getGroupByName(parts[0]); for (int i = 1; i < l - 1; ++i) { if (r == null) return null; r = r.getGroupByName(parts[i]); } if (r == null) return null; return r.getResourceByName(parts[l - 1]); } COM: <s> get resource meta information by a path split in units achieved by a </s>
funcom_train/28130780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write(final List<? extends Object> content) throws IOException { // convert object array to strings and write them final String[] strarr = new String[content.size()]; int i = 0; for( final Object o : content ) { if( o == null ) { throw new NullInputException("Object at position " + i + " is null", new CSVContext(getLineNumber(), i), (Throwable) null); } strarr[i++] = o.toString(); } write(strarr); } COM: <s> writes the list of content </s>
funcom_train/5576530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("+" + this.getFullpath() + "\n"); Iterator it = files.keySet().iterator(); while (it.hasNext()) { sb.append(files.get(it.next()) + "\n"); } it = directories.keySet().iterator(); while (it.hasNext()) { sb.append(directories.get(it.next())); } sb.append("-" + this.getFullpath() + "\n"); return sb.toString(); } COM: <s> retrieves a textual representation of this object </s>
funcom_train/4717590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoteOffWith0Velocity() { SynMessage msg = new SYN().synth(1).voice(1).off().velocity(0); assertEquals("/SYN/ID1/V1/OFF", msg.getAddress()); assertEquals(0, msg.getArguments().length); } COM: <s> note off message with 0 velocity </s>
funcom_train/4237371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCambio() { System.out.println("getCambio"); ImplNotaDeConsumo instance = new ImplNotaDeConsumo(); instance.setCambio(100.20); Double expResult = 100.20; Double result = instance.getCambio(); assertEquals(expResult, result); } COM: <s> test of get cambio method of class restaurante </s>
funcom_train/22237874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getMetadataPortNamesForProtocol(String protocol) { Vector result = new Vector(); Enumeration portNames = lsidMetadataPorts.keys(); while (portNames.hasMoreElements()) { String portName = (String) portNames.nextElement(); LSIDMetadataPort lmdp = (LSIDMetadataPort) lsidMetadataPorts.get(portName); String prot = lmdp.getProtocol(); if (prot == null) continue; if (prot.equals(protocol)) result.add(portName); } return result.elements(); } COM: <s> get the keys of all the metadata ports for the given protocol </s>
funcom_train/12652404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDiagnosis(PatientHistory patientHistory, CharacteristicCode location, CharacteristicCode value) { if ((patientHistory == null) || (location == null) || (value == null)) return; Diagnosis diagnosis = new Diagnosis(); diagnosis.getValueHistory().setValue(ANATOMIC_SITE, location); diagnosis.getValueHistory().setValue(TUMOR_STAGE_FINDING, value); patientHistory.getDiagnoses().add(diagnosis); } COM: <s> add an tumor stage diagnosis to a history </s>
funcom_train/14519828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ICAAdminSessionLocal getCAAdminSession() { if (caadminsession == null) { try { ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome) getLocator().getLocalHome(ICAAdminSessionLocalHome.COMP_NAME); caadminsession = caadminsessionhome.create(); } catch (CreateException e) { throw new EJBException(e); } } return caadminsession; } //getCAAdminSession COM: <s> gets connection to caadmin session bean </s>
funcom_train/9646503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStats() { lScore.setText(String.valueOf(snakeModel.getScore())); lItems.setText(String.valueOf(snakeModel.getItemsCollected())); lMoves.setText(String.valueOf(snakeModel.getMoveCnt())); lLength.setText(String.valueOf(snakeModel.getSnake().getCurrentLength())); } COM: <s> revert put values from bean to gui </s>
funcom_train/22497882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStyleRef() { String linkName = null; final Element link = Util.findElementDown(HTML.Tag.LINK.toString(), getDefaultRootElement()); if (link != null) { final Object href = link.getAttributes().getAttribute(HTML.Attribute.HREF); if (href != null) { linkName = href.toString(); } } return linkName; } COM: <s> get the style sheet reference of the document in this </s>
funcom_train/5231832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runSplash() { screen = new JSplashScreen("pdfsam loader", "Initialization.."); screen.setMaximumBarValue(5); Runnable runner = new Runnable() { public void run() { screen.setVisible(true); } }; SwingUtilities.invokeLater(runner); } COM: <s> run a splash screen </s>
funcom_train/21885028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEcoreClassPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ASTClass_ecoreClass_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ASTClass_ecoreClass_feature", "_UI_ASTClass_type"), AstPackage.Literals.AST_CLASS__ECORE_CLASS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the ecore class feature </s>
funcom_train/9187664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type completionError(DiagnosticPosition pos, CompletionFailure ex) { log.error(pos, "cant.access", ex.sym, ex.getDetailValue()); if (ex instanceof ClassReader.BadClassFile && !suppressAbortOnBadClassFile) throw new Abort(); else return syms.errType; } COM: <s> report a failure to complete a class </s>
funcom_train/46389422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object member) throws IllegalArgumentException, IllegalAccessException { if (!isReadable()) throw new IllegalStateException("Property " + propertyName + " of " + memberClass + " not readable"); try { return getter.invoke(member, null); } catch (InvocationTargetException e) { throw new UndeclaredThrowableException(e.getTargetException()); } } COM: <s> gets the value of this property for the specified object </s>
funcom_train/3122005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onLeaf(Writer pwriter, Object data, int depth) { String strPrefix = StringLib.spaces(INDENT * depth); try { pwriter.write(StringLib.fold(strPrefix, data.toString())); pwriter.write("\n"); } catch (Exception e) { e.printStackTrace(); } } // of onLeaf COM: <s> this method is called when we reach a leaf node </s>
funcom_train/12555253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gaigsChangeHexEdgeColors(String search, String replace){ for(int i = 0; i < num_edges; i++){ for(int j = 0; j < num_edges; j++){ if(my_edgeset[i][j].getHexColor() == search) { my_edgeset[i][j].setHexColor(replace); } } } } COM: <s> changes any edges in this code visual graph code with the color </s>
funcom_train/9680789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BinTreeTableNode doSearch(){ SearchVisitor searchVisitor = createVisitor(); for (int i = 0; i < visitables.length; ++i) { visitables[i].accept(searchVisitor); } BinTreeTableNode rootNode = new BinTreeTableNode(getTableCaption()); List results = searchVisitor.getResults(); addResultsToTable(results, rootNode); return rootNode; } COM: <s> makes search and creates a binary table with results </s>
funcom_train/49789843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClickButton1() throws Exception { beginAtSitemapThenPage("Home"); assertNoProblem(); // three buttons List<IElement> buttons = checkButtons(); // click the first button clickElement(buttons.get(0)); assertNoProblem(); // we should now be on the target frame assertTitleEquals("Target Frame"); // with only the label and PK present assertLabelTextExactlyPresent("Content One"); assertLabelTextNotPresent("Content Two"); assertLabelTextNotPresent("Content Three"); } COM: <s> click the first button </s>
funcom_train/32947477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore( IMetadataProvider provider ) { Object[] sources = provider.getSources(); Metadata[] values = provider.getValues(); for ( int i = 0; i < sources.length || i < values.length; i++ ) { if ( sources[i] != null && values[i] != null ) { setValue( sources[i], values[i] ); } } } COM: <s> restores the metadata tree from the given content provider </s>
funcom_train/5869009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void afterZULComponentComposed(Component zulcomp) { super.afterZULComponentComposed(zulcomp); if (this instanceof ClientInputSupport) { String att = ((ClientInputSupport) this).getInputAttributeName(); String value = ((ClientInputSupport) this).getInputAttributeValue(); try { Fields.setField(zulcomp, att, value, true); } catch (Exception x) { throw new RuntimeException(x.getMessage(), x); } } } COM: <s> override method if instance implements </s>
funcom_train/18368144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PlanElement queryPlanHook(Plan plan, PlanElement planElt) { Iterator it = this.policy.countConstraints().iterator(); while (it.hasNext()) { CountConstraint count = (CountConstraint) it.next(); planElt = new PlanCount(plan, planElt, this.policy.rootGraphPattern(), count); } return new PlanExplain(plan, planElt, this.policy, this.cache); } COM: <s> add count and explain stages to end of query plan </s>
funcom_train/10345745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIssuerDN(Principal nissuer) { if (nissuer instanceof codec.x501.Name) { issuer_ = (codec.x501.Name) nissuer; } else { try { issuer_ = new codec.x501.Name(nissuer.getName(), codec.x501.Name.PRINTABLE_ENCODING); } catch (Exception e) { System.out.println("Internal Error:"); e.printStackTrace(); return; } } // update the structure! set(3, issuer_); } COM: <s> sets the issuers distinguished name dn </s>
funcom_train/2501957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeHashCode(int superResult) { HashCodeBuilder builder = new HashCodeBuilder(); boolean hasAnnotation = false; for (Field field : that.getClass().getDeclaredFields()) { if (field.isAnnotationPresent(EqualsField.class)) { hasAnnotation = true; try { field.setAccessible(true); builder.append(field.get(that)); } catch (Exception e) { throw new PojoExtensionException( "Error calculating object hash code", e); } } } if (hasAnnotation) return builder.toHashCode(); else return superResult; } COM: <s> returns a hash code for the given object resulting of its key attributes </s>
funcom_train/8638886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) { if (writer != null && writer.isPaused()) { return false; } nextMarginLeft = marginLeft; nextMarginRight = marginRight; nextMarginTop = marginTop; nextMarginBottom = marginBottom; return true; } COM: <s> sets the margins </s>
funcom_train/49678579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllLocations() { return mDb.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_LABEL, KEY_DTCREATED, KEY_APPICONPATH, KEY_APPURL, KEY_USERNAME, KEY_PASSWD,KEY_EXECCOUNT }, null, null, null, null, null); } COM: <s> return a cursor over the list of all locations in the database </s>
funcom_train/27779858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPilots(int index, Object val) { if (index >= pilots.length) { Object o[] = new Object[index + 10]; for (int i = 0; i < pilots.length; i++) { o[i] = pilots[i]; } pilots = o; } pilots[index] = val; } COM: <s> sets the pilots attribute of the merge enums object </s>
funcom_train/29618308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisTextField getJAdminField() { if (jAdminField == null) { jAdminField = new MgisTextField(); jAdminField.setBounds(175, 40, 58, 19); jAdminField.setDocument(jAdminField.new JTextFieldLimit(20, true)); jAdminField.setEditable(MgisApp.hasFullControl()); } return jAdminField; } COM: <s> this method initializes j admin field </s>
funcom_train/3389889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexObject(Object obj, Environment env) { if (indexHashObject == null) createIndexHash(env); Integer result = (Integer)indexHashObject.get(obj); if (result == null) throw new IndexOutOfBoundsException("Cannot find object " + obj + " of type " + obj.getClass() + " in constant pool"); return result.intValue(); } COM: <s> find the index of an object in the constant pool </s>
funcom_train/41567060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGoalsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Element_goals_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Element_goals_feature", "_UI_Element_type"), MolicPackage.Literals.ELEMENT__GOALS, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_ReferencesPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the goals feature </s>
funcom_train/19715871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ILinguisticOntologyContainer createContainer(String project) throws CoreException { ILinguisticOntologyContainer container = new LinguisticContainer(project); Object[] modifyListeners = _dirtyListeners.getListeners(); for (int i=0; i<modifyListeners.length; i++) { container.addModuleModifiedListener((OntologyModifiedListener)modifyListeners[i]); } return container; } COM: <s> this method is used to create the instance of the module container </s>
funcom_train/18514241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeRecNumber(int factor) { if (recNumberField.isEditable()) { recNumberField.setValue(recNumberField.getValue() + factor); recNumberField.setToolTipText(ResourceManager .getResource("Current_record_number") + " (" + getRecNumber() + "/" + recNumberField.getMaxConstraint() + ")"); CESE.getEnvironment().getModelManager().setRecordActions(true); } } COM: <s> changes current record number by a specific factor </s>
funcom_train/655991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CVSelectTag selectTag() throws JspException { CVSelectTag selectTag = (CVSelectTag) pageContext.getAttribute(Constants.SELECT_KEY); if (selectTag == null) { JspException e = new JspException(messages.getMessage("optionTag.select")); RequestUtils.saveException(pageContext, e); throw e; } return selectTag; } COM: <s> acquire the select tag we are associated with </s>
funcom_train/26665938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean clearEmpty() { boolean emptyChildren = ResultsBean.clearEmpty(children,getAny()); return emptyChildren && getOtherAttributes().isEmpty() && getRegion() == null && getSpsUID() == null && getWindowCenter() == null && getWindowWidth() == null && getZoom() == null; } COM: <s> indicate if there are any interesting children clearing any empty ones first </s>
funcom_train/50585727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newScenario(String qualifiedName) { if (TestSequenceContentProvider.getMarkedForReference() == null) { throw new IllegalArgumentException("please mark TestSequence first"); } Scenario scenario = new Scenario(); scenario.setQualifiedName(qualifiedName); TestSequence testSequenceForReference = TestSequenceContentProvider.getMarkedForReference(); scenario.add(testSequenceForReference); persistenceManager.createScenario(scenario); refreshTree(); } COM: <s> this method creates a new scenario includes the marked test sequence </s>
funcom_train/20215412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem() { if (stringItem == null) {//GEN-END:|51-getter|0|51-preInit // write pre-init user code here stringItem = new StringItem("", new HelpText().getHelpText());//GEN-LINE:|51-getter|1|51-postInit // write post-init user code here }//GEN-BEGIN:|51-getter|2| return stringItem; } COM: <s> returns an initiliazed instance of string item component </s>
funcom_train/37775796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(String columnName, int rowNum) { Object obj = null; List row = getRow(rowNum); if (row != null) { int i = m_columns.indexOf(columnName); if(i != -1) obj = row.get(i); } return obj; } COM: <s> return a field value from a given row </s>
funcom_train/2856341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bindNearEnd(EndPoint near) throws IOException { if (state >= BOUND) throw new IllegalStateException("already bound"); Address nearAddr = near.getAddress(); if (nearAddr instanceof IPAddress) socket.bind(((IPAddress)nearAddr).getSocketAddress()); else throw new UnsupportedOperationException (); state = BOUND; } COM: <s> tcp ip bind </s>
funcom_train/16319426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeDisplay(XmlDisplay display) { if (display == null) { return; } refTable.removeRef(display); if (refTable.getRefNumber(display) == 0) { refTable.remove(display); xmlEditor.getDtdFilesManager().closeFile(display.getXsdFile()); } } COM: <s> called when an xml display is closed </s>
funcom_train/8774276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getBirthDay() throws SkypeException { String value = getProperty("BIRTHDAY"); if ("0".equals(value)) { return null; } else { try { return new SimpleDateFormat("yyyyMMdd").parse(value); } catch (ParseException e) { throw new IllegalStateException("library developer should check Skype specification."); } } } COM: <s> gets the birth day of the current user </s>
funcom_train/3749319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMailDomains() { if (logger.isDebugEnabled()) { logger.debug("getMailDomains() - start"); } if (logger.isDebugEnabled()) { logger.debug("getMailDomains() - end - return value = " + mailDomains); } return mailDomains; } COM: <s> on strong windows strong this returns a list of all email domains </s>
funcom_train/26454522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void include(String page) throws ServletException { String url = baseUrl + page; if (url.startsWith("//")) { url = url.substring(1); } try { context.getRequestDispatcher(url).include(request, response); } catch (IOException e) { throw new ServletException("Cannot include page '" + url + "' : " + e.toString()); } } COM: <s> include specified page under code base url code directory </s>
funcom_train/17251872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector2f subtractLocal(Vector2f vec) { if (null == vec) { LoggingSystem.getLogger().log(Level.WARNING, "Provided vector is " + "null, null returned."); return null; } x -= vec.x; y -= vec.y; return this; } COM: <s> code subtract local code subtracts a provided vector to this vector </s>
funcom_train/29271354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnmarshalSimpleContent() throws Exception { String s = getMarshalledAuthor(); Author author = (Author) getFactory().createUnmarshaller().unmarshal(new InputSource(new StringReader(s))); verifyUnmarshalledAuthor(author); author = (Author) getFactory().createUnmarshaller().unmarshal(new StreamSource(new StringReader(s))); verifyUnmarshalledAuthor(author); } COM: <s> p tests whether elements with simple content can be unmarshalled </s>
funcom_train/11728151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDescendantLeaf() throws RepositoryException, NotExecutableException { // find leaf Node leaf = testRootNode; while (leaf.hasNodes()) { leaf = leaf.getNodes().nextNode(); } String sql = getStatement(leaf.getPath() + "/%"); executeSqlQuery(session, sql, new Node[0]); } COM: <s> tests if lt somepath returns no nodes if node at lt somepath </s>
funcom_train/29968092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processBackupAndArchive() { Date backupTime = new Date(System.currentTimeMillis()); try { listener.onProcess(Process.TaskArchivingFiles); archiveDirectories(backupTime); archiveFiles(backupTime); listener.onProcess(Process.TaskCleanupArchivedFiles); cleanupArchivedFiles(); cleanupArchivedDirectories(); listener.onProcess(Process.TaskBackupFiles); backupDirectories(); backupFiles(); listener.onProcess(Process.EndProcess); } catch (IOException e) { listener.onException(e); } } COM: <s> processes archiving and backup of the files </s>
funcom_train/48453443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String genServiceAsyncInterfaceSignature() { String regular_params = getParamsList(); String total_params = regular_params; if (regular_params.length() > 0) total_params += ", "; total_params += "AsyncCallback callback"; return "public void " + method.getName() + "(" + total_params + ");"; } COM: <s> generates the method signature for the async service interface </s>
funcom_train/21653133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createGlobalItem(int id, int amt, int x, int y, int height) { if (id < 0 || amt < 0 || id >= maxListedItems) { return; } for (Player p : engine.getPlayers()) { if (p == null) { continue; } frames.createGroundItem(p, id, amt, x, y, height); } } COM: <s> creates an item on the ground for everyone within distance </s>
funcom_train/51533894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageData createResourceImageData(String name) throws IOException { ImageData data = new ImageData(); /* * Load native image data from cache and create * image, if available. If image is not cached, * proceed to load and create image normally. */ createImageFromStream(data, ImageData.class.getResourceAsStream(name)); return data; } COM: <s> creates an immutable code image data code </s>
funcom_train/29978172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long processBatch() { Batch<SubmissionIdType> batch = this.getBatch(); Iterator<WorkUnit<SubmissionIdType>> itr = batch.iterator(); while (itr.hasNext()) { WorkUnit<SubmissionIdType> unit = itr.next(); // Do some work here unit.setProcessingStatus(WorkUnit.ProcessingStatus.SUCCESS); } return this.getWorkUnitsProcessed(); } COM: <s> process a batch of work units </s>
funcom_train/10500376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isOutOfDate(File t, Collection l) { Iterator iter = l.iterator(); while (iter.hasNext()) { File f = (File) iter.next(); if (t.lastModified() < f.lastModified()) { return true; } } return false; } COM: <s> is t older than any of the files in list </s>
funcom_train/8078603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double classifyInstance(Instance instance)throws Exception{ Instance transformedInstance = instance; m_TransformFilter.input(transformedInstance); transformedInstance = m_TransformFilter.output(); m_MissingFilter.input(transformedInstance); transformedInstance = m_MissingFilter.output(); return m_ls.classifyInstance(transformedInstance); } // classifyInstance COM: <s> classify a given instance using the best generated </s>
funcom_train/40432863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAllZero(TelemetryStream stream) { for (TelemetryDataPoint dp : stream.getDataPoints()) { Number value = dp.getValue(); if (value != null) { if ((value instanceof Double || value instanceof Float) && value.doubleValue() != 0.0) { return false; } else if (value.longValue() != 0L) { return false; } } } return true; } COM: <s> checks whether a telemetry stream contains all zeros or no value at all </s>
funcom_train/17724132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contextInitialized(ServletContextEvent servletContextEvent) { // For Application static initializer logging. Application.class.getClass(); Stage stage = getStage(servletContextEvent); Configuration configuration = getConfiguration(servletContextEvent); Application.setWeb(true); if (stage != null && configuration == null) { Application.bootstrap(stage); } else if (stage == null && configuration != null) { Application.bootstrap(configuration); } else if (stage != null && configuration != null) { Application.bootstrap(stage, configuration); } else { Application.bootstrap(); } } COM: <s> bootstraps jazzmaster application in web environment </s>
funcom_train/42309155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { if (e.getSource() instanceof JProgressBar) { JProgressBar pb = (JProgressBar) e.getSource(); if (pb.isIndeterminate()) { panelValid = false; return; } if (pb.getValue() == pb.getMaximum()) { panelValid = true; fireChangeEvent(); } } } COM: <s> monitor the jprogress bar for updating the panel state </s>
funcom_train/46753064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setReference() { return " if (" + getFieldGetter() + "().getId() !=0) " + getFieldGetter() + "().setDisplay(reference.getDisplayValuePrimitive(" + getFieldGetter() + "().getId()), reference.getShortDisplayValuePrimitive(" + getFieldGetter() + "().getId()), 0L);"; } COM: <s> set the reference </s>
funcom_train/24333856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double logLikelihood(double[][] trainYs, double[][] probs) { double logLikelihood = 0; for (int i = 0; i < trainYs.length; i++) { for (int j = 0; j < m_NumClasses; j++) { if (trainYs[i][j] == 1.0 - m_Offset) { logLikelihood -= Math.log(probs[i][j]); } } } return logLikelihood / trainYs.length; } COM: <s> computes loglikelihood given class values </s>
funcom_train/39125049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startDrag() { this.dragList = new Vector<PartImage>(); for (Part it : this.project.getPartSelection().getSelected()) { PartImage pi = new PartImage(it, it.getLane().getDisplayID()); this.dragList.add(pi); pi.positionPartImage(); } } COM: <s> call this to start dragging with the reference point </s>
funcom_train/8860957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("FachadaWSSGS".equals(portName)) { setFachadaWSSGSEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/11728678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProperty() throws RepositoryException, NotExecutableException { if (!multiple) { // not testable since format of ID is implementation specific } else { try { prop.getProperty(); fail("Property.getProperty() called on a multivalue property " + "should throw a ValueFormatException."); } catch (ValueFormatException vfe) { // ok } } } COM: <s> tests the conversion from binary type to path type </s>
funcom_train/43580436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOfficeButton() { if (officeButton == null) { officeButton = new JButton(); officeButton.setText("Apply"); officeButton.setSize(new Dimension(80, 20)); officeButton.setLocation(new Point(357, 188)); officeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setskin(1); SkinContainer.setLookAndFeel(getskin()); f.repaint(); } }); } return officeButton; } COM: <s> this method initializes office button </s>
funcom_train/7821511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Composite getButtonBoxControl(Composite parent) { if (buttonBox == null) { buttonBox = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.marginWidth = 0; buttonBox.setLayout(layout); createButtons(buttonBox); buttonBox.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { addDirButton = null; addFileButton = null; removeButton = null; upButton = null; downButton = null; buttonBox = null; } }); } else { checkParent(buttonBox, parent); } selectionChanged(); return buttonBox; } COM: <s> returns this field editors button box containing the add remove </s>
funcom_train/125610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTS(TS[] tsArray) { tSModel.setTS(tsArray); setCellRenderer(cellRenderer); if (tsArray.length > 10) setAutoResizeMode(AUTO_RESIZE_OFF); else setAutoResizeMode(AUTO_RESIZE_SUBSEQUENT_COLUMNS); modelChanged = false; } COM: <s> sets the code ts code to be held by the table </s>
funcom_train/9536367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelHistory() { if (jPanelHistory == null) { jPanelHistory = new JPanel(); jPanelHistory.setLayout(new BorderLayout()); jPanelHistory.add(getJScrollPaneTableHistory(), BorderLayout.CENTER); } return jPanelHistory; } COM: <s> this method initializes j panel history </s>
funcom_train/40762698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String constructMessage(URI fileResource, String type, String lineno) { StringBuffer message = new StringBuffer(); message.append("Debug : ").append(this.eclipseSensor.extractFileName(fileResource)); message.append(" [").append(type).append(',').append(lineno).append(']'); return message.toString(); } COM: <s> constructs message string to be displayed or logged </s>