__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33280406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String asText(final DomNode node) { appletEnabled_ = node.getPage().getWebClient().isAppletEnabled(); buffer_.setLength(0); appendNode(node); final String response = buffer_.toString(); buffer_.setLength(0); return cleanUp(response); } COM: <s> converts an html node to text </s>
funcom_train/21423454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSetTimeoutMenuItem() { if (setTimeoutMenuItem == null) { setTimeoutMenuItem = new JMenuItem(); setTimeoutMenuItem.setText("Set Timeout..."); setTimeoutMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setTimeout(); } }); } return setTimeoutMenuItem; } COM: <s> this method initializes set timeout menu item </s>
funcom_train/33516085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAverageLoad() { int totalLoad = 0; int numServers = 0; double averageLoad = 0.0; synchronized (serversToLoad) { numServers = serversToLoad.size(); for (HServerLoad load : serversToLoad.values()) { totalLoad += load.getNumberOfRegions(); } averageLoad = (double)totalLoad / (double)numServers; } return averageLoad; } COM: <s> compute the average load across all region servers </s>
funcom_train/19402601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long hash( final char[] a, final int l, final int k ) { final int[] w = weight[ k ]; long h = init[ k ]; int i = l; while( i-- != 0 ) h ^= ( h << 5 ) + a[ i ] * w[ i % NUMBER_OF_WEIGHTS ] + ( h >>> 2 ); return ( h & 0x7FFFFFFFFFFFFFFFL ) % m; } COM: <s> hashes the given character array with the given hash function </s>
funcom_train/2892034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEmoticon(String emoticonText, String description, String imagePath) { ClassLoader loader = this.getClass().getClassLoader(); Emoticon emoticon = new Emoticon(); emoticon.emoticonText = emoticonText; emoticon.description = description; emoticon.imagePath = imagePath; emoticon.imageIcon = new ImageIcon(loader.getResource(imagePath)); emoticonList.addLast(emoticon); emoticonMap.put(emoticonText, emoticon); } COM: <s> adds a new emoticon to the icon manager </s>
funcom_train/101889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(Element e) { if(!selectedElements.contains(e)) selectedElements.add(e); else return; chosenSorter.reSort(); // tell the table it's changed! ((ElementListTableModel)tblChosenMeas.getModel()).fireTableDataChanged(); // verify a selected element if(selectedElements.size() > minimumSelectedElements) btnOk.setEnabled(true); else btnOk.setEnabled(false); } COM: <s> adds an element to the list </s>
funcom_train/29722791
/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.setFont(new Font("Dialog", Font.PLAIN, 12)); jButtonCancel.setText("Cancel"); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { okPressed = false; FindReplaceTestDialog.this.dispose(); } }); } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/44480727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClusteredServer getNextServer() { ClusteredServer server; int start = currentServerNumber; int current = start; do { current = (current + 1) % numberOfServers; server = (ClusteredServer) servers.get("server" + current); } while (!server.online() && start != current); currentServerNumber = current; return server; } COM: <s> returns the next in the cluster </s>
funcom_train/5521087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNode(Node node) { // if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("InputOutputReporter.setNode: " + node, new RuntimeException ("Who calls InputOutputReporter.setNode")); dataObject = node.getCookie(DataObject.class); } COM: <s> somehow helps to properly link to external entities </s>
funcom_train/45623015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTreatWarningsAsErrorsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_treatWarningsAsErrors_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_treatWarningsAsErrors_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_TreatWarningsAsErrors(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the treat warnings as errors feature </s>
funcom_train/34128626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDocumentProperties( DocumentProperties props) { Vector documents = getDocumentProperties(); boolean exists = false; // remove a previous document/file with the same name for ( int i = 0; (i < documents.size()) && !exists; i++) { DocumentProperties doc = (DocumentProperties)documents.elementAt(i); if ( doc.getName().equals( props.getName())) { remove( doc); break; } } add( props); } COM: <s> adds a document properties object to the project </s>
funcom_train/12662868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties loadProperties(final File file) { final Properties p = new Properties(); try { FileInputStream fis = new FileInputStream(file); try { p.load(fis); } finally { if (null != fis) { fis.close(); } } } catch (IOException e) { throw new CtlException("failed loading property file: " + e.getMessage(), e); } return p; } COM: <s> reads the property file </s>
funcom_train/31662466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration peaks() { return new Enumeration() { int i = 0; public Object nextElement() { if (peaks != null && i < peaks.length) { Peak1D peak = peaks[i]; i++; return peak; } return null; } public boolean hasMoreElements() { if (peaks != null && i < peaks.length - 1) return true; return false; } }; } COM: <s> gets peaks of the pattern as an enumeration </s>
funcom_train/11742716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List updatedAttributes(DbEntity entity, Map updatedSnapshot) { List attributes = new ArrayList(updatedSnapshot.size()); Map entityAttributes = entity.getAttributeMap(); Iterator it = updatedSnapshot.keySet().iterator(); while (it.hasNext()) { Object name = it.next(); attributes.add(entityAttributes.get(name)); } return attributes; } COM: <s> creates a list of db attributes that are updated in a snapshot </s>
funcom_train/24135437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void runJPythonScript(Object context) { // PythonInterpreter python = ChatApp.getChatApp().getPythonInterpreter(); // try { // python.set("context",context); // python.execfile(_action); // } // catch (Exception e) { // JOptionPane.showMessageDialog(ChatApp.getChatApp(), // "Exception ["+e+"] attempting to run JPython script ["+_action+ "]", // "Error running custom action", // JOptionPane.INFORMATION_MESSAGE); // } // } COM: <s> run the actions jpython script </s>
funcom_train/17848647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File file) { if (file.isDirectory()) { return true; } // Get the lowercase name String name = file.getName().toLowerCase(); // check whether the name ends with one of the extensions for (String element : mExtensionList) { if (name.endsWith(element)) { return true; } } return false; } COM: <s> returns whether this given file is accepted by this filter </s>
funcom_train/32766889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getParameterError(String key) { if (key.equals(SIGMA)) { return sigma_err; } else if (key.equals(AMP)) { return amp_err; } else if (key.equals(CENTER)) { return (center0_err+center1_err)/2.0; } else if (key.equals(CENTER0)) { return center0_err; } else if (key.equals(CENTER1)) { return center1_err; } else if (key.equals(PEDESTAL)) { return pedestal_err; } return 0.; } COM: <s> returns the parameter value error </s>
funcom_train/20397228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_player(int player_id){ Player player = new Player(current_map.getPlayerPosition(), player_id); player_list.put(player_id, player); queues.put(player_id, new LinkedList<Types.Direct>()); moves_threads.put(player_id, new Thread(new EngineProcessor(player_id))); } COM: <s> this adds a new player to the game creates a move queue and </s>
funcom_train/25291685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFrequencyScaleFactor() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_FREQUENCY_SCALE_FACTOR_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes17")); return ((AuralAttributesRetained)this.retained).getFrequencyScaleFactor(); } COM: <s> retrieve frequency scale factor </s>
funcom_train/43580094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setBounds(new Rectangle(153, 58, 51, 19)); jButton.setText("Go"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { FeederUI feederUI = new FeederUI(); feederUI.setVisible(true); hideMe(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/44019200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getEditCopyMenuItem() { if (editCopyMenuItem == null) { editCopyMenuItem = new JMenuItem(); editCopyMenuItem.setText("Copy"); editCopyMenuItem.setMnemonic('C'); editCopyMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, MENU_SHORTCUT_KEY_MASK)); editCopyMenuItem.addActionListener(eventHandler); } return editCopyMenuItem; } COM: <s> return the edit copy menu item </s>
funcom_train/34749258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { for (Iterator poolIter = managers.values().iterator(); poolIter.hasNext();) { try { ((CPDSConnectionFactory) poolIter.next()).getPool().close(); } catch (Exception closePoolException) { //ignore and try to close others. } } InstanceKeyObjectFactory.removeInstance(instanceKey); } COM: <s> close pool s being maintained by this datasource </s>
funcom_train/943890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setLeftDividerLocation(int pixels) { String dividerLocation = Integer.toString(pixels); InstanceWorld iw = InstanceWorld.getCurrentInstanceWorld(); iw.updateQuadValue(MetaDeskConstants.USER_PROFILE_CONTEXT_URI, MetaDeskConstants.METADESK_PROFILE, MetaDeskConstants.METADESK_LEFT_SPLITPANE_DIVIDER_LOCATION, dividerLocation, true); } COM: <s> persistently record left split panes position in the data model </s>
funcom_train/45405847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if((this.tabs == null) || (this.status == null)) { LogManager.programmLog .finest("Erstellen des Tabcontainers sowie StatusPanel"); this.tabs = new Tabs(); this.status = new StatusPanel(); } LogManager.programmLog.finest("Erstellen des Homeframes"); HomeFrame home = new HomeFrame(this.tabs,this.status); this.frame = home; home.setVisible(true); } COM: <s> starts the start frame of the application </s>
funcom_train/15541099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateChart(final String graphType, final String data) { final FusionChart newFlash = new FusionChart( graphType, this.getGraphWidth(), this.getGraphHeigth(), data, null); //Delete the current fusion chart from the panel this.panel.remove(this.fusion); //Anyadimos el nuevo FusionCharts this.panel.add(newFlash); this.fusion = newFlash; } COM: <s> create a new flash object with the new data </s>
funcom_train/14329600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTableParsing() throws SQLException { Statement stmt = con.createStatement(); try { stmt.executeQuery( "SELECT * FROM ::fn_missing('c:\\t file.trc')"); fail("Expecting an SQLException"); } catch (SQLException ex) { // 42000 == syntax error or access rule violation assertEquals("42000", ex.getSQLState()); } } COM: <s> test that the sql parser doesnt try to parse the table name unless </s>
funcom_train/43876160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testListheaders() { final int count = parentElement.findElement( By.className( "z-listhead" ) ).findElements( By.className( "z-listheader" ) ).size(); for ( int index = 0; index < count; ++index ) { testListheader( index ); } webElement = parentElement.findElement( By.className( "z-listbox" ) ); } COM: <s> executes full test of listheaders </s>
funcom_train/32733620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(Doctor doc, Staff<Nurse> nurses) { this.setNurseTeam(nurses); this.setDoctor(doc); this.processID = UUID.randomUUID(); task = patient.newTask(TaskID.CRITICAL_CARE, getProcessID(), patient.getPriority()); // waitDelay("StartIntensiveTreatmentActivity", 0.0, Priority.HIGH); } COM: <s> the code init code method is used to initialize the process </s>
funcom_train/27677552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CellRangeAddress readCellRangeAddressPreBIFF8() { // In these versions the column indicies are stored as // individual bytes, so we just need to treat each byte as an // unsigned number return new CellRangeAddress( this.readUnsigned2Byte(), this.readUnsigned2Byte(), this.readUnsignedByte(), this.readUnsignedByte() ); } COM: <s> returns the code cell range address code at the current offset in the </s>
funcom_train/3830455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClasses(String formats[], String[] classNames) { classes.clear(); if ( classNames != null ) { for (int i = 0; i < classNames.length; i++) { addClassByName( formats[i], classNames[i] ); } } } COM: <s> sets the classes that are responsible for handling creating the </s>
funcom_train/9786404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabels() { if (inputLabel != null) inputLabel.setText( app.getPlain("InputLabel") + ":"); //inputButton.setToolTipText(app.getMenu("Mode") + " " + app.getMenu("InputField")); if (helpIcon != null) helpIcon.setToolTipText(app.getMenu("FastHelp")); //setCommandNames(); } COM: <s> updates labesl according to current locale </s>
funcom_train/11426174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(String filter) { Filter f; try { f = FrameworkUtil.createFilter(filter); } catch (InvalidSyntaxException e) { IllegalArgumentException iae = new IllegalArgumentException(e .getMessage()); iae.initCause(e); throw iae; } Dictionary<String, Object> d = new UnmodifiableDictionary<String, Object>( properties); /* * we can use matchCase here since properties already supports case * insensitive key lookup. */ return f.matchCase(d); } COM: <s> tests the properties of this code endpoint description code against </s>
funcom_train/37649434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkPath(TreeItem item, boolean checked, boolean grayed) { if (item == null) return; if (grayed) { checked = true; } else { int index = 0; TreeItem[] items = item.getItems(); while (index < items.length) { TreeItem child = items[index]; if (child.getGrayed() || checked != child.getChecked()) { checked = grayed = true; break; } index++; } } check(item, checked); item.setGrayed(grayed); checkPath(item.getParentItem(), checked, grayed); } COM: <s> method check path </s>
funcom_train/3786403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String lookupMenuItem(MenuItem mi) { /* lookupMenuItem */ if(mi==null) return(null); MenuCmdData mcd= (MenuCmdData)menuItemDataHT.get(mi); if(mcd==null) return(null); String cmd= mcd.cmd; return(cmd); } /* lookupMenuItem */ COM: <s> lookup menu item lookup menu item entry by menu item in menu list </s>
funcom_train/34111070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void get() { // ServiceDefTarget endPoint = (ServiceDefTarget) folderService; // endPoint.setServiceEntryPoint(Config.OKMFolderService); // Main.get().mainPanel.navigator.status.setFlagGet(); // folderService.getProperties( ((GWTFolder) actualItem.getUserObject()).getPath() ,callbackGet); } COM: <s> gets the actual folder actual item and refresh all information on it </s>
funcom_train/33313107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calcNumberOfColumns() { int result = 0; for (Iterator i = this.fieldEditorList.iterator(); i.hasNext(); ) { FieldEditor pe = (FieldEditor)i.next(); result = Math.max(result, pe.getNumberOfControls()); } return result; } COM: <s> calculates the number of columns needed to host all field editors </s>
funcom_train/21734428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildEnvironment() { this.environment = new Environment(); this.sky = new SkyComponent(); this.effects = new EffectComponent(); this.astronomy = new AstronomyComponent(); this.weather = new WeatherComponent(); this.buildConnection(); this.buildSkyComponent(); this.buildEffectComponent(); this.buildAstronomyComponent(); this.buildWeatherComponent(); this.environment.connect(this.sky); this.environment.connect(this.effects); this.environment.connect(this.astronomy); this.environment.connect(this.weather); this.environment.setCurrentTime("17.00"); this.environment.applyToScene(this.rootNode, this.pManager); } COM: <s> build the environment </s>
funcom_train/25331430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSetID() { VariationType instance = new VariationType(); assertNull(instance.getSetID()); instance.setSetID(5); assertTrue(instance.getSetID().equals(5)); assertFalse(instance.getSetID().equals(4)); } COM: <s> test of get set id method of class variation type </s>
funcom_train/3391831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeMemberSummaryHeader(ClassDoc classDoc) { printedSummaryHeader = true; writer.println("<!-- ======== NESTED CLASS SUMMARY ======== -->"); writer.println(); writer.printSummaryHeader(this, classDoc); } COM: <s> write the classes summary header for the given class </s>
funcom_train/24086486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMeasurement(Measurement m) { Measurements ms = measurements.get(m.getProperty().getName()); if (ms == null) { ms = new Measurements(); measurements.put(m.getProperty().getName(), ms); } ms.addMeasurement(m); } COM: <s> adds a measurement to the list of measurements </s>
funcom_train/49441840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void goForward(final GraphNode /* ! */node) { assert node != null; if (!node.isComeFromStartingNode()) { node.setComeFromStartingNode(true); final List<GraphNode> children = node.getChildren(); for (final GraphNode graphNode : children) { this.goForward(graphNode); } } } COM: <s> recursive method to check that all the ways of a graph comes from </s>
funcom_train/24119026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doNew() { /** !!! DO NOT BREAK THE TIERS !!! */ // We don't create a new DomainObject() in the frontend. // We GET it from the backend. setOrder(getOrderService().getNewOrder()); doClear(); // clear all commponents doEdit(); // edit mode // btnCtrl.setBtnStatus_New(); btnCtrl.setInitNew(); // remember the old vars doStoreInitValues(); } COM: <s> create a new order object </s>
funcom_train/31084609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print (String indent, PrintStream output) { output.println (indent + "Staff"); output.println (indent + " " + _staffHeader); for (int i = 0; i < getMeasureStartCount(); ++i) getMeasureStart(i).print (indent + " ", output); } COM: <s> this prints the staff including all time slices </s>
funcom_train/7495824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartRule(int month, int dayOfMonth, int time) { // unwrapSTZ().setStartRule(month, dayOfMonth, time); getSTZInfo().setStart(month, -1, -1, time, dayOfMonth, false); setStartRule(month, dayOfMonth, 0, time, WALL_TIME); } COM: <s> sets the dst start rule to a fixed date within a month </s>
funcom_train/27825588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SetTracker getPropertiesFromConceptTracker() { if (m_propertiesFrom==null) m_propertiesFrom=new SetTracker() { protected Set loadSet() throws KAONException { return getVirtualProperties(getConcept().getPropertiesFromConcept(),true); } }; return m_propertiesFrom; } COM: <s> returns the tracker for properties from concept </s>
funcom_train/40414340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toggleMenuForContainer(ContainerIndicator indicator) { if (indicator == menuTarget && menuPopup != null) { hideMenu(); return; } menuTarget = indicator; MenuBar bar = createMenuBar(true); buildEditorMenuItems(indicator.getEditor(), null, bar); buildManagerMenuItems(bar); displayMenu(bar, -1, -1); } COM: <s> display an editor menu suitable for indicator </s>
funcom_train/42985519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recievedError(Throwable error) { System.out.println("Bot " + getName() + " recieved the error: "); System.out.println(error); System.out.println("******************************************"); } COM: <s> prints a message when an error is recieved </s>
funcom_train/33371474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = "Characteristics [\n"; Iterator it = map.keySet().iterator(); while(it.hasNext()) { String name = (String)it.next(); result += "\t"+name+" = "+map.get(name)+"\n"; } return result + "]"; } COM: <s> returns a string representation of this characteristics instance </s>
funcom_train/26574304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent pce) { LogEntry logEntry = (LogEntry) pce.getSource(); boolean doNotify = notify; notify = false; if (pce.getPropertyName().equals("DATE")) { delete(logEntry); add(logEntry); } notify = doNotify; updateCyclist(UPDATE_LOG_ENTRY, this, logEntry, true); } COM: <s> cyclist himself listens to changes of all its activities </s>
funcom_train/18480894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumItersU(int num_iters_u) { if (this.num_iters_u != num_iters_u) { int old = this.num_iters_u ; this.num_iters_u = num_iters_u ; notifyChanged(NUMITERSU,old,num_iters_u) ; createContents() ; } } COM: <s> sets number of iterations in u direction </s>
funcom_train/49944624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XYSeries convertTelemetrySeries(TelemetryXYSeries series, String name) { final XYSeries series1 = new XYSeries(name); for (Double X : series.getSeriesData().keySet()) { series1.add(X, series.getSeriesData().get(X)); } return series1; } COM: <s> converts telemetry xydataset into jfc xydataset </s>
funcom_train/8078760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMatrix( int i0, int i1, int j0, int j1, double s ) { try { for( int i = i0; i <= i1; i++ ) { for( int j = j0; j <= j1; j++ ) { A[i][j] = s; } } } catch( ArrayIndexOutOfBoundsException e ) { throw new ArrayIndexOutOfBoundsException( "Index out of bounds" ); } } COM: <s> set the submatrix a i0 i1 j0 j1 with a same value </s>
funcom_train/8310825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WebElement findElement(SearchContext context) { Vector allElements = findElements(context); if (allElements == null || allElements.size() == 0) { throw new WebDriverException("Cannot locate an element using " + toString()); } return (WebElement) allElements.elementAt(0); } COM: <s> find a single element </s>
funcom_train/20242627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testerChanged() { // TODO - implement this method if(testerBox.getSelectedItem() instanceof String) { ControllerFacade.getInstance().changeTestGroupTester((TestGroup)target, null); } else { ControllerFacade.getInstance().changeTestGroupTester((TestGroup)target, (User)testerBox.getSelectedItem()); } System.out.println("Tester changed"); } COM: <s> this method is called when the user modifies the tester value </s>
funcom_train/26314706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPhasePlayable(IGame.Phase phase) { switch (phase) { case PHASE_INITIATIVE: case PHASE_END: return false; case PHASE_SET_ARTYAUTOHITHEXES: case PHASE_DEPLOY_MINEFIELDS: case PHASE_DEPLOYMENT: case PHASE_MOVEMENT: case PHASE_FIRING: case PHASE_PHYSICAL: case PHASE_TARGETING: return game.hasMoreTurns(); case PHASE_OFFBOARD: return isOffboardPlayable(); default: return true; } } COM: <s> should we play this phase or skip it </s>
funcom_train/8630417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean(int columnIndex) throws SQLException { try { debugCodeCall("getBoolean", columnIndex); Boolean v = get(columnIndex).getBoolean(); return v == null ? false : v.booleanValue(); } catch (Exception e) { throw logAndConvert(e); } } COM: <s> returns the value of the specified column as a boolean </s>
funcom_train/46009726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasActor(String schema, Long actor_id) { for (ListIterator<ConvActorAssignment> li = this.getConv_actor_assigns(schema).listIterator(); li.hasNext();) { ConvActorAssignment caa = li.next(); if (actor_id.equals(caa.getActor_id())) { return true; } } return false; } COM: <s> checks a conversation for the occurance of a particular actor </s>
funcom_train/42991887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String printTopDirectives(String program_name){ String str_top_directive = ""; /*Adding .source program_name.ir */ str_top_directive += ".source " + program_name + ".ir" + "\n"; /*Adding .class public program_name*/ str_top_directive += ".class public " + program_name + "\n"; /*Adding .super java/lang/Object*/ str_top_directive += ".super java/lang/Object" + "\n"; //System.out.println(str_top_directive); return str_top_directive; } COM: <s> adds top directive to generated </s>
funcom_train/18593599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void glSetSide(int s) { if (s == Fot.Settings.USA) { toolBox.setBackground(java.awt.Color.blue); sideUsaRadio.setSelected(true); } else { toolBox.setBackground(java.awt.Color.red); sideJapanRadio.setSelected(true); } toolBox.repaint(); } COM: <s> indicates that this player has changed sides </s>
funcom_train/4703927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initHorizontalColors(int[] i_colors) { int[] horizontalColors = calcColorArray(i_colors, thetaSteps); colors = new int[phiSteps][thetaSteps]; for (int i = 0; i < phiSteps; i++) { for (int j = 0; j < thetaSteps; j++) { colors[i][j] = horizontalColors[j]; } } } COM: <s> this will create a horizontal color gradient for the surface </s>
funcom_train/24536476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IProxy handleFrameTitle(IProxy frame, IProxy title, boolean replaceOld, boolean wantOld, IExpression expression) { return expression.createSimpleMethodInvoke(BeanAwtUtilities.getWindowApplyFrameTitleMethodProxy(expression), null, new IProxy[] {frame, title, expression.getRegistry().getBeanProxyFactory().createBeanProxyWith(replaceOld)}, wantOld); } COM: <s> handle the frame title </s>
funcom_train/16177979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPersistentObj(Object key) { //delegate to central controller Object out = null; try { out = ProActive.getFutureValue(control.getPersistentObj(key)); } catch (RuntimeException e) { System.out.println("e.getMessage() = " + e.getMessage()); System.out.println("Null Object returned from Persistent Object Store"); } return out; } COM: <s> retrieve a persistent object </s>
funcom_train/14051760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addForwardLink(Link link) { super.addForwardLink(link); Node dest = link.destination(); if (dest.isIndex() && (getID() == ((GroupNode) dest).getIndexCategory())) { indices.addElement(dest); save(); } } COM: <s> adds a feature to the forward link attribute of the node object </s>
funcom_train/18261201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSizeFromPrefs(int screenWidth, int screenHeight) { int width = Integer.parseInt(prefs.get(USERFRAME_WIDTH, String.valueOf(screenWidth))); int height = Integer.parseInt(prefs.get(USERFRAME_HEIGHT, String.valueOf(screenHeight))); setSize(Math.min(width, screenWidth) , Math.min(height, screenHeight)); } COM: <s> set the size of the </s>
funcom_train/4640954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConstantShader(Color color) { // save internal status this.color = color; type = SHADER_CONSTANT; // save name for use with primitives currentName = defaultName + nameID++; // set parameter sunflow.parameter("color", colorSpace, color.getRed()/(float)255, color.getGreen()/(float)255, color.getBlue()/(float)255); // set shader sunflow.shader(currentName, SHADER_CONSTANT); } COM: <s> sets constant shader </s>
funcom_train/3883200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMinimumversionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_minimumversion_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_minimumversion_feature", "_UI_DocumentRoot_type"), ImsMdRootv1p1Package.Literals.DOCUMENT_ROOT__MINIMUMVERSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the minimumversion feature </s>
funcom_train/3731817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds(){ checkWidget(); int index = parent.indexOf(this); if (index == -1) return new Rectangle (0, 0, 0, 0); int hwnd = parent.handle; int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0, 0); RECT rect = new RECT(); OS.SendMessage(hwndHeader,OS.HDM_GETITEMRECT,index,rect); int width = rect.right - rect.left; int height = rect.bottom - rect.top; return new Rectangle(rect.left,rect.top,width,height); } COM: <s> returns a rectangle describing the recievers header relative </s>
funcom_train/20357289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getWatchlist(String virtualWiki, int userId, Pagination pagination) throws Exception { List all = new Vector(); int virtualWikiId = this.lookupVirtualWikiId(virtualWiki); WikiResultSet rs = this.queryHandler().getWatchlist(virtualWikiId, userId, pagination); while (rs.next()) { RecentChange change = initRecentChange(rs); all.add(change); } return all; } COM: <s> retrieve a watchlist containing a list of recent changes objects </s>
funcom_train/18789340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEmail(String email) { String oldEmail = this.email; if (((this.email != null) && !this.email.equals(email)) || ((this.email == null) && (email != null))) { this.email = email; changeSupport.firePropertyChange("email", oldEmail, email); setModified(true); } } COM: <s> sets the new value of the simple property email </s>
funcom_train/38300865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAgent(String agentName) { Iterator it = agents.iterator(); while(it.hasNext()) { Agent agent = (Agent)it.next(); if(agentName.equals(agent.agentName) && agent.onCanv == true) { agents.remove(agent); } } } COM: <s> removes an agent from the list </s>
funcom_train/17868912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Outline (int from_col, int parent_col, boolean collapsed) { if (from_col < parent_col) { minCol_ = from_col; maxCol_ = parent_col; } else { minCol_ = parent_col; maxCol_ = from_col; } parentCol_ = parent_col; //FIXME: minCol_ or maxCol_??? collapsed_ = collapsed; }; COM: <s> build a new outline </s>
funcom_train/36534479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean assignRouteToBus(String registration, String mapName, int routeNum) { try { String updateStatement = "UPDATE bus SET RouteID=? WHERE Registration=?;"; PreparedStatement pstmt = con.prepareStatement(updateStatement); pstmt.setInt(1, this.getRouteID(mapName, routeNum)); pstmt.setString(2, registration); int result = pstmt.executeUpdate(); pstmt.close(); return true; } catch (SQLException sqle) { System.out.println(sqle); return false; } } COM: <s> assigns a route to a bus which must already exist in the database </s>
funcom_train/3378615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeTag() { if (dataPos == dataSize) return; int tag = data[dataPos++]; if (isEOC(tag) && (data[dataPos] == 0)) { dataPos++; // skip length writeTag(); } else newData[newDataPos++] = (byte)tag; } COM: <s> write the tag and if it is an end of contents tag </s>
funcom_train/20977947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize(JSlider slider, java.awt.Dimension uiPreferredSize) { if (slider.getOrientation() == HORIZONTAL) { uiPreferredSize.height = Math.max(uiPreferredSize.height, h_thumb.getHeight()); } else { uiPreferredSize.width = Math.max(uiPreferredSize.width, v_thumb.getWidth()); } return uiPreferredSize; } COM: <s> gets the preferred size attribute of the gtk slider object </s>
funcom_train/4527895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canStartDataNode(Configuration conf) throws IOException { DataNode dn = null; try { dn = DataNode.createDataNode(new String[]{}, conf); } catch(IOException e) { if (e instanceof java.net.BindException) return false; throw e; } dn.shutdown(); return true; } COM: <s> check whether the data node can be started </s>
funcom_train/15607514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GeneFeatureBean getModelForGeneAccession(String geneAccession) { try { OID geneOID = mGeneAccessionRegistry.get(geneAccession); if (geneOID != null) return (GeneFeatureBean)getOrLoadBeanForOid(geneOID); else return null; } catch (ClassCastException cce) { FacadeManager.handleException(new IllegalArgumentException("Requested gene accession for non-gene feature")); } // End catch block for getter. return null; } // End method: getModelForGeneAccession COM: <s> returns a gene feature model given an accession number </s>
funcom_train/15743664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void toList(IPath path, List<IPath> paths) { if (files == null) return; for (File file : files) { if (file.isDirectory && file.files == null) paths.add(path.append(file.path).addTrailingSeparator()); else if (!file.isDirectory) paths.add(path.append(file.path)); file.toList(path.append(file.path), paths); } } COM: <s> adds all paths elements from the current file node and its sub nodes </s>
funcom_train/439778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killSprites(Enum... types) { LinkedList<Sprite> spritesToKill = new LinkedList<Sprite>(); for (Enum type: types) { HashSet<Sprite> sprites = typeMap.get(type); if (sprites != null) { spritesToKill.addAll(sprites); } } for (Sprite sprite: spritesToKill) { sprite.die(); } } COM: <s> kills all the contained sprites that have a type that matches </s>
funcom_train/37741391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Info forwardActivityInfo (Activity activity) { try { if (activity instanceof ActivityProxy) { involveContainerInTx((ActivityProxy)activity); activity = ((ActivityProxy)activity).unwrap(); } return activity.activityInfo (); } catch (RemoteException e) { throw new EJBException (e); } } COM: <s> forward the request for the activity info to the given </s>
funcom_train/14516858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAdminGroup(String name) throws AdminGroupExistsException, AuthorizationDeniedException{ // Authorized to edit administrative priviledges authorizationsession.isAuthorized(administrator, "/system_functionality/edit_administrator_privileges"); authorizationsession.addAdminGroup(administrator, name); informationmemory.administrativePriviledgesEdited(); this.authorizedadmingroups = null; } COM: <s> method to add a new admingroup to the administrator priviledges data </s>
funcom_train/40392712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void declarePackages(JExportableClassType requestedClassType) { // save this namespace to restore later sw.print("var pkg = "); sw.println( "@org.timepedia.exporter.client.ExporterUtil::declarePackage(Ljava/lang/String;)('" + requestedClassType.getJSQualifiedExportName() + "');"); } COM: <s> for each package of sub1 </s>
funcom_train/3889241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrganizationsType_default_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OrganizationsType_default_feature", "_UI_OrganizationsType_type"), ImscpRootv1p1p2Package.Literals.ORGANIZATIONS_TYPE__DEFAULT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default feature </s>
funcom_train/23405117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessToCompositeActionMapping_source_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessToCompositeActionMapping_source_feature", "_UI_ProcessToCompositeActionMapping_type"), MappingPackage.Literals.PROCESS_TO_COMPOSITE_ACTION_MAPPING__SOURCE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the source feature </s>
funcom_train/43327983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double calcMaxY() { if (graphs==null) return 0.0; double rv; Graphable2D gr; gr = (Graphable2D)graphs.elementAt(0); rv = gr.maxY(); for (int i=1; i<graphs.size(); i++) { gr = (Graphable2D)graphs.elementAt(i); double m = gr.maxY(); if (m > rv) rv = m; } return rv; } COM: <s> returns the maximum y value from all the graphs </s>
funcom_train/23998469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findEntityTypes( List< Entity > foundentities, Class entityclass ) { if ( entities == null ) return; for ( Entity entity : entities ) { if ( entity.getClass().equals( entityclass ) ) { foundentities.add( entity ); } } for ( EntityGroup grp : groups ) { grp.findEntityTypes( foundentities, entityclass ); } } COM: <s> find all entities of given type </s>
funcom_train/8342828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragMouseMoved(final DragSourceDragEvent dsde) { if(dragSource == null){ setUpDragImage(dsde.getDragSourceContext().getComponent()); setVisible(true); } this.setCursor(dsde.getDragSourceContext().getCursor()); this.setDrawingPosition(this.getMousePosition()); this.repaint(); } COM: <s> every time a we get this event we will repaint and make </s>
funcom_train/28219965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { // addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, // "&Directory preference:", getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.VERBOSE, "&Verbose Output for Link", getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.AUTO_RUN, "&Run Program after upload", getFieldEditorParent())); } COM: <s> creates the field editors </s>
funcom_train/48406815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParameterTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessParameter_parameterType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessParameter_parameterType_feature", "_UI_ProcessParameter_type"), SpemxtcompletePackage.eINSTANCE.getProcessParameter_ParameterType(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the parameter type feature </s>
funcom_train/47945244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Array getGrid(String fullName) throws NetCdfVariableException, NetCdfVariableNotFoundException { if (LOG.isDebugEnabled()) { LOG.debug("getGrid() - entering"); } Variable variable = getVariable(fullName); Array returnArray = getGrid(variable); if (LOG.isDebugEnabled()) { LOG.debug("getGrid() - exiting"); } return returnArray; } COM: <s> read all the data for this variable and return a memory resident array </s>
funcom_train/23789024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean selectMF() { if (selectFID("3F 00").sw()==0x9000) { lt.info("called method selectMF(). return is \"true\"", this); return true; } else { lt.info("called method selectMF(). return is \"false\"", this); return false; } } COM: <s> this method implements the abstract method from jsmex card service </s>
funcom_train/31251683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLoginTemplate(String loginTemplateName) { String page = ""; if (loginTemplateName == null) { loginTemplateName = CS_DEF_LOGIN_TEMPL_NAME; _templateLoader.useJar(true); page = _templateLoader.loadTemplate(loginTemplateName); } else { // go to /opt/aspenos/login to get the template String path = ServerInit.getAspenHomeDir() + "login" + File.separator + loginTemplateName; _templateLoader.useJar(false); page = _templateLoader.loadTemplate(path, false); } return page; } COM: <s> loads the given login template </s>
funcom_train/18058771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldName(UID objectId, int fieldNumber) throws RemoteException { synchronized(SO) { SO.rmcCount++; try { CategorySource cat = (CategorySource) SO.objectMap.get(objectId); return cat.getFieldName(fieldNumber); } catch(PerformanceException e) { throw new RemoteException(e.getMessage()); } } } COM: <s> return the field name given the field number </s>
funcom_train/28722371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String applyPreferences(String str) { StringBuilder buffer = new StringBuilder(str.length()); for (int i = advanceToMeaningfulChar(str, 0); i < str.length(); i = advanceToMeaningfulChar(str, i+1)) { char c = str.charAt(i); if (mergeWhitespaces && isWhitespace(c)) { c = ' '; } buffer.append(c); } return buffer.toString(); } COM: <s> applies user preferences to the input strings </s>
funcom_train/11704354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleException(Throwable t, Object[] entity, ProcessTrace aPTrace) { t.printStackTrace(); if (t instanceof AbortCPMException || t instanceof Error) { isRunning = false; killed = true; } notifyListeners(CAS_PROCESSED_MSG, entity, aPTrace, t); } COM: <s> handle given exception </s>
funcom_train/45740625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1 () { if (backCommand1 == null) {//GEN-END:|25-getter|0|25-preInit // write pre-init user code here backCommand1 = new Command ("Back", Command.BACK, 0);//GEN-LINE:|25-getter|1|25-postInit // write post-init user code here }//GEN-BEGIN:|25-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/9663930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(int index) { if (index != selected) { if (index >= tabs.size()) return; BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if (event.isCanceled()) return; selected = index; renderTabs(); SelectionEvent.fire(this, index); resize(); } } COM: <s> sets the specified tab selected </s>
funcom_train/17530008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getLeafs(JavaFileEvaluator node, Counters[] aggregates, int level) { if (node.hasChildren()) { if (level > 0) { aggregates[0].add(Constants.DIR, 1); } for (JavaFileEvaluator e : node.children) { getLeafs(e, aggregates, level + 1); } } else { node.updateCounters(aggregates); } } COM: <s> recursively collect the leaf nodes of the given node </s>
funcom_train/14607321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspException { try { String url = getContext().getBaseURL().toString(); pageContext.getOut().print(url + (url.endsWith("/") ? "" : "/")); return SKIP_BODY; } catch (Exception e) { throw new JspException(e); } } COM: <s> renders a tag with an url to current context base directory </s>
funcom_train/50158783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TokenStream tokenStream(String fieldName, Reader reader) { Analyzer analyzer = (Analyzer) analyzerMap.get(fieldName); if (analyzer == null) analyzer = defaultAnalyzer; // System.out.println("PerFieldAnalyzer using: " + analyzer.getClass().getName() + " for field: " + fieldName); return analyzer.tokenStream(fieldName, reader); } COM: <s> generates a token stream for the given field </s>
funcom_train/7385660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapBounds(Object cell, boolean willCollapse) { if (cell != null) { mxGeometry geo = model.getGeometry(cell); if (geo != null) { geo = (mxGeometry) geo.clone(); updateAlternateBounds(cell, geo, willCollapse); geo.swap(); model.setGeometry(cell, geo); } } } COM: <s> swaps the alternate and the actual bounds in the geometry of the given </s>