__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46718609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMetaEntry getMetaByName (String name, boolean createIfAbsent) { XMetaEntry result = null; for (Iterator<XMetaEntry> it = iterator(); it.hasNext(); ){ XMetaEntry thisEntry = it.next(); if (name.equals(thisEntry.getName())) { result = thisEntry; break; } } if ((result == null) && createIfAbsent) { result = XMetaFactory.createEntry(name); this.add(result); } return result; } COM: <s> retrieve an entry of this list by its name attribute </s>
funcom_train/3153573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNadirViewBitmask() { assertEquals("nadir_view_bitmask", SstConstants.NADIR_VIEW_BITMASK_PARAM_NAME); assertEquals("!cloud_flags_nadir.LAND & !cloud_flags_nadir.CLOUDY & !cloud_flags_nadir.SUN_GLINT", SstConstants.DEFAULT_NADIR_VIEW_BITMASK); } COM: <s> tests for correct constants for the nadir view bitmask expression </s>
funcom_train/31906972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireManagerStoppedEvent() { Object[] dll = listeners.toArray(); if (dll.length > 0) { UpdateManagerEvent ev = new UpdateManagerEvent(this, null, null); for (int i = 0; i < dll.length; i++) { ((UpdateManagerListener)dll[i]).managerStopped(ev); } } } COM: <s> fires a update manager event to notify that the manager was stopped </s>
funcom_train/1985819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedFontSize(int size) { String sizeString = String.valueOf(size); for (int i = 0; i < this.fontSizeStrings.length; i++) { if (this.fontSizeStrings[i].equals(sizeString)) { getFontSizeList().setSelectedIndex(i); break; } } getFontSizeTextField().setText(sizeString); updateSampleFont(); } COM: <s> set the size of the selected font </s>
funcom_train/50865723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNewSupplyRow() { // Add new supply row. supplyTableModel.addNewSupplyItem(); // Select new row. int index = supplyTable.getRowCount() - 1; supplyTable.setRowSelectionInterval(index, index); // Scroll to bottom of table. supplyTable.scrollRectToVisible(supplyTable.getCellRect(index, 0, true)); } COM: <s> adds a new supply row to the supply table </s>
funcom_train/41666552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAppContextPath() { String appContextPath = ""; HttpServletRequest req = getWebRequestCycle().getWebRequest() .getHttpServletRequest(); String contextPath = req.getContextPath(); // /ModelibraWicketApp String servletPath = req.getServletPath(); // /app // i.e http://localhost:8081/ModelibraWicketApp/app/ appContextPath += getServerPath() + contextPath + servletPath; return appContextPath; } COM: <s> gets application context path </s>
funcom_train/4361222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { try { ObjectName objectName = new ObjectName( "JMImplementation:type=MBeanServerDelegate"); mBeanServer.removeNotificationListener(objectName, this); } catch (Exception e) { log.warn("Error unregistering MBeanServerDelegate", e); } } COM: <s> unregister this from jmimplementation type mbean server delegate </s>
funcom_train/31208295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getQueryTimeout() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); int result=queryTimeout; if(Trace.isEnabled()) Trace.traceResult(result); return result; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the current query timeout in seconds </s>
funcom_train/23028903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(2); gridLayout.setColumns(1); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; this.setLayout(gridLayout); this.setSize(150, 52); this.add(getTowarView(), null); this.add(getTowMagPanel(), null); } COM: <s> this method initializes this </s>
funcom_train/2429134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCallRestrictions(CallRestrictions restriction) { if ((restriction == null && callRestriction != null) || (restriction != null && !restriction.equals(callRestriction))) { CallRestrictions old = callRestriction; callRestriction = (restriction == null ? null : restriction.getCopy()); firePropertyChange(CALL_RESTRICTION, old, restriction); } } COM: <s> sets the restrictions for how this web service can be called </s>
funcom_train/34339848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCliente() { if (Cliente == null) {//GEN-END:|36-getter|0|36-preInit // write pre-init user code here Cliente = new TextField("Cliente", null, 32, TextField.ANY);//GEN-LINE:|36-getter|1|36-postInit // write post-init user code here }//GEN-BEGIN:|36-getter|2| return Cliente; } COM: <s> returns an initiliazed instance of cliente component </s>
funcom_train/48390623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addFilterChangedHandler(com.smartgwt.client.widgets.form.events.FilterChangedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.form.events.FilterChangedEvent.getType()) == 0) setupFilterChangedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.form.events.FilterChangedEvent.getType()); } COM: <s> add a filter changed handler </s>
funcom_train/44011343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmpFirstName() { System.out.println("setEmpFirstName"); String empFirstName = ""; EmployeeBO instance = new EmployeeBO(); instance.setEmpFirstName(empFirstName); // 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 emp first name method of class edu </s>
funcom_train/50815543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String hasValue(final String str) { if (this.keyValue.containsValue(str)) { for (Map.Entry<String, String> e: this.keyValue.entrySet()) { if (e.getValue().equals(str)) { return e.getKey(); } } throw new IllegalStateException("unreachable"); } return null; } COM: <s> returns the key that holds the given string or code null code if </s>
funcom_train/9993473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectRow(int rowIndex) { // get the row element Element rowElem = getRowElement(rowIndex); // make sure row is visible before selecting it while (!isRowVisible(rowElem)) { if (rowIndex > 1) { rowElem = getRowElement(--rowIndex); } } selectRow(rowElem); } COM: <s> selects a row </s>
funcom_train/130917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queryConfiguration () { try { sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_RANGER_REQ_GET_CONFIG, 0); os.flush (); } catch (IOException e) { throw new PlayerException ("[Ranger] : Couldn't request PLAYER_RANGER_REQ_GET_CONFIG: " + e.toString(), e); } } COM: <s> request reply query configuration </s>
funcom_train/49790942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLinkEditPartTest() throws IOException { File template = this.template2; File output = this.output2; String expected = getExpectedContent(readFile(template), template); if (!output.exists() || !readFile(output).equals(expected)) { System.out.println("Writing '" + output + "'..."); FileWriter fw = new FileWriter(output); fw.write(expected); fw.close(); } } COM: <s> check the link edit part </s>
funcom_train/44853237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBAccessConfiguration getDBConfiguration() { try { return new DBAccessConfiguration(get(KEY_DB_DRIVER), get(KEY_DB_SERVER), get(KEY_DB_SCHEMA), get(KEY_DB_USER), get(KEY_DB_PW)); } catch (IOException exc) { // intentionally left empty } return DBAccessConfiguration.getEmptyConfiguration(); } COM: <s> returns the db access configuration </s>
funcom_train/39101299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { int index = (getBoolean() ? 1 : 0); String text = null; if (trueFalseLabelModel != null && trueFalseLabelModel.getLength() > index) { text = trueFalseLabelModel.getItem(index).toString(); } else { text = TRUE_FALSE[index]; } return text; } COM: <s> get the actual value as string </s>
funcom_train/3081024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAccessKeySupport(Component component, Element element) { if (component instanceof AccessKeyable) { if (! component.isRenderEnabled()) { return; } AccessKeyable ak = (AccessKeyable) component; if (ak.getRenderProperty(AccessKeyable.PROPERTY_ACCESS_KEY) instanceof String) { element.setAttribute("accesskey", (String) ak.getRenderProperty(AccessKeyable.PROPERTY_ACCESS_KEY)); } } } COM: <s> this will add access key attributes to an element if the specified </s>
funcom_train/9495304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListPopulation (List<Chromosome> chromosomes, int populationLimit) { if (chromosomes.size() > populationLimit) { throw new IllegalArgumentException("List of chromosomes bigger than maxPopulationSize."); } if (populationLimit < 0) { throw new IllegalArgumentException("Population limit has to be >= 0"); } this.chromosomes = chromosomes; this.populationLimit = populationLimit; } COM: <s> creates a new list population instance </s>
funcom_train/8967544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void frac() { if (!(this.exponent >= 0 && this.mantissa != 0) || exponent < 0x40000000) return; int shift = 0x4000003e-exponent; if (shift <= 0) { makeZero(sign); return; } mantissa &= ((1L<<shift)-1); normalize(); } COM: <s> calculates the fractional part of this code real code by subtracting </s>
funcom_train/4843354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void remove(Words words) { int lineNumber = 0; for (String line : words.lines) { int characterIndex = 0; for (char letter : line.toCharArray()) { if (letter == ' ') { String toReplace = lines.get(lineNumber); if (toReplace.charAt(characterIndex) != ' ') { toReplace = Dictionary.replace(toReplace, characterIndex, " "); lines.set(lineNumber, toReplace); } } characterIndex++; } lineNumber++; } } COM: <s> remove the blanks from the given instance </s>
funcom_train/46477768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDrDriversPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DriversDiagram_DrDrivers_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DriversDiagram_DrDrivers_feature", "_UI_DriversDiagram_type"), SecurityContextPackage.Literals.DRIVERS_DIAGRAM__DR_DRIVERS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the dr drivers feature </s>
funcom_train/9931370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCookieTLDDomain(ServletRequest request) { String cookieDomain = request.getServerName(); String[] parts = cookieDomain.split("\\."); if (parts.length >= 2) cookieDomain = parts[parts.length - 2] + "." + parts[parts.length - 1]; return ".".concat(cookieDomain); } COM: <s> returns the last two parts of the specified requests server name </s>
funcom_train/14082483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getItems(HttpServletRequest request, HashMap items) { ArrayList allowed = new ArrayList(); for (Iterator it= sortOrdering.values().iterator(); it.hasNext(); ) { String itemName = (String) it.next(); ArrayList roles = ((MenuItem) items.get(itemName)).getRoles(); if (accessAllowed(request, roles)) allowed.add(itemName); } return allowed; } COM: <s> return a list of menu items </s>
funcom_train/33149645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getElement( String name ) { if ( _elements == null ) return null ; Iterator it = _elements.iterator() ; while ( it.hasNext() ) { Element element = (Element) it.next() ; if ( element.getName().equals( name ) ) return element ; } return null ; } COM: <s> return the named code element code </s>
funcom_train/32723821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { if (offset != -1 && offset < data.length()) { int i; StringBuffer prob = new StringBuffer(); i = offset - 5; if (i < 0) { i = 0; } else prob.append("..."); for (int j = 0; j < 15; j++) { if (i == data.length()) break; prob.append(data.charAt(i++)); } return super.getMessage() + "\nError: "+prob.toString()+". Code:\n"+data; } return super.getMessage(); } COM: <s> returns error message </s>
funcom_train/22286007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScrollbar(ScrollbarWidget vsbar) { if (vsbar != null && vsbar != this.vsbar) { vsbar.setOrientation(VERTICAL); vsbar.setAutoSetValue(false); vsbar.setConstrained(false); this.vsbar = vsbar; add(vsbar); } else if (this.vsbar != null) { remove(this.vsbar); this.vsbar = null; } view.setScrollbar(this.vsbar); // REMIND change to view.setScrollbars(vsbar, hsbar); } COM: <s> set the vertical scrollbar </s>
funcom_train/44820017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initEntityProvider(IEntityProvider provider, Association association) { if (association == null) { return; } if (isAutoConfigProvidersForm()) { initEntityProviderForm(provider, association); // INIT FORM } if (isAutoConfigProvidersService()) { initEntityProviderService(provider, association); // INIT SERVICE } } COM: <s> initialize the entity provider by association </s>
funcom_train/18875685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createGpxDocument(String fileName, String name) throws ParserConfigurationException, TransformerException, FileNotFoundException, UnsupportedEncodingException { Element root = super.createDocument(fileName, "gpx"); this.setName(name); root.setAttribute("version", "1.1"); root.setAttribute("name", name); root.setAttribute("creator", "capcode - http://sourceforge.net/projects/capcode/"); if (metaData == null){ metaData = new GpxMetaData(name); } metaData.writeToElement(this, root); return root; } COM: <s> creates a gpx document on the base of a xml document </s>
funcom_train/27747002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopCenter(Control topCenter) { checkWidget(); if (topCenter != null && topCenter.getParent() != this) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (this.topCenter != null && !this.topCenter.isDisposed()) { this.topCenter.setBounds(OFFSCREEN, OFFSCREEN, 0, 0); } this.topCenter = topCenter; layout(); } COM: <s> set the control that appears in the top center of the pane </s>
funcom_train/8541734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Frame returnLastResult(boolean returnRepeat) { if (returnRepeat) { if (!cc.getPlayer().isEmpty()) { lastPointCounter1 = cc.getPlayer().size(); return cc.getPlayer().last(); } else return null; } else { if (!cc.getPlayer().isEmpty() && lastPointCounter1 < cc.getPlayer().size()) { lastPointCounter1 = cc.getPlayer().size(); return cc.getPlayer().last(); } else return null; } } COM: <s> gets the last coordinates </s>
funcom_train/19400779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void completedTx(ITx tx) throws IllegalStateException { assert tx != null; assert tx.isComplete(); Long id = tx.getStartTimestamp(); ITx txActive = activeTx.remove(id); ITx txPrepared = preparedTx.remove(id); if (txActive == null && txPrepared == null) { throw new IllegalStateException( "Neither active nor being prepared: tx=" + tx); } } COM: <s> notify the journal that a transaction is completed either aborted or </s>
funcom_train/4646414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean _mouseDown(MouseEvent e) { if (DEBUG) System.out.println("getitem " + e.x + " " + e.y); //$NON-NLS-1$//$NON-NLS-2$ GalleryItem group = this._getGroup(new Point(e.x, e.y)); if (group != null) { int pos = vertical ? (e.y + translate) : (e.x + translate); return groupRenderer.mouseDown(group, e, new Point(vertical ? e.x : pos, vertical ? pos : e.y)); } return true; } COM: <s> forward the mouse down event to the corresponding group according to the </s>
funcom_train/50556094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showHTMLDocument(URL url, String targetFrame, boolean reload) { if (url != null) { if (targetFrame == null) { targetFrame = viewer.name; } showDocument(new CalHistoryItem(url, targetFrame, url.getRef(), null, null), null, reload, HISTORY_NEW, 0); } } COM: <s> shows the contents of the specified code url code in the named </s>
funcom_train/7387198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearCellOverlays(Object cell) { mxIGraphModel model = graph.getModel(); if (cell == null) { cell = model.getRoot(); } removeCellOverlays(cell); // Recursively removes all overlays from the children int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { Object child = model.getChildAt(cell, i); clearCellOverlays(child); // recurse } } COM: <s> removes all overlays in the graph for the given cell and all its </s>
funcom_train/46456765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoscaleZ(boolean isAutoscale, double floor, double ceil) { autoscaleZ = isAutoscale; if(autoscaleZ) { update(); } else { zmax = ceil; zmin = floor; if(zMap!=null) { zMap.setMinMax(zmin, zmax); } colorMap.setScale(zmin, zmax); } } COM: <s> sets the autoscale flag and the floor and ceiling values </s>
funcom_train/32070017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addPermissions(Collection<Permission> permissions) { boolean addOk = getPermissions().addAll(permissions); if (addOk) { for(Permission permission : permissions) { permission.setPermissionType((PermissionType)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed permissions collection to the permission type collection </s>
funcom_train/32778071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deRegister(FileOutput file) { if (file == null) { sendWarning("Can not de-register FileOutput! Command ignored.", "Experiment '" + getName() + "' method 'void deRegister(FileOutput file).'", "The parameter given was a null reference.", "Make sure to only connect valid FileOutputs at the Experiment."); return; } _registryFileOutput.remove(file); // remove whether it was inside or not } COM: <s> de registers a file at the experiment </s>
funcom_train/5265645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printUC(int c) { if (c > 255) { out.print("\\u"); if (c < 0x1000) out.print("0"); out.print(Integer.toHexString(c)); } else { out.print("\\"); out.print(Integer.toOctalString(c)); } } COM: <s> print number as octal unicode escaped string character </s>
funcom_train/9906900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createAndStartInfiltratorAgent() throws JadeRuntimeException { validateMinimalState(); try { createAndStartTheUtilityAgent(); } catch (ControllerException ex) { final String message = "Failed to start an utility agent."; l.error(message, ex); throw new JadeRuntimeException(message, ex); } } COM: <s> start the utility agents necessary for the jade bean to operate </s>
funcom_train/29022192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAntialias() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (data.gdipGraphics == 0) return SWT.DEFAULT; int mode = Gdip.Graphics_GetSmoothingMode(data.gdipGraphics); switch (mode) { case Gdip.SmoothingModeDefault: return SWT.DEFAULT; case Gdip.SmoothingModeHighSpeed: case Gdip.SmoothingModeNone: return SWT.OFF; case Gdip.SmoothingModeAntiAlias: case Gdip.SmoothingModeAntiAlias8x8: case Gdip.SmoothingModeHighQuality: return SWT.ON; } return SWT.DEFAULT; } COM: <s> returns the receivers anti aliasing setting value which will be </s>
funcom_train/19090873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invalidSurrogate(int uuuuu) throws UTFDataFormatException { StringBuffer str = new StringBuffer(); str.append("high surrogate bits in UTF-8 sequence must not exceed 0x10 but found 0x"); String message = fFormatter.formatMessage(fLocale, "InvalidHighSurrogate", new Object[] {Integer.toHexString(uuuuu)}); throw new UTFDataFormatException(message); } // invalidSurrogate(int) COM: <s> throws an exception for invalid surrogate bits </s>
funcom_train/3413450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeVetoableChangeListener(VetoableChangeListener listener) { if (listener == null) { return; } if (listener instanceof VetoableChangeListenerProxy) { VetoableChangeListenerProxy proxy = (VetoableChangeListenerProxy)listener; // Call two argument remove method. removeVetoableChangeListener(proxy.getPropertyName(), (VetoableChangeListener)proxy.getListener()); } else { this.map.remove(null, listener); } } COM: <s> remove a vetoable change listener from the listener list </s>
funcom_train/29577078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int removeRanksByLevel(int level) { int cost = 0; List l = doc.selectNodes("//rank[@level='" + String.valueOf(level) + "']"); for (Iterator iter = l.iterator(); iter.hasNext(); ) { Element e = (Element) iter.next(); cost += Integer.parseInt(e.valueOf("@cost")); Element parent = e.getParent(); parent.remove(e); } return cost; } COM: <s> this removes every skill rank on this character for a given level </s>
funcom_train/22260174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validate(LSIDRequestContext req) throws LSIDServerException { LSID lsid = req.getLsid(); checkLowerCase(lsid); InputStream in = null; try { in = getXMLInputStream(lsid); in.read(); } catch (Exception e) { throw new LSIDServerException(e,LSIDServerException.UNKNOWN_LSID,"Unable to process: " + lsid); } finally { if (in != null) { try { in.close(); } catch (IOException e) { e.printStackTrace(); } } } } COM: <s> make sure this lsid exists </s>
funcom_train/44025228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean logout(String cookie) { try { String line = cosAddr + "/session"; HttpClient client = new HttpClient(); DeleteMethod method = new DeleteMethod(line); method.addRequestHeader("Cookie", cookie); client.executeMethod(method); method.releaseConnection(); if (method.getStatusCode() != 200) { System.out.println("ASI-error: " + method.getResponseBodyAsString()); return false; } return true; } catch (Exception e) { e.printStackTrace(); return false; } } COM: <s> logout from asi </s>
funcom_train/17828870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveConfigDirectory() { String filesep = System.getProperty("file.separator"); File homedir = new File( System.getProperty("user.home") + filesep + ".jsqsh"); File history = new File(homedir, "history.xml"); bufferManager.save(history); saveReadlineHistory(homedir); } COM: <s> saves off the state of sqsh into the configuration directory </s>
funcom_train/11394325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testEchoMap() throws Exception { assertEquals("a:b\nc:d\n", readOutput(new URL(baseUrl, "/echomap?a=b&c=d"))); assertEquals("a:b,&gt;\nc&lt;:d\n", readOutput(new URL(baseUrl, "/echomap?a=b&c<=d&a=>"))); } COM: <s> test the echo map servlet that uses get parameter map </s>
funcom_train/40883703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects (float x, float y, CollisionGeometry other, float otherX, float otherY) { boolean result = false; for (int i = 0; i < runs.size; i++) { Rectangle run = runs.get(i); setRectangle(r, x + run.x, y + run.y, run.width, run.height); if (other.intersects(r, otherX, otherY)) { result = true; break; } } return result; } COM: <s> tests if this collision geometry is in collision with another </s>
funcom_train/2878677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrequency(int newFrequency) throws RemoteException { this.frequency = newFrequency; //this.timeSleep = (this.frequency * factor); if (sfLog().isInfoEnabled()) sfLog().info (" frequency updated: " + this.frequency); if (sleeping) { downloader.interrupt(); } } COM: <s> sets the frequency attribute of the stress tester impl object </s>
funcom_train/34988513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValid(double[][] a, double[] b, double[] c) { for (int i = 0; i < a.length - 1; i++) { if (a[i].length != a[i + 1].length - 1) { return false; } } return b.length == c.length + 1; } COM: <s> checks if the given vectors and array defining a fixed step runge kutta </s>
funcom_train/18355558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void disableJDBCConnection() { logger.debug("["+ConnNum+"] DatabaseWriter: Disabling second (Filtered) JDBC Connection."); try { sharedData.getFJDBCConn().setAutoCommit(sharedData.isAutoCommitMode()); } catch (SQLException e) { logger.error("["+ConnNum+"] DatabaseWriter: SQL Error came while restoring Original JDBC drivers commit mode."); e.printStackTrace(); } sharedData.setFilteredJDBCConnectionOn(false); sharedData.setSocketOutputDropData(true); } COM: <s> disables the currently open filtered jdbc connection to the database </s>
funcom_train/5344894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNode(Object key) { long length = length(key); if (length == 0l) { if (!root.isEmpty()) { return root; } } else { Node node = getR(root.left, key, length, -1l); if (node != root || !root.isEmpty()) { return node; } } return null; } COM: <s> helper method so that you have not to struggle with the </s>
funcom_train/31900830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorPreference(String key, Color value) { for (int i = 0;i < COLORNAMES.length; i++) { if (value.equals(COLORVALUES[i])) { setStringPreference(key, COLORNAMES[i]); return; } } setStringPreference(key, value.toString()); } // setColorPreference() COM: <s> set the setting for a pre defined preference using a color </s>
funcom_train/17773978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpperLimit(Comparable<T> max) { if (max == null) { this.max = null; } else { if (!(myClass.isInstance(max))) { throw new ClassCastException("max (" + max + ") is not an " + "instance of " + myClass); } this.max = max; } } COM: <s> sets the largest allowed value </s>
funcom_train/3784643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawOverLays(Graphics g, Image imgToDraw, int w, int h) { /* drawOverLays */ paintCSI(g, imgToDraw, w, h, false); paintCSI(g, imgToDraw, w, h, true); /* for offscreen img */ } /* drawOverLays */ COM: <s> draw over lays paint the scrollable image canvas which includes </s>
funcom_train/45018400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRunCyclePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXentry_runCycle_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXentry_runCycle_feature", "_UI_NXentry_type"), NexusPackageImpl.Literals.NXENTRY__RUN_CYCLE, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the run cycle feature </s>
funcom_train/44216893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { if(e.getSource() == tree) { if (e.getClickCount() == 2) { String selectedId = tree.getSelectedElementId(); // System.out.println("selectedId = " + selectedId); if(selectedId != "root") { selectTab(selectedId); } } } } COM: <s> mouse listener interface </s>
funcom_train/32944431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDayPercentage() { if (null == endTime || null == startTime) { return 0; } Double start = new Double(startTime.getTime()); Double end = new Double(endTime.getTime()); Double p = ((end - start) / 86400000) * 100; return p.intValue(); } COM: <s> get the percentage of the day that this bandwidth applies to </s>
funcom_train/30204870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getJSpinnerPointAx() { if (jSpinnerPointAx == null && annotation instanceof ExtentAble) { spinnerModelPointAx = new SpinnerNumberModel(); spinnerModelPointAx.setValue(((ExtentAble) annotation).getPointA().x); spinnerModelPointAx.setStepSize(1); jSpinnerPointAx = new JSpinner(spinnerModelPointAx); } return jSpinnerPointAx; } COM: <s> this method initializes j text field point ax </s>
funcom_train/42097778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int evaluateEnd(OthelloBitBoard position, int state) { int pieceDiff = position.countPieces(state) - position.countPieces(state ^ 1); if (pieceDiff < 0) { return LOWESTSCORE + 1 + position.countPieces(state); // LOSE } else if (pieceDiff == 0) { return valueOfDraw; } else { return HIGHESTSCORE - 1 - position.countPieces(state ^ 1); //win } } COM: <s> evaluate the results of a game that has ended </s>
funcom_train/9067445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _3_optimumCycle() throws SpotFail { CusFunction cf = _functionFactory.oneCycleCusFunction(); _seqParams.put( CYCLES, new Long(1) ); doInitialGuess(); //doFixedOpt( cf, new String[] { CYCLES, LOAD } ); doFixedOpt( cf, doFixedSeqParams() ); } COM: <s> optimize for one cycle </s>
funcom_train/29849509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double polarToCartesianX(double rho, double alpha) { double result = xStart + rho * Math.cos(alpha) * nodeDistance + maxNodeHeight.size() * nodeDistance; if (treeDirection == 270) { result = xStart - rho * Math.cos(alpha) * nodeDistance + maxNodeHeight.size() * nodeDistance; } return result; } COM: <s> compute the x coordinate </s>
funcom_train/43431589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawBorder(Graphics g, Point position) { Graphics2D g2d = (Graphics2D)g; if (toolState == ToolState.Highlighted) g2d.setColor(HIGHLIGHT_BORDER_COLOR); else if (toolState == ToolState.Selected) g2d.setColor(SELECTED_BORDER_COLOR); g2d.drawRoundRect(position.x, position.y, TOOL_WIDTH, TOOL_HEIGHT, 3, 3); } COM: <s> draws a border a rounded rectangle around the tool </s>
funcom_train/49200136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUseGeneratedBackgroundImagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Scene_useGeneratedBackgroundImage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Scene_useGeneratedBackgroundImage_feature", "_UI_Scene_type"), ExhibitionPackage.Literals.SCENE__USE_GENERATED_BACKGROUND_IMAGE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the use generated background image feature </s>
funcom_train/48068413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean wasOnceDownloaded(String accountID, String messageID) { if (DEBUG) { System.out.println("DEBUG InBox.wasOnceDownloaded(String, String)"); } if (msgIDs.containsKey(accountID + "@" + messageID)) { //if it is in the storage return true; } return mujMail.getMailDBSeen().wasMailSeen(accountID, messageID); } COM: <s> checks if we see this many sometime or its new comming email </s>
funcom_train/24058971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScrollVerticalBar() { additiveScrollBar = new JScrollPane(scrolledPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); additiveScrollBar.setBorder(BorderFactory.createEmptyBorder()); centralPanel.add(additiveScrollBar, BorderLayout.CENTER); // Resize panel for include scrollbar width Dimension dim = scrolledPanel.getPreferredSize(); scrolledPanel.setPreferredSize(new Dimension((int)dim.getWidth()-20, (int)dim.getHeight())); } COM: <s> add scrolled bar to the tab </s>
funcom_train/19454983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGraphic(String graphic) { /* Get the old property value for fire property change event. */ String oldValue = fieldGraphic; /* Set the graphic property (attribute) to the new value. */ fieldGraphic = graphic; /* Fire (signal/notify) the graphic property change event. */ firePropertyChange("graphic", oldValue, graphic); return; } COM: <s> sets the graphic property name </s>
funcom_train/22603769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean skip(){ if(getWhereParamValue()==null) return true; if(getWhereParamValue() instanceof String && ((String)getWhereParamValue()).trim().length()==0) return true; /* -1 mean select all */ if(getWhereParamValue() instanceof Collection && ((Collection)getWhereParamValue()).contains(SELECT_ALL)) return true; //TODO need check Collection default select all data type other than -1 //String, how about date, or number etc. return false; } COM: <s> whether to include this criterion in search </s>
funcom_train/20728676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableModel getJFreeReportTable(String rapName, int compId) { TranTableToCloseAtEnd = (TransactionTable) buttonGetReportOld(true, rapName, compId); return (TableModel) TranTableToCloseAtEnd; }//}}} //{{{ +getNumGridRows() : int COM: <s> gets the j free report table attribute of the transaction report object </s>
funcom_train/46833390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getjButtonCancel() { if (jButtonCancel == null) { jButtonCancel = new JButton(); jButtonCancel.setBounds(new Rectangle(145, 10, 110, 26)); jButtonCancel.setText(EBIPGFactory.getLANG("EBI_LANG_CANCEL")); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dialogDone(EBIDialogOpenCompanyHistory.this); setVisible(false); dispose(); } }); } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/10482456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(String needle, int position) { // get the last possible match position int last = response.length - needle.length(); // no match possible if (last < position) { return -1; } for (int i = position; i <= last; i++) { if (match(i, needle)) { return i; } } return -1; } COM: <s> search for a string in the response buffer starting from the </s>
funcom_train/27941114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String composeFilename() { final StringBuilder builder = new StringBuilder(128); if (getBeforeComposite() != null) { builder.append(getBeforeComposite().composeFilename()); builder.append(' '); } if (getAfterComposite() != null) { builder.append(getAfterComposite().composeFilename()); } return builder.toString().trim(); } COM: <s> reconstruct the filename that is represented by this composite </s>
funcom_train/19657202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChangeListenerFiringNullChange() { mockRadioCollection = new MockAbstractRadioCollection("test", new String[] { "hi", "hello", "test", "testing" }); mockRadioCollection.addChangeListener(new ChangeListener() { public void onChange(Widget arg0) { // if this was called, we should fail. fail("Change listener should not have been called."); } }); mockRadioCollection.setValue("blah"); mockRadioCollection.setValue("test"); } COM: <s> test to insure that when we change the value that a </s>
funcom_train/41990816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireUpdateEventMessage(ImageEvent evt) { Object[] listeners = listenerList.getListenerList(); for (int i=0; i<listeners.length; i+=2) { if (listeners[i]==ImageEventListener.class) { ((ImageEventListener)listeners[i+1]).receivedImage(evt); } } } COM: <s> handler that dispatches images to all of the listeners </s>
funcom_train/5244522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int choosePlan(ArrayList<ApplicablePlan> aps, Intention inte) { if (trackplanusage) { int currentvalue = 0; int candidate = 0; for (int i = 0; i < aps.size(); i++) { ApplicablePlan p = aps.get(i); if (i == 0) { currentvalue = scoreplan(p); } else { int value = scoreplan(p); if (value > currentvalue) { currentvalue = value; candidate = i; } } } updatePlanUsage(aps.get(candidate)); return candidate; } else { return 0; } } COM: <s> returns the position of a chosen plan in a list of applicable plans </s>
funcom_train/32762852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MachineSnapshot loadChannelSnapshotsInto( final Connection connection, final ChannelSnapshotTable channelSnapshotTable, final MachineSnapshot machineSnapshot ) throws SQLException { final ChannelSnapshot[] snapshots = channelSnapshotTable.fetchChannelSnapshotsForMachineSnapshotID( connection, machineSnapshot.getId() ); machineSnapshot.setChannelSnapshots( snapshots ); return machineSnapshot; } COM: <s> fetch the channel snapshots from the data source and populate the machine snapshot </s>
funcom_train/17680009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void completeOptimisticLocking(ClassMetaData cmd, boolean quiet) { JdbcClass jdbcClass = (JdbcClass)cmd.storeClass; ClassInfo info = getClassInfo(cmd); switch (jdbcClass.optimisticLocking) { case JdbcClass.OPTIMISTIC_LOCKING_VERSION: case JdbcClass.OPTIMISTIC_LOCKING_TIMESTAMP: processTimestampOrRowVersionLocking(jdbcClass, cmd, info.optimisticLockingExt, info.elements, quiet); break; } } COM: <s> finish up optimistic locking for cmd </s>
funcom_train/51763070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image card2image(Card card) { Card.Color color = card.getColor(); Card.Sign sign = card.getSign(); String name = sign + ".gif"; if (color != Card.Color.NONE) name = color + "/" + name; name = "cards/" + name; return ImageCache.getImage(name); } COM: <s> creates the image of a given card </s>
funcom_train/28215590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImplicitTransitionToPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImplicitEvent_implicitTransitionTo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImplicitEvent_implicitTransitionTo_feature", "_UI_ImplicitEvent_type"), StateMachinePackage.Literals.IMPLICIT_EVENT__IMPLICIT_TRANSITION_TO, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the implicit transition to feature </s>
funcom_train/31823550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); TCHAR buffer = new TCHAR (getCodePage (), string, true); int result = OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer); if (result == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED); if (result == OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED); if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer, true); } COM: <s> adds the argument to the end of the receivers list </s>
funcom_train/9201316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected URLPattern matchPattern(String pattern, String httpMethod, URLPatternMatcher matcher) throws Exception { // PERFORMANCE IMPROVEMENT OPPORTUNITY: cahce pattern matches Iterator i = patternList.iterator(); while (i.hasNext()) { URLPattern urlPattern = (URLPattern) i.next(); if (matcher.match(pattern, httpMethod, urlPattern)) { return urlPattern; } } return null; } COM: <s> find a match for the requested pattern method if any </s>
funcom_train/20245018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onActive(boolean active) { if (!this.active || !active) { setStyleName(getElement(), style + CBG_ACTIVE, active); if (colorCalculated) { setColorActive(active); } Accessibility.setState(getElement(), "aria-pressed", active ? "true" : "false"); this.active = active; } } COM: <s> set the button style in active state if code true code or </s>
funcom_train/2904624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findMainClassInJar(String jarPath){ String clazz = null; try{ JarFile jarFile = new JarFile(jarPath); Manifest man = jarFile.getManifest(); Attributes attr = man.getMainAttributes(); if(attr != null){ clazz = attr.getValue("Main-Class"); } jarFile.close(); return clazz; } catch(Exception e){ new JXError(getClass(), "Error reading jar's manifest data", e.getStackTrace()); } return null; } COM: <s> this method find the main class in a jar from a manifest </s>
funcom_train/12628304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeAntTarget(String[] args) throws LauncherException { DefaultLauncher launcher = new DefaultLauncher(args); launcher.addClasspathEntry("projects/scriptlandia-installer/target/scriptlandia-installer.jar"); launcher.addClasspathEntry("projects/antrun/target/antrun.jar"); launcher.setMainClassName("org.sf.scriptlandia.antrun.AntRun"); launcher.configure(Thread.currentThread().getContextClassLoader()); launcher.launch(); } COM: <s> installs required projects </s>
funcom_train/9886948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendMatrices(AlgorithmData data, Element mlist) { NodeList matrices = mlist.getElementsByTagName("matrix"); for(int i = 0; i < matrices.getLength(); i++) { addMatrix(data, (Element)matrices.item(i)); } } COM: <s> appends a matrix to the algorithm data object </s>
funcom_train/5317898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getServiceRequest (JID from, ServiceRequest packet) { System.out.println ("%%% service_rq from " + from); //addUser (packet.getHashedID (), from.getResource ()); if (status.getExportPort () != 0) { conn.sendMessage (from, conn.makeServiceReply (status.getExportProtocol (), status.getExportHost (), status.getExportPort ())); } } COM: <s> a user wants to know our download server information </s>
funcom_train/44623190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putSpecs(ClassSymbol type, TypeSpecs spec) { spec.csymbol = type; specsmap.put(type,spec); if (utils.jmldebug) log.noticeWriter.println("Saving class specs for " + type.flatname + (spec.decl == null ? " (null declaration)": " (non-null declaration)")); } COM: <s> adds the specs for a given type to the database overwriting anything </s>
funcom_train/49637647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String put(String key, String value) { if (key == null) { throw new IllegalArgumentException("Key must not be " + "null"); } if (value == null) { throw new IllegalArgumentException("Value must not be " + "null"); } return super.put(key, value); } COM: <s> override of hash map </s>
funcom_train/47120549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object execute(String methodName, Object[] params) throws MwaConnectionException { try { return getXmlRpcClient().execute(methodName, params); } catch (XmlRpcException e) { throw new MwaConnectionException("methidName:" + methodName + " params:" + Arrays.toString(params), e); } } COM: <s> execute a xml rpc request </s>
funcom_train/1842480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disposeEvent(Event ev) { if (!Main.EVENT_TRACE && !Main.EVENT_LOCATION) { ev.ref = null; ev.args = null; ev.method = null; if (ev.cont != null) { ev.cont.state = null; ev.cont.result = null; ev.cont.exception = null; ev.cont.caller = null; continuationPool.put(ev.cont); ev.cont = null; } eventPool.put(ev); } } COM: <s> dispose event into the event pool and clear any references in the event </s>
funcom_train/23184587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createButtons(Composite box) { this.addButton = createPushButton(box, "Add"); this.modifyButton = createPushButton(box, "Modify"); this.removeButton = createPushButton(box, "Remove"); this.defaultIndexButton = createPushButton(box, "Add Default"); } COM: <s> creates the add remove up and down button in the given button box </s>
funcom_train/49403948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateTags(final SAMRecord record, final long recordNumber) { for (final SAMRecord.SAMTagAndValue tagAndValue : record.getAttributes()) { if (tagAndValue.value instanceof Long) { addError(new SAMValidationError(Type.TAG_VALUE_TOO_LARGE, "Numeric value too large for tag " + tagAndValue.tag, record.getReadName(), recordNumber)); } } } COM: <s> report error if a tag value is a long </s>
funcom_train/37053066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int degree(Object v, EdgeType type) { int degree = 0; if (type.equals(EdgeType.OUT) || type.equals(EdgeType.ALL)) { degree = + ((Set) outEdgeMap.get(v)).size(); } if (type.equals(EdgeType.IN) || type.equals(EdgeType.ALL)) { degree = + ((Set) inEdgeMap.get(v)).size(); } return degree; } COM: <s> returns the number of edges for the object with the given </s>
funcom_train/8627851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit(Session session) throws SQLException { if (database == null || readOnly) { return; } synchronized (database) { if (pageStore != null) { pageStore.commit(session); session.setAllCommitted(); } if (closed) { return; } currentLog.commit(session); session.setAllCommitted(); } } COM: <s> commit the current transaction of the given session </s>
funcom_train/28494762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String iValue(Node ast) { ProgressLogger.getInstance().debug("Enter iValue(Node)"); // processing attr // expression may be complex // what if variable wasn't found? String expr = getAttr(ast, "expr"); // System.out.print("%%%%% iValue: "); ProgressLogger.getInstance().debug("Exit iValue(Node)"); return Variables.resolveExpr(expr); } COM: <s> implementation of the value element </s>
funcom_train/5508467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compile() throws IOException { ByteArrayOutputStream err = new ByteArrayOutputStream(); sun.tools.javac.Main compiler = new sun.tools.javac.Main(err, "javac"); boolean result = compiler.compile(toStringArray(fillArguments(new ArrayList()))); this.errors = new ByteArrayInputStream(err.toByteArray()); return result; } COM: <s> compile a source file yielding a loadable class file </s>
funcom_train/27785783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newTransaction() { JDesktopPane desktop = nz.org.venice.ui.DesktopManager.getDesktop(); TransactionDialog dialog = new TransactionDialog(desktop, portfolio); // Update portfolio displayed if the user entered a new transaction if(dialog.newTransaction()) { redraw(); if(historyFrame != null && !historyFrame.isClosed()) historyModule.redraw(); } } COM: <s> open a new transaction dialog to allow the user to enter a new </s>