__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41208810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addQuote(int curAlign) { String quote=null; if (quoteTagCount==0) { quote="\""; } else { quote="'"; } if ((FIXED_WIDTH) && (width-x<font.stringWidth(quote))) { newLine(curAlign); } addString(quote, curAlign); } COM: <s> adds a quote according to the current quote count </s>
funcom_train/7619816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopSync() { if (Config.LOGV) { Log.v(LOGTAG, "*** WebSyncManager stopSync ***, Ref count:" + mStartSyncRefCount); } if (mHandler == null) { return; } if (--mStartSyncRefCount == 0) { mHandler.removeMessages(SYNC_MESSAGE); } } COM: <s> stop sync requests sync manager to stop sync </s>
funcom_train/20350372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean goal() { for (int i=0; i<4; i++) { for (int j=0; j<4; j++) { if (tiles[i][j]!=i*4+j+1) { if (i==3 && j==3) return true; return false; } } } return true; } COM: <s> check if this state is a goal state </s>
funcom_train/51652370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font (Device device, FontData[] fds) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (fds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (fds.length == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<fds.length; i++) { if (fds[i] == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); } init(device, fds); if (device.tracking) device.new_Object(this); } COM: <s> constructs a new font given a device and an array </s>
funcom_train/8357661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getFramePanel() { if (framePanel == null) { framePanel = new JPanel(); framePanel.setLayout(new BorderLayout()); framePanel.add(getStatusBar(), BorderLayout.SOUTH); splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, getWorkspacePanel(), getDesktopPanel()); framePanel.add(splitPane, java.awt.BorderLayout.CENTER); } return framePanel; } COM: <s> this method initializes frame panel </s>
funcom_train/20077793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void divideLinePerValue(double[][] coefficients, int line, int collumn){ int numTerms = coefficients[0].length - 1; //nro de coeficientes da matriz (nao usa o indice 0) for(int i = collumn + 1; i <= numTerms; i++) { coefficients[line][i] /= coefficients[line][collumn]; } coefficients[line][collumn] = 1; } COM: <s> divide elementes from a given line using one of its own value </s>
funcom_train/3613312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove() { map.put("a", 1); map.remove("a"); assertEquals(0, map.size()); assertEquals(0, map.get("a")); assertEquals(0, map.sum()); } COM: <s> method test remove </s>
funcom_train/35063489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void occurs(int minOccurs, int maxOccurs) throws SAXException{ if(minOccurs!= 1) xml.addAttribute("minOccurs", String.valueOf(minOccurs)); if(maxOccurs!=1) xml.addAttribute("maxOccurs", maxOccurs==-1 ? "unbounded" : String.valueOf(maxOccurs)); } COM: <s> if min occurs 1 </s>
funcom_train/35277763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxTablesInSelect() throws SQLException { dmetaLog("fwp 19"); // - soft limit is >>> than will ever be seen in any real stmnt // - exists a fixed (non statement dependent) hard limit? No. // - depends totally on number of table idents that can fit in // Integer.MAX_VALUE characters, minus the rest of the stmnt return 0; } COM: <s> retrieves the maximum number of tables this database allows in a </s>
funcom_train/43886539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection(String user, String password) throws SQLException { Properties props = new Properties(); props.put("user", user); props.put("password", password); if (charSet != null) { props.put("charSet", charSet); } return getConnection(props); } COM: <s> creates a database connection method to initialize a given database for </s>
funcom_train/13896251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WasteContainer getWasteContainer(String wasteId) { WasteContainer container = new WasteContainer(); try { ResultSet rs = this.wcds.getWasteContainer(wasteId); rs.next(); setupWasteContainerCommon(container, rs); setupWasteContainerName(container, rs); } catch (SQLException sqle) { log .info("An SQLException has occured in WasteContainerWorker.getWasteContainer()" + sqle.getMessage()); } finally { this.cleanUp(); } return container; } COM: <s> gets a waste container object populated with the information for the </s>
funcom_train/10018058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeadSubstanceListOfGroup(int group) { if (group < 0 || m_nodes[group] != GROUP_NODE) { throw new EXISchemaRuntimeException( EXISchemaRuntimeException.NOT_GROUP, new String[] { String.valueOf(group) }); } return _getHeadSubstanceListOfGroup(group, m_nodes); } COM: <s> returns the list of uniform substance particles of a group </s>
funcom_train/27747019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBorderVisible(boolean show) { checkWidget(); if (showBorder == show) return; showBorder = show; if (showBorder) { if ((getStyle() & SWT.FLAT)!= 0) { BORDER_LEFT = BORDER_TOP = BORDER_RIGHT = BORDER_BOTTOM = 1; } else { BORDER_LEFT = BORDER_TOP = 1; BORDER_RIGHT = BORDER_BOTTOM = 3; } } else { BORDER_BOTTOM = BORDER_TOP = BORDER_LEFT = BORDER_RIGHT = 0; } layout(); redraw(); } COM: <s> specify whether the border should be displayed or not </s>
funcom_train/48667173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveHostRepository(String host) throws XMLException, IOException { HostData hd = this.hosts.get(host); if(hd == null) { return; } if(hd.hostResources == null) { return; } File out = new File(baseFolder, host + "." + this.fileExtension); Document doc = XMLUtils.createEmptyDocument("rms"); hd.hostResources.toXML(doc.getFirstChild()); writeToFile(out, doc); } COM: <s> saves host resources </s>
funcom_train/26246245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseSize(UWP uwp) { int size = uwp.getDiameter(); if (size == 0) { planetType = PlanetType.Cerean; } radius = size * 800; // Following sets day length to be some whole number of minutes. day = 60 * (int)(Die.d6(7) * 50 * Math.pow(radius/6400.0, 0.33)); if (distance < 50) { day *= 100; } } COM: <s> find the radius of the planet from the uwp code </s>
funcom_train/8525635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cancel() { synchronized (lock) { if (isCancelled) { LOG.debug("Ignoring cancel request"); return false; } isCancelled = true; LOG.debug("Entry has been successfully cancelled"); if (this == head) { LOG.debug("Head entry cancelled - notifying"); lock.notify(); } return true; } } COM: <s> cancels this permit </s>
funcom_train/50421347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewDocument(Document newDocument) { // remove all documents after the current position while (docs.size() - 1 > currentPosition) { docs.removeElementAt(docs.size() - 1); } // limit the size if (docs.size() >= SIZE) { docs.removeElementAt(0); -- currentPosition; } docs.add(newDocument); goToNext(); } COM: <s> adds a new document to the history </s>
funcom_train/22208920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Association getParent() { String xPathExpr = ".."; // attempt to select the parent node, if this isn't an Association, // throw a runtime exception try { return (Association) this.selectSingleNode(xPathExpr); } catch (ClassCastException e) { String msg = "Parent node is not an Association."; throw new TopicMapRuntimeException(msg, e); } } COM: <s> returns the association this member belongs to </s>
funcom_train/36775424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode addObject(Object child) { DefaultMutableTreeNode parentNode = null; TreePath parentPath = tree.getSelectionPath(); if (parentPath == null) { parentNode = topNode; } else { parentNode = (DefaultMutableTreeNode) (parentPath.getLastPathComponent()); } return addObject(parentNode, child, true); } COM: <s> add child to the currently selected node </s>
funcom_train/4283537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcons( String icons ) { StringTokenizer st = new StringTokenizer( icons, "," ); int n = st.countTokens(); for (int i = 0; i < n; i++) { Attribute attr = new Attribute( "icon", st.nextToken() ); super.setIconAt( i, (ImageIcon) ImageIconConverter.conv( null, attr, null ) ); } } COM: <s> sets the icons for all tabs </s>
funcom_train/41262238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_getLength() { Range range; // 'open-ended' range range = new Range(5); assertEquals("Unexpected length", -1, range.getLength()); // suffix range range = new Range(-10); assertEquals("Unexpected length", -1, range.getLength()); // already resolved range = new Range(2, 4); assertEquals("Unexpected length", 3, range.getLength()); } COM: <s> test the code get length code method </s>
funcom_train/49632986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean configFileExists() { String configurationFolder = configuration.getString("muvis.configuration_folder") + Util.getOSEscapeSequence(); File file = new File(configurationFolder + ".properties"); if (file.exists() && file.length() != 0) { return true; } else { return false; } } COM: <s> checks if the configuration file exists </s>
funcom_train/7876348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTask(Task task) { Date d = task.getDate(); if (d == null) { return; } Object o = getData(d); Collection col = (Collection) o; if (col == null) { col = new ArrayList(); addData(d, col); } col.add(task); } COM: <s> adds a new task to the model </s>
funcom_train/34129900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( ActionEvent e) { if ( dialog == null) { dialog = new ExecuteXSLTDialog( parent); } dialog.show( parent.getDocument()); if ( !dialog.isCancelled()) { ScenarioProperties scenario = dialog.getScenario(); parent.getExecutePreviousXSLTAction().setScenario( scenario); ScenarioUtilities.execute( parent.getDocument(), scenario); } } COM: <s> the implementation of the execute xslt action </s>
funcom_train/19380915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadYourOptions () { String OS = System.getProperty("os.name").toLowerCase(); // System.out.println(OS); if (OS.indexOf("windows") > -1) { loadWindowsOptions(); } else { loadLinuxOptions(); } } COM: <s> this method loads user options </s>
funcom_train/39126547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setGraphTitle (String inGraphTitle) { // Set the title and the default size of the graph graphTitle = "Graph"; if (inGraphTitle != null) { if (inGraphTitle.length () > 1) { graphTitle = inGraphTitle; } // if } // if setTitle (graphTitle); } // setGraphTitle () COM: <s> set the title of the graph in the title bare </s>
funcom_train/32639328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceMethod(Method old, Method new_) { if(new_ == null) throw new ClassGenException("Replacement method must not be null"); int i = method_vec.indexOf(old); if(i < 0) method_vec.addElement(new_); else method_vec.setElementAt(new_, i); } COM: <s> replace given method with new one </s>
funcom_train/4991277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createUI() { // Create the login panel createUICompositeLogin(); // Create the blank spanner createUICompositeBlank(); // Create the user name label createUILabelUserName(); // Create the user name text widget createUITextUserName(); // Create the password label createUILabelPassword(); // Create the password text widget createUITextPassword(); // Create the blank label createUILabelBlank(); // Create the OK button createUIButtonOK(); // Create the cancel button createUIButtonCancel(); } COM: <s> creates the ui </s>
funcom_train/35841288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGenerator(Language lang, CodeGenerator gen) { if (currLanguage == null) { currLanguage = lang; } generators.put(lang, gen); ArgoEventPump.fireEvent( new ArgoGeneratorEvent(ArgoEventTypes.GENERATOR_ADDED, gen)); LOG.debug("Added generator " + gen + " for " + lang); } COM: <s> registers a new generator </s>
funcom_train/3814847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRPDProperties(Map<String, RawPropertyData> p) { if (_propertyMap == null) _propertyMap = new HashMap<String, RawPropertyData>(); if ( p != null && !p.isEmpty()) _propertyMap.putAll(p); copyPropertiesToOtherMap(p); } COM: <s> add a whole set of raw property data properties not global properties </s>
funcom_train/2884447
/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 equalOk = false; if ((obj != null) && (obj instanceof NodeIdSet)){ NodeIdSet objBS = (NodeIdSet)obj; equalOk = (this.contains(objBS) && (this.cardinality() == objBS.cardinality())); } return equalOk; } COM: <s> equal if obj is a bitset and contains the same bits as this </s>
funcom_train/12180993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copy(Locator from, LocatorImpl to) { if (from != null && to != null) { to.setColumnNumber(from.getColumnNumber()); to.setLineNumber(from.getLineNumber()); to.setPublicId(from.getPublicId()); to.setSystemId(from.getSystemId()); } } COM: <s> copy the fields from a specified </s>
funcom_train/22957638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showFrame() { frame.getContentPane().add(rootWindow, BorderLayout.CENTER); frame.setSize(900, 700); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setTitle("Modified GMDH, Group of Adaptive Models Evolution (GAME)- the modelling tools"); frame.setVisible(true); } COM: <s> initializes the frame and shows it </s>
funcom_train/3562390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTextField() { if (textField == null) { textField = new JTextField(); textField.setName("textField"); textField.setEditable(false); // textField.setBackground(CorasClient.DISABLED_COLOR); } return textField; } COM: <s> this method initializes j text field </s>
funcom_train/651730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void synchronizeWithPreference(ITextEditor editor) { if (editor != null) { boolean show = this.store.getBoolean( CssUIPreferences.EDITOR_SHOW_SELECTED_ELEMENT_ONLY); setChecked(show); if (show != editor.showsHighlightRangeOnly()) { IRegion highlightRange = editor.getHighlightRange(); editor.resetHighlightRange(); editor.showHighlightRangeOnly(show); if (highlightRange != null) { editor.setHighlightRange(highlightRange.getOffset(), highlightRange.getLength(), true); } } } } COM: <s> synchronizes the appearance of the editor with what the preference store </s>
funcom_train/10805390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Slice getSlice(String name, boolean mustExist) { for (Slice slice : _slices) if (slice.getName().equals(name)) return slice; if (mustExist) { throw new UserException(_loc.get("slice-not-found", name, getActiveSliceNames())); } return null; } COM: <s> get the slice of the given slice </s>
funcom_train/8901209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float calculateOutputValue(float[] inputValues){ float net = weights[0]; //bias value for(int i=0; i<inputValues.length; i++){ net = net + (inputValues[i] * weights[i + 1]); } outputValue = (float)activationFunction.functionValue(net); return outputValue; } COM: <s> method that calculate the output value of the neuron using the output </s>
funcom_train/16546823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invokeMethod(String name, Object ... param) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, Exception { Method m = members.getMethod(name); if (m == null) { throw new Exception("Method " + instance.getClass().getName() + "." + name + "() is either non-existent, not explicitly marked public or has return type void."); } return m.invoke(instance, param); } COM: <s> invokes the method given by the name argument with the parameters given </s>
funcom_train/5377006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _start(CommandInterpreter intp) throws Exception { String nextArg = intp.nextArgument(); if (nextArg == null) { intp.println(ConsoleMsg.CONSOLE_NO_BUNDLE_SPECIFIED_ERROR); //$NON-NLS-1$ } while (nextArg != null) { AbstractBundle bundle = getBundleFromToken(intp, nextArg, true); if (bundle != null) { bundle.start(); } nextArg = intp.nextArgument(); } } COM: <s> handle the start command </s>
funcom_train/20750057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PastryNode makeScribeNode() { NodeHandle bootstrap = getBootstrap(); PastryNode pn = factory.newNode(bootstrap); // internally initiateJoins pastryNodes.addElement(pn); localNodes.addElement(pn.getNodeId()); Credentials cred = new PermissiveCredentials(); Scribe scribe = new Scribe(pn, cred ); scribe.setTreeRepairThreshold(3); DistScribeRegrTestApp app = new DistScribeRegrTestApp(pn, scribe, cred, this); distClients.addElement(app); return pn; } COM: <s> create a pastry node and add it to pastry nodes </s>
funcom_train/40908963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reopenStream() throws IOException { // reopen the stream and go to the beginning of the stream try { inputStream.reset(); return; } catch (IOException ex) { if (getLocator() == null) { throw ex; } } if (inputStream != null) { inputStream.close(); inputStream = null; } getConnection(); } COM: <s> description of the method </s>
funcom_train/29990736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGoodVertex(SimpleVertex goodVertex) { SimpleVertex oldValue = this.goodVertex; this.goodVertex = goodVertex; if ( oldValue != null ) oldValue.setTheGoodVertex( false ); if ( goodVertex != null ) goodVertex.setTheGoodVertex( true ); propertyChangeSupport.firePropertyChange( "goodVertex", oldValue, goodVertex ); } COM: <s> the setter function for b good vertex b </s>
funcom_train/1989783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillCbo() { cbo.removeAllItems(); // Gets the item provider @SuppressWarnings("unchecked") ItemProvider<?, Object> itemProvider = (ItemProvider<?, Object>) getField() .getItemProvider(); // Gets all items List<?> items = itemProvider.getItems(getField()); for (Object item : items) { cbo.addItem(item); } invalid = false; } COM: <s> fills the combo box </s>
funcom_train/10267079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setYAWLService(YAWLServiceReference service, String sessionHandle) throws IOException { String serialisedYAWLService = service.toXML(); Map queryMap = new HashMap(); queryMap.put("sessionHandle", sessionHandle); queryMap.put("action", "newYAWLService"); queryMap.put("service", serialisedYAWLService); return executePost(_backEndURIStr, queryMap); } COM: <s> lets the engine know of a new custom yawl service avaliable </s>
funcom_train/251790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanHandleMissingFileFromCommandLineParameters() { File file = new File("ThisFileDoesNotExist.doh"); assertFalse(file.exists()); String[] args = { "-f", file.getAbsolutePath() }; Main main = new Main(); try { main.processArguments(args); } catch (StartupException e) { // Expecting to receive an exception. assertTrue(e.getMessage().startsWith("Unable to find the configuration file")); return; } fail("Should never reach here - missing file"); } COM: <s> check that a missing file from the command line arguments can be handled </s>
funcom_train/534444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object deleteMin() { if(this.isEmpty()) { throw new EmptyHeapException(); } Object min = this.data[1]; // now go find the last object Object last = this.data[this.size()]; this.data[1] = last; this.data[this.size()] = null; // i need to set the size prior to percolateDown or else // percolateDown will break this.setSize(this.size() - 1); this.percolateDown(1); return min; } COM: <s> returns and removes the smallest object in the heap </s>
funcom_train/48404230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDragResizeStopHandler(com.smartgwt.client.widgets.events.DragResizeStopHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DragResizeStopEvent.getType()) == 0) setupDragResizeStopEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DragResizeStopEvent.getType()); } COM: <s> add a drag resize stop handler </s>
funcom_train/43768202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(T x) { boolean result = false; acquire(x); try { int myBucket = Math.abs(x.hashCode() % table.length); result = table[myBucket].add(x); size = result ? size + 1 : size; } finally { release(x); // always unlock } if(policy()) resize(); return result; } COM: <s> add item to set </s>
funcom_train/31670256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConfigFile ( String pathAndFileName ) { // verify not null if ( pathAndFileName == null ) throw new IllegalArgumentException(); // verify not empty String tempFileName = pathAndFileName.trim(); if ( tempFileName.equals("") ) throw new IllegalArgumentException(); setup(tempFileName); } COM: <s> same as constructor above but inputs the whole filename </s>
funcom_train/43396562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { float divisionType = sequence.getDivisionType(); if (divisionType != Sequence.PPQ) { throw new IllegalStateException("Only division type PPQ supported"); } ticksPerQuarter = sequence.getResolution(); tracks = sequence.getTracks(); // seqLength = sequence.getTickLength(); } COM: <s> initializes various parameters from the sequence </s>
funcom_train/39981861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void autonomousPeriodic() { //temporarily disable watchdog getWatchdog().setEnabled(false); drive_system.drive(1,-1); //spin to the right for 2 seconds Timer.delay(2); drive_system.drive(.5,.5); //drive forward at half speed for 3 seconds Timer.delay(3); kick(); //activate kicker //re-enable watchdog getWatchdog().setEnabled(true); //feed watchdog getWatchdog().feed(); } COM: <s> this function is called periodically during autonomous </s>
funcom_train/25360607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int pow(int a, int b) { if (a < 0 || b < 0) { System.out.println(" Negative values cannot be taken as input"); return 0; } // Anything to the power of 0 is 1 if (b == 0) { return 1; } // Anything multiplied by zero is zero if (a == 0) { return 0; } int temp = a; // Multiply a for b times for (int i=1; i<b; i++) { a *= temp; } return a; } COM: <s> this method is used to find the power of two positive integers </s>
funcom_train/2949355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save(String file) { try { prop.store(new FileOutputStream(file), "Class Manifest File"); //$NON-NLS-1$ } catch (IOException e) { log.warn("Cannot save manifest file \"" + file + "\"", e); //$NON-NLS-1$ //$NON-NLS-2$ return false; } return true; } COM: <s> saves the manifest to file </s>
funcom_train/4557828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testForgotPasswordCheckRequiredFields() { repEng.newStep("299", "Forgot Password-Check the required fields in Forgot Password window"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the cart icon. //5. Click Login button. //6. Click Forgot Password link. //7. Check if all the required fields are blank. // The "OK" button keeps disabled. } COM: <s> 299 forgot password check the required fields in forgot password window </s>
funcom_train/9869740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdmin(Boolean newVal) { if ((newVal != null && this.admin != null && newVal.equals(this.admin)) || (newVal == null && this.admin == null && admin_is_initialized)) { return; } this.admin = newVal; admin_is_modified = true; admin_is_initialized = true; } COM: <s> setter method for admin </s>
funcom_train/25540727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSeriesVisibility() { Map<SeriesType, Boolean> seriesVisibilityMap = obsModel .getSeriesVisibilityMap(); for (SeriesType seriesType : seriesVisibilityMap.keySet()) { int seriesNum = obsModel.getSrcTypeToSeriesNumMap().get(seriesType); renderer.setSeriesVisible(seriesNum, seriesVisibilityMap .get(seriesType)); } } COM: <s> set the visibility of each series </s>
funcom_train/887289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node mergeChildNodes(Node nodeToBeMerged, XMLInserter inserter) { Node lastNode = null; // Insert all paragraphs for (Node child : new ElemIterator(nodeToBeMerged)) { if (!child.getNodeName().equals(NODE_OO_SEQUENCE_DECLS) && !child.getNodeName().equals(NODE_OO_VARIABLE_DECLS)) { inserter.insert(child); lastNode = child; } } return lastNode; } COM: <s> takes the given </s>
funcom_train/26661587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init( ServletConfig config ) { if (server != null) return; server = MBeanServerLocator.locate(); String s = config.getInitParameter("mcmScuServiceName"); try { mcmScuServiceName = new ObjectName(s); } catch (Exception e) { log.error( "Exception in init! ",e ); } } COM: <s> iinitialize the mcm service delegator </s>
funcom_train/12923549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { pathInProgress = false; setInitial(0, 0); setCurrent(0, 0); setControl(0, 0); setBounds(0, 0, 0, 0); lineStyles.clear(); fillStyles.clear(); objects.clear(); lineWidth = 0; } COM: <s> creates a new path discarding any path elements drawn </s>
funcom_train/47111158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FrontWallArrangement checkFrontWall(int depth, Land[] land) { switch (depth) { case 4: return getFrontWallArrangement(land, DungeonWalls.FRONT_WALL4, DungeonWalls.LEFT_WALL4, DungeonWalls.RIGHT_WALL4); case 3: return getFrontWallArrangement(land, DungeonWalls.FRONT_WALL3, DungeonWalls.LEFT_WALL3, DungeonWalls.RIGHT_WALL3); case 2: return getFrontWallArrangement(land, DungeonWalls.FRONT_WALL2, DungeonWalls.LEFT_WALL2, DungeonWalls.RIGHT_WALL2); case 1: return getFrontWallArrangement(land, DungeonWalls.FRONT_WALL, DungeonWalls.LEFT_WALL, DungeonWalls.RIGHT_WALL); } return FrontWallArrangement.NO_FRONT_WALL; } COM: <s> based on the given depth it will call the get front wall arrangement </s>
funcom_train/3155935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void releaseBuffer() { BufferStorage buffer = null; QuadTreeLeaf owner = null; // loop over all buffer and tell owners to release for (int n = 0; n < _numBuffer; n++) { buffer = (BufferStorage) _bufferStorage.elementAt(n); owner = buffer.getOwner(); if (owner != null) { owner.releaseBuffer(); } buffer.releaseBuffer(); } } COM: <s> releases the cache buffer allocated </s>
funcom_train/5411684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cancelExistingCB() { assert(Thread.holdsLock(this)); if (mCb != null) { // cancel the existing waiter mCb.dataReady(this, -1, true, null); mCb = null; mLastAccessedTime = System.currentTimeMillis(); } } COM: <s> cancel any existing callback </s>
funcom_train/28672859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropType_key_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropType_key_feature", "_UI_PropType_type"), BeansPackage.Literals.PROP_TYPE__KEY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the key feature </s>
funcom_train/9549863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCreate() { if (jButtonCreate == null) { jButtonCreate = new JButton(); jButtonCreate.setText("Create DCF"); jButtonCreate.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { writeDCF(); } }); } return jButtonCreate; } COM: <s> this method initializes j button create </s>
funcom_train/21656498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtAgregarLitologias() { if (btAgregarLitologias == null) { btAgregarLitologias = new JButton(); btAgregarLitologias.setBounds(new Rectangle(500, 180, 43, 30)); btAgregarLitologias.setMnemonic('a'); btAgregarLitologias.setText("+"); btAgregarLitologias.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarAgregarLitologia(); } }); } return btAgregarLitologias; } COM: <s> this method initializes bt agregar litologias </s>
funcom_train/49535024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasExpired(String questionId) { PollsQuestion question = null; boolean hasExpired = false; try { question = PollsQuestionManagerUtil.getQuestion(questionId); } catch (Exception e) { Logger.error(PollsAPILiferayImpl.class, e.getMessage()); } Date expirationDate = question.getExpirationDate(); if (expirationDate != null) { Date today = new Date(); if (expirationDate.before(today)) { hasExpired = true; } } return hasExpired; } COM: <s> returns whether a question has expired or not </s>
funcom_train/37079865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void browseFiles() { File selectedFile = null; if (getCurrentInput()!=null) selectedFile = new File(getCurrentInput()); File browsedFile = GenericFileAdapterGUI.fileBrowser(selectedFile, parentComponent); if (browsedFile==null) return; // Stick file name in combo box comboBox.configureEditor(comboBox.getEditor(),browsedFile.toString()); } COM: <s> this is called from the browse button if it exists brings up </s>
funcom_train/1165703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendDirectMessageAsync(String id, String text, WeiboListener listener) { getDispatcher().invokeLater(new AsyncTask(SEND_DIRECT_MESSAGE, listener, new String[] {id, text}) { public void invoke(WeiboListener listener,Object[] args) throws WeiboException { listener.sentDirectMessage(sendDirectMessage( (String) args[0], (String) args[1])); } }); } COM: <s> sends a new direct message to the specified user from the authenticating user </s>
funcom_train/2676259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void modified(IPersistable object, FilePersistence store) { FilePersistence previous = objects.put(new UpdateEntry(object, store), store); if (previous != null && !previous.equals(store)) { log.warn("Object {} was also modified in {}, saving instantly", new Object[] { object, previous }); previous.saveObject(object); } } COM: <s> notify thread that an object was modified in a persistence store </s>
funcom_train/24003278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(String x, final AsyncCallback<Boolean> callback) { synchronized (this) { print(x, new AsyncCallback<Boolean>() { public void onSuccess(Boolean b) { newLine(callback); } public void onFailure(Throwable t) { callback.onFailure(t); } } ); } } COM: <s> prints a string and then terminate the line </s>
funcom_train/21634062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MLMethod obtainMethod() { final String resourceID = getProp().getPropertyString( ScriptProperties.ML_CONFIG_MACHINE_LEARNING_FILE); final File resourceFile = getScript().resolveFilename(resourceID); final MLMethod method = (MLMethod) EncogDirectoryPersistence .loadObject(resourceFile); if (!(method instanceof MLMethod)) { throw new AnalystError( "The object to be trained must be an instance of MLMethod. " + method.getClass().getSimpleName()); } return method; } COM: <s> obtain the ml method </s>
funcom_train/12563012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readMIDletInfo() { for (int n = 1; n < 100; n++) { String nth = "MIDlet-" + n; String attr = getAppProperty(nth); if (attr == null || attr.length() == 0) { break; } addMIDlet(new MIDletInfo(attr)); } } COM: <s> read in and create a midlet infor for each midlet lt n gt </s>
funcom_train/19314070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColumnNumber(final FObj fobj, final FoContext context) { final PdColumnNumber property = (PdColumnNumber) getProperty( FoProperty.COLUMN_NUMBER); if (property == null) { return PdColumnNumber.getValueNoInstance(context, fobj); } return property.getValue(); } COM: <s> returns the column number property </s>
funcom_train/8357305
/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) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getButtonsPanel(), java.awt.BorderLayout.SOUTH); jContentPane.add(getCenterPanel(), java.awt.BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/39549765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AffineTransform getViewBoxTransform() { AffineTransform at = getRenderingTransform(); if (at == null) at = new AffineTransform(); else at = new AffineTransform(at); AffineTransform vt = getViewingTransform(); if (vt != null) { at.concatenate(vt); } return at; } COM: <s> returns the transform from view box coords to screen coords </s>
funcom_train/28957053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jsFunction_setReplyTo(String addstr) { try { if (addstr.indexOf("@") < 0) { throw new AddressException(); } Address[] replyTo = new Address[1]; replyTo[0] = new InternetAddress(addstr); message.setReplyTo(replyTo); } catch (Exception mx) { System.err.println("Error in MailObject.setReplyTo(): "+mx); } } COM: <s> set the reply to address for this message </s>
funcom_train/16842452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(char ch) { if (i == b.length) { char[] new_b = new char[i + INC]; for (int c = 0; c < i; c++) { new_b[c] = b[c]; } b = new_b; } b[i++] = ch; } COM: <s> add a character to the word being stemmed </s>
funcom_train/39130266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRandomMessage(String path) { if (path.equals(expectedPath)) { return shuntedMessage; } final String[] messages = FileHelper.getFileHelper().getFile(path).list(this); return path + "/" + messages[getGenerator().nextInt(messages.length)]; } COM: <s> if path matches the shunted path this method will returned the shunted message </s>
funcom_train/50479003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void valueChanged() { setPresentsDefaultValue(false); boolean oldState = valid; refreshValidState(); if (valid != oldState) { fireStateChanged(IS_VALID, oldState, valid); } String newValue = getValue(); if (!newValue.equals(oldValue)) { fireValueChanged(VALUE, oldValue, newValue); oldValue = getValue(); } } COM: <s> informs this field editors listener if it has one about a change </s>
funcom_train/18591055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPriorityFile(String filename) { boolean result = false; Iterator iter = priorityFile_.iterator(); while (iter.hasNext()) { String name = (String) iter.next(); // get file name if (name.equals(filename)) { result = true; break; } } return result; } COM: <s> checks whether the given file has a higher priority or not </s>
funcom_train/32754357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged( final Channel channel, final ChannelTimeRecord record ) { final double repRate = record.doubleValue(); if ( repRate != _repRate ) { // only post an event if the value changed _repRate = repRate; _eventProxy.repRateChanged( this, Math.min( repRate, REP_RATE_MAX ) ); } } COM: <s> received a rep rate change event </s>
funcom_train/8487024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startMove(final PlayMove currentMove) { //prepare the group modifications currentMove.setGroups( (ArrayList<Group>) getCurrentMove().getGroups().clone()); Node<PlayMove> newMove = new Node<PlayMove>(currentMove); lastMove.addChild(newMove); lastMove = newMove; } COM: <s> creates a new node with the given play move </s>
funcom_train/17875703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkPreviousNode() { if (fromElement != null && previousNode != null) { int compareTo; try { compareTo = previousNode.compareTo(fromElement); } catch (RBTException exception) { throw new RuntimeException(exception);// NOPMD } if (fromInclusive && compareTo < 0 || !fromInclusive && compareTo <= 0) { previousNode = null;// NOPMD no previous node } } } COM: <s> check previous node not out of sub set if yes null it </s>
funcom_train/37241218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String phraseData = new String("--------- PHRASE: " + title + ". Contains " + this.size() + " notes. Start time: " + startTime +" ---------" +'\n'); Enumeration enum = getNoteList().elements(); int counter = 0; while(enum.hasMoreElements()){ Note note = (Note) enum.nextElement(); phraseData = phraseData + note.toString() + '\n'; } return phraseData; } COM: <s> prints the tracks attributes to stdout </s>
funcom_train/40553214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void set(Node x, boolean isleft, Node n) throws HsqlException { x = x.getUpdatedNode(); if (isleft) { x.setLeft(n); } else { x.setRight(n); } if (n != null) { n = n.getUpdatedNode(); n.setParent(x); } } COM: <s> set a node as child of another </s>
funcom_train/29372342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText("OK"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { //System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() CloseWindow(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/50479062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int adaptLevel(SeverityLevel level) { if (level == SeverityLevel.ERROR) { return IMarker.SEVERITY_ERROR; } else if (level == SeverityLevel.INFO) { return IMarker.SEVERITY_INFO; } else if (level == SeverityLevel.WARNING) { return IMarker.SEVERITY_WARNING; } // all unknown levels are mapped to warning return IMarker.SEVERITY_ERROR; } COM: <s> adapt the checkstyle severity to the eclipse marker severity </s>
funcom_train/22638751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegisterSet writesNonObj() throws DataConversionException { if (isWrite) { for (Attribute key : typeIsObj.keySet()) { for (String s : possibleWrites) { if (key.getName().equals(s)) { if (!typeIsObj.get(key)) { return RegisterSet.from(key.getIntValue()); } } } } } return RegisterSet.none(); } COM: <s> the list of registers this instruction writes with non objects </s>
funcom_train/779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private JButton createToolBarButton(String iconName, String actionCommand, String toolTipText) { // Create and initialize the button. JButton button = new JButton(Utilities.getIcon(iconName, null)); button.setActionCommand(actionCommand); button.setToolTipText(toolTipText); button.addActionListener(this); // The buttons must be clicked with the mouse. button.setFocusable(false); return button; } COM: <s> creates a button for the tool bar </s>
funcom_train/17162994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBuscarbut() { if (buscarbut == null) { buscarbut = new JButton(); buscarbut.setBounds(new Rectangle(197, 52, 29, 20)); buscarbut.setActionCommand(""); buscarbut.setToolTipText("buscar archivo"); buscarbut.setForeground(Color.white); buscarbut.setBackground(new Color(0, 0, 153)); buscarbut.setText("..."); buscarbut.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cargarArchivo(); } }); } return buscarbut; } COM: <s> this method initializes buscarbut </s>
funcom_train/8065557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyTyped(KeyEvent ke) { checkModeTransitions(ke); for (int i = _modes.size() - 1; i >= 0 && !ke.isConsumed(); --i) { FigModifyingModeImpl m = ((FigModifyingModeImpl) _modes.get(i)); m.keyTyped(ke); } } COM: <s> pass events to all modes in order until one consumes it </s>
funcom_train/124267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJSCSArray(JSCSArray dataKeys) { if (dataKeys == null) throw new IllegalArgumentException("Data object is null"); Object obj[] = new Object[dataKeys.rows()]; for (int i = 0; i < obj.length; i++) obj[i] = dataKeys.stringAt(i, 0); setObjArray(obj); } COM: <s> sets the data that should be displayed in the list </s>
funcom_train/36675776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAccount() { List<Account> funds = all_.Get(fund_category); Assert.assertEquals(2, funds.size()); Assert.assertTrue(Iterables.contains(funds, fund_accnt1)); Assert.assertTrue(Iterables.contains(funds, fund_accnt2)); List<Account> banks = all_.Get(bank_category); Assert.assertEquals(1, banks.size()); Assert.assertTrue(Iterables.contains(banks, bank_accnt1)); } COM: <s> tests if adding an account works correctly </s>
funcom_train/19065131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(int pos, byte[] array, int offset, int length) { mutex.lock(); int result = length > (len-pos) ? (len-pos) : length; if( result < 0 ) { mutex.release(); throw new ArrayIndexOutOfBoundsException(pos); } System.arraycopy(buffer, pos, array, offset, result); mutex.release(); return result; } COM: <s> fill the array with data from the buffer starting </s>
funcom_train/268646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkTransactionIsolationLevel() throws SQLException { String txIsolationName = null; if (this.io.versionMeetsMinimum(4, 0, 3)) { txIsolationName = "tx_isolation"; } else { txIsolationName = "transaction_isolation"; } String s = (String) this.serverVariables.get(txIsolationName); if (s != null) { Integer intTI = (Integer) mapTransIsolationName2Value.get(s); if (intTI != null) { isolationLevel = intTI.intValue(); } } } COM: <s> set transaction isolation level to the value received from server if any </s>
funcom_train/20889802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void statDouble(String label, double x) { if (x == Double.NaN) { x = 0.0; } val[index] = new Double(Util.round4(x)); title[index] = checkTitle(label); SimulationManager.logStatistic(statNode, statLayer, "time", label, Util.nowStr(), Double.toString(x)); checkEOL(); } COM: <s> wrapper to generate a statistic item for an double value </s>
funcom_train/22033112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { boolean direction = (e.getSource() == back); if (horiz == direction) { // move back cur--; if (cur < min) cur = max; } else { // move forward cur++; if (cur > max) cur = min; } step.setValue(cur); updateStep(); } COM: <s> action listener method used with jbuttons </s>
funcom_train/48261717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDecode_impreciseLongitudeLatitude() { String hash = GeoHashUtils.encode(84.6, 10.5); double[] latitudeLongitude = GeoHashUtils.decode(hash); assertEquals(84.6, latitudeLongitude[0], 0.00001D); assertEquals(10.5, latitudeLongitude[1], 0.00001D); } COM: <s> pass condition lat 84 </s>
funcom_train/43526248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsStrictFpPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Method_isStrictFp_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Method_isStrictFp_feature", "_UI_Method_type"), CallGraphPackage.Literals.METHOD__IS_STRICT_FP, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is strict fp feature </s>
funcom_train/9298393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_90 = NL + NL + "\t/**" + NL + "\t * @see Servlet#getServletConfig()" + NL + "\t */" + NL + "\tpublic ServletConfig getServletConfig() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t\treturn null;" + NL + "\t}"; COM: <s> protected final string text 89 nl nl t nl t </s>