__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5088728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transform( float[] pointArray ) { notImplemented("transform"); // if( isDisposed() ) // SWT.error( SWT.ERROR_GRAPHIC_DISPOSED ); // if( pointArray == null ) // SWT.error( SWT.ERROR_NULL_ARGUMENT ); // Gdip.Matrix_TransformPoints( handle, pointArray, pointArray.length / 2 ); } COM: <s> given an array containing points described by alternating x and y values </s>
funcom_train/46979903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getStereotypes(MNamespace ns) { List l = new ArrayList(); if (ns == null) return l; Iterator it = ns.getOwnedElements().iterator(); while (it.hasNext()) { Object o = it.next(); if (o instanceof MStereotype) { l.add(o); } } return l; } COM: <s> returns all stereotypes in some namespace </s>
funcom_train/8077304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdditionalMeasures(String [] additionalMeasures) { m_AdditionalMeasures = additionalMeasures; if (m_SplitEvaluator != null) { System.err.println("CrossValidationResultProducer: setting additional " +"measures for " +"split evaluator"); m_SplitEvaluator.setAdditionalMeasures(m_AdditionalMeasures); } } COM: <s> set a list of method names for additional measures to look for </s>
funcom_train/45775442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(KeyEvent event) { if (isMoveDown(event)) { rowDown(offset , event.Source); } else if (isMoveUp(event)) { rowUp(offset, event.Source); } else if (isDown(event)) cursorDown(offset, event.Source); else if (isUp(event)) cursorUp(offset, event.Source); enableButtons(); } COM: <s> impelementation of xkey listener </s>
funcom_train/41572879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAcceptableClassValue() { int val = getValue() & (PUBLIC | FINAL | INTERFACE | ABSTRACT); if (isProtected()) val |= PUBLIC; if (isInterface()) { val &= PUBLIC; val |= ABSTRACT | INTERFACE; } else { val |= 0x0020; // ACC_SUPER } return val; } COM: <s> returns an integer that is acceptable to store as a </s>
funcom_train/33852463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addClasspathEntryToList() { String dirs = classpathEntryTextField.getText(); String[] classDirs = parsePaths(dirs); for (String classpathEntry : classDirs) { if (!classpathEntry.equals("")) { addClasspathEntryToProject(classpathEntry); } } classpathEntryTextField.setText(""); } COM: <s> called to add the classpath entry in the classpath entry text field </s>
funcom_train/12173334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportBadParent(Class clazz) throws BuilderException { throw new BuilderException(exceptionLocalizer.format( "menu-entity-child-invalid", new Object[] { clazz.getName(), (currentEntity != null ? currentEntity.getClass().getName() : null)})); } COM: <s> helper method used to throw a builder exception with an appropriate </s>
funcom_train/37444563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTotalElements(final int totalElements) { if (totalElements < 0) { LOGGER.warn(getBeanTag().getJSPBean().getStringID() + "setTotalElements(" + totalElements + "):Changed to 0"); this.totalElements = 0; } else { this.totalElements = totalElements; } } COM: <s> accepts the total number of elements </s>
funcom_train/44011456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTxLineID() { System.out.println("getTxLineID"); TransLineBO instance = new TransLineBO(); String expResult = ""; String result = instance.getTxLineID(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get tx line id method of class edu </s>
funcom_train/28982897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean endAppointNodes(){ boolean end = true; int i = 0; SpotLocation spotLocation; while ( (i < coordinateSpots.size() ) && (end) ){ spotLocation = (SpotLocation) coordinateSpots.elementAt(i); end = end && !(spotLocation.getNameRegion() == 0); i++; } return end; } COM: <s> determines if all the nodes belong to a particular region </s>
funcom_train/1589221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interval withPeriodBeforeEnd(ReadablePeriod period) { if (period == null) { return withDurationBeforeEnd(null); } Chronology chrono = getChronology(); long endMillis = getEndMillis(); long startMillis = chrono.add(period, endMillis, -1); return new Interval(startMillis, endMillis, chrono); } COM: <s> creates a new interval with the specified period before the end instant </s>
funcom_train/9555106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { logger.debug("start 'start()'."); try { if (runner.isRunning()) { throw new IllegalStateException("master is running already."); } runner.start(); } finally { logger.debug("end 'start()'."); } } COM: <s> start master application </s>
funcom_train/32964080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttribute( ExpressionEvaluator ee, String attribute ) { try { String property = (String)ee.get(attribute + "Property"); String value; if (property==null) { value = (String)ee.get(attribute); } else { value = getAccountProperty(ee, property); } if (value!=null) { // in any case, we always evaluate the value String valueFinal = (String) ee.evaluate(value); return valueFinal; } return null; } catch (Exception e) { throw new RuntimeException( "Error evaluating email attribute " + attribute, e); } } COM: <s> get an attribute from expression evaluator </s>
funcom_train/28921993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createEl(Node parent, String name, Object text) { logger.debug("+"); Document doc; if (parent instanceof Document) { doc = (Document) parent; } else { doc = parent.getOwnerDocument(); } Element child = doc.createElementNS(namespace, getNamespacePrefix() + ":" + name); if (text != null && !"".equals(text.toString())) { child.appendChild(doc.createTextNode(text.toString())); } logger.debug("-"); return child; } COM: <s> creates an element but unlike b add el </s>
funcom_train/33601548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRounds(int limit) { roundsLock.lock(); for(Integer key : (Integer[])rounds.keySet().toArray(new Integer[0])) { if(key > limit) { Round round = rounds.remove(key); round.setRemoved(); //round.getTimeoutTask().cancel(); } } roundsLock.unlock(); } COM: <s> removes rounds greater than limit from this execution </s>
funcom_train/50502792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getBeanNames() { List list = new ArrayList(); synchronized(beans) { Iterator iter = beans.values().iterator(); while(iter.hasNext()) { IClassInfo item = (IClassInfo) iter.next(); list.add(item.getName()); } } return list; } COM: <s> gets all bean names </s>
funcom_train/28923393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); sb.append("SingleResponse: \n"); sb.append(certId); sb.append("\nCertStatus: "+ certStatusToText(getCertStatus(null)) + "\n"); sb.append("thisUpdate is " + thisUpdate + "\n"); if (nextUpdate != null) { sb.append("nextUpdate is " + nextUpdate + "\n"); } return sb.toString(); } COM: <s> construct a string representation of a single ocsp response </s>
funcom_train/8015442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printToFile() { if (cageCollection != null) { File printFile = selectFile(desktopDirectory, "Print Work To File", "Enter File Name to Print to", false, printFilterString, "Print Files", -1); if (printFile != null) { if (!printFile.getPath().endsWith(".html")) printFile = convertTo(printFile, ".html"); createHTMLFile(printFile); } } } COM: <s> prints the current work done by the user to a </s>
funcom_train/45115420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTitle() { String titleToReturn = title; if (!isHtmlMessage()){ titleToReturn = StringUtils.toHtmlString(title); } if (!StringUtils.isEmpty(time)){ String start = CssType.TIME_STAMPS.getCssStart(); String end = CssType.getCssClosingTag(); titleToReturn = titleToReturn.replace(time, start + time + end); } return titleToReturn; } COM: <s> get the report title </s>
funcom_train/7625576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Movie getMovie(int id) throws NotFoundException { InputStream is = openRawResource(id); Movie movie = Movie.decodeStream(is); try { is.close(); } catch (java.io.IOException e) { // don't care, since the return value is valid } return movie; } COM: <s> return a movie object associated with the particular resource id </s>
funcom_train/33734452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseXmlStartErrorTag(XmlPullParser parser, FlickrPhotosResponse res) { log.debug("Parser found ERROR start tag."); String errorCode = parser.getAttributeValue("", FlickrResponseAttributeName.ERROR_CODE.getTag()); FlickrResponseErrorCode code = FlickrResponseErrorCode.parseCode(errorCode); res.setResponseCode(code); } COM: <s> method to parse the starting error tag </s>
funcom_train/39185189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MainFrame () { enableEvents(AWTEvent.WINDOW_EVENT_MASK); ImageIcon icon = new ImageIcon(this.getClass().getResource("gifs/icon.gif")); this.setIconImage(icon.getImage()); try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } COM: <s> constructs the frame </s>
funcom_train/46681910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double GetThruput(int should_be_class, String wname) { String fn = "GetThruput()"; double x = 0.0; int jobIdx = getjob_index(wname); if (jobIdx >= 0) { switch (should_be_class) { case Job.TERM : x = job[jobIdx].term.sys.thruput; break; case Job.BATCH : x = job[jobIdx].batch.sys.thruput; break; case Job.TRANS : x = job[jobIdx].trans.sys.thruput; break; default : System.err.println(fn + ": Unknown should_be_class"); break; } } else x = 0.0; return x; } // GetThruput COM: <s> returns the system throughput for the specified workload </s>
funcom_train/29651736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMethod3() { Object target = new Object(); String methodName = ""; try { MethodDispatchServlet.getMethod(target, methodName); fail("The exception javax.servlet.ServletException should" + " have been thrown."); } catch (javax.servlet.ServletException exception) { if (!exception.getClass().getName().equals( "javax.servlet.ServletException")) { fail("The exception javax.servlet.ServletException should" + " have been thrown."); } } } COM: <s> method test get method3 </s>
funcom_train/50894362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatObjectList(FTPObject obj) { String fs = new String(); if (obj.isDirectory()) { fs = "dr-xr-xr-x 1 owner group 0"; } else { fs = "-r-xr-xr-x 1 owner group " + obj.size(); } fs = fs + " " + obj.getFormattedDate(); fs = fs + " " + obj.toString(); return fs; } COM: <s> put information about a particular object in a unix ish listing </s>
funcom_train/4920525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSectionObject() { // Add two different outputs verifying details this.replayMockObjects(); SectionObject object = this.node.addSectionObject("OBJECT", Connection.class.getName()); assertNotNull("Must have object", object); assertEquals("Incorrect object name", "OBJECT", object.getSectionObjectName()); assertNotSame("Should obtain another object", object, this.node.addSectionObject("ANOTHER", Object.class.getName())); this.verifyMockObjects(); } COM: <s> tests obtaining a </s>
funcom_train/8492028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCancel() { if (jButtonCancel == null) { jButtonCancel = new JButton(); jButtonCancel.setBounds(new Rectangle(237, 231, 121, 32)); jButtonCancel.setText("CANCEL"); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getInstance().setVisible(false); } }); } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/21015881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPixel(int x, int y) { requireTrue(((x >= 0) && (x < getWidth())), "@require ((x >= 0) && (x < getWidth()))"); requireTrue(((y >= 0) && (y < getHeight())), "@require ((y >= 0) && (y < getHeight()))"); return _pixelData[y * _pixelPerLine + x]; } COM: <s> returns the specified pixel </s>
funcom_train/45311035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createFieldEditors() { Enumeration enumeration = ColorManager.getInstance().getEnum(); while(enumeration.hasMoreElements()){ ManagedColor mc = (ManagedColor) enumeration.nextElement(); ColorFieldEditor colorEditor = new ColorFieldEditor(mc.getId(), mc.getLabel(), getFieldEditorParent()); addField(colorEditor); } addField(new TodoTagListFieldEditor(todo_tag_id,"Todo Tags",getFieldEditorParent())); } COM: <s> creates the color fields and the </s>
funcom_train/10500503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getShortLabel() { String shortLabel; if (label != null && label.length() > 31) { shortLabel = this.label.substring(0, 30); log("Label is longer than 31 characters, truncated to: " + shortLabel, Project.MSG_WARN); } else { shortLabel = label; } return shortLabel; } COM: <s> return at most the 30 first chars of the label </s>
funcom_train/49101699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AclfBus mapAclfBusData(LoadflowBusXmlType busRec, AclfBus aclfBus, AclfNetwork adjNet) throws InterpssException { //AclfBus aclfBus = CoreObjectFactory.createAclfBus(busRec.getId(), adjNet); //adjNet.addBus(aclfBus); mapBaseBusData(busRec, aclfBus, adjNet); AclfBusDataHelper helper = new AclfBusDataHelper(adjNet, aclfBus); helper.setAclfBusData(busRec); return aclfBus; } COM: <s> map a bus record </s>
funcom_train/7277204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleConnect(Socket socket) { this.connectingSocket = null; HTTPDownloader dl = httpDownloaderFactory.create(socket, _rfd, _commonOutFile, _manager instanceof InNetworkDownloader); try { dl.initializeTCP(); // already connected, timeout doesn't // matter. } catch (IOException iox) { shutdown(); // if it immediately IOX's, try a push instead. return; } startDownload(dl); } COM: <s> upon succesful connect create the httpdownloader with the right </s>
funcom_train/16570551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPPrincipal() { if (pPrincipal == null) { pPrincipal = new JPanel(); pPrincipal.setLayout(new BorderLayout()); pPrincipal.setPreferredSize(new java.awt.Dimension(540,252)); pPrincipal.add(getPNorth(), java.awt.BorderLayout.NORTH); pPrincipal.add(getPCentral(), java.awt.BorderLayout.CENTER); } return pPrincipal; } COM: <s> this method initializes p principal </s>
funcom_train/45955419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreCheckedEntries() { final CharSequence[] entryValues = getEntryValues(); final String[] vals = ListPreferenceMultiSelect .parseStoredValue(getValue()); if (vals != null) { for (final String val2 : vals) { final String val = val2.trim(); for (int i = 0; i < entryValues.length; i++) { final CharSequence entry = entryValues[i]; if (entry.equals(val)) { mClickedDialogEntryIndices[i] = true; break; } } } } } COM: <s> restore checked entries </s>
funcom_train/15922064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeader(SourceFile sfn, CodeWriter w) { if (sfn.package_() != null) { w.write("package "); sfn.package_().del().translate(w, this); w.write(";"); w.newline(0); w.newline(0); } boolean newline = false; for (Import imp : sfn.imports()) { imp.del().translate(w, this); newline = true; } if (newline) { w.newline(0); } } COM: <s> write the package and import declarations for a source file </s>
funcom_train/2291527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addContextMenuSeparator(CmsExplorerContextMenuItem item) { item.setType(CmsExplorerContextMenuItem.TYPE_SEPARATOR); m_contextMenuEntries.add(item); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ADD_MENU_SEPARATOR_1, item.getType())); } } COM: <s> adds a menu separator to the list of context menu items </s>
funcom_train/7659838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean offer(E o) { if (o == null) throw new NullPointerException(); final ReentrantLock qlock = this.qlock; for (;;) { Node node; qlock.lock(); try { node = waitingConsumers.deq(); } finally { qlock.unlock(); } if (node == null) return false; else if (node.setItem(o)) return true; // else retry } } COM: <s> inserts the specified element into this queue if another thread is </s>
funcom_train/19454664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(ExceptionEvent event) { if (event.getApplicationObject() != null) StrataSystem.log(event.getApplicationObject().toString()); StrataSystem.log("The actual exception follows:"); StrataSystem.log(event.exception); OutputStream out = new ByteArrayOutputStream(); PrintWriter writer = new PrintWriter(out); event.exception.printStackTrace(writer); writer.flush(); StrataSystem.log(out.toString()); } COM: <s> handles a given excepton by tracing it to the strata system log </s>
funcom_train/25142209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug51912() throws Exception { if (!versionMeetsMinimum(5, 0)) { return; } Connection overrideConn = null; try { Properties props = new Properties(); props.setProperty("nullCatalogMeansCurrent", "false"); overrideConn = getConnectionWithProps(props); DatabaseMetaData dbmd = overrideConn.getMetaData(); this.rs = dbmd.getProcedureColumns(null, null, "%", null); this.rs.close(); } finally { if (overrideConn != null) { overrideConn.close(); } } } COM: <s> tests fix for bug 51912 passing null as cat </s>
funcom_train/25027910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSounds() { soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100); soundPoolMap = new HashMap<Integer, Integer>(); soundPoolMap.put(SOUND_MOVEDSTONE, soundPool.load(getContext(), R.raw.click1, 1)); soundPoolMap.put(SOUND_WON, soundPool.load(getContext(), R.raw.cartoon008, 2)); soundPoolMap.put(SOUND_WRONGMOVE, soundPool.load(getContext(), R.raw.cartoon004, 3)); } COM: <s> initialize the sound pool for play back and put the audio file </s>
funcom_train/14178821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { Object command = ae.getActionCommand(); if (command.equals("Clear Screen")) { if (role.equals("sender")) { gui.clearScreen(); try { webService.clearArrays(gameID); webService.clearScreen(gameID); } catch (RemoteException e) { e.printStackTrace(); } } } if (command.equals("Send")) { sendMessage(); } } COM: <s> event handler vom action listener </s>
funcom_train/22636277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showLastKnownLocation() { Location loc = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); if (loc != null) { labelLongitude.setText("" + loc.getLongitude()); labelLatitude.setText("" + loc.getLatitude()); } else { labelLongitude.setText("unknown"); labelLatitude.setText("unknown"); } } COM: <s> getting the last known location all we need to do is to call </s>
funcom_train/45760970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAccessibleRowExtentAt(int r, int c) { try { return unoAccessibleTable.getAccessibleRowExtentAt(r,c); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { return 0; } catch (com.sun.star.uno.RuntimeException e) { return 0; } } COM: <s> returns the number of rows occupied by the accessible </s>
funcom_train/31078740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocalVariableInstruction setParam(int param) { int local = getCode().getLocalsIndex(param); if (local != -1) { BCMethod method = getCode().getMethod(); setType(method.getParamNames()[param]); } return setLocal(local); } COM: <s> set the method parameter that this instruction operates on </s>
funcom_train/38813664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save(Resource resource) { // copy from map to prop for (String key : map.keySet()) { String text; text = map.get(key); if (text == null) { prop.removeKey(key); } else { prop.put(key, text); } } copyToMap(); prop.setLocation(resource); return prop.save(); } COM: <s> puts the current state into props and save them </s>
funcom_train/34590503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkAllGeneralActionPerformed(java.awt.event.ActionEvent evt) { boolean check = generalCheckBox.isSelected(); for (int i = 0; i < generalTable.getRowCount(); i++) { generalTable.setValueAt(check, i, 0); } } COM: <s> check all checkboxes </s>
funcom_train/35607361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performYearChange(int year) { int currentYear = year; updateCalendarUI(currentYear); clearReminderTask(); if(year == CalendarMethod.getThisYear()) displayDayTask(todayReminderList); logger.info("[performYearChange]: year=" + year); } COM: <s> update ui when year change </s>
funcom_train/8381062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFCKDir(String fileType) { String dirName = configuration.getString("file-servlet.dir"); if (dirName == null) { throw new RuntimeException("The file-servlet.dir configuration property is not set and is required"); } if (!StringTools.isTrimmedEmpty(fileType)) { dirName = dirName + "/" + fileType; } return dirName; } COM: <s> grabs the fck upload directory configuration property and verifies that it is set </s>
funcom_train/3080775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(AbstractPane pane) { int index = super.indexOf(pane); if (index == -1) { throw new IllegalStateException("StackedPane does not contain specified pane."); } int count = getComponentCount(); if (index == count - 1) { // top pane. close(); } else { // obscured pane. super.remove(pane); } } COM: <s> closes the specified pane </s>
funcom_train/42068227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHighVelocityPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkInstrument_highVelocity_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkInstrument_highVelocity_feature", "_UI_ChunkInstrument_type"), WavPackage.Literals.CHUNK_INSTRUMENT__HIGH_VELOCITY, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the high velocity feature </s>
funcom_train/42062092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultMutableTreeNode addNode(Object o, final DefaultMutableTreeNode parent){ final DefaultMutableTreeNode n = new DefaultMutableTreeNode(new Context(o, (Context) parent.getUserObject())); SwingUtilities.invokeLater(new Runnable() { public void run(){ treeModel.insertNodeInto(n, parent, parent.getChildCount()); tree.scrollPathToVisible(new TreePath(n.getPath())); } }); return n; } COM: <s> this method adds a node represented by code o code to the parent </s>
funcom_train/2889714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transmission beginSubscribe(QName topic, String callback, boolean useNotify, String expiryTime) { AlpineEPR epr=new AlpineEPR(callback); SoapElement subscription=WsrfUtils.createSubscriptionRequest(epr, topic, useNotify, expiryTime); return queue(subscription); } COM: <s> subscribe to an endpoint </s>
funcom_train/49081209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Store openConnection(String storeType, String host, String user, String password) throws MessagingException { log.debug("opening " + storeType + " conection to " + host); Properties props = new Properties(); Session session = Session.getDefaultInstance(props); Store store = session.getStore(storeType); store.connect(host, user, password); log.debug(store.getURLName().toString()); return store; } COM: <s> opens a connection to a mail server </s>
funcom_train/3379325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setKey(BitArray key) { this.bitStringKey = (BitArray)key.clone(); /* * Do this to keep the byte array form consistent with * this. Can delete when byte[] key is deleted. */ this.key = key.toByteArray(); int remaining = key.length() % 8; this.unusedBits = ((remaining == 0) ? 0 : 8 - remaining); } COM: <s> sets the key in the bit array form </s>
funcom_train/8089662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRange(String fromTo) { int i = fromTo.indexOf(".."); String from = fromTo.substring(0, i); setMinRange(Double.valueOf(from).doubleValue()); String to = fromTo.substring(i + 2, fromTo.length()); setMaxRange(Double.valueOf(to).doubleValue()); } COM: <s> sets the upper and lower boundary for the range of x </s>
funcom_train/2578558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PaintItem)) { return false; } PaintItem that = (PaintItem) obj; if (this.value != that.value) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; } COM: <s> tests this item for equality with an arbitrary object </s>
funcom_train/25791885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String entry, String attribute, String value) { HashMap<String, String> entryStore; if (m_settings.containsKey(entry)) { entryStore = m_settings.get(entry); } else { entryStore = new HashMap<String, String>(INITIAL_CAPACITY); } entryStore.put(attribute, value); m_settings.put(entry, entryStore); } COM: <s> sets a value to the attribute in the given entry </s>
funcom_train/32871016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearExceptionThrowWatch(Class cls) { if (!isInitialized) throw new NotInitializedException("JVMAspectInterface.clearExceptionThrowWatch: jvmai not initialized"); if (cls == null) throw new NullPointerException("JVMAspectInterface.clearExceptionThrowWatch: null cls parameter"); synchronized(exceptionThrowMap) { doClearExceptionWatch(cls); if (exceptionThrowMap.containsKey(cls)) exceptionThrowMap.remove(cls); else throw new WatchNotSetException(); } } COM: <s> clears a watch on a exception throw joinpoint </s>
funcom_train/24538558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNearestColumn(int x) { if (columnModelPositions == null || columnModelPositions.length == 0) return 0; int column = 0; int value = Integer.MAX_VALUE; for (int i = 0; i < columnModelPositions.length; i++) { int diff = Math.abs(columnModelPositions[i] - x); if (diff < value) { column = i; value = diff; } } return column; } COM: <s> get the nearest column to the x in model coor </s>
funcom_train/12553899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String signExtend(String binStr, int i){ String firstBit = String.valueOf(binStr.charAt(0)); String extension = ""; while (i>0){extension = extension.concat(firstBit); i--;} return extension.concat(binStr); } COM: <s> sign extends bin str by i bits </s>
funcom_train/51782754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertToFolder(UmlDiagram diagram) { DefaultMutableTreeNode child = new DefaultMutableTreeNode(diagram); if (diagram instanceof StructureDiagram) { insertNodeInto(child, structureFolder, structureFolder.getChildCount()); } else if (diagram instanceof SequenceDiagram) { insertNodeInto(child, sequenceFolder, sequenceFolder.getChildCount()); } } COM: <s> inserts the specified diagram to the correct folder </s>
funcom_train/12316914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveDependencies() { getDependencies().put(DEPENDENCIES_KEY_ANALYZER, analyzerDescriptor.getId()); Bundle luceneBundle = Platform.getBundle(LUCENE_BUNDLE_ID); if (luceneBundle != null) { String luceneBundleVersion = "" //$NON-NLS-1$ + luceneBundle.getHeaders().get(Constants.BUNDLE_VERSION); getDependencies().put(DEPENDENCIES_KEY_LUCENE, luceneBundleVersion); } else { getDependencies().put(DEPENDENCIES_KEY_LUCENE, ""); //$NON-NLS-1$ } getDependencies().save(); } COM: <s> saves lucene version and analyzer identifier to a file </s>
funcom_train/44011367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpCity() { System.out.println("getEmpCity"); EmployeeBO instance = new EmployeeBO(); String expResult = ""; String result = instance.getEmpCity(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get emp city method of class edu </s>
funcom_train/44888268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPrimary parseCall(IPrimary primary) throws ParseException { this.consumeToken(); IArgument[] arguments = this.parseArgumentList(); this.expect(this.getNextToken().isCloseParenthesis(), "Closing parenthesis expected."); return new CallNode(primary, arguments); } COM: <s> call primary argument list </s>
funcom_train/43897373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double fixRound(double value, int decimalPlaces, boolean up) { double divisor = Math.pow(10, decimalPlaces); double newVal = value * divisor; if (up) { newVal++; //+0.001 (for 3 dec places) } else { newVal--; //-0.001 } newVal = newVal / divisor; return newVal; } COM: <s> corrects a round off operation by incrementing or decrementing the </s>
funcom_train/16392691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endSerialize() throws IOException { OutputFormat format = new OutputFormat(); format.setOmitXMLDeclaration( false ); format.setEncoding( OutputFormat.Defaults.Encoding ); format.setIndenting( true ); format.setDoctype( XGMML.PUBLIC_ID, XGMML.SYSTEM_ID ); this.serializer.setOutputFormat( format ); this.serializer.serialize( doc ); } COM: <s> writes out the tt document tt via dom serialization </s>
funcom_train/2643842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsGreaterThan(VersionID m) { for(int i = 0; i < _versionIds.size(); i++) { VersionID vi = (VersionID)_versionIds.get(i); boolean check = vi.isGreaterThan(m); if (check) return true; } return false; } COM: <s> check if this version string object contains anything greater than m </s>
funcom_train/36147451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Vector objs) throws PersistentException { getConnectionOffline().delete(objs); Enumeration objsEnum = objs.elements(); Vector ls = (Vector) getParameter(OPERATION_DELETE); while (objsEnum.hasMoreElements()) { Object obj =objsEnum.nextElement(); if (!ls.contains(obj)) ls.addElement(obj); } } COM: <s> deletes a vector of objects in the device </s>
funcom_train/50848685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String cleanHTML(String s){ //String ss= this.replaceAllSubstr(s,"<","&lt;") ; return this.replaceAllSubstr(this.replaceAllSubstr(s,"<","&lt;"),">","&gt;") ; } COM: <s> replace and by their html equivalent </s>
funcom_train/49350043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getHelpPanel() { if (helpPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.anchor = GridBagConstraints.CENTER; gridBagConstraints.gridy = -1; gridBagConstraints.gridx = -1; helpPanel = new JPanel(); helpPanel.setLayout(new GridBagLayout()); helpPanel.add(getHelpButton(), gridBagConstraints); } return helpPanel; } COM: <s> this method initializes help panel </s>
funcom_train/2576744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getDisplayLength() { if (this.displayStart < this.displayEnd) { return (this.displayEnd - this.displayStart); } else { return (this.fixedRange.getUpperBound() - this.displayStart) + (this.displayEnd - this.fixedRange.getLowerBound()); } } COM: <s> returns the display length for the axis </s>
funcom_train/37593664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static void showMessageBox(final String msg, final String title) { // Utilities.invokeAndWait(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, msg); } } ); Utilities.invokeAndWait(new Runnable() { public void run() { new ScrollableDialog(null, title, "Message:", msg, false).show(); } } ); } COM: <s> shows a modal message box with an ok button </s>
funcom_train/42943783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { int errCode = this.getErrorCode(); StringBuffer sb = new StringBuffer(); sb.append("["); sb.append(StringTools.toHexString(errCode, 16)); sb.append("] "); sb.append(ServerErrors.getErrorDescription(errCode)); return sb.toString(); } COM: <s> returns string contianing error code and description </s>
funcom_train/17031232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerCommand(String node, String name, final Class clazz) { registerCommand(node, name, new LocalCommandFactory() { public LocalCommand getInstance() throws InstantiationException, IllegalAccessException { return (LocalCommand)clazz.newInstance(); } }); } COM: <s> registers a new command with this command manager which is related to a </s>
funcom_train/48587968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NicknameFeed retrieveNicknames(String username) throws AppsForYourDomainException, ServiceException, IOException { LOGGER.log(Level.INFO, "Retrieving nicknames for user '" + username + "'."); URL feedUrl = new URL(domainUrlBase + "nickname/" + SERVICE_VERSION); AppsForYourDomainQuery query = new AppsForYourDomainQuery(feedUrl); query.setUsername(username); return nicknameService.query(query, NicknameFeed.class); } COM: <s> retrieves all nicknames for the given username </s>
funcom_train/42822610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getReturnCommand() { if (returnCommand == null) {//GEN-END:|95-getter|0|95-preInit // write pre-init user code here returnCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|95-getter|1|95-postInit // write post-init user code here }//GEN-BEGIN:|95-getter|2| return returnCommand; } COM: <s> returns an initiliazed instance of return command component </s>
funcom_train/25637785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Content getNavLinkNext() { Content nextletterLabel = getResource("doclet.Next_Letter"); if (next == -1) { return HtmlTree.LI(nextletterLabel); } else { Content nextLink = getHyperLink("index-" + next + ".html","", nextletterLabel); return HtmlTree.LI(nextLink); } } COM: <s> get link to the next unicode character </s>
funcom_train/9917265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canReach(final Node parent, Node to, Node exChild, List route) { //if (parent == null) return false; if (parent.getChildren().size() == 0) return false; for (Node child : parent.getChildren()) { if (child != exChild) { route.add(child); if (child == to) return true; if (canReach(child, to, null, route)) return true; else route.remove(child); } } return false; } COM: <s> check if can reach to from parent not including parent </s>
funcom_train/17774324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTagSize(int type) { int size = 0; if (allow(ID3V1, type)) { size += id3v1.getSize(); } if (allow(ID3V2, type)) { // Extra check because size will return at least 10 // because of header, even if the tag doesn't exist if (id3v2.tagExists()) { size += id3v2.getTotalWrittenTagSize(); } } return size; } COM: <s> returns the current size of the tag s in bytes </s>
funcom_train/46696020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetClassParameter() { System.out.println("getClassParameter"); SyntaxCheckerFactory instance = SyntaxCheckerFactory.newInstance(); Parameter result = instance.getClassParameter(); assertNotNull(result); assertEquals("SyntaxCheckerClass",result.getType()); } COM: <s> test of get class parameter method of class syntax checker factory </s>
funcom_train/27841434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefault() throws Exception { DummyHTTPRequest request = new DummyHTTPRequest(new String[][]{ }); DummyHTTPResponse response = servlet.handlePost(request); assertEquals("0", response.getContent()); assertTrue(!AppController.doneTest1Control); assertTrue(!AppController.doneTest1aControl); assertTrue(!SubController.doneTest2Control); } COM: <s> default request should do startup of the app controller </s>
funcom_train/8722293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CascadedStyle getPseudoElementStyle(Node node, String pseudoElement) { Element e = null; if (node.getNodeType() == Node.ELEMENT_NODE) { e = (Element) node; } else { e = (Element) node.getParentNode(); } return _matcher.getPECascadedStyle(e, pseudoElement); } COM: <s> gets the pseudo element style attribute of the style reference object </s>
funcom_train/25647292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImplicitTransition getOutboundTransitionForPseudoState(State pseudoState) { assert pseudoState.getOutgoingTransitions().size() < 2; ImplicitTransition result = null; if (pseudoState.getOutgoingTransitions().size() == 1) { Transition t = pseudoState.getOutgoingTransitions().get(0); assert t instanceof ImplicitTransition; result = (ImplicitTransition) t; } return result; } COM: <s> returns the sole implicit outbound transition of the specified pseudo </s>
funcom_train/2904209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JXMessage moveWindow(JXWindow mw){ if(mw != null){ long id = mw.getID().longValue(); if(!move0(id, mw.getX(), mw.getY())){ return new JXError(getClass(), "Failed to move window"); } } else{ return new JXError(getClass(), "Move window error, window==null"); } return null; } COM: <s> move the selected window </s>
funcom_train/16651932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Converter getFileConverter() { return new Converter() { @Override public String getAsString(FacesContext context, UIComponent component, Object value) { return ((FileAtarrabi) value).getChecksum(); } @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { for (FileAtarrabi attachment : getAttachments()) { if (attachment.getChecksum().equals(value)) { return attachment; } } return null; } }; } COM: <s> converter for rich ordering list </s>
funcom_train/3445132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findNode(String id) { Object node = idNodeMap.get(id); if (node == null) { int n = graph.addVertex(); node = new Integer(n); idNodeMap.put(id, node); return n; } return ((Integer)node).intValue(); } COM: <s> returns the node with the specified id </s>
funcom_train/3674274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("\tMappedStatement: " + getName() + "\n"); if (getParameterMapName() != null) { buffer.append(getParameterMapName()); } if (getResultMapName() != null) { buffer.append(getResultMapName()); } return buffer.toString(); } COM: <s> returns a string representation of the statement </s>
funcom_train/3756604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { java.awt.GridLayout layGridLayout1 = new java.awt.GridLayout(); layGridLayout1.setRows(4); layGridLayout1.setColumns(1); this.setLayout(layGridLayout1); this.add(getJPanel2(), null); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel3(), null); this.setSize(457, 247); } COM: <s> this method initializes this </s>
funcom_train/43108734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getOwner(Object handle) { if ((handle instanceof MAttribute) && ((MAttribute) handle).getAssociationEnd() != null) { return ((MAttribute) handle).getAssociationEnd(); } if (handle instanceof MFeature) { return ((MFeature) handle).getOwner(); } return illegalArgumentObject(handle); } COM: <s> return the owner of a feature or its </s>
funcom_train/3596636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeUnfinishedAnnotations(List elems) { int i = 0; while (i < elems.size()) { NOMWriteElement elem = (NOMWriteElement)elems.get(i); if (Double.isNaN(elem.getEndTime())) elems.remove(i); else i++; } } COM: <s> p removes all unfinished annotations without an end time from </s>
funcom_train/2386195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findAllAlbums() throws PhotoAlbumException{ try { return super.findAll("name"); } catch (HibernateException he){ throw new PhotoAlbumException("Could not find all albums, cause of an Hibernate problem."); } catch (HbnDaoException hde){ throw new PhotoAlbumException("Could not find all albums."); } } COM: <s> find all album instances from data source </s>
funcom_train/21611381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParsePredicateDeclarationFixedArguments() throws MUParserException { ParseTree pt = parser.parse("predicate_declaration", "PredicateName ( var1, var2, var3, var4 )"); System.out.println("parse tree: " + pt); checkParsing(pt, "predicate_name", "(", "variable", "variable", "variable", "variable", ")"); } COM: <s> tests parsing of a predicate declaration with fixed arguments </s>
funcom_train/28875748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableTheme() { jRadioButtonOcean.setEnabled(true); jRadioButtonSteel.setEnabled(true); jRadioButtonAqua.setEnabled(true); jRadioButtonCharcoal.setEnabled(true); jRadioButtonHighContrast.setEnabled(true); jRadioButtonEmerald.setEnabled(true); jRadioButtonRuby.setEnabled(true); } COM: <s> enable the themes buttons </s>
funcom_train/38757617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void listDoubleClicked(MouseEvent m) { Object file = list.getSelectedValue(); if (file != null) { String currentPath = ""; try { currentPath = nav.getCurrentPath() + nav.getFilename(file); nav.cd(currentPath); updateUI(nav.getCurrentPath()); } catch (IOException e) { mc.setStatus(e.getClass().getName() + ": " + e.getMessage(), StatusBar.ERROR); } } } COM: <s> list double click event calls navigator </s>
funcom_train/72419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void collectTypes() { boolean foundNewType = true; Iterator i = types.iterator(); while (i.hasNext()) { String t = (String) i.next(); if(t.equalsIgnoreCase(type)) { foundNewType = false; break; } } if(foundNewType) { Log.print(3, "New type found, added to the list: " + type); types.add(type); } } COM: <s> for each field that is created a type is saved in a vector </s>
funcom_train/20874593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMaxPenalty() { if (iCachedMaxPenalty == null) { double max = Double.MIN_VALUE; for (Course course : iCourses) { max = Math.max(max, course.getOffering().getMaxPenalty()); } iCachedMaxPenalty = new Double(max); } return iCachedMaxPenalty.doubleValue(); } COM: <s> maximal penalty maximum of </s>
funcom_train/12388765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmpty() { DelayQueue q = new DelayQueue(); assertTrue(q.isEmpty()); assertEquals(NOCAP, q.remainingCapacity()); q.add(new PDelay(1)); assertFalse(q.isEmpty()); q.add(new PDelay(2)); q.remove(); q.remove(); assertTrue(q.isEmpty()); } COM: <s> is empty is true before add false after </s>
funcom_train/32869437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void presenceSetUnavail() { String sStatus = "Away"; groupChatPresence(sStatus); if (moJabberComm.sendPresence("","","","Away","1","away") == Constants.SEND_SUCCEEDED) jidMe.setStatus(Config.UNAVAIL, "unavailable"); else msgDialogLaunch( Config.PROBLEM_ERROR, Config.PROBLEM_SET_STATUS ); } COM: <s> send away status to server and replace toolbar with an away indicator </s>
funcom_train/3049065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Configuration mergeProperties(Properties properties) { Iterator itr = properties.entrySet().iterator(); while ( itr.hasNext() ) { final Map.Entry entry = ( Map.Entry ) itr.next(); if ( this.properties.containsKey( entry.getKey() ) ) { continue; } this.properties.setProperty( ( String ) entry.getKey(), ( String ) entry.getValue() ); } return this; } COM: <s> adds the incoming properties to the internap properties structure </s>
funcom_train/20947134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean slotValueAlreadyExists(Slot inSlot, Object inValue) { @SuppressWarnings("unchecked") Iterator<Cls> iter = mKB.getClses().iterator(); while (iter.hasNext()) { Cls cls = (Cls) iter.next(); if (cls.getOwnSlotValue(inSlot) != null && cls.getOwnSlotValue(inSlot).equals(inValue)) { return true; } } return false; } COM: <s> determines if a object already exists in the knowledgebase </s>