__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/43902933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ManagedPooledConnection getInUseManagedPooledConnection(PooledConnection conn) { ManagedPooledConnection returnConn = null; for (Iterator iter = usedConnections.iterator(); iter.hasNext();) { ManagedPooledConnection mConn = (ManagedPooledConnection) iter.next(); if (mConn.pooledConn == conn) { returnConn = mConn; } } return returnConn; } COM: <s> helper method to get the managed pooled connection for a given pooled connection </s>
funcom_train/26245514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Planet getOortCloud(String name, int distance) { Planet planet = new Planet(factory, name, star, distance, PlanetType.OortCloud); planet.setRadius(0); planet.setTemperature(star.getOrbitTemperature(distance)); setDayLength(planet, 1.0); planet.addResource(WATER, 40+Die.d20(2)); planet.addResource(OORCINE, 30+Die.d20(2)); planet.addResource(TRITANIUM, 10+Die.d6(2)); return planet; } COM: <s> an oort cloud </s>
funcom_train/44601477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_member_class_02() { compileAndExecGivenStatement( "X.java", "public class X {\n" + " static class Y {};\n" + " void m() {\n" + " }\n" + "}\n", "new X().m()"); } COM: <s> static member class inside a class </s>
funcom_train/2845465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(String role) { // return keys.indexOf(role); for (int i=0; i<arguments.size(); i++) { if ( ((Argument)arguments.get(i)).getRole().equals(role) ) return i; } return -1; } COM: <s> returns the index of the first occurance of the specified role name </s>
funcom_train/35289153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renumberLeaves() { for (int i = 0; i < leafNodes.size(); i++) { DefaultMutableTreeNode leaf = leafNodes.get(i); Node node = (Node)leaf.getUserObject(); node.tag = i+1; treeModel.nodeChanged( leaf ); } } COM: <s> this function renumbers all current leaf nodes in the order they were visited </s>
funcom_train/46660061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hardCopy(final String format, String outputName) throws IOException { synchronized (doHardCopy) { this.doHardCopy = new Boolean(true); this.format = format; // Add default file extension, if missing outputName += "." + format; int i = outputName.lastIndexOf('.'); // Filename: name + <counter> + .extension this.outputName = outputName.substring(0, i) + (++outputFileCounter) + outputName.substring(i); } } COM: <s> save a hardcopy of the video screen </s>
funcom_train/12299457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { labelFileOpening = new JLabel(Messages.getString("ProgressDialog.openFileProgress")); //$NON-NLS-1$ labelFileOpening.setHorizontalAlignment(SwingConstants.CENTER); jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(labelFileOpening, BorderLayout.NORTH); jContentPane.add(getProgressBar(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/37504627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setMap(Map map) { if (this.map == map) return; if (this.map != null) { this.map.removeMapInventoryListener(this); } super.setMap(map); if (this.map != null) { this.map.addMapInventoryListener(this); } } COM: <s> sets the size from the given map </s>
funcom_train/9802556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent mouseEvent) { if (myTurn) { if (diceSelected) { colorState = 0; repaint(); diceSelected = false; dicePlayPanel.diceClicked(this); } else { colorState = 2; repaint(); diceSelected = true; dicePlayPanel.diceClicked(this); } } } COM: <s> invoked when a mouse button has been pressed on a component </s>
funcom_train/29715087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sort(String[] array) { boolean sorted = true; do { sorted = true; for (int i = 1; i < array.length; i++) { if (getMoves(array[i - 1]) < getMoves(array[i])) { final String tmp = array[i - 1]; array[i - 1] = array[i]; array[i] = tmp; sorted = false; } } } while (!sorted); } COM: <s> sorts a highscore list </s>
funcom_train/31957546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup() { for( int i = 0; comp != null && i < comp.length; ++i ) { setCompEnabled( comp[i], false, !getEnabled(), waitCrs, setupSet, setupTip ); } for( int i = 0; act != null && i < act.length; ++i ) { setActionEnabled( act[i], false, !getEnabled() ); } } COM: <s> default setup implementation override this and call this one if you </s>
funcom_train/2522985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimeSeriesFileHeader saveToFileWithHeader(File file) throws IOException{ String h1 = new String(RB.getString("x.timestamp")); //$NON-NLS-1$ for (ColumnInfo ci : this.header) h1 += this.format.colDelim + ci.quantity + ":" + ci.stats.getAbbreviation(); //$NON-NLS-1$ // Convert.removeLastChar(h1); BufferedWriter out = IO.getBufferedWriter(file); out.write(h1); out.newLine(); out.close(); return this.saveToFile(file, true); } COM: <s> saves the time series into a csv file </s>
funcom_train/41812460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean translationNeeded() { if (this.rptFile == null) return true; if (this.kleioFile.lastModified() > this.rptFile.lastModified()) return true; if (this.xmlFile == null) return true; if (this.kleioFile.lastModified() > this.xmlFile.lastModified()) return true; return false; } COM: <s> checks if a translation is needed by seeing if there are </s>
funcom_train/29831948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openURLInBrowser(UIComponent uiForRequests, String url) { assert uiForRequests != null && url != null; if (browserLauncher == null) { try { browserLauncher = new BrowserLauncher(); } catch (BrowserLaunchingInitializingException e) { uiForRequests.request(new UIRequest_Output(str("errorBrowser"))); } catch (UnsupportedOperatingSystemException e) { uiForRequests.request( new UIRequest_Output(str("errorBrowserOS"))); } } browserLauncher.openURLinBrowser(url); } COM: <s> opens an url in the browser using the existing browser launcher </s>
funcom_train/46504892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataRecordMaker makeDataRecordMaker(Resource cond) { // replaces non-word sequences such that there'll be similar subdirs assert cond != null : "A non-null condition ID is required."; String dir = resourceToPath(cond); dir = dir+"_"+cond.hashCode(); DataRecordMaker drm = new FileDataRecordMaker(new File(currentBase, dir)); return drm; } COM: <s> returns a new file data record maker </s>
funcom_train/18037267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isProcessingInstruction(Object object) { if (debugging) { System.out.println("isProcessingInstruction() :" + ((XMLEvent) object).toString()); } if (!(object instanceof XMLEvent)) { return false; } return ((XMLEvent) object).isProcessingInstruction(); } COM: <s> test if a node is a processing instruction </s>
funcom_train/37388802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void optimizeClass(String fileName) throws UnpositionedError { ClassInfo info; MethodInfo[] methods; info = readClassFile(fileName); optimizeClass(info, options.optimize, options.verbose); writeClassFile(info, options.destination == null ? fileName : options.destination + File.separatorChar + takoc.util.Utils.splitQualifiedName(info.getName())[1] + ".class"); } COM: <s> reads optimizes and writes a class file </s>
funcom_train/2539779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3D getMiddlePointBetweenFingers(){ Vector3D bla = rotateFingerNew.getSubtracted(pinFingerNew); //= Richtungsvektor vom 1. zum 2. finger bla.scaleLocal(0.5f); //take the half return (new Vector3D(pinFingerNew.getX() + bla.getX(), pinFingerNew.getY() + bla.getY(), pinFingerNew.getZ() + bla.getZ())); } COM: <s> gets the middle point between fingers </s>
funcom_train/23831328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPatternScore(int subj, int pred, int obj, int context) { int score = 0; for (char field : tripleComparator.getFieldSeq()) { switch (field) { case 's': if (subj >= 0) { score++; } else { return score; } break; case 'p': if (pred >= 0) { score++; } else { return score; } break; case 'o': if (obj >= 0) { score++; } else { return score; } case 'c': if (context >= 0) { score++; } else { return score; } } } return score; } COM: <s> determines the score of this index on the supplied pattern of </s>
funcom_train/22431538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTlvImpl(Tlv tlv) { DefensiveTools.checkNull(tlv, "tlv"); getTlvList().add(tlv); Integer type = new Integer(tlv.getType()); List siblings = (List) getTlvMap().get(type); if (siblings == null) { siblings = createSiblingList(); getTlvMap().put(type, siblings); } siblings.add(tlv); } COM: <s> adds a tlv to this chain </s>
funcom_train/48266750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { isRunning = false; _myThread = null; if (_myDatagramSocket != null) { if (_myDatagramSocket.isConnected()) { SNetwork.printDebug("UDPServer.dispose()", "disconnect()"); _myDatagramSocket.disconnect(); } SNetwork.printDebug("UDPServer.dispose()", "close()"); _myDatagramSocket.close(); _myDatagramSocket = null; SNetwork.printDebug("UDPServer.dispose()", "Closing unicast datagram socket."); } } COM: <s> stop the udp server clean up and delete its reference </s>
funcom_train/22468853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void find(char c) { for (int i = 0; i < itemCount; i++) { String s = items.items[i].toString(); // guich@220_37 if (s.length() > 0 && Convert.toUpperCase(s.charAt(0)) == c && selectedIndex != i) // first letter matches and not the // already selected index? { select(i); repaint(); break; // end the for loop } } } COM: <s> searches this list box for an item with the first letter matching the </s>
funcom_train/26574188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCyclist(Cyclist cyclist) { if (!cyclist.equals(_cyclist)) { if (_cyclist != null) { _cyclist.removePropertyChangeListener(this); } _cyclist = cyclist; _cyclist.addPropertyChangeListener(this); _tableModel = new JCDTableModel(_cyclist); _root = _cyclist.getName(); _allYears = _cyclist.getAllLogEntries(); stats = Statistics.getInstance(_cyclist); } } COM: <s> set the cyclist </s>
funcom_train/10688239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String concat(String string) { if (string.count == 0) { return this; } char[] buffer = new char[count + string.count]; if (count > 0) { System.arraycopy(value, offset, buffer, 0, count); } System.arraycopy(string.value, string.offset, buffer, count, string.count); return new String(0, buffer.length, buffer); } COM: <s> concatenates this string and the specified string </s>
funcom_train/5395480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEntireIndiceArray() { System.out.println("getEntireIndiceArray"); FecEncoder instance = null; int[] expResult = null; int[] result = instance.getEntireIndiceArray(); 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 entire indice array method of class org </s>
funcom_train/32057709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPropertyChange() { System.out.println("testPropertyChange"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.propertyChange(null); } catch (Exception e) { fail(); } } COM: <s> test of property change method of class gpdocument </s>
funcom_train/1443392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePoint(Point p) { if (null == p) throw new IllegalArgumentException("p cannot be null."); int index = getPointIndex(p); if (GChart.NAI == index) throw new IllegalArgumentException("p must be a point on this curve " + "(whose curveIndex is " + getParent().getCurveIndex(this) + ")"); removePoint(index); } COM: <s> removes the given point from this curve </s>
funcom_train/47989683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkParameters() throws BuildException { checkFileParameter(claxAspect, "claxAspect", false); checkParameterExistence(axAspect, "axAspect"); checkFileParameter(clexwHome, "clexwHome", true); checkParameterExistence(indentChar, "indentChar"); checkParameterExistence(language, "language"); checkIntdentParameter(); } COM: <s> check correctness of all parameters of the ant task </s>
funcom_train/14422321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); jLabel.setText("File name :"); jPanel = new JPanel(); jPanel.add(jLabel, null); jPanel.add(getJTextField(), null); jPanel.add(getJButton2(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/22155442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void np() { if(inText) c(); if(!inStroke) { if(pre_np!=null) { pw.print(pre_np); // this is the prefix set by setOrientation() pre_np = null; } pw.print("n "); } inText=false; inStroke=true; // an unlikely coordinate to fool the moveto() optimizer lx = ly = -9999; } COM: <s> functions that draw lines should start by calling this </s>
funcom_train/14456893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSummaries(String name, CompleteSummary[] summaries) { SummarySet set = new SummarySet(name); for(int i=0; i<summaries.length; i++) { set.add(new CompleteSummaryRecord(summaries[i])); } root.add(set); notifyListeners(); } COM: <s> adds a list of summaries to this code summary tree model code </s>
funcom_train/18132118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParentName (String value) { if (value != null) { synchronized (parentNames) { int len = parentNames.length + 1; String[] newNames = new String [len]; System.arraycopy (parentNames, 0, newNames, 0, len-1); newNames [len - 1] = value; setParentNames (newNames); } } } COM: <s> add one parent of this data type </s>
funcom_train/34341210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getExtraccion() { if (Extraccion == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here Extraccion = new TextField("Extraccion", null, 16, TextField.ANY);//GEN-LINE:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return Extraccion; } COM: <s> returns an initiliazed instance of extraccion component </s>
funcom_train/27862839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleConfigureWindow(int window, boolean isroot, int x, int y, int w, int h){ boolean consumed = false; if (verbose) System.out.println("configure "+window); for(RfbMessageHandler l : listeners){ consumed = l.handleConfigureWindow(window, isroot, x, y, w, h) || consumed; } if(!consumed){ for(RfbMessageHandler l : listeners){ l.addWindow(window, isroot, x, y, w, h); } if (verbose) System.out.println("add "+window); } } COM: <s> handles configure window messages </s>
funcom_train/7904064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopActiveTrack(){ if(currentTrackId != TRACK_ID_NO_TRACK){ // we send a broadcast to inform all registered services to stop tracking Intent intent = new Intent(OSMTracker.INTENT_STOP_TRACKING); sendBroadcast(intent); // need to get sure, that the database is up to date DataHelper dataHelper = new DataHelper(this); dataHelper.stopTracking(currentTrackId); // set the currentTrackId to "no track" currentTrackId = TRACK_ID_NO_TRACK; } } COM: <s> stops the active track </s>
funcom_train/22385970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String byteArrToHex(byte[] b) { char[] hex = new char[b.length*2]; int n = 0; for(int i=0; i<b.length; i++) { int val = b[i]; if(val < 0) val += 2 * 128; hex[n++] = character(val / 16); hex[n++] = character(val % 16); } return new String(hex); } COM: <s> convert the given byte array to a hex string </s>
funcom_train/17805136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPatternInformationsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Diagram_patternInformations_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Diagram_patternInformations_feature", "_UI_Diagram_type"), CtbPackage.Literals.DIAGRAM__PATTERN_INFORMATIONS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the pattern informations feature </s>
funcom_train/20589705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HttpServletRequest checkMultipart(HttpServletRequest request) throws MultipartException { if (this.multipartResolver != null && this.multipartResolver.isMultipart(request)) { if (request instanceof MultipartHttpServletRequest) { logger.debug("Request is already a MultipartHttpServletRequest - if not in a forward, " + "this typically results from an additional MultipartFilter in web.xml"); } else { return this.multipartResolver.resolveMultipart(request); } } // If not returned before: return original request. return request; } COM: <s> convert the request into a multipart request and make multipart resolver available </s>
funcom_train/22436417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList search3DModel(Integer Gi) throws RemoteServerException{ try { return DataHandler.CachedSearch3DModel(Gi); } catch (ServiceException e) { RemoteServerException newE = new RemoteServerException(); newE.setStackTrace(e.getStackTrace()); throw newE; } catch (RemoteException e) { RemoteServerException newE = new RemoteServerException(); newE.setStackTrace(e.getStackTrace()); throw newE; } } COM: <s> search 3d domain model for given protein if not found return null </s>
funcom_train/20439899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDeLayoutPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFDistGrid_deLayout_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFDistGrid_deLayout_feature", "_UI_ESMFDistGrid_type"), ESMFPackage.Literals.ESMF_DIST_GRID__DE_LAYOUT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the de layout feature </s>
funcom_train/2584514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() { GrayPaintScale gps = new GrayPaintScale(); assertEquals(0.0, gps.getLowerBound(), EPSILON); assertEquals(1.0, gps.getUpperBound(), EPSILON); assertEquals(255, gps.getAlpha()); } COM: <s> simple check for the default constructor </s>
funcom_train/50440332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doParse(Reader xmlPacket,ContentHandler contentHandler){ try { // Startup XMLReader XMLReader parser=new SAXParser(); // Register contentHandler parser.setContentHandler(contentHandler); // Wrap reader in InputSource InputSource xmlInput=new InputSource(xmlPacket); // Parse xmlData parser.parse(xmlInput); } catch (Exception error){ debug(error.toString()); } } COM: <s> parse parsing method </s>
funcom_train/9237899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void emptyChannel() { ClientInfo cTemp = null; for (ChannelClientInfo client : hChannelUserList.values()) { cTemp = client.getClient(); cTemp.delChannelClientInfo(client); if (cTemp != myParser.getMyself() && !cTemp.checkVisibility()) { myParser.removeClient(cTemp); } } hChannelUserList.clear(); } COM: <s> empty the channel remove all known channelclients </s>
funcom_train/39397559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revokeMessage(Mail mail) { // call preRevokers to notify them of this revoke callPreRevokers(mail); this.filterStatistics.increaseRevoked(); // update statistics // loop all enabled filters and call their revoke method for (SpamFilter filter : getFilters()) { try { filter.revokeMail(mail); } catch (Throwable t) { // ignore t.printStackTrace(); } } // call postRevokers to notify them of this revoke callPostRevokers(mail); // let's free some resources System.gc(); System.gc(); } COM: <s> calling this method revokes the given code mail code in all filters </s>
funcom_train/23834369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInDictionary(JCas jcas, PotentialSideEffect pse) { String drug = pse.drug.getCoveredText().toLowerCase().trim(); if(keyDrugMap.containsKey(drug)) { Set<String> seSet = sideEffectMap.get(keyDrugMap.get(drug)); String pseStr = pse.ne.getCoveredText().toLowerCase().trim(); //exact matching if(seSet.contains(pseStr)) return true; } return false; } COM: <s> return true if pse belongs to side effects in the side effect dictionary </s>
funcom_train/42570822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContainmentFeaturePropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractCompartmentChildDesc_containmentFeature_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_AbstractCompartmentChildDesc_containmentFeature_feature", "_UI_AbstractCompartmentChildDesc_type"), DescPackage.Literals.ABSTRACT_COMPARTMENT_CHILD_DESC__CONTAINMENT_FEATURE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the containment feature feature </s>
funcom_train/8130792
/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 != null && obj instanceof ContextElement) { ContextElement other = (ContextElement)obj; return StringUtils.equals(cssId, other.cssId) && StringUtils.equals(value, other.value) && StringUtils.equals(type, other.type) && StringUtils.equals(status, other.status); } return false; } COM: <s> search for doublets needs this to be exact </s>
funcom_train/40452188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdBuscarProducto() { if (cmdBuscarProducto == null) {//GEN-END:|150-getter|0|150-preInit // write pre-init user code here cmdBuscarProducto = new Command("Buscar", Command.OK, 0);//GEN-LINE:|150-getter|1|150-postInit // write post-init user code here }//GEN-BEGIN:|150-getter|2| return cmdBuscarProducto; } COM: <s> returns an initiliazed instance of cmd buscar producto component </s>
funcom_train/22529377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPaginators() { // create the userListPaginator PaginationParams userList = new PaginationParams(this.props, ListUsersAction.paginatorKey); paginators.put(ListUsersAction.paginatorKey, userList); // create the uolListPaginator PaginationParams uolList = new PaginationParams(this.props, ListUolsAction.paginatorKey); paginators.put(ListUolsAction.paginatorKey, uolList); // create the uolrunListPaginator PaginationParams uolrunList = new PaginationParams(this.props, ListRunsAction.paginatorKey); paginators.put(ListRunsAction.paginatorKey, uolList); } COM: <s> creates the paginators </s>
funcom_train/546568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getObjectsByName(String name,boolean recurseGroup) { Vector ret = new Vector(); for(int i=0;i<objects.size();i++) ((JDObject)objects.get(i)).getObjectsByName(ret,name,recurseGroup); return ret; } COM: <s> returns all objects having the given name present in the drawing area </s>
funcom_train/9869522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFeccreacion(java.util.Date newVal) { if ((newVal != null && this.feccreacion != null && (newVal.compareTo(this.feccreacion) == 0)) || (newVal == null && this.feccreacion == null && feccreacion_is_initialized)) { return; } this.feccreacion = newVal; feccreacion_is_modified = true; feccreacion_is_initialized = true; } COM: <s> setter method for feccreacion </s>
funcom_train/48257157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void treeInsert( Node x ) { Node y = null; Node z = root; int c = 0; while( z != nil ) { y = z; c = comparator.compare( x.item.key, z.item.key ); if( c < 0 ) z = z.left; else z = z.right; } x.parent = y; if( y == null ) root = x; else { if( c < 0 ) y.left = x; else y.right = x; } } COM: <s> inserts given node into this tree by sorting it into the tree structure </s>
funcom_train/18321543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getHandledEvents() { Set events = new HashSet(); for (Iterator i = getAllTransitions().iterator(); i.hasNext();) { Transition transition = (Transition) i.next(); Event e = transition.getEvent(); if (!e.equals(Event.ANY)) { events.add(e); } } return events; } COM: <s> returns all events that are handled in the state without </s>
funcom_train/20632925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLeaf(Object node) { ApelTreeNode n = (ApelTreeNode)node; //Categories.uiModel().debug("Calling isLeaf of " + n.getLabel() + " returning " + n.isLeaf()); // If the node allows children, we want to count it as a branch, not // a leaf if(n.getAllowsChildren()) return false; return n.isLeaf(); } COM: <s> is leaf method comment </s>
funcom_train/4360995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameter(String name) { parseParameters(); Object value = parameters.get(name); if (value == null) return (null); else if (value instanceof String[]) return (((String[]) value)[0]); else if (value instanceof String) return ((String) value); else return (value.toString()); } COM: <s> override the code get parameter code method of the wrapped request </s>
funcom_train/42474695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String reverseRules(String text) { if (text == null) throw new NullPointerException("Parameter 'text' must not be null."); text = applyStereoRSZERuleReversed(text); text = translate(text, RULES_REVERSED); text = applyReverseStereoRules(text); return text; } COM: <s> applies the reverse rules </s>
funcom_train/39401870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxAutoPurchase() { if (jCheckBoxAutoPurchase == null) { jCheckBoxAutoPurchase = new JCheckBox(); jCheckBoxAutoPurchase.setToolTipText(getMainFrame().getI18N().translate("Automatisch Inkooporders aanmaken")); jCheckBoxAutoPurchase.addFocusListener(new FocusStyle(jCheckBoxAutoPurchase.getBackground())); } return jCheckBoxAutoPurchase; } COM: <s> this method initializes j check box auto purchase </s>
funcom_train/34282697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeTipVisibleBounds() { // Compute area that the mouse can move in without hiding the // tip window. Note that Java 1.4 can only detect mouse events // in Java windows, not globally. Rectangle r = tipWindow.getBounds(); Point p = r.getLocation(); SwingUtilities.convertPointFromScreen(p, textArea); r.setLocation(p); tipVisibleBounds.setBounds(r.x,r.y-15, r.width,r.height+15*2); } COM: <s> compute the bounds in which the user can move the mouse without the </s>
funcom_train/12847547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDateFromJD(double jd, boolean calType) { this.jd=jd; this.calType=calType; IDate dt=swe_revjul(jd, calType); this.year=dt.year; this.month=dt.month; this.day=dt.day; this.hour=dt.hour; } COM: <s> sets the year month day hour cal type and jd fields of this </s>
funcom_train/34452715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BEncDictionary parseDict() throws BDecoderParseException, IOException { Map<BEncString, BEncType> dict = new HashMap<BEncString, BEncType>(); while (true) { int lookupChar = is.read(); if ((lookupChar == -1) || (lookupChar == CHAR_ENDOFELEMENT)) break; BEncString key = parseString((char)lookupChar); BEncType o = parseStream(); dict.put(key, o); } return new BEncDictionary(dict); } COM: <s> parse the dictionary available on the input stream </s>
funcom_train/47124102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSplitPanel() { createLeftPanel(); createTopRightPanel(); // Topright: 3 tabbed window; Bottom right: satellite view; left: graph // display JScrollPane topRightScrollPanel = new JScrollPane(topRightPanel); mainSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, leftPanel, topRightScrollPanel); mainSplitPane.setResizeWeight(0.8); mainSplitPane.setContinuousLayout(true); mainSplitPane.setOneTouchExpandable(true); } COM: <s> create panels for individual parts of the split window create split panes </s>
funcom_train/5464703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveKey() { //add the key Keystore ks = KeyStoreFactory.getDefaultKeystore(null); ks.addKey("profileXXX", key1, "passwordXXX", "username1"); //remove it ks.removeKey("profileXXX"); //let's find it again byte[] key = ks.findKey("profileXXX", "passwordXXX"); assertTrue( key == null ); } COM: <s> test the removal of a key </s>
funcom_train/11648352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCurrentUsername() { Subject subject = SecurityUtils.getSubject(); if (subject == null || subject.getPrincipal() == null || !subject.isAuthenticated()) { throw new IllegalStateException("Unable to retrieve the current authenticated subject"); } return SecurityUtils.getSubject().getPrincipal().toString(); } COM: <s> internal utility method to retrieve the username of the current authenticated user </s>
funcom_train/8803831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nwrite ( byte ch, int many){ if (0 < many){ int ni = wc+many; if ( ni >= buf.length){ if ( many > gf) buf = growbuf(buf,ni); else buf = growbuf(buf,buf.length+gf); } for ( int cc = wc; cc < ni; cc++) buf[cc] = ch; wc += many; } return many; } COM: <s> repeat the byte into the buffer </s>
funcom_train/5787580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createComment(Comment comment) throws ObjectDoesNotExistException { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); HibernateUtil.assertExists(Review.class, comment.getReview().getId()); // if the user is not null, make sure it exists in the database if(null != comment.getUser()) { HibernateUtil.assertExists(User.class, comment.getUser().getId()); } session.save(comment); } COM: <s> creates a comment using a comment object basically just persists it </s>
funcom_train/32970368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton53() { if (jButton53 == null) { jButton53 = new JButton(); jButton53.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/spy2.gif"))); jButton53.setToolTipText("Spying"); jButton53.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/spy3.gif"))); jButton53.setIcon(new ImageIcon(getClass().getResource("/orders/norm/spy1.gif"))); jButton53.setDoubleBuffered(true); jButton53.setBounds(new java.awt.Rectangle(842,70,34,34)); jButton53.setBorderPainted(false); } return jButton53; } COM: <s> this method initializes j button53 </s>
funcom_train/46869719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(String userName, UserFetchDescriptor fetch) { StringBuffer query = new StringBuffer(); query.append("from User u ").append(getFetchQuery(fetch)); query.append("where u.userName=:userName "); List list=baseDao.findByNamedParam(query.toString(), "userName", userName); if(list != null && list.size() > 0) return (User)list.get(0); else return null; } COM: <s> gets the user object from the user name </s>
funcom_train/5241316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAllMatches(Operation opr, List matches) { for (ListIterator itr = listIterator(); itr.hasNext();) { PointerTargetTreeNode node = (PointerTargetTreeNode)itr.next(); Object obj = opr.execute(node); if (obj != null) { matches.add(obj); } if (node.hasValidChildTreeList()) { node.getChildTreeList().getAllMatches(opr, matches); } } } COM: <s> get all matches and add them to var matches var </s>
funcom_train/7440488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBlockIndex() throws ServletException, IOException { assertEquals(BlockInterceptor.RETURN, invoke("/inters/block")); assertNull(request.getAttribute(AdvancedInterceptor.AFTER_COMPLETION)); assertEquals(true, request.getAttribute(BlockInterceptor.AFTER_COMPLETION)); assertNull(request.getAttribute(HackInterceptor.AFTER_COMPLETION)); } COM: <s> intercepted block hack </s>
funcom_train/24299253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getCloneCommand(ChangeBoundsRequest request) { CloneCommand clone = new CloneCommand(); clone.setParent((QueryDiagram) getHost().getModel()); Iterator i = request.getEditParts().iterator(); GraphicalEditPart currPart = null; while (i.hasNext()) { currPart = (GraphicalEditPart) i.next(); clone.addPart((QuerySubpart) currPart.getModel(), (Rectangle) getConstraintForClone( currPart, request)); } return clone; } COM: <s> override to return the code command code to perform an </s>
funcom_train/1050936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(BolNameBundle b) { BolName[] othersNames = b.getBolNames(); if (othersNames.length != bolNames.length) { for (int i = 0; i<bolNames.length; i++) { if (!bolNames[i].equals(othersNames[i])) return false; } return true; } else return false; } COM: <s> two bundles are equal if both have the same array of bolnames </s>
funcom_train/51199387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (prices == null) { return stockName + ": No prices available"; } else { String fromDate = YahooGrabber.sdf.format(prices.firstElement() .getDate()); String toDate = YahooGrabber.sdf.format(prices.lastElement() .getDate()); return stockName + ": Start date is " + fromDate + ", end date is " + toDate; } } COM: <s> return a string rapresentation of the stock </s>
funcom_train/23533888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean stem(char[] wordBuffer, int offset, int wordLen) { reset(); if (b.length < wordLen) { char[] new_b = new char[wordLen + EXTRA]; b = new_b; } System.arraycopy(wordBuffer, offset, b, 0, wordLen); i = wordLen; return stem(0); } COM: <s> stem a word contained in a portion of a char array </s>
funcom_train/13814524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete( boolean deleteFromExtVol ) { boolean success = false; ODMGXAWrapper txw = new ODMGXAWrapper(); Database db = ODMG.getODMGDatabase(); if ( !(volume instanceof ExternalVolume) || deleteFromExtVol ) { if ( imageFile == null || imageFile.delete() ) { db.deletePersistent( this ); success = true; } } txw.commit(); return success; } COM: <s> attempts to delete the instance </s>
funcom_train/38827659
/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 (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; BasicNurbsSurface that = (BasicNurbsSurface)obj; if(this._cnet.equals(that._cnet)) return false; if(this._sKnots.equals(that._sKnots)) return false; if(this._tKnots.equals(that._tKnots)) return false; return super.equals(obj); } COM: <s> compares this basic nurbs surface against the specified object for strict </s>
funcom_train/37508134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayFullImage(ImageComponent ic) { if (m_imagePopup != null) { return; } // display image m_imagePopup = new ImagePopup( this, ic.getFullImageName(), m_imgSize.width, m_imgSize.height); m_imagePopup.show(); } COM: <s> displays the image of a code image component code in a </s>
funcom_train/17677036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToCache(StatesReturned container) { for (Iterator i = container.iterator(); i.hasNext(); ) { EntrySet.Entry e = (EntrySet.Entry)i.next(); cache.addStateOnly((OID)e.getKey(), (State)e.getValue()); } } COM: <s> add all the oids and states in the container to the cache </s>
funcom_train/39928364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTileAt(int tx, int ty, Tile ti) { if (bounds.contains(tx, ty) && canEdit()) { if(ti != null && map[ty - bounds.y][tx - bounds.x] != ti){ map[ty - bounds.y][tx - bounds.x] = ti; ti.setUseedCount(1); } } } COM: <s> sets the tile at the specified position </s>
funcom_train/45075234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML(String indent) { Float upperObj = new Float(upper); Float lowerObj = new Float(lower); String xml; xml = indent + "<Range Units=" + units + ">\n"; xml += indent + " <Lower>" + lowerObj.toString() + "</Lower>\n"; xml += indent + " <Upper>" + upperObj.toString() + "</Upper>\n"; xml += indent + "</Range>\n"; return xml; } COM: <s> convert to xml </s>
funcom_train/2845923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean intersects(Set a, Set b) { if (a == null || b == null) return false; for (Iterator i = a.iterator(); i.hasNext();) { Object p1 = i.next(); for (Iterator j = b.iterator(); j.hasNext();) { Object p2 = j.next(); if (p1 == p2) return true; } } return false; } COM: <s> does set a intersect set b </s>
funcom_train/7800086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void memoryUsageCritical(TYPE iType, final long usedMemory, final long maxMemory) { if (iType == TYPE.JVM) { acquireExclusiveLock(); try { OLogManager.instance().debug(this, "Clearing %d resources", entries.size()); entries.clear(); } catch (Exception e) { OLogManager.instance().error(this, "Error while freeing resources", e); } finally { releaseExclusiveLock(); } } } COM: <s> free the entire cache </s>
funcom_train/7646857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private byte nextTC() throws IOException { if (hasPushbackTC) { hasPushbackTC = false; // We are consuming it } else { // Just in case a later call decides to really push it back, // we don't require the caller to pass it as parameter pushbackTC = input.readByte(); } return pushbackTC; } COM: <s> return the next token code tc from the receiver which indicates what </s>
funcom_train/44308196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transaction getTransaction(Object object0,Object object1) { Transaction transactionKey=new Transaction(object0,object1); Transaction existingTransaction=(Transaction)m_transactions.get(transactionKey); if (existingTransaction==null && object0.hashCode()==object1.hashCode()) { transactionKey=new Transaction(object1,object0); existingTransaction=(Transaction)m_transactions.get(transactionKey); } return existingTransaction; } COM: <s> returns an existing transaction for given objects </s>
funcom_train/1242501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color chooseColor(Priority priority) { Color color = null; switch (priority) { case Highest: color = getResourceStore().getColor(255, 220, 204); break; case High: color = getResourceStore().getColor(255, 238, 222); break; case Medium: color = getResourceStore().getColor(255, 250, 205); break; case Low: color = getResourceStore().getColor(246, 246, 246); break; case Lowest: color = getResourceStore().getColor(251, 251, 251); break; } return color; } COM: <s> creates a color for each priority </s>
funcom_train/22397763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setInboxFolder(FolderTreeItem mailbox) { if(this.inboxMailbox != mailbox) { mailbox = new FolderTreeItem(mailbox); DataStore dataStore = DataStoreFactory.getConnectionCacheStore(); dataStore.putNamedObject(Long.toString(accountConfig.getUniqueId()) + "_INBOX", mailbox); dataStore.save(); this.inboxMailbox = mailbox; } } COM: <s> sets the inbox folder </s>
funcom_train/27826239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(ChangeEvent event1,ChangeEvent event2) throws KAONException { try { m_event1=event1; m_event2=event2; m_result=false; if (equals(m_event1.getOIModel(),m_event2.getOIModel())) m_event1.accept(this); return m_result; } finally { m_event1=null; m_event2=null; } } COM: <s> checks whether two elements are equal </s>
funcom_train/17387362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sentText(String text) { Enumeration<OutgoingTextPlugin> e = outgoingTextPlugins.elements(); while (e.hasMoreElements()) { OutgoingTextPlugin plugin = (OutgoingTextPlugin) e.nextElement(); ((OutgoingTextCallback) plugin.getCallback()).sentText(text, plugin.getData()); } } COM: <s> the text is being sent out </s>
funcom_train/10801820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadRegisteredClassMetaData(ClassLoader envLoader) { Class<?>[] reg = processRegisteredClasses(envLoader); for (int i = 0; i < reg.length; i++) { try { getMetaData(reg[i], envLoader, false); } catch (MetaDataException me) { if (_log.isWarnEnabled()) _log.warn(me); } } } COM: <s> parses the metadata for all registered classes </s>
funcom_train/43245819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPlanIEN() { System.out.println("setPlanIEN"); String planIEN = ""; InsuranceDG1Object instance = new InsuranceDG1Object(); instance.setPlanIEN(planIEN); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set plan ien method of class org </s>
funcom_train/31527120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processImplicitPackage( File file ) { String name = file.getParent(); PackageDef pkg = symbolTable.getPackage( name ); if ( pkg == null ) { pkg = new PackageDef( name, symbolTable.getBaseScope(), null ); symbolTable.definePackage( pkg, symbolTable.getBaseScope() ); } symbolTable.pushScope( pkg ); } COM: <s> processes a java class that use default no package </s>
funcom_train/32319126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEqualTo(byte[] other) { if (other.length != buffer.length) { return false; } for (int i = 0; i < buffer.length; i++) { if (this.byteAt(i) != other[i]) { return false; } } return true; } COM: <s> return if the given byte array holds the same contents as this buffer </s>
funcom_train/22305775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generate() throws IOException { for (FactoryWriter factoryWriter : factoryWriters) { factoryWriter.writeHeader(); for (FactoryMethod factoryMethod : factoryMethods) { factoryWriter.writeMethod(factoryMethod.getName(), factoryMethod); } factoryWriter.writeFooter(); factoryWriter.flush(); } } COM: <s> generate all the factory methods using all the writers </s>
funcom_train/3098949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CycApiQueryMsg (ACL queryAcl) { this.queryAcl = queryAcl; String contentXml = (String) queryAcl.getContentObject(); try { query = (CycList) CycObjectFactory.unmarshall(contentXml); } catch (JDOMException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> creates a query object using the agent communication language query </s>
funcom_train/18657716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTCPPort(int newTCPPort) throws IllegalArgumentException { if (newTCPPort < 0) { throw new IllegalArgumentException(Messages.getString("Parameter TCPPort cannot be less than 0.")); } if (newTCPPort > 65535) { throw new IllegalArgumentException(Messages.getString("Parameter TCPPort cannot be greater than 65535.")); } TCPPort = newTCPPort; } COM: <s> set our internet port </s>
funcom_train/25858513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildGraphs(String path, boolean scoring) throws Exception { conceptCount = new TreeMap<String, Integer>(); elemPool = new TreeMap<String, SummaryGraphElement>(); indiv2con = new LuceneMap(); firstScan(path, scoring); System.gc(); secondScan(path, scoring); System.gc(); thirdScan(path, false, false, scoring); System.gc(); } COM: <s> main entry for split summary graph building </s>
funcom_train/23021644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTime consumeDateTime(String name, boolean required) throws ParseException { String value = consume(name, required); if (value == null) { return null; } try { return DateTime.parseDateTimeChoice(value); } catch (NumberFormatException e) { ParseException pe = new ParseException(CoreErrorDomain.ERR.invalidDatetime, e); pe.setInternalReason("Badly formatted datetime in attribute: " + name); throw pe; } } COM: <s> gets the value of a </s>
funcom_train/43894131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object oth) { if (this == oth) { return true; } if (oth instanceof StyleImpl) { StyleImpl other = (StyleImpl) oth; return Utilities.equals(name, other.name) && Utilities.equals(title, other.title) && Utilities.equals(abstractText, other.abstractText) && Utilities.equals(featureTypeStyles, other.featureTypeStyles); } return false; } COM: <s> compares this style with another </s>
funcom_train/8369186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyTo(byte[] buffer, int offset, int from, int to) { buffer.getClass(); int length = to - from; for (int i = 0; i < length; i++) { buffer[offset + i] = underlyingArray[from + i]; } } COM: <s> copies the specified range of the underlying array into the specified buffer </s>
funcom_train/15608587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FeatureIndex getTranscriptIndex() { // Generate a new accession number (unique across the loaded // scratch space). Also position "generator" for next unique acc no. String accession = AccessionGenerator.getAccessionGenerator().generateAccessionString( transcriptPrefix ); // Create a feature index using the accession number generated from the // above interaction. return ( new FeatureIndex( accession ) ); } COM: <s> returns the index of the transcript </s>
funcom_train/38352818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getCurrentValue() throws ObserverUnknownException { if (getObserver() == null) throw new ObserverUnknownException("Observer for " + this +" is unknown."); switch (getObserver().getMeasure()) { case Observer.GENERATIONS : return getSchedule().getCurrentGeneration(); case Observer.RUNS : return getSchedule().getCurrentTimeIndex().run; case Observer.BATCHES : return getSchedule().getCurrentTimeIndex().batch; default : return updateCounter; } } COM: <s> returns the current value current run current generation etc </s>