__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17904333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateDatabaseKeywords() { if (!host.getDatabaseConnection().isConnected()) { return; } try { keyWordsPanel.setDatabaseKeywords(host.getDatabaseKeywords()); } catch (DataSourceException e) { controller.handleException(e); keyWordsPanel.setDatabaseKeywords(new String[0]); } } COM: <s> loads the sql key words for this host </s>
funcom_train/24379316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeAsXML(TemplateBlockType type){ String sXML = ""; if (type!=null){ QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "templateBlock"); JAXBElement<TemplateBlockType> jaxbe = new JAXBElement<TemplateBlockType>(qname, TemplateBlockType.class, type); sXML = getXML(jaxbe); } return sXML; } COM: <s> gets the template block type as an xml string </s>
funcom_train/16760023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SectorIndex getIndexFromPos( final float x, final float y, final float z, int level ) { float levelSize = levelMults[level]; tmp_index.set( (int) ( x * levelSize ), (int) ( y * levelSize ), (int) ( z * levelSize ), level ); return tmp_index; } COM: <s> actual computation for world coordinate to index coordinate </s>
funcom_train/8276722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void findTrianglePick(Spatial parent, BaseGeometry target, Ray toTest, IntList results) { if (parent == null || target == null || !target.isCollidable()) { return; } CollisionTree ct = target.getCollisionTree(); if(ct != null) { ct.intersect(toTest, results, parent, parent.getWorldBound()); } } COM: <s> code find triangle pick code determines the triangles of this trimesh </s>
funcom_train/35657719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHighLights(ArrayList<Point> pts){ highLights.addAll(pts); /* ArrayList<Point> possibleMoves = pc.getPossibleMove(); //gets the arrayList of possible moves for the queen for(Point p : possibleMoves) //loops through the list and adds each point to illegal Positions hashSet super.highLights.add(p); super.highLights.add(pc.getPosition()); //adds the point of the places queen to illegal positions */ } COM: <s> add high lights method </s>
funcom_train/21883001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeTab(final Thinlet thinlet) { /** * Only remove the tab if it is not the last one */ if (thinlet.getCount(tabbedpane) > 1) { thinlet.remove(thinlet.getSelectedItem(tabbedpane)); thinlet.setInteger(tabbedpane, "selected", 0); } } COM: <s> callback for tab popupmenu close tab popup </s>
funcom_train/15513814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAngle() { System.out.println("getAngle"); Node start = new Node(0,0); Node stop = new Node(0,50); //float result = NewMath.getAngle(start, stop); //System.out.println("getAngle " + result); } COM: <s> test of get angle method of class lib </s>
funcom_train/28170939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGet() { System.out.println("get"); int index = 0; int coord = 0; BezierPath instance = new BezierPath(); Point2D.Double expResult = null; Point2D.Double result = instance.get(index, coord); 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 method of class org </s>
funcom_train/12803333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void gatherImports() { List definitions = new ArrayList(); definitions.add(objectDefinition); definitions.addAll(fields); definitions.addAll(constructors); definitions.addAll(methods); for (Iterator i = definitions.iterator(); i.hasNext();) { imports.addAll(((JavaDefinition) i.next()).getImports()); } } COM: <s> gather additional imports from the various parts of the source file </s>
funcom_train/20899303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeServiceListener(String type, ServiceListener listener) { type = type.toLowerCase(); List list = (List) serviceListeners.get(type); if (list != null) { synchronized (this) { list.remove(listener); if (list.size() == 0) { serviceListeners.remove(type); } } } } COM: <s> remove listener for services of a given type </s>
funcom_train/29324480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings("UnusedFormalParameter") private void fetchRadiusSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_fetchRadiusSliderStateChanged int value = fetchRadiusSlider.getValue(); if (value == 0) { fetchRadiusSlider.setValue(1); } settings.setFetchRadius(value); }//GEN-LAST:event_fetchRadiusSliderStateChanged COM: <s> handle a slider move event dont allow the value to go below 1 </s>
funcom_train/9389477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSettingsPage(ISettingsPage settingsPage) { mSettingsPage = settingsPage; mSettingsPage.loadSettings(mProperties); settingsPage.setOnSettingsChanged(new ISettingsPage.SettingsChangedCallback() { public void onSettingsChanged(ISettingsPage page) { SettingsController.this.onSettingsChanged(); } }); } COM: <s> associate the given </s>
funcom_train/31155796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadImages(String[] paths, Point[] points) { assert paths.length == points.length : "the number of image file names is consistent with the number of coordinates"; for (int i = 0; i < paths.length; ++i) { loadImageAt(paths[i], points[i].x, points[i].y); } } COM: <s> loads multiple images from an array of paths to corresponding points </s>
funcom_train/43246239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDiagnosis() { System.out.println("setDiagnosis"); String diagnosis = ""; AdmissionObject instance = new AdmissionObject(); instance.setDiagnosis(diagnosis); // 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 diagnosis method of class org </s>
funcom_train/3638754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String name, Object value) { if (dynaClass.getDynaProperty(name) == null) { throw new IllegalArgumentException(name); } try { dynaClass.getResultSet().updateObject(name, value); } catch (SQLException e) { throw new RuntimeException ("set(" + name + "): SQLException: " + e); } } COM: <s> set the value of a simple property with the specified name </s>
funcom_train/45231096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VSMParm parameterNamed(String name) { VSMParm result = null; for (Enumeration <VSMParm> e = elements(); e.hasMoreElements();) { VSMParm v = e.nextElement(); if (v.getFormalName().equals(name)) { result = v; break; } } return result; } COM: <s> searches for a parameter with the specified formal name </s>
funcom_train/48190231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PosMachine entity) { LogUtil.log("deleting PosMachine instance", Level.INFO, null); try { entity = entityManager.getReference(PosMachine.class, entity .getPosid()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent pos machine entity </s>
funcom_train/31909763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayError(String message) { if (svgUserAgent != null) { super.displayError(message); } else { JOptionPane pane = new JOptionPane(message, JOptionPane.ERROR_MESSAGE); JDialog dialog = pane.createDialog(JSVGCanvas.this, "ERROR"); dialog.setModal(false); dialog.show(); // Safe to be called from any thread } } COM: <s> displays an error message in the user agent interface </s>
funcom_train/50080515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFingerprint(Connection dbconn) throws TorqueException { try{ MDLReader mdlreader = new MDLReader(new StringReader(getStructureFile(1,dbconn))); Molecule mol2 = (Molecule) mdlreader.read(new org.openscience.cdk.Molecule()); CDKHueckelAromaticityDetector.detectAromaticity(mol2); setFingerprint(mol2); }catch(Exception ex){ throw new TorqueException(ex); } } COM: <s> sets the fingerprint values of the dbmolecule object taking the molecule from db </s>
funcom_train/36253710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void uploadFile(FileSystem fs, String src, String dst) throws IOException { fs.copyFromLocalFile(new Path(src), new Path(dst+".part")); if (fs.exists(new Path(dst))) fs.delete(new Path(dst), true); fs.rename(new Path(dst+".part"), new Path(dst)); } COM: <s> uploads a file to a file system making an intermediate file </s>
funcom_train/10749995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInterrupt_CurrentThread() { Thread t = new Thread() { public void run() { interrupt(); } }; t.start(); waitTime = waitDuration; while (!t.isInterrupted() && !(expired = doSleep(10))) { } if (expired) { fail("interrupt status has not changed to true"); } } COM: <s> interrupt the current thread </s>
funcom_train/10190402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUnquotedParameter(String param_name, String param_value) { if (m_strValue.indexOf('=')<0) m_strValue+=" "; else m_strValue+=","+LWS_SEPARATOR; m_strValue+=param_name+"="+param_value; } COM: <s> adds a parameter without inserting quotes </s>
funcom_train/36176482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveText() { scrollText = text.substring(textPos,text.length()); // //System.out.println(scrollText); this.setText(scrollText); if(textPos == text.length()) { retrocede = true; } else if (textPos == 0) { retrocede= false; } if(retrocede) textPos--; else textPos++; } COM: <s> calculates the new textposition </s>
funcom_train/9877917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGraphPanel() { GraphViewer graphViewer = createGraph(); graphPanel.removeAll(); graphPanel.add(graphViewer, new GridBagConstraints(0,0,1,1,1,1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(3,3,3,3), 0, 0)); graphPanel.validate(); graph = graphViewer; } COM: <s> updates the graph panel on locus change </s>
funcom_train/15689594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAufstellung(int hrfId, String name) { final String[] whereS = { "HRF_ID", "Aufstellungsname" }; final String[] whereV = { "" + hrfId, "'" + name + "'" }; //erst Vorhandene Aufstellung löschen getTable(AufstellungTable.TABLENAME).delete(whereS, whereV); //Standard sys resetten getTable(PositionenTable.TABLENAME).delete(whereS, whereV); } COM: <s> delete eine aufstellung positionen </s>
funcom_train/37863017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUserGroup(Account user) throws XMLDBException { try { List<Object> params = new ArrayList<Object>(3); params.add(user.getName()); String[] gl = user.getGroups(); params.add(gl); parent.getClient().execute("updateAccount", params); } catch (XmlRpcException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e); } } COM: <s> update the specified account without update users password </s>
funcom_train/18103950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int addBreak(short index, short offset, int last) { if (last+1 < lineBreaks.length) { short newBreaks[] = new short[lineBreaks.length + GROW_SIZE]; System.arraycopy(lineBreaks, 0, newBreaks, 0, lineBreaks.length); lineBreaks = newBreaks; } lineBreaks[last++] = index; lineBreaks[last++] = offset; return last; } COM: <s> add a line break in this layout </s>
funcom_train/43885640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Filter filter) throws GeometryEncoderException { this.sdeSpatialFilters = new ArrayList(); if (Filter.INCLUDE.equals(filter)) { return; } if (capabilities.fullySupports(filter)) { filter.accept(this, null); } else { throw new GeometryEncoderException("Filter type " + filter.getClass() + " not supported"); } } COM: <s> overriden just to avoid the where keyword </s>
funcom_train/12162255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testControlMultiSelect() throws Exception { privateSetUp(); boolean[] selected = {false, false, false}; // no options selected // single select - ie radio // horizontal options // align caption to the left boolean multiple = true; boolean vertical = false; boolean alignright = false; int optGroupCount = 0; doTestControlSelect(selected, multiple, vertical, alignright, optGroupCount); } COM: <s> test the output for a multi control select </s>
funcom_train/4529427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int metaSave(String[] argv, int idx) throws IOException { String pathname = argv[idx]; DistributedFileSystem dfs = (DistributedFileSystem) fs; dfs.metaSave(pathname); System.out.println("Created file " + pathname + " on server " + dfs.getUri()); return 0; } COM: <s> dumps dfs data structures into specified file </s>
funcom_train/12808033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getWidthCorrected(float charSpacing, float wordSpacing) { float total = 0; for (int k = 0; k < line.size(); ++k) { PdfChunk ck = line.get(k); total += ck.getWidthCorrected(charSpacing, wordSpacing); } return total; } COM: <s> gets a width corrected with a char spacing and word spacing </s>
funcom_train/2916224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFile(final IPath filePath) { checkAssertion("a workspace must be open", fIsOpen); //$NON-NLS-1$ try { fWorkspace.getRoot().getFile(filePath).delete(true, null); } catch (final CoreException e) { handle(e); } } COM: <s> remove a file </s>
funcom_train/9159598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildCount(long parentKey) { int count = 0; char parentIndex = findKey(parentKey, (char)1); if (parentIndex == 0) { return 0; } char siblingIndex = leftChildren[parentIndex]; while (siblingIndex != 0) { count++; siblingIndex = rightSiblings[siblingIndex]; } return count; } COM: <s> returns the number of children of code parent key code </s>
funcom_train/44934993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQueryWordsParameterValue() { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < words.length; i++) { if (i != 0) { buffer.append(" "); } buffer.append(words[i]); } return buffer.toString(); } COM: <s> get words parameters in link words </s>
funcom_train/32913648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureEditor(ComboBoxEditor newEditor) { if (editor != null) { editor.removeKeyListener(editorKeyListener); editor.removeFocusListener(editorFocusListener); } if (newEditor != null) { editor = (JTextComponent) newEditor.getEditorComponent(); editor.addKeyListener(editorKeyListener); editor.addFocusListener(editorFocusListener); editor.setDocument(this); } } COM: <s> configure the combo box editor </s>
funcom_train/2002542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] bs, int off, int len) throws IOException { for (int i = off; i < len; ++i) { int nextByte = read(); if (nextByte == -1) return (i - off); // eof, return length read bs[i] = Converter.integerToByte(nextByte); } return len > 0 ? len : 0; } COM: <s> read the specified number of bytes into the array beginning from the position </s>
funcom_train/46523870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setFocus(boolean val) { if (val != hasFocus) { if (val) { gotFocus(); if (parentComponent != null) { parentComponent.focusComponent = this; } } else { lostFocus(); if (parentComponent != null) { parentComponent.focusComponent = null; } } hasFocus = val; } } COM: <s> set or remove foucs from the component and call </s>
funcom_train/16558588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSymbolTypeDefinition() { for (int i = 0; i < symbols.length; i++) { assertFalse("Symbol no. "+i+" '"+getNameForSymbol(symbols[i])+"'", symbols[i].getSymbolType() == 0); } } COM: <s> ensures that symbols defined which can of fshape is the symbol </s>
funcom_train/17492721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String name, Object value) { for (Link l = scopes; l != null; l = l.next) { Object val = l.scope.get(name); if (val != Scope.NO_SUCH_KEY) { l.scope.put(name, value); return; } } throw new IllegalStateException(name); } COM: <s> sets the value of a defined variable </s>
funcom_train/50297965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate() throws SQLException { Object syncObject = getSynchronizationObject(); synchronized (syncObject) { notifyStatementStarted(); try { if (internalExecute(isExecuteProcedureStatement) && !generatedKeys) { throw new FBSQLException( "Update statement returned results."); } return getUpdateCount(); } finally { notifyStatementCompleted(); } } } COM: <s> executes the sql insert update or delete statement in this </s>
funcom_train/20315187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPOS(long file_offset) { String result = ""; try { String sql = "SELECT pos FROM synset WHERE file_offset = ?;"; PreparedStatement statement = openConnection().prepareStatement( sql, Statement.CLOSE_ALL_RESULTS, Statement.RETURN_GENERATED_KEYS); statement.setLong(1, file_offset); ResultSet resultSet = statement.executeQuery(); if (resultSet.next()) { result = resultSet.getString("pos"); } } catch (SQLException e) { getLogger().error("Datenbank-Fehler: " + e.getLocalizedMessage()); } return result; } COM: <s> gets parts of speech of entry at file offset from database </s>
funcom_train/2558245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Object source, Object value) throws Exception{ Class type = get.getDeclaringClass(); if(set == null) { throw new MethodException("Property '%s' is read only in %s", name, type); } set.getMethod().invoke(source, value); } COM: <s> this is used to set the specified value on the provided object </s>
funcom_train/2861351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String authorizeErrorMessage() { if (errorCode == 0) return ""; switch (errorCode) { case Z39initApi.InvalidAutho: case Z39initApi.BadAuthoPassword: return "Invalid authorization/password"; case Z39initApi.MaxNumberSimultaneousUsers: return "The maximum number of simultaneous users for the authorization is exceeded"; case Z39initApi.BlockedIPAddress: return "Invalid IP Address"; default: return "Temporary System Error"; } } COM: <s> retrieves a string containing the error message for failed authorizations </s>
funcom_train/12809677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRunDirection(final int runDirection) { if (runDirection < RUN_DIRECTION_NO_BIDI || runDirection > RUN_DIRECTION_RTL) throw new RuntimeException(MessageLocalization.getComposedMessage("invalid.run.direction.1", runDirection)); this.runDirection = runDirection; } COM: <s> use this method to set the run direction </s>
funcom_train/596735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pop(final int elements) { if (outputStackTop >= elements) { outputStackTop -= elements; } else { // if the number of elements to be popped is greater than the number // of elements in the output stack, clear it, and pops the remaining // elements from the input stack. owner.inputStackTop -= elements - outputStackTop; outputStackTop = 0; } } COM: <s> pops the given number of types from the output frame stack </s>
funcom_train/21099525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDirectEventListener(JaimEventListener listener) { log.entering("AIMFactory", "removeDirectEventListener()"); for (int i = 0; i < mConnections.size(); i++) { JaimConnection jc = (JaimConnection) mConnections.get(i); jc.removeEventListener(listener); } log.exiting("AIMFactory", "removeDirectEventListener()"); } COM: <s> adds a jaim event listener to be notified of events </s>
funcom_train/40622942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalAlignment(int row, int column, HorizontalAlignmentConstant align) { prepareCell(row, column); Element elem = getRawElement(row, column); DOM.setElementProperty(elem, "align", align.getTextAlignString()); } COM: <s> sets the horizontal alignment of the specified cell </s>
funcom_train/173749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setXPath(String expr) throws JDOMException { try { xPath = new JDOMXPath(expr); xPath.setNamespaceContext(new NSContext()); } catch (Exception ex1) { throw new JDOMException( "Invalid XPath expression: \"" + expr + "\"", ex1); } } COM: <s> compiles and sets the xpath expression wrapped by this object </s>
funcom_train/14400575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMethodRsp() throws Exception { CIMArgument<?>[] outArgA = new CIMArgument[3]; Object retVal = SAXHelper.parseInvokeMethodResponse(new InputStreamReader( getInputStream("data/EmbObjMethodRsp.xml")), outArgA, Common.LOCALPATH .getBasePath()); checkMethodRsp(retVal, outArgA); } COM: <s> test method rsp </s>
funcom_train/37567090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAnalyze() { String tokencontent = "testmeagain"; NGramProfile p = new NGramProfile("test", 1, 1); p.analyze(new StringBuffer(tokencontent)); //test that profile size is ok, eg 9 different NGramEntries "_tesmagin" assertEquals(9, p.getSorted().size()); } COM: <s> test analyze method </s>
funcom_train/27906528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpires(Date expires) { if ("1".equals(version)) { throw new UnsupportedOperationException("Version 1 cookies do not support Expires. Use Max-Age."); } synchronized (this.expires) { if (expires == null) { bExplicitExpires = false; this.expires = new Date(0); } else { bExplicitExpires = true; this.expires = expires; } } } COM: <s> sets the date time when this cookie expires </s>
funcom_train/40736443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTestId2(String newVal) { if ((newVal != null && testId2 != null && (newVal.compareTo(testId2) == 0)) || (newVal == null && testId2 == null && testId2IsInitialized)) { return; } testId2 = newVal; testId2IsModified = true; testId2IsInitialized = true; } COM: <s> setter method for test id2 </s>
funcom_train/11654247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createMenuBar() { makeFileMenu(); makeEditMenu(); makeRunMenu(); makeOptionsMenu(); makeHelpMenu(); this.add(fileMenu); this.add(editMenu); this.add(runMenu); this.add(optionsMenu); this.add(helpMenu); } COM: <s> creates the menu bar for this application </s>
funcom_train/14021193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatatypeProperty createDatatypeProperty(String ontPropUri) { ontPropUri = uriAnalyzer(ontPropUri); if (ontPropUri.indexOf('#') < 0) { ontPropUri = mkInstanceDataURI(ontPropUri); } if (ontPropUri != null && ontPropUri.length() > 0) { return getTheModel().createDatatypeProperty(ontPropUri); } return null; } COM: <s> call this method to create a new datatype property in the model </s>
funcom_train/7640611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAllocationStackCall() { Client client = getCurrentClient(); if (client != null) { // get the current selection in the ThreadTable AllocationInfo selectedAlloc = getAllocationSelection(null); if (selectedAlloc != null) { updateAllocationStackTrace(selectedAlloc); } else { updateAllocationStackTrace(null); } } } COM: <s> updates the stack call of the currently selected thread </s>
funcom_train/11347568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDynamicJustEnough() { Factory f = Utils.getFactoryByName(getContext(), "Factories-FooProviderType-Dyn2"); Properties p = new Properties(); p.put("instance.name","ok"); p.put("boolean", new Boolean(true)); p.put("string", "absdir"); p.put("strAProp", new String[] {"a"}); ComponentInstance ci = null; try { ci = f.createComponentInstance(p); ci.dispose(); } catch(Exception e) { fail("An acceptable configuration is rejected : " + e.getMessage()); } } COM: <s> check good configuration </s>
funcom_train/7614579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getStrokes(BasicMetrics metrics) { if (!haveStrokes) { if (strikeThrough) { strikeThroughStroke = new BasicStroke( metrics.strikethroughThickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10 ); } if (ulOn) { ulStroke = new BasicStroke( metrics.underlineThickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10 ); } haveStrokes = true; } } COM: <s> creates strokes of proper width according to the info </s>
funcom_train/2387637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUserAttrubute(String login, String attribute) { if (attribute.equals(NAME)) { return this.getName(); } if (attribute.equals(E_MAIL)) { return this.getEmailAddress(); } if (attribute.equals(ADDRESS)) { return this.getAddress(); } if (attribute.equals(CPF)) { return this.getCpf(); } if (attribute.equals(PHONE)) { return this.getPhoneNumber(); } return ""; } COM: <s> get users attribute </s>
funcom_train/14094515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processElement() throws XMLException { validateElement(); String name = getString(NAME); String value = getString(VALUE); if (getXMLTestCase() != null) { getXMLTestCase().addProperty(name, value); } else { getXMLTestSuite().addProperty(name, value); } } COM: <s> handle the xml processing of the tag property </s>
funcom_train/1939330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateSelectionIndexHolder(int firstIndex, int lastIndex) { int[] selectionIndices = table.getSelectedRows(); if (selectionIndices.length == 0) { selectionIndexHolder.setValue(Integer.valueOf(-1)); } else { int selectionIndex = table .convertRowIndexToModel(selectionIndices[selectionIndices.length - 1]); setSelectionIndex(selectionIndex); } } COM: <s> updates the selection index holder after the tables selection has changed </s>
funcom_train/20621094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadQualTypes (Object type, QualifiesItemType qItemType) { if (type instanceof DTSPropertyType) { DTSPropertyType propType = (DTSPropertyType) type; loadPropQualTypes (propType.getNamespaceId(), qItemType); } if (type instanceof AssociationType) { AssociationType assocType = (AssociationType) type; loadAssocQualTypes (assocType.getNamespaceId(), qItemType); } } COM: <s> namespace comes from the property or association in parent panel </s>
funcom_train/38514195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrdoSolventBFraction() { if (jrdoSolventBFraction == null) { jrdoSolventBFraction = new JRadioButton(); jrdoSolventBFraction.setBounds(new Rectangle(8, 48, 201, 17)); jrdoSolventBFraction.setText("Solvent B fraction"); jrdoSolventBFraction.setActionCommand("Plot solvent B fraction"); jrdoSolventBFraction.setBackground(Color.white); } return jrdoSolventBFraction; } COM: <s> this method initializes jrdo solvent bfraction </s>
funcom_train/45692216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSampleTunePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Sample_sampleTune_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Sample_sampleTune_feature", "_UI_Sample_type"), EsxPackage.Literals.SAMPLE__SAMPLE_TUNE, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the sample tune feature </s>
funcom_train/44551400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getDecimalValue(int[] bits, int start, int stop, boolean printBits) { String dec = ""; for (int i = start; i >= stop; i--) { dec += bits[i]; } return Integer.parseInt(dec, 2); } COM: <s> returns the decimal value of a specified number of bytes from a specific </s>
funcom_train/6260471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String methodInvokeParam(List attributes) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < attributes.size(); i++) { Attribute at = (Attribute)attributes.get(i); buf.append(name(at)); buf.append((i != attributes.size() - 1) ? ", " : ""); } return buf.toString(); } COM: <s> creates and returns coma separated list of attributes name without types </s>
funcom_train/27807585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connect() { con = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/papers", "root", "root"); if (!con.isClosed()) System.out.println("Successfully connected to " + "MySQL server using TCP/IP..."); } catch (Exception e) { System.err.println("Exception: " + e.getMessage()); } finally { } } COM: <s> function to connect mysql to the program papers running at </s>
funcom_train/17092169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem1() { if (stringItem1 == null) {//GEN-END:|30-getter|0|30-preInit // write pre-init user code here stringItem1 = new StringItem("stringItem1", null);//GEN-LINE:|30-getter|1|30-postInit // write post-init user code here }//GEN-BEGIN:|30-getter|2| return stringItem1; } COM: <s> returns an initiliazed instance of string item1 component </s>
funcom_train/8124790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MediaPlayerEvent createMediaSubItemPlayedEvent(int subItemIndex, int eventMask) { if(MediaPlayerEventType.set(eventMask, MediaPlayerEventType.SUB_ITEM_PLAYED)) { return new MediaSubItemPlayedEvent(mediaPlayer, subItemIndex); } return null; } COM: <s> create a new semantic event for a played sub item </s>
funcom_train/50311387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAdapter(Class aClass) { Object adapter; if (aClass.equals(IContentOutlinePage.class)) { if (fOutlinePage == null || fOutlinePage.isDisposed()) { fOutlinePage = new VelocityOutlinePage(this); if (getEditorInput() != null) { fOutlinePage.setInput(getEditorInput()); } } adapter = fOutlinePage; } else { adapter = super.getAdapter(aClass); } return adapter; } COM: <s> get the outline page if requested </s>
funcom_train/12652852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireTrialParseEvent(Trial trial, String encoding, String characterEncodingScheme) { // Do nothing if no trial if (trial == null) return; // Send the event to each listener TrialParseEvent trialParseEvent = new TrialParseEvent(trial, encoding, characterEncodingScheme); Iterator<TrialParseListener> iterator = listeners.iterator(); while (iterator.hasNext()) iterator.next().trialParsed(trialParseEvent); } COM: <s> notify listeners of a newly parsed trial </s>
funcom_train/11744364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubclassDescriptor(String className, ClassDescriptor subclassDescriptor) { // note that 'className' should be used instead of // "subclassDescriptor.getEntity().getClassName()", as this method is called in // the early phases of descriptor initialization and we do not want to trigger // subclassDescriptor resolution just yet to prevent stack overflow. subclassDescriptors.put(className, subclassDescriptor); } COM: <s> adds a subclass descriptor that maps to a given class name </s>
funcom_train/21483705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertPageNotBlank(WebResponse response) { String body = null; try { body = response.getText(); } catch (IOException e) { LOG.fatal(e, e); fail(); } assertNotNull(body); assertTrue(!body.equals("")); } COM: <s> checks for the page is not blank </s>
funcom_train/10188476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected( boolean b ) { if( b ) { // because there are some problems with multiple ButtonGroups that we duplicate some of the logic here if( currentAction != null && currentAction != this ) { currentAction.setSelected( false ); } currentAction = this; } putValue( SELECTED_KEY, Boolean.valueOf( b ) ); } COM: <s> selects or deselects the menu item </s>
funcom_train/29849197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getLeftBrother(Node node) { Node leftBrother = null; int depth = (bfsNum.get(node)).intValue(); int pos = ((LinkedList) treeMap.get(depth)).indexOf(node); if (pos != 0) { leftBrother = (Node) ((LinkedList) treeMap.get(depth)).get(pos - 1); } return leftBrother; } COM: <s> get the left brother at the actual level </s>
funcom_train/42719033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disposePreviewWindows() { if (previewWindows == null) { return; } Object o; for (int i = previewWindows.size() - 1; i >= 0; i--) { o = previewWindows.elementAt(i); if (o == null) { previewWindows.removeElementAt(i); continue; } ((PrintPreview)o).releaseResources(); ((Window)o).dispose(); o = null; previewWindows.removeElementAt(i); } previewWindows = null; } COM: <s> disposes all existing preview windows if any </s>
funcom_train/25506632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getDescriptionRegular() { if (descriptionRegular == null) { descriptionRegular = new JRadioButton(); descriptionRegular.setText(LocalizationData.get("CustomFilterPanel.description.regularExpression")); //$NON-NLS-1$ descriptionRegular.setToolTipText(wordings.regExprToolTip); descriptionRegular.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { checkConsistency(); } }); } return descriptionRegular; } COM: <s> this method initializes description regular </s>
funcom_train/6300818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String create(String serviceType, Org.omg.CORBA.Object obj, Property[] props) { OfferList list = (OfferList) m_offerLists.get(serviceType); if (list == null) { list = new OfferList(serviceType); m_offerLists.put(serviceType, list); } return list.create(obj, props); } COM: <s> creates a new offer returning the assigned offer id </s>
funcom_train/46932516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processTraining(int characterId, Node root) { CharRecord r = null; for(Enumeration e=Storage.characters.getRecords();e.hasMoreElements();){ CharRecord t = (CharRecord)e.nextElement(); if(t.getId()==characterId) { r = t; break; } } if(r!=null) { processTraining(r, root); } } COM: <s> find the matching char record for character id and process the training information </s>
funcom_train/48982986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGraduatedStudentsInfo() { XStream xStream = new XStream(new JettisonMappedXmlDriver()); Integer result = courseRemote.getGraduatedStudentsCount(course.getId()); String json = xStream.toXML(result); json = json.replaceAll("int", "count"); setInputStream(new ByteArrayInputStream(json.getBytes())); return "json"; } COM: <s> retrieves a info about graduated students </s>
funcom_train/47925834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner createRoundNoSpinner(final List<Integer> roundNumbers) { boolean isSequential = true; int n = 1; for (final Integer round : roundNumbers) { if (n != round.intValue()) { isSequential = false; break; } n++; } SpinnerModel model; if (isSequential) { model = new SpinnerNumberModel(1, 1, n - 1, 1); } else { model = new SpinnerListModel(roundNumbers); } return new JSpinner(model); } COM: <s> we prefer a </s>
funcom_train/3484933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUser(User user) { if (!(this == user.getDatabase())) { throw new IllegalArgumentException ("User not associated with this database"); } if (log.isTraceEnabled()) { log.trace("Removing user '" + user.getUsername() + "'"); } synchronized (users) { users.remove(user.getUsername()); } } COM: <s> remove the specified </s>
funcom_train/21909275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() throws Exception { Session session = newSession(); final Connection conn = session.connection(); try { migrate(new DataSourceMigrationContext() { public Connection getConnection() throws SQLException { return conn; } }); } finally { conn.commit(); session.close(); } } COM: <s> support for running a migration task in isolation for manual testing for example </s>
funcom_train/18745600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeNode getLub(Collection<TypeNode> types) { Set<TypeNode> ubs = new HashSet<TypeNode>(nodeSet()); for (TypeNode typeNode : types) { if (typeNode.isDataType()) { continue; } ubs.retainAll(getSupertypes(typeNode)); } return getMinimum(ubs); } COM: <s> returns a least upper bound with respect to subtyping if this exists </s>
funcom_train/8073542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(E element) throws UnsupportedEncodingException { long hash; String valString = element.toString(); for (int x = 0; x < k; x++) { hash = createHash(valString + Integer.toString(x)); hash = hash % (long)bitSetSize; bitset.set(Math.abs((int)hash), true); } numberOfAddedElements ++; } COM: <s> adds an object to the bloom filter </s>
funcom_train/31902379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void positionChange(int idx) { if (this.idx == 0) { if (idx != 0) this.remove(workingButton); } else { if (idx == 0) { this.add(workingButton, TabbedPanelLayout.EAST); if (type == MozillaButton.IMAGEONLY || type == MozillaButton.TEXTONLY) { workingButton.setLarge(false); } else { workingButton.setLarge(true); } // workingButton.setVisible(true); } } this.idx = idx; this.doLayout(); } COM: <s> handle when the position of some items changes </s>
funcom_train/39567548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleGoodbye(SPT_Message m) { if (neighbors.containsAdjacentNode(m.getSrcLA())) neighbors.removeAdjacentNode(m.getSrcLA()); //Report event NEIGHBORHOODCHANGED to notification handler. if (n_handler != null) { NODE_NEIGHBORHOODCHANGED ne = new NODE_NEIGHBORHOODCHANGED(m_adapter.getCurrentTime(), null); n_handler.eventOccurred(ne); } } COM: <s> handle the goodbye message </s>
funcom_train/44572531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifySimpleSpecStatementBody(JmlSpecBodyClause[] clauses) { boolean result = true; for (int i = 0; i < clauses.length; i++) if (!clauses[i].isSimpleSpecStatementBody()) { utility.reportTrouble( new PositionedError( clauses[i].getTokenReference(), JmlMessages.BAD_SIMPLE_SPEC_STATEMENT_BODY )); result = false; } return result; } COM: <s> returns true if all elements of the argument are simple spec </s>
funcom_train/3493058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { Iterator mapEntries = iterator(); while (mapEntries.hasNext()) { Map.Entry entry = (Map.Entry)mapEntries.next(); // Print the term and its weight, where the value of the map entry is a Weight // and then you need to get the value of the Weight as the weight. System.out.println(entry.getKey() + ":" + ((Weight)entry.getValue()).getValue()); } } COM: <s> print out the vector showing the tokens and their weights </s>
funcom_train/12245031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEmotion(Element emotion) { Element modChanges = emotion.getChild(type); if (modChanges != null) { for (Iterator iter = modificationPlugins.iterator(); iter.hasNext();) { ModificationPlugin mod = (ModificationPlugin) iter.next(); mod.setGui(emotion); } } else { for (Iterator iter = modificationPlugins.iterator(); iter.hasNext();) { ModificationPlugin element = (ModificationPlugin) iter.next(); element.setGuiDefault(); } } } COM: <s> set new values for all modificators </s>
funcom_train/18104905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commandAction(Command c, Displayable s) { if ((s == mlist && c == List.SELECT_COMMAND) || (c == launchCmd)) { synchronized (this) { if (selectedMidlet != -1) { // the previous selected MIDlet is being launched return; } selectedMidlet = mlist.getSelectedIndex(); } new Thread(this).start(); } else if (c == backCmd) { destroyApp(false); notifyDestroyed(); return; } } COM: <s> respond to a command issued on any screen </s>
funcom_train/50189144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void atestRunTests2() { try { Thread.sleep(5000); } catch (InterruptedException e) {} long delta = exampleSAXSourceAndStreamResult(); log.info("1. SAX2Stream Transformation length : " + delta + " ms"); delta = exampleSAXSourceAndStreamResult(); log.info("2. SAX2Stream Transformation length : " + delta + " ms"); } COM: <s> show the identity transformation with sax source and stream result </s>
funcom_train/8473080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String writeCreateTableSQL() { String createSQL = "\n\ncreate table " + tableName; createSQL += " ("; Integer columnCount = columns.size(); Integer currentCol = 0; for (Column col : columns) { createSQL += col.getName(); createSQL += " "; createSQL += col.getType(); if (++currentCol < columnCount) createSQL += ","; } createSQL += ");\n"; return createSQL; } COM: <s> this method writes the sql to create the table </s>
funcom_train/48045633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTimeFormatter withLocale(Locale locale) { DateTimeFormatter.checkNotNull(locale, "Locale must not be null"); if (locale.equals(this.getLocale())) { return this; } DateTimeFormatSymbols newSymbols = DateTimeFormatSymbols.of(locale); return new DateTimeFormatter(newSymbols, printerParser); } COM: <s> returns a copy of this date time formatter with a new locale </s>
funcom_train/23306645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { boolean isEq = false; if ((obj != null) && (obj instanceof AuthGroup)) { AuthGroup authGroup = (AuthGroup) obj; if ((_authGroupName != null) && (authGroup.getAuthGroupName() != null) && (_authGroupName.equals(authGroup.getAuthGroupName()))) { isEq = true; } } return isEq; } COM: <s> equal for equal non null auth group name </s>
funcom_train/15624394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrigin(final int firstLine, final int horizontalOffset) { boolean changed = false; if (horizontalOffset != this.horizontalOffset) { this.horizontalOffset = horizontalOffset; changed = true; } if (firstLine != this.firstLine) { this.firstLine = firstLine; changed = true; } if (changed) { updateScrollBars(); painter.repaint(); } } COM: <s> a fast way of changing both the first line and horizontal offset </s>
funcom_train/3071087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkTree(Tree tree,String proof) throws Throwable { Configurator config=new Configurator("trust.properties",new String[0]); config.finishConfig(); tree.appendProofRuleVector(new X509CredentialStore(config.getValue( Vocabulary.BASE_FOLDER_TAG)+config.getValue(Vocabulary. KEYSTORE_FILE_TAG),config.getValue(Vocabulary.STORE_PASSWORD_TAG)), config,proof); tree.setLastExpandedGoal(tree.getGoal()); return ProofTreeValidator.isProofTreeOk(tree,null); } COM: <s> checks if tree has a valid proof tree </s>
funcom_train/3133645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resize(int size) { if(array.length < size) { int expand = array.length + chunk; int max = Math.max(expand, size); byte[] temp = new byte[max]; System.arraycopy(array, 0, temp, 0, count); array = temp; } } COM: <s> this method is used to add an additional chunk size to the </s>
funcom_train/28749090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildWfdLinkedList(Collection wfds) { try { //Build the LinkedList view of WorkflowDetailInfo Collection. this.wfdLinkedList = new LinkedList(wfds); //Build the ListIterator view of WorkflowDetailInfo Collection. this.wfdListIter = wfdLinkedList.listIterator(); } catch (Exception ex) { LogManager.logMessage(clsName + ".buildWfdLinkedList(): ", ex); } } COM: <s> this method build the linked list view of workflow detail info collection </s>
funcom_train/3904425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void expandNode(DefaultMutableTreeNode node, boolean expand) { if(node != null) { TreePath path = new TreePath(node.getPath()); // This works! - expandPath() doesn't always work int row = getRowForPath(path); if(row >= 0) { if(expand) { expandRow(row); } else { collapseRow(row); } } // Failsafe else { if(expand) { expandPath(path); } else { collapsePath(path); } } } } COM: <s> expand collapse a node on the tree </s>
funcom_train/3470826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PseudoMousePointerGlassPane getPseudoMousePane(Component component) { GlassPaneCompound compound = getGlassPaneCompound(component); if (compound != null) { if (!compound.isVisible(GlassPaneCompound.PSEUDO_MOUSE_PANE) && isRunning() && !isPaused()) { compound.setVisible(GlassPaneCompound.PSEUDO_MOUSE_PANE, true); } return (PseudoMousePointerGlassPane) compound .getGlassPane(GlassPaneCompound.PSEUDO_MOUSE_PANE); } else { return null; } } COM: <s> returns the actual pseudo mouse glass pane </s>