__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16469757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTabs(Tab[] tabs) { SettingsTabbedPane tabbedPane = new SettingsTabbedPane(); for (Tab tab : tabs) { tabbedPane.addTab(tab.getName(), tab); } JSplitPane splitPane = this.getViewComponent().getMainSplitPane(); splitPane.setLastDividerLocation(splitPane.getDividerLocation()); splitPane.setRightComponent(tabbedPane); splitPane.setDividerLocation(splitPane.getLastDividerLocation()); } COM: <s> creates a new code tabbed pane code and adds each given </s>
funcom_train/28429477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { // Called from StandardContext.init() if (log.isDebugEnabled()) log.debug(sm.getString("contextConfig.init")); context.setConfigured(false); ok = true; contextConfig(); try { fixDocBase(); } catch (IOException e) { log.error(sm.getString("contextConfig.fixDocBase"), e); } } COM: <s> process a init event for this context </s>
funcom_train/42473967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsIntegerDigits(){ logger.debug("TestStringUtil.java - testIsIntegerDigits"); try{ assertTrue(StringUtil.isInteger("90980938")); } catch (Exception e){ // If anything else is thrown then we have an error aswell. assertFalse(true); } } COM: <s> this method tests that just digits as parameter will return true </s>
funcom_train/18739651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CtrlTransition nextCall(boolean matchFound) { CtrlTransition result; CtrlSchedule schedule = this.state.getSchedule(); if (schedule.isFinished()) { result = null; } else { this.state.setSchedule(schedule = schedule.next(matchFound)); if (schedule.isFinished()) { result = null; } else { result = schedule.getTransition(); } } return result; } COM: <s> increments the rule iterator and returns the next rule </s>
funcom_train/14365671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateChartData() { // Get the up-to-date data sets. Couple<DataSet, DataSet> dataSets = getDataSets(); _chart.updateBaseDataSet(dataSets.getKey()); _chart.updateOrthogonalDataSet(dataSets.getValue()); markDirty(); } COM: <s> update the chart according to data changes </s>
funcom_train/6439674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCcmVersionOK() { int versionInfo[] = ccmCmds.getVersion(); if (versionInfo[0] == -1) { ccmDialogs.showMsgCMNotFound(); return false; } if (versionInfo[0] < 5) { ccmDialogs.showMsgCMUnsupported(versionInfo[0] + "." + versionInfo[1]); stopCM(); return false; } return true; } COM: <s> check to make sure that the current version of cm is supported </s>
funcom_train/47140450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedItem (Object oSelectedItem) { // make sure our model is up to date ((ListenerHelper) listenerList).needModelUpdate(); if (m_lUsers.contains (oSelectedItem)) { m_usrSelection = (User) oSelectedItem; fireContentsChanged (this, 0, m_lUsers.size() - 1); } } COM: <s> set the currently selected user making sure that it is known to the </s>
funcom_train/7876234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setShowingYear(int year) { showingyear = year; for (int i = 0; i < months.length; i++) { cal.setTime(months[i].getMonth()); cal.set(Calendar.YEAR, year); months[i].setMonth(cal.getTime()); } refreshSelection(); } COM: <s> sets the year shown </s>
funcom_train/42660281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireOnAfterClearEvent() { if (this.onAfterClearEvent != null) { ActionEventAfter_1x0<Table<R,C,V>> actionBefore = new ActionEventAfter_1x0<Table<R,C,V>>(this, 0, CM_BEFORE_CLEAR, this); this.onAfterClearEvent.fire(actionBefore); } } COM: <s> fires on after clear event </s>
funcom_train/45255501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getObjectContributors(Class objectClass) { List objectList = null; // Lookup the results in the cache first. if (objectLookup != null) { objectList = (List) objectLookup.get(objectClass); } if (objectList == null) { objectList = addContributorsFor(objectClass); if (objectList.size() == 0) { objectList = Collections.EMPTY_LIST; } else { objectList = Collections.unmodifiableList(objectList); } cacheObjectLookup(objectClass, objectList); } return objectList; } COM: <s> returns the contributions for the given class </s>
funcom_train/45696890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override protected void startup() { CharLibManagerView view = new CharLibManagerView(this); try { Manager.boundView(view); Manager.loadCurrLib(); } catch (Exception ex) { JOptionPane.showMessageDialog(view.getComponent(), ex.getMessage()); } show(view); } COM: <s> at startup create and show the main frame of the application </s>
funcom_train/4748063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEJBQL( final Class<?> entity ) { // Create a new string instance String result = String.valueOf( ListEntitySearchByAttribute.TEMPLATE_EJBQL_STRING ); // Replace template keys with values result = result.replaceAll("%entityParameter", entity.getSimpleName(). toLowerCase()); result = result.replaceAll("%entity", entity.getSimpleName()); return result; } COM: <s> will return a parsed template string for ejbql query usage </s>
funcom_train/47983016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleLocationCallback(String jid, Location geoloc) { // if (isMember(jid)) { Intent i = new Intent( Const.INTENT_PREFIX + "location"); i.putExtra(Const.INTENT_PREFIX + "location.jid", jid); i.putExtra(Const.INTENT_PREFIX + "location.location", geoloc); SessionService.getInstance().getContext().sendBroadcast(i); // } } COM: <s> sends a location changed intent to the upper layer if the supplied jid </s>
funcom_train/18103840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDayOffset() { Date save = calendar.getTime(); calendar.set(Calendar.DATE, 1); dayOffset = calendar.get(Calendar.DAY_OF_WEEK); if (Resource.getFirstDayOfWeek() != Calendar.SUNDAY) { dayOffset = (dayOffset == 1) ? 7 : (dayOffset - 1); } calendar.setTime(save); } COM: <s> set the day offset </s>
funcom_train/41720962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateColorGrid() { clearColorGridMap(); for (BlockShape shape : getShapes()) { ArrayList<ModelColor> incorrectlyAllocatedColors = new ArrayList<ModelColor>(); shape.updateColorGrid(this, 0, 0, true, incorrectlyAllocatedColors, true, null); } } COM: <s> recomputes the color grid that maintains what tiles and their local color correctness </s>
funcom_train/38868380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testParseYear() { // Too low String grpdata="AA19750820322000800 "; sao.setGrpData(grpdata); int Nerror=sao.parseGrp(); Assert.assertEquals(1, Nerror); // Too high grpdata="AA20200820322000800 "; sao.setGrpData(grpdata); Assert.assertEquals(1, sao.parseGrp()); } COM: <s> test parse grp for sao group 3 year exceptions </s>
funcom_train/9937805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initUI() { //1.Setup the toolbar toolbarTools = new javax.swing.JToolBar(JToolBar.VERTICAL); toolsButtonGroup = new javax.swing.ButtonGroup(); //2.Load the map tools to be displayed initToolSelectionActions(); //3.Load the user actions to be displayed initUserActions(); //4.Add the toolbar to the panel add(toolbarTools, BorderLayout.WEST); } COM: <s> creates the various ui components like buttons </s>
funcom_train/9489956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawCircle(double x, double y, double R){ initMatrix(); drawCircleArcDashedOrNot((float) x, (float) y, (float) R, 0, 2f * (float) Math.PI, dash!=0); resetMatrix(); } COM: <s> draw a circle with center x y and radius r </s>
funcom_train/15742356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProjectsCount() { WorkbenchContentProvider contentProvider = (WorkbenchContentProvider) this.viewer .getContentProvider(); Object[] objects = contentProvider .getElements(((TreeViewer) this.viewer).getInput()); return ArrayUtils.getAdaptableObjects(objects, IProject.class, Platform.getAdapterManager()).size(); } COM: <s> returns the displayed </s>
funcom_train/13712402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printSliders(){ if(sliders.size() > 0){ System.out.println("\n<<< available "+name+" sliders: >>>\n"); for (int i = 0; i < sliders.size(); i++){ System.out.print(" "+i+": "); System.out.println(((ControllInput) sliders.get(i)).getName()); } System.out.println("\n<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); } } COM: <s> lists the available slider of a device in the console window </s>
funcom_train/947635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStemOnly() { System.out.println("testStemOnly"); Filename fn = new Filename("dummy.java"); assertEquals(false, fn.StemOnly()); fn = null; fn = new Filename("dummy"); assertEquals(true, fn.StemOnly()); } COM: <s> test of stem only method of class org </s>
funcom_train/37241070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMetre(double timeSig) { System.out.print("Time Sig ="); System.out.println(timeSig); System.out.print("Numerator ="); System.out.println(phrase.getNumerator()); System.out.print("Denominator ="); System.out.println(phrase.getDenominator()); this.metre = timeSig; } COM: <s> sets the current metre for this stave instance </s>
funcom_train/8632151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelRowUpdates() throws SQLException { try { debugCodeCall("cancelRowUpdates"); checkClosed(); if (insertRow != null) { throw Message.getSQLException(ErrorCode.NO_DATA_AVAILABLE); } updateRow = null; } catch (Exception e) { throw logAndConvert(e); } } COM: <s> cancels updating a row </s>
funcom_train/33980007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean extractBoolean( String result ) throws FacebookException { if ( "json".equals( responseFormat ) ) { Object out = JsonHelper.parseCallResult( result ); if ( out instanceof Boolean ) { return (Boolean) out; } return Boolean.parseBoolean( String.valueOf( out ) ); } else { return XmlHelper.extractBoolean( XmlHelper.parseCallResult( result, factory ) ); } } COM: <s> extracts a boolean from a result that consists of a boolean only </s>
funcom_train/21952042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configureListener(String key, String property, String propertyBase, String editorTemplate, PropertyEditorManager pManager) { String parentProp = pManager.getProperty(key + ".listProperty", ""); if (parentProp.length() > 0) { if (parentProp.startsWith(".")) { parentProperty=propertyBase + parentProp; } else { parentProperty=parentProp; } } manager = pManager; } COM: <s> configures this filter from the given key </s>
funcom_train/21325660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyIndividual(Individual srcInd) { this.genome = new Vector<Chromosome>(); for (int i = 0; i < srcInd.genome.size(); i++) { Chromosome temp = new Chromosome(srcInd.genome.elementAt(i)); genome.addElement(temp); } this.fitness = srcInd.fitness; this.fitnessRank = srcInd.fitnessRank; } COM: <s> function to copy the genome fitness rank from the input individual </s>
funcom_train/8629874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void throttle() { if (throttle == 0) { return; } long time = System.currentTimeMillis(); if (lastThrottle + Constants.THROTTLE_DELAY > time) { return; } lastThrottle = time + throttle; try { Thread.sleep(throttle); } catch (Exception e) { // ignore } } COM: <s> wait for some time if this session is throttled slowed down </s>
funcom_train/37797322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void exitForm() { try { if (captureFile != null) { captureFile.flush(); captureFile.close(); } if (con != null) { con.close(); } } catch (Exception e) { e.printStackTrace(System.err); } System.exit(0); } COM: <s> exit the application </s>
funcom_train/22032790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(ColorChangeEvent e) { Vector cl = null; synchronized (listeners) { cl = (Vector) listeners.clone(); } for (int i = 0; i < cl.size(); i++) { ColorChangeListener c = (ColorChangeListener) cl.elementAt(i); c.colorChanged(e); } } COM: <s> notify the color change listerers that the color widget has changed </s>
funcom_train/45598809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearDatabase() { // clear executed scripts, also makes sure that the scripts table exists executedScriptInfoSource.clearAllExecutedScripts(); // Referential constraints are removed before clearing the database, to be sure there will be no conflicts when dropping tables constraintsDisabler.disableReferentialConstraints(); for (Database database : databases.getDatabases()) { if (database == null) { continue; } clearDatabase(database); } } COM: <s> clears the database schemas </s>
funcom_train/4811789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeFile(String filename) { try { Source source = new DOMSource(document); File file = new File(filename); Result result = new StreamResult(file); Transformer xformer = TransformerFactory.newInstance().newTransformer(); xformer.transform(source, result); } catch (TransformerException ex) { Logger.getLogger("syncd").log(Level.SEVERE, ex.getLocalizedMessage()); } } COM: <s> saves the xml file </s>
funcom_train/3594966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object rowKey, Object columnKey, Object value) { Map column = (Map)rows.get(rowKey); if (column == null) { //System.out.println("new row: " + rowKey); //System.out.println("existing data: " + rows); column = new HashMap(); rows.put(rowKey,column); } Object result = column.put(columnKey, value); allColumnKeys.add(columnKey); return result; } COM: <s> add a value to the map2 d for the given two keys </s>
funcom_train/27762026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void returnConnection(GenericConnection conn) { Debug.getDebug().debug(getClass().getName() + " releaseConnection(), activeCount" + activeCount + ", useCount" + (useCount - 1)); synchronized (connections) { connections.addLast(conn); useCount--; } } COM: <s> return this connection to the available connection pool </s>
funcom_train/41471495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { addPrefix(); while (!stopped && scanner.hasNextLine()) { String line = scanner.nextLine(); if (this.consoleListener != null) { this.consoleListener.commandEntered(line); } if (!this.stopped) { addPrefix(); } } } COM: <s> starts this console </s>
funcom_train/13473714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode() throws BackingStoreException { // Check if it is a root node if (parent == null) throw new UnsupportedOperationException("Cannot remove root node"); synchronized(parent) { synchronized(this) { if (isRemoved()) throw new IllegalStateException("Node Removed"); purge(); } parent.childCache.remove(name); } } COM: <s> removes this and all subnodes from the backing store and clears all </s>
funcom_train/44216606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedToParent() { DefaultMutableTreeNode selectedNode = getSelectedNode(); DefaultMutableTreeNode selectedParent = (DefaultMutableTreeNode)(selectedNode.getParent()); if(selectedParent != null) { setSelectionPath(new TreePath(selectedParent.getPath())); } } COM: <s> set selected element to be the parent of the currently selected node </s>
funcom_train/2561853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContainedInPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Publication_ContainedIn_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Publication_ContainedIn_feature", "_UI_Publication_type"), PublicationsPackage.Literals.PUBLICATION__CONTAINED_IN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the contained in feature </s>
funcom_train/39319340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { m_status.setText("Starting up..."); m_frame.setVisible(true); m_status.setText("Querying..."); //m_refresh_button.setEnabled(false); m_browser.queryAll(); updateHostsList(); m_refresh_button.setEnabled(true); } COM: <s> runs the actual browser </s>
funcom_train/3885125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCatalogPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_catalog_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_catalog_feature", "_UI_DocumentRoot_type"), ImsmdRootv1p2p1Package.Literals.DOCUMENT_ROOT__CATALOG, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the catalog feature </s>
funcom_train/20078984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void analyseBranching() { Iterator<VmCommand> it = _vmCommands.listIterator(0); while (it.hasNext()) { VmCommand cmd = it.next(); if (cmd instanceof JackFunctionCommand) { addFunction((JackFunctionCommand)cmd); } else if (cmd instanceof JackCallCommand) { addCall((JackCallCommand)cmd); } else if (cmd instanceof VmLabelCommand) { addLabel((VmLabelCommand)cmd); } else if (cmd instanceof VmGotoCommand) { addGoto((VmGotoCommand)cmd); } } } COM: <s> collect data of the branching structure in the program </s>
funcom_train/50697785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getHottestTopics(int count, int daysBack) { ArrayList list = new ArrayList(); try { list = (ArrayList) categoryDAO.getHottestTopics(count, daysBack); } catch (HibernateException e) { LOGGER.warning(e.toString()); } catch (SQLException e) { LOGGER.warning(e.toString()); } return list; } COM: <s> return a set of hottest topics for all categories </s>
funcom_train/22890591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeListener(Component c ) { if (c == null) { return; } c.removeMouseListener(mouseListener); if (!(c instanceof Container)) { return; } Container container = (Container) c; container.removeContainerListener(this); Component[] children = container.getComponents(); if (children != null || children.length > 0) { for (int i=0;i<children.length;i++) { removeListener(children[i]); } } } COM: <s> removes the mouselistener from this component as well as its children </s>
funcom_train/45622913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWildcardsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VjsResGenType_wildcards_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VjsResGenType_wildcards_feature", "_UI_VjsResGenType_type"), MSBPackage.eINSTANCE.getVjsResGenType_Wildcards(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the wildcards feature </s>
funcom_train/51358947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(java.awt.Graphics g, int tileWidth, int tileHeight) { if (theDrawingInfo != null) theDrawingInfo.draw(g, tileWidth, tileHeight); // Don't synchronize the whole method; drawing could take a while, // and the wait in refresh might want to acquire the monitor on a // timeout. doRefreshNotification(); } COM: <s> display the most recent frame data </s>
funcom_train/7440256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeNoCatch() throws ServletRequestBindingException { if (getBindingResult().hasErrors()) { throw new ServletRequestBindingException("Errors binding onto object '" + getBindingResult().getObjectName() + "'", new BindException( getBindingResult())); } } COM: <s> treats errors as fatal </s>
funcom_train/18351821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean childCountCheck(QueryGraph graph) { boolean valid = true; Iterator nodes = graph.nodes().iterator(); while (nodes.hasNext()) { CapNode node = (CapNode) nodes.next(); if ((node instanceof AndQueryComponent) || (node instanceof OrQueryComponent)) { if (graph.children(node).size() != 2) { valid = false; message = "AND and OR components must have 2 children"; break; } } } return valid; } COM: <s> and and or components must have two children </s>
funcom_train/10252327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Grantee addRole(HsqlName name) { if (map.containsKey(name.name)) { throw Error.error(ErrorCode.X_28503, name.name); } Grantee g = new Grantee(name, this); g.isRole = true; map.put(name.name, g); roleMap.add(name.name, g); return g; } COM: <s> creates a new role object under management of this object </s>
funcom_train/5768541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void undoMove() { history.removeLastMove(); showMessage("Last move reversed."); // Take back two moves if playing against AI: if (((!isWhiteTurn() && blackPlayer == COMPUTER) || (isWhiteTurn() && whitePlayer == COMPUTER)) && history.getFullMoveNumber() > 0) { history.removeLastMove(); } gameIsFinished = false; prepareMove(); } COM: <s> takes back the last move </s>
funcom_train/27845805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFromProperty(Object inValue, boolean inReadOnly) { if (LOG.isDebugEnabled()) { LOG.debug("updateFromProperty: " + inValue + ", " + inReadOnly); } if (inValue == null) { if(!isSelectionEmpty()){ clearSelection(); return; } } updateFromObject(inValue); } COM: <s> incoming value is null an object or a java </s>
funcom_train/44773194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void htransform(double v[], double nv[], int nvert) { for(int i = nvert*4; (i -= 4) >= 0; ) { double x = v[i]; double y = v[i+1]; double z = v[i+2]; double w = v[i+3]; for(int j = 0; j < DIM; j++) nv[i+j] = x*T[0+j] + y*T[4+j] + z*T[8+j] + w*T[12+j]; } } COM: <s> transform nvert homogeneous 4 component points from v into nv </s>
funcom_train/47287461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMagFilter(int mag_filter){ this.mag_filter= mag_filter; bindColorTexture(); gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, mag_filter); bindDepthTexture(); gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, mag_filter); unbind(); } COM: <s> returns the texture magnification function </s>
funcom_train/7295377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharacterIterator getText() { // The iterator is initialized pointing to no text at all, so if this // function is called while we're in that state, we have to fudge an // an iterator to return. if (text == null) { text = new StringCharacterIterator(""); } return text; } COM: <s> return a character iterator over the text being analyzed </s>
funcom_train/14092988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTreePathRoot() { JTree tree = this.createTree(); m_pathData = new PathData(new String[] {"TreeDemo"}); TreePath actualReturn = m_pathData.getTreePath(tree); assertTrue(actualReturn.getPathCount() == 1); } COM: <s> test getting the root element </s>
funcom_train/3925752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field getInterfaceDeclaration( String fieldName ) { if ( protoInterface == null ) { return( null ); } int interfaceSize = protoInterface.size(); for ( int i = 0; i < interfaceSize; i++ ) { Field testField = (Field)protoInterface.elementAt( i ); if ( testField.getFieldId().compareTo( fieldName ) == 0 ) { return( testField ); } } return( null ); } COM: <s> get the interface declaration based on the name of the field </s>
funcom_train/18571592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatusOnFiles(boolean resetThreads) { if (resetThreads) { ThreadStatusManager.getInstance().deleteAll(); } newsFileDAO.updateDownloadingStatus(); for (Nzb col : nzbDAO.findByStatus(NzbStatus.NOT_DOWNLOADED, NzbStatus.PAUSE)) { switch (col.getStatus()) { case NOT_DOWNLOADED: newsFileDAO.setStatus(col.getId(), NewsfileStatus.NOT_DOWNLOADED); break; case PAUSE: newsFileDAO.setStatus(col.getId(), NewsfileStatus.PAUSE); break; } } } COM: <s> resets the file status in the database </s>
funcom_train/49410946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long count(String setSpec) throws Exception { if (setSpec == null) return this.idxSet.size(); long count = 0; Iterator i = idxSet.iterator(); while (i!=null) { IndexItem item = (IndexItem) i.next(); if (item.getSetSpecs().contains(setSpec)) count++; } return count; } COM: <s> returns the number of index item records associated with the specified </s>
funcom_train/43268974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IConcept getConcept() { if (concept == null) { try { concept = (Concept) ConceptDAO.getInstance().findByPK(getConceptId() + ""); } catch (DAOException e) { if (log.isErrorEnabled()) { log.error( "Failed to retrieve the Concept for a " + "ConceptDelegate.", e); } } } return concept; } COM: <s> gets the concept attribute of the concept delegate object </s>
funcom_train/18846878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createTimerSpecNotFoundException(String tscToken, String timerID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80252"; propertyMap.addPropertyValuePair("timerID", timerID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct timer spec not found exception message </s>
funcom_train/38994167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFinite(){ for(int i = 0; i < this.getXDimension(); i++) for(int j = 0; j < this.getYDimension(); j++) if(Double.isInfinite(this.getEntry(i, j).doubleValue()) || Double.isNaN(this.getEntry(i, j).doubleValue())) return false; return true; } COM: <s> checks whether each entry in this matrix describes a finite number </s>
funcom_train/11736910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPropertyConvertValue() throws RepositoryException { Node content = testRootNode.addNode("jcr:content", "nt:resource"); content.setProperty("jcr:lastModified", Calendar.getInstance()); content.setProperty("jcr:mimeType", "text/plain"); content.setProperty("jcr:data", "Hello"); superuser.save(); } COM: <s> test case for jcr 2336 </s>
funcom_train/39958449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(String key) { String retVal = null; if (textResources.containsKey(key)) { return textResources.get(key); } else { try { retVal = translations.getString(key); } catch (MissingResourceException mre) { // Do nothing, the translations are only partial at the moment } } if (retVal == null) { LOGGER.warning("Invalid text resource key: " + key); } return retVal; } COM: <s> gets a text asset from this text resource repository </s>
funcom_train/10181240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getModelsByMake(String make) { List l = new ArrayList(); for (Iterator iter = cars.iterator(); iter.hasNext();) { Car car = (Car) iter.next(); if (car.getMake().equalsIgnoreCase(make)) { l.add(car); } } return l; } COM: <s> get all models for a particular car maker </s>
funcom_train/37389473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genCode(GenerationContext context) { CodeSequence code = context.getCodeSequence(); code.setLineNumber(getTokenReference().getLine()); for (int i = 0; i < statements.length; i++) { statements[i].genCode(context); } if (implicitReturn != null) { implicitReturn.genCode(context); } } COM: <s> generates a sequence of bytescodes </s>
funcom_train/35562289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void runCurrentIndexTestMethod() { rpcService.runTest( methodItems.get(currentIndex), config.isCpumsEnabled(), config.isApimsEnabled(), config.isLogHookEnabled(), config.getLogHookTimezone(), this); } COM: <s> runs the test that is the current index of the method items </s>
funcom_train/40686176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapRemoveMapTypeHandler(final MapRemoveMapTypeHandler handler) { maybeInitMapRemoveMapTypeEvent(); mapRemoveMapTypeHandlers.addHandler(handler, new MapTypeCallback() { @Override public void callback(MapType type) { MapRemoveMapTypeEvent e = new MapRemoveMapTypeEvent(MapWidget.this, type); handler.onRemoveMapType(e); } }); } COM: <s> this event is fired when a map type is removed from the map </s>
funcom_train/49756879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void upbWarn(String theMessage) { synchronized(messageBuffer) { messageBuffer.setLength(0); messageBuffer.append(dateTimeFormatter.format(new Date())); messageBuffer.append(" Warning "); messageBuffer.append(theMessage); System.out.println(messageBuffer); } } COM: <s> internal to upb4 java warning logging primative </s>
funcom_train/28544568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Annotation getOptionalSingleAnn(String aBindingKey) { Annotation result = null; AnnotationSet annSet = getOptionalAS(aBindingKey); if (annSet != null) { if (annSet.size() != 1) { throw new RuntimeException( "Optional annotation " + aBindingKey + " is present, however, expecting a single annotation but " + annSet.size() + " values found."); } result = annSet.iterator().next(); assert result != null; } return result; } COM: <s> returns an optional single annotation from the annotation set bound to </s>
funcom_train/3275617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Move getFinalMove (boolean trueMainLine) { Move walker = null; if (trueMainLine) walker = head.get(0); else walker = currMove; while (walker != null && !walker.getContinuationList().isTerminal()) walker = walker.getContinuationList().getMainLine(); return walker; } COM: <s> returns the final move played on the main line or the current line </s>
funcom_train/29793075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToGraph(ClassDoc cd) { // avoid adding twice the same class, but don't rely on cg.getClassInfo // since there // are other ways to add a classInfor than printing the class if (visited.contains(cd.toString())) return; visited.add(cd.toString()); cg.printClass(cd, false); cg.printRelations(cd); if (opt.inferRelationships) { cg.printInferredRelations(cd); } if (opt.inferDependencies) { cg.printInferredDependencies(cd); } } COM: <s> adds the specified class to the internal class graph along with its </s>
funcom_train/18756185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(Component c) { Component[] components = getComponents(); Component selectedComponent = null; for (int i = 0; i < components.length; i++) { if (components[i] == c) { selectedComponent = components[i]; break; } } if (selectedComponent == null) { // Account for More menu moreMenu.setSelected(c); } else { // do something intelligent // This is a place where the difference between // JPopupMenu and JMenu makes things a little difficult setSelected(true); } } COM: <s> override of the jmenu set selected includes a </s>
funcom_train/42464372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getDir(int type) { switch (type) { case BASE: return baseDir; case MAIL: return mailBaseDir; /* case INBOX: return inboxDir; case SENT: return sentDir; case DRAFTS: return draftsDir; */ case CONTACT: return contactsDir; case APPOINTMENT: return appointmentDir; case TASK: return taskDir; case ATTACHMENT: return attachmentDir; case TEMP: return tempDir; default: return ""; } } COM: <s> get the full path for a specific type </s>
funcom_train/3529155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFragment(String fragment) throws URIException { if (fragment == null || fragment.length() == 0) { _fragment = (fragment == null) ? null : fragment.toCharArray(); return; } _fragment = encode(fragment, allowed_fragment); setURI(); } COM: <s> set the fragment </s>
funcom_train/37228990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { if( (vComponents == null || vComponents.size() == 0) ) return 0; int iCount = 0; Iterator i = vComponents.iterator(); while( i.hasNext() ) { HL7Element e = (HL7Element)i.next(); iCount += e.size(); } return iCount; } COM: <s> how many components are in this element br br </s>
funcom_train/10908232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBreakBefore() { int breakBefore = Constants.EN_AUTO; for (Iterator iter = gridUnits.iterator(); iter.hasNext();) { GridUnit gu = (GridUnit) iter.next(); if (gu.isPrimary()) { breakBefore = BreakUtil.compareBreakClasses(breakBefore, gu.getPrimary().getBreakBefore()); } } return breakBefore; } COM: <s> returns the break class for this row </s>
funcom_train/4920250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFailGetSupplierSourceSpecification() { final Error failure = new Error("specification failure"); // Record failure to instantiate this.record_issue("Failed to obtain SupplierSourceSpecification from " + MockSupplierSource.class.getName(), failure); // Attempt to obtain specification MockSupplierSource.specificationFailure = failure; this.replayMockObjects(); this.loadSpecification(false); this.verifyMockObjects(); } COM: <s> ensures issue if failure in obtaining the </s>
funcom_train/33407325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { jButton1 = new JButton(); jButton1.setName("jButton1"); jButton1.setText("Checar"); jButton1.setEnabled(false); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { grFingerJavaSample.alta(); } }); return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/26411531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBackgroundColorFor(Date date, ColorPreferencesBean colorPreferences) { String color = colorPreferences.getFailedAuditColor(); AuditRecord record = (AuditRecord)auditRecordMap.get(date); if (record.isPassingAudit()) color = colorPreferences.getPassedAuditColor(); return color; } COM: <s> get the displayable background color for the given audit record </s>
funcom_train/2615318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LinkedList getDisksBetween(int x, int y, int tx, int ty, int directionX, int directionY) { LinkedList newDisks = new LinkedList(); int diskX = x; int diskY = y; do{ diskX += directionX; diskY += directionY; newDisks.add(new Point(diskX,diskY)); }while(diskX != tx || diskY != ty); return newDisks; } COM: <s> lists the positions that are between to points </s>
funcom_train/28756189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPmols(String newVal) { if ((newVal != null && this.pmols != null && (newVal.compareTo(this.pmols) == 0)) || (newVal == null && this.pmols == null && pmols_is_initialized)) { return; } this.pmols = newVal; pmols_is_modified = true; pmols_is_initialized = true; } COM: <s> setter method for pmols </s>
funcom_train/2676993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compress() { ByteBuffer tmp = ByteBuffer.allocate(0); tmp.setAutoExpand(true); DeflaterOutputStream deflater = new DeflaterOutputStream(tmp.asOutputStream(), new Deflater(Deflater.BEST_COMPRESSION)); byte[] tmpData = new byte[data.limit()]; data.position(0); data.get(tmpData); try { deflater.write(tmpData); deflater.finish(); } catch (IOException e) { tmp.release(); throw new RuntimeException("could not compress data", e); } data.release(); data = tmp; data.flip(); prepareIO(); } COM: <s> compress contents using zlib </s>
funcom_train/1147358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|64-getter|0|64-preInit // write pre-init user code here okCommand = new Command("Ok", Command.EXIT, 0);//GEN-LINE:|64-getter|1|64-postInit // write post-init user code here }//GEN-BEGIN:|64-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/1559734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToHistory(String str) { // exit if the new string is the same as the last entered string if(!history.isEmpty() && str.equals(history.get(history.size()-1))) return; history.add(str); historyIndex = history.size(); if(historyPopup != null && !isBorderButtonVisible(1)) setBorderButtonVisible(1, true); } COM: <s> adds string to input textfields history </s>
funcom_train/24492868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addReply(String author, String text, Calendar creationDate) { if (currentDisplay == COMMENT_DETAIL) { ((CommentDetail) currentParent).addReply(author, text, creationDate); //save the current comment in order to save the reply creation time ((CommentDetail) currentParent).partClosedOrDeactivated(this); } } COM: <s> add reply if and only if the comment detail part is opened </s>
funcom_train/9018818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getHeight(Canvas g2) { double result = 0.0; if (this.markers.size() > 0) { Paint p = new Paint(Paint.ANTI_ALIAS_FLAG); p.setTextSize(font.getSize()); Rectangle2D rec = TextUtilities.getTextBounds("123g", p); result = this.topOuterGap + this.topInnerGap + rec.getHeight() + this.bottomInnerGap + this.bottomOuterGap; } return result; } COM: <s> returns the height of the band </s>
funcom_train/28104643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String opAsString(DriverOperation dop) { if(dop == null) { throw new Error("PluginDriverListener: Null pointer in opAsString"); } String ret = dop.getMethodName(); ret = ret + fieldSeperator + dop.getType(); ret = ret + fieldSeperator + dop.getTargetGSH(); ret = ret + fieldSeperator + dop.getReference(); ret = ret + fieldSeperator + arrayAsString(dop.getParameters()); return ret; } COM: <s> encodes an operation into a string </s>
funcom_train/3414833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWaitQueueLength(Condition condition) { if (condition == null) throw new NullPointerException(); if (!(condition instanceof AbstractQueuedSynchronizer.ConditionObject)) throw new IllegalArgumentException("not owner"); return sync.getWaitQueueLength((AbstractQueuedSynchronizer.ConditionObject)condition); } COM: <s> returns an estimate of the number of threads waiting on the </s>
funcom_train/26395042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig servletconfig) throws ServletException { super.init(servletconfig); this.statusFile = getInitParameter(servletconfig, CURRENT_BUILD_STATUS_FILE); this.singleProject = getInitParameter(servletconfig, SINGLE_PROJECT); this.logDirPath = getInitParameter(servletconfig, LOG_DIR); this.logDir = new File(logDirPath); } COM: <s> set up the servlet mainly getting the required parameters </s>
funcom_train/36737174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatement(Object[] params) { String rawStatement = getStatement(); String outputStatement = null; if(params != null && params.length == 0) { outputStatement = rawStatement; } else { outputStatement = BasicTemplater.template(rawStatement, params); } return outputStatement; } COM: <s> this method assumes that the given statement has placeholders defined </s>
funcom_train/4139826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeTypeFrags (Map<Element, List<Fragment>> map, FragmentType type) { Iterator<Element> mit = map.keySet().iterator(); while (mit.hasNext()) { Element e = mit.next(); List<Fragment> frags = map.get(e); Iterator<Fragment> it = frags.iterator(); while (it.hasNext()) { Fragment f = it.next(); if (f.getType().equals(type)) { it.remove();//frags.remove(f); } } } } COM: <s> remove all fragments that belong to the type type </s>
funcom_train/50118791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(living l) { if(is_property_set("water") || is_property_set("underwater")) { if(l.query_not_wet()) { l.set_wet(l.WET_DURATION); l.tell("You get wet."); } } } COM: <s> this function is called when the living enters the room </s>
funcom_train/50053731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedObject(HierarchicalObject selectedObject) { this.selectedObject = selectedObject; translateField.removeInputChangedListener(this); scaleField.removeInputChangedListener(this); rotateField.removeInputChangedListener(this); translateField.setValue(selectedObject.getTranslate()); scaleField.setValue(selectedObject.getScale()); rotateField.setValue(selectedObject.getRotation()); translateField.addInputChangedListener(this); scaleField.addInputChangedListener(this); rotateField.addInputChangedListener(this); } COM: <s> sets the selected object for configuring its transformation </s>
funcom_train/20264632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class Version extends abc.aspectj.Version { public String name() { return "clara(abc+ja+eaj+da)"; } @Override public int major() { return 1; } @Override public int minor() { return 0; } @Override public int patch_level() { return 0; } @Override public String prerelease() { return ""; } } COM: <s> version information for eaj extension </s>
funcom_train/13805162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseServiceElement(Element ele,int position) throws Exception { String abstractionName = ele.getAttribute("abstraction"); String className = ele.getAttribute(CLASS); System.out.println("> abstractionName = "+abstractionName); System.out.println("> className = "+className); AbstractBeanDefinition bd = BeanDefinitionReaderUtils.createBeanDefinition( className, null, null, null, getBeanDefinitionReader().getBeanClassLoader()); registerBean(SERVICE+position,bd); } COM: <s> this method creates the configuration of a service and registers </s>
funcom_train/17025582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(BaseElement child) { if(child instanceof Lane) { this.getChildLaneSet(true).getLanes().add((Lane) child); ((Lane) child).setLaneSet(this.getChildLaneSet(true)); } else if (!(child instanceof Edge)) { this.getFlowNodeRef().add((FlowNode) child); } } COM: <s> adds the child to the lanes flow elements if possible </s>
funcom_train/5855615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method getMethod(String name, String descriptor) { if (!linked) { throw new IllegalStateException("Not linked"); } Method result = (Method) getMember(methods, name, descriptor); if (result == null) { result = getInterfaceMethod(name, descriptor); } if (result == null && superType != null) { result = superType.getMethod(name, descriptor); } return result; } COM: <s> return the method matching the given name and descriptor </s>
funcom_train/2881311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MBeanServer findLocalMBeanServer(Reference address) throws AgentNotFoundException { try { address.setEager(true); SFJMXAgentImpl agent = (SFJMXAgentImpl) sfResolve(address); return agent.getMBeanServer(); // Get the MBeanServer itself } catch (Exception e) { throw new AgentNotFoundException(address, nameRef, "No local JMX Agent found", e.toString()); } } COM: <s> this method returns the mbean server of a deployed local instance of the </s>
funcom_train/7533427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setIntParameter(int i, int value) throws SQLException { checkSetParameterIndex(i, false); int outType = parameterTypes[i - 1]; switch (outType) { case Types.TINYINT : case Types.SMALLINT : case Types.INTEGER : Object o = new Integer(value); parameterValues[i - 1] = o; break; default : setLongParameter(i, value); } } COM: <s> used with int and narrower integral primitives </s>
funcom_train/27827045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printDataValue(Object value) throws KAONException { m_xmlWriter.openTagIndent(Namespaces.OWLX_NS+"DataValue",false); m_xmlWriter.printAttributeURI(Namespaces.OWLX_NS+"datatype",Namespaces.XSD_NS+"string"); m_xmlWriter.printData(value.toString()); m_xmlWriter.closeLastTag(); } COM: <s> prints the data value </s>
funcom_train/36145885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == this) return true; if (o instanceof CharProfile) { CharProfile otherProfile = (CharProfile) o; for (int i = 0; i < charOccurrenceProfile.length; i++) if (getConsideredCharsFrequency((char) i) != otherProfile.getConsideredCharsFrequency((char) i)) return false; return true; } else return false; } COM: <s> compares the relative occurrence of all profiled and considered characters </s>
funcom_train/37747551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Locale getLocale() throws PropertyException { Locale locale = null; // Get the value of the language and country properties PropertyValue pv = getPropertyValue(PropNames.LANGUAGE); String language = LanguageType.getISO639_1Language( getPropertyValue(PropNames.LANGUAGE)); String country = CountryType.getCountry(getPropertyValue(PropNames.COUNTRY)); return new Locale(language, country); } COM: <s> gets the current locale </s>