__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10017807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clear() { // delete the arrays super.clear(); // other variables m_namespaces = null; // clear maps, sets, etc. m_doneNodes.clear(); m_doneNodesReverse.clear(); m_mapSubst.clear(); m_subTypableTypes.clear(); m_sortedAttrUses.clear(); } COM: <s> releases resources that was allocated in the previous compilation </s>
funcom_train/42385151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasContentHeaders() { final String url = getHeader().getUrl(); if (url == null) { return false; } if (!url.toLowerCase().startsWith("http")) { return false; } if (getHeader().getLength() <= MIN_HTTP_HEADER_LENGTH) { return false; } return true; } COM: <s> is it likely that this record contains headers </s>
funcom_train/46937824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuExport() { if (jMenuExport == null) { jMenuExport = new JMenu(); jMenuExport.setSize(new Dimension(20, 18)); jMenuExport.setPreferredSize(new Dimension(100, 18)); jMenuExport.setText("Export To.."); jMenuExport.add(getJMenuItemMPEG7()); jMenuExport.add(getJMenuItemPOLYSEMA_Ontology()); } return jMenuExport; } COM: <s> this method initializes j menu export </s>
funcom_train/23442644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addXpathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SelectorType_xpath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SelectorType_xpath_feature", "_UI_SelectorType_type"), SchemaPackage.Literals.SELECTOR_TYPE__XPATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the xpath feature </s>
funcom_train/37658296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTransform1() throws Exception { InputStream test; InputStream expected; test = ClassLoader.getSystemResourceAsStream(testDir + "canonical_form_test_1.xml"); expected = ClassLoader.getSystemResourceAsStream(testDir + "canonical_form_expected_1.xml"); compareXML(true, test, expected, new ByteArrayOutputStream()); } COM: <s> transforms a source xml document and compares the output to the expected </s>
funcom_train/50383183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(Node child) { List<Node> oldChildren = getChildren(); INodeData data = getData(); if (data == null) { return; } synchronized (data) { List<Node> children = getChildren(); if (children.contains(child)) { return; } if (child.getName() == null) { child.retrieveName(); } children.add(child); child.setParent(this); setChildren(sortChildren(children)); getPropertyChangeSupport().firePropertyChange( new PropertyChangeEvent(this, PROPERTY_CHILDREN, oldChildren, children)); } } COM: <s> add node as child </s>
funcom_train/46790876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEntry(String glyphName, int unicode) { getGlyphNameToUnicode().put(glyphName, new Integer(unicode)); getUnicodeToGlyphName().put(new Integer(unicode), glyphName); if ((unicode >= 0) && (unicode < ARRAY_MAPPING_SIZE)) { asciiToGlyphName[unicode] = glyphName; } } COM: <s> add an entry to the collection of known mappings </s>
funcom_train/45916326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doKeyTyped(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_SPACE || e.getKeyCode() == KeyEvent.VK_ENTER) { doPlaySelected(); e.consume(); } else if (e.getKeyCode() == KeyEvent.VK_S) { AnimPlay.menuStop.doClick(); } else if (e.getKeyCode() == KeyEvent.VK_D) { AnimPlay.menuReplay.doClick(); } } COM: <s> action on key typed within the table </s>
funcom_train/23997714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntityCreation( Entity entity ) { if ( entity == null ) { Log.error( "UndoManager [2]: invalid undo/redo entry request" ); return; } ed.lockData(); EntityGroup parent = ed.getEntityGroup().findEntityParent( entity ); ed.unlockData(); EntityCreateUndoableEdit edit = new EntityCreateUndoableEdit( entity, parent ); addEdit( edit ); updateItems(); } COM: <s> add entity creation undo redo </s>
funcom_train/48491412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createBackup() throws BackupCannotBeCareatedException { try { this.backupFile = java.io.File.createTempFile(this.getTmpFilename(), "back"); Filesystem.copyText(this.getPath(), this.getBackupFilePath()); } catch(IOException ex) { throw new BackupCannotBeCareatedException(ex); } } COM: <s> created backup of this file </s>
funcom_train/28455899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Hashtable getAllSystemProperties() { Hashtable ret = new Hashtable(); for (Enumeration e = x.java.lang.System.getProperties().propertyNames(); e.hasMoreElements();) { String name = (String) e.nextElement(); ret.put(name, x.java.lang.System.getProperties().getProperty(name)); } return ret; } COM: <s> convert the system properties to a hashtable </s>
funcom_train/18568872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateCanvas(Component viewComponent, Dimension canvasSize, boolean zoomMode) { if(Debug.enabled) assert canvasSize.width > 0: "canvasSize.width must be a positive integer"; if(Debug.enabled) assert canvasSize.height > 0: "canvasSize.height must be a positive integer"; this.viewComponent = viewComponent; this.canvasSize = canvasSize; } COM: <s> set size of painting canvas </s>
funcom_train/47585537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEventPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessBinding_event_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessBinding_event_feature", "_UI_ProcessBinding_type"), PmmPackage.Literals.PROCESS_BINDING__EVENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the event feature </s>
funcom_train/25937832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onPageFinished(WebView view, String url) { /* // for each finished page, try looking for active scripts List<String> active = scriptdb.getActive(url); Log.d(TAG, String.format("Found %d active scripts on url=%s", active.size(), url)); if(active.size() == 0) return; // inject each applicable script into page for(String script : active) { script = BrowserActivity.this.prepareScript(script); webview.loadUrl(script); } */ } COM: <s> handle finished loading of each page </s>
funcom_train/34422433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(String pName, Object value) { Object old=props.get(pName); try { props.remove(pName); props.put(pName, value); if(null!=vcs){ vcs.fireVetoableChange(pName, old, getProperty(pName, value)); } } catch (PropertyVetoException e) { props.remove(pName); props.put(pName, old); } } COM: <s> sets a named property </s>
funcom_train/3535773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void collectAllClientOrders() { // Clear the list of client orders ordersList.clear(); // Build up a collection of orders from each client for (int i = 0; i < clients.length; i++) { Order[] orders = clients[i].getOrders(); for (int j = 0; j < orders.length; j++) { ordersList.add(orders[j]); } } } COM: <s> collect all the client orders to the local order list </s>
funcom_train/34836226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(final String[] testClassNames){ Runnable runnable = new Runnable(){ public void run(){ listener.start(false); for(String testClassName : testClassNames){ try{ Class<?> clazz = this.getClass().getClassLoader().loadClass(testClassName); Request req = Request.aClass(clazz); juc.run(req); }catch(ClassNotFoundException e1){ e1.printStackTrace(); } } try{ Thread.sleep(10); }catch(InterruptedException e){ // back to work } listener.finish(); } }; if(forkThread){ Thread thread = new Thread(runnable, this.toString()); thread.start(); }else{ runnable.run(); } } COM: <s> run all tests in the given test classes </s>
funcom_train/45773646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAccessibleObject(XAccessibleContext xContext) { if (xContext != null) { m_xaccessContext = xContext; maTextualDisplay.setAccessibleObject(xContext); maGraphicalDisplay.setAccessibleObject(xContext); m_actinPanel.action.setEnabled(true); } else { m_actinPanel.setButtonsProperties(); } } COM: <s> set the view of the properties for found staroffice object </s>
funcom_train/4675369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deliverPrivateMessage( int messageId, String username ) { Message m = getEntityManager().find( Message.class, messageId ); User u = getEntityManager().find( User.class, username ); if (m != null && u != null) return deliverPrivateMessage( m, u ); else return false; } COM: <s> delivers a private message to a single user </s>
funcom_train/45770618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(InputStream input) throws IOException { cce = (byte) input.read(); int numOfBytesRead = 1; rgch = new byte[cce*2]; numOfBytesRead += input.read(rgch, 0, cce*2); Debug.log(Debug.TRACE, "\tcce : "+ cce + " rgch : " + new String(rgch,"UTF-16LE")); return numOfBytesRead; } COM: <s> reads the number format from the code input stream code byte array </s>
funcom_train/2641972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TDoubleArrayList grep(TDoubleProcedure condition) { TDoubleArrayList list = new TDoubleArrayList(); for (int i = 0; i < _pos; i++) { if (condition.execute(_data[i])) { list.add(_data[i]); } } return list; } COM: <s> searches the list for values satisfying tt condition tt in </s>
funcom_train/40333616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue(HSSFCell cell, String defaultValue) { if (cell == null) { return defaultValue; } else { String s; try { s = cell.getStringCellValue(); } catch (RuntimeException e) { return "" + cell.getNumericCellValue(); } if (s == null || s.length()== 0) { return defaultValue; } else { return s; } } } COM: <s> extractes a string value from a cell </s>
funcom_train/4381853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectionChanged() { int index = list.getSelectionIndex(); int size = list.getItemCount(); removeButton.setEnabled(index >= 0); editButton.setEnabled(index >= 0); upButton.setEnabled(size > 1 && index > 0); downButton.setEnabled(size > 1 && index >= 0 && index < size - 1); } COM: <s> notifies that the list selection has changed </s>
funcom_train/50073563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean WaitForString(String string) throws InterruptedException { WaitConditionString wait = new WaitConditionString(string, this, sessionVT); Waiter waiter = new Waiter(wait, oia, sessionVT.getSessionConfiguration()); boolean result = false; try { result = waiter.startWaitFor(); } catch (OhioException oe) { //System.out.println(ex.getMessage()); } waiter.dispose(); return result; } COM: <s> synchronously waits until the string appears in the presentation space </s>
funcom_train/30194353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JxplElement evaluate(JxplElement input) throws JxplException { /* Expect one child after head: Return that child (no evaluation) */ //try{ List list = ((JxplList)input).getElements(); return (JxplElement)list.get(1); /*} catch(Exception ex){ recorder.error("Quote Error: ", new IllegalArgumentException(ex.toString())); throw new IllegalArgumentException("Quote Error: "+ex.toString()); }*/ } COM: <s> gets the elements from the jxpl element puts them in a list and </s>
funcom_train/16524585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceTile(Tile find, Tile replace) { if (!canEdit()) return; for (int y = bounds.y; y < bounds.y + bounds.height; y++) { for (int x = bounds.x; x < bounds.x + bounds.width; x++) { if(getTileAt(x,y) == find) { setTileAt(x, y, replace); } } } } COM: <s> replaces all occurances of the tile code find code with the tile </s>
funcom_train/37076566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); Point oldPosition = viewport.getViewPosition(); viewport.setViewPosition(new Point(oldPosition.x, value)); //for (ChangeListener listener : viewport.getChangeListeners()) { // listener.stateChanged(new ChangeEvent(viewport)); //} } COM: <s> assumes that the scrollbar adjustment values have the same bounds </s>
funcom_train/42717619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDirty() { if (getInitialValue() == null && getValue() == null) { return false; } else if (getInitialValue() == null && getValue() != null) { return true; } else if (getInitialValue() != null && getValue() == null) { return true; } else { return !getInitialValue().equals(getValue()); } } COM: <s> is this component dirty e </s>
funcom_train/43244953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetConnectionManager() { System.out.println("getConnectionManager"); ConnectionManager expResult = null; ConnectionManager result = ConnectionManager.getConnectionManager(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get connection manager method of class org </s>
funcom_train/49504272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { if (config.isHeaderActive() && config.getHeaderList() != null) { StringBuffer strBuf = new StringBuffer(); boolean isFirst = true; for (Iterator<String> iter = config.getHeaderList().iterator(); iter.hasNext(); ) { if (! isFirst) { strBuf.append(config.getSeparator()); } isFirst = false; strBuf.append(iter.next()); } lineWriter.write(strBuf.toString()); } } COM: <s> write the csv headers if the csv configuration headers are active </s>
funcom_train/1546887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkPositive(double[] in) throws IllegalArgumentException { for (int i = 0; i < in.length; i++) { if (in[i] <= 0) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.NOT_POSITIVE_ELEMENT_AT_INDEX, i, in[i]); } } } COM: <s> check all entries of the input array are 0 </s>
funcom_train/986681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand3() { if (backCommand3 == null) {//GEN-END:|72-getter|0|72-preInit // write pre-init user code here backCommand3 = new Command("Back", Command.BACK, 0);//GEN-LINE:|72-getter|1|72-postInit // write post-init user code here }//GEN-BEGIN:|72-getter|2| return backCommand3; } COM: <s> returns an initiliazed instance of back command3 component </s>
funcom_train/5450782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configBean (BeanConfig CB) { if (CB.OK) { CB.B.setName (CB.NewName); if (CB.NewIcon != null) { CB.B.setIcon (CB.NewIcon); } } CB.dispose(); setSource (PM.getPage(PageList.getSelectedIndex())); toFront(); } COM: <s> this method is called by the bean config dialog on exit </s>
funcom_train/42268219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertChildAt(int index, Node child) throws IndexOutOfBoundsException { if (index == getNumberOfChildren()) { // this is really an append addChild(child); return; } else { children.get(index); //just to throw the exception, and stop here children.add(index, child); } } COM: <s> inserts a node t at the specified position in the child list </s>
funcom_train/19753043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String executeFTPCommand(String command) throws IOException { final StringBuffer newLine = new StringBuffer("\r\n"); StringBuffer commandLine = new StringBuffer(command); _lastCommand=command; PrintStream ps = new PrintStream(_commandOutput); commandLine.append(newLine); ps.print(commandLine); if(ps.checkError()) throw new IOException(); /* int n,nn; _lastCommand=command; nn=command.length(); for(n=0;n<nn;n++) { byte b=(byte)command.charAt(n); _commandOutput.write(b); } _commandOutput.write('\n'); */ return _commandInput.readLine(); } COM: <s> sends a command to the ftp server </s>
funcom_train/17489659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (Arrays.asList(getFormats()).contains(cmd)){ // Use the format name to initialise the file suffix. File file = new File("untitledBarcode." + cmd); JFileChooser fc = new JFileChooser(); fc.setSelectedFile(file); int rval = fc.showSaveDialog(BCPlot.this); if (rval == JFileChooser.APPROVE_OPTION) { file = fc.getSelectedFile(); barcodePane.saveImage(file, cmd); } } } COM: <s> action events handler </s>
funcom_train/24123679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public boolean tableSort(JTable jT, boolean b, Vector<MusicOutputDesign> v, Comparator c) { previousComparator = c; if (b == false) { Collections.sort(v, c); updateTable(v, jT); return true; } else { Comparator reverseC = Collections.reverseOrder(c); Collections.sort(v, reverseC); updateTable(v, jT); return false; } } COM: <s> sorts a table using a comparator </s>
funcom_train/23057288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JDialog getProjectorCommandStatusjDialog() { if (ProjectorCommandStatusjDialog == null) { ProjectorCommandStatusjDialog = new JDialog(getJFrame()); ProjectorCommandStatusjDialog.setSize(new Dimension(403, 112)); ProjectorCommandStatusjDialog.setLocation(new Point(200, 200)); ProjectorCommandStatusjDialog.setTitle("Shutdown/Startup Status - Please Wait..."); ProjectorCommandStatusjDialog.setContentPane(getProjectorCommandStatusjContentPane()); } return ProjectorCommandStatusjDialog; } COM: <s> this method initializes projector command statusj dialog </s>
funcom_train/19166426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTSSPair(TSSPair pair) { tssPair = pair; String targetID = pair == null ? null : DesignUtils.getTargetID(pair); mps.setProperty(new SimpleProperty(KEY_TARGET_ID,targetID,false)); sequence.replace(0,sequence.length(),composeSequence()); } COM: <s> set the tsspair of this probe </s>
funcom_train/4377565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSections(Section param){ if (localSections == null){ localSections = new Section[]{}; } //update the setting tracker localSectionsTracker = true; java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localSections); list.add(param); this.localSections = (Section[])list.toArray( new Section[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/28719185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImageObject(ImageObject img){ for(int i=0;i<objects.size();i++){ ImageObject obj=(ImageObject)objects.elementAt(i); if(obj.getImageName().equals(img.getImageName())){ objects.remove(obj); addImageObject(obj.update(img)); return; } } // maintain only LIMIT images. if(objects.size()>=getLimit()){ ImageObject obj=(ImageObject)objects.elementAt(getLimit()-1); obj.dispose(); } // insert new image to the beginning. objects.add(0,img); } COM: <s> add a new image object to the list </s>
funcom_train/24538508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getColumnEndPosition(int x) { if (columnEndModelPositions != null) { for (int i = 0; i < columnModelPositions.length; i++) { int xpos = columnModelPositions[i]; if ((x >= xpos - ROW_COLUMN_SENSITIVITY) && (x <= xpos + ROW_COLUMN_SENSITIVITY)) return columnEndModelPositions[i].getCopy(); } } return new Point(0,0); } COM: <s> get column end position in model coordinates </s>
funcom_train/9879042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addValidationResultNodes(Frame frame, DefaultMutableTreeNode node, long time, String function, Experiment experiment) { addExpressionImages(node); addCentroidViews(node); addTableViews(node); add3DViewNode(frame, node, experiment); addClusterInfo(node); addGeneralInfoNode(node, time, function); } COM: <s> adds validation nodes into a result tree root </s>
funcom_train/38291653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanProperty(String aKey, boolean aDefault) { String v = props.getProperty(aKey); if(v == null) { return aDefault; } else { if(CaseInsensitiveString.equalsIgnoreCase(v, "true")) { return true; } else if(CaseInsensitiveString.equalsIgnoreCase(v, "false")) { return false; } else { return aDefault; } } } COM: <s> retrieve a boolean value for a configuration property </s>
funcom_train/887271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInsert(Node node) { // Must be an script node if(node.getNodeType() != Node.ELEMENT_NODE) return false; if(!node.getNodeName().equals(NODE_SCRIPT)) return false; // Must be of right type String type = ((Element) node).getAttribute(ATTR_SCRIPT_LANG); if(type == null || !type.equals(SCRIPT_TYPE)) return false; // Ok then return true; } COM: <s> returns wether a given node is an insertion script </s>
funcom_train/46580806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) return; Collection<ReferenceNode> nodes = new Vector<ReferenceNode>(); for (Information info : selectionModel.getSelected()) { nodes.add(new ReferenceNode(info)); } refsProvider.provide(nodes); } COM: <s> handle table selection change by calling provider for the new selection </s>
funcom_train/33712947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getStationsDistance(int est1,int est2) { double dist; dist= Math.sqrt(Math.pow(coordStations[est1][0]- coordStations[est2][0],2) +Math.pow(coordStations[est1][1]-coordStations[est2][1],2)) ; return dist; } COM: <s> retutns the distance between two stations </s>
funcom_train/25422553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean assertContentType(String contentType) { contentType = Val.chkStr(contentType); if (contentType.length()==0) return false; Pattern pattern = getEligibleContentTypePattern(); if (pattern==null) return false; Matcher matcher = pattern.matcher(contentType); if (matcher.matches()) return true; return false; } COM: <s> asserts content type </s>
funcom_train/45458008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void throwWarning(String warning) { String message = "<font color='#ff7700'>WARNING: "; message += warning; final String msg = message + "</font>"; System.out.println(msg); SwingUtilities.invokeLater(new Runnable() { public void run() { GameCompiler.compFrame.writeLine(msg); } }); } COM: <s> unlike errors warnings do not stop the compilation </s>
funcom_train/43896235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRange(int fromIndex, int toIndex) { ListIterator it = listIterator(fromIndex); try { for (int i = 0, n = toIndex - fromIndex; i < n; i++) { it.next(); it.remove(); } } finally { close(it); } } COM: <s> removes from this list all of the elements whose index is between </s>
funcom_train/9998590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean equalPrevAndCurrentRowObjects(Object newObject, Object previousRowObject){ if(previousRowObject == null){ if(newObject == null){ //the objects are the same (null=null) return true; }else{ return false; } }else{ if(newObject == null){ return false; }else{ return previousRowObject.equals(newObject); } } } COM: <s> compares the given object with the same index object from last row </s>
funcom_train/36145656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean deleteCD(long dataBaseDiscId) { boolean success = true; // delete tracks if (executeUpdateSequence(generator.getDeleteTracksStatement(dataBaseDiscId), false) < 0) success = false; // delete cd if (executeUpdateSequence(generator.getDeleteDiscStatement(dataBaseDiscId), false) < 0) success = false; return success; } COM: <s> deletes a cd and it acute s tracks from database </s>
funcom_train/9355762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateAccessibilityServiceListLocked() { mInstalledServices.clear(); List<ResolveInfo> installedServices = mPackageManager.queryIntentServices( new Intent(AccessibilityService.SERVICE_INTERFACE), PackageManager.GET_SERVICES); for (int i = 0, count = installedServices.size(); i < count; i++) { mInstalledServices.add(installedServices.get(i).serviceInfo); } } COM: <s> populates the cached list of installed </s>
funcom_train/26073503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasStepCounter() { Vector inps = getAllInputs(); if (inps == null) return false; for (int x = 0; x < inps.size(); ++x) { if (inps.elementAt(x) instanceof InputSynapse) { InputSynapse inp = (InputSynapse) inps.elementAt(x); if (inp.isStepCounter()) return true; } } return false; } COM: <s> determine whether this layer has an input synapse attached </s>
funcom_train/37445158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPageNumber(final Integer pageNumber) { if (pageNumber == null || pageNumber.intValue() < 1) { LOGGER.warn(getStringID() + "setPageNumber(" + pageNumber + ")"); this.pageNumber = Integer.valueOf(1); } else { this.pageNumber = pageNumber; } } COM: <s> sets the page number </s>
funcom_train/13951664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TokenizedExpression copy() { TokenizedExpression copy = new TokenizedExpression( type ); switch( type ) { case OPERATOR: copy.operator = operator; break; case CONSTANT: copy.constant = constant; break; case LABEL: copy.label = label; break; case EXPRESSION: copy.expression = new Vector<TokenizedExpression>(); for( int i = 0; i < expression.size(); i++ ) copy.expression.add( expression.get( i ).copy() ); break; case ERROR: return null; } return copy; } // public TokenizedExpression copy() COM: <s> this method creates a copy of the tokenized expression object </s>
funcom_train/39184354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellComment(boolean contains, String name){ crit11CheckBox.setSelected(true); crit11ComboBox.setSelectedIndex(contains?0:1); crit11TextField.setText(name); crit11ComboBox.setEnabled(true); crit11TextField.setEnabled(true); crit11Label.setEnabled(true); } COM: <s> changes the settings for the cellular comment criteria </s>
funcom_train/21125492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyTAInConflict(String sTaID, boolean bChildInConflict) { // iterate through listeners for(Iterator it = taCompletedListeners.iterator(); it.hasNext(); ) { // call notification method ((TACompletedListener) it.next()).taInConflict(sTaID, bChildInConflict); } } COM: <s> notifies all registered listeners about a transaction in conflict </s>
funcom_train/7442900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Route getBest(Request request, Response response, float requiredScore) { Route result = null; float bestScore = 0F; float score; for (final Route current : this) { score = current.score(request, response); if ((score > bestScore) && (score >= requiredScore)) { bestScore = score; result = current; } } return result; } COM: <s> returns the best route match for a given call </s>
funcom_train/48353696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCompressedSize(String s) { ByteArrayOutputStream baos = null; BufferedOutputStream out = null; try { baos = new ByteArrayOutputStream(); out = new BufferedOutputStream(new GZIPOutputStream(baos)); byte[] bytes = s.getBytes(); for (int i = 0; i < bytes.length; i++) { out.write(bytes[i]); } out.flush(); } catch (Exception e) { } try { if (out != null) out.close(); } catch (Exception e) { } return baos.size(); } COM: <s> returns the size of a string after compression by gzip </s>
funcom_train/2558606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateExpressions(Class type) throws Exception { for(Label label : elements) { if(label != null) { validateExpression(label); } } for(Label label : attributes) { if(label != null) { validateExpression(label); } } if(text != null) { validateExpression(text); } } COM: <s> this is used to validate the expressions used for each label that </s>
funcom_train/42710896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void movePoint(T point, double newEasting, double newNorthing) { if(!onMap(newEasting, newNorthing)) throw new IllegalArgumentException("New location is not within the bounds of this quad tree."); this.removePoint(point); point.setEasting(newEasting); point.setNorthing(newNorthing); this.addPoint(point); } COM: <s> move an existing point object to a new location </s>
funcom_train/44706858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String label, String attribute) { // Determine if we are dealing with a simple string or a complex // path if(attribute.indexOf('.') == -1) { add(label, attribute, m_toStringFormatter); } else { add(label, attribute, m_recursiveFormatter); } } COM: <s> add a new property to the sheet </s>
funcom_train/14282395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestDumpDebug() throws IOException, CommandNotProcessedException { SNZBRequestBase messageBase = new SNZBRequestBase(); messageBase.init(SNZBRequestBase.E_REQUEST_DUMP_DEBUG, this.password); messageBase.writeTo(sout); SNZBDumpDebugResponse dumpDebugResponse = new SNZBDumpDebugResponse(sin); if (!dumpDebugResponse.isSuccess()) { throw new CommandNotProcessedException("The command can not be processed by nzbget server.\n" + dumpDebugResponse.getText()); } } COM: <s> request dumping of debug info </s>
funcom_train/4022982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadQuickSlot() { Client client = getClient(); if (client == null) { return; } Iterator<QuickSlotItem> quickSlot = getQuickSlot() .getQuickSlotIterator(); while (quickSlot.hasNext()) { QuickSlotItem qsItem = quickSlot.next(); Item item = qsItem.getItem(); if(item.getEntityId()==-1){ client.getPlayer().getPosition().getLocalMap().createEntityId(item); } client.sendPacket(Type.QUICK, qsItem); } } COM: <s> load quick slot items </s>
funcom_train/25792236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRemoved() { if (m_toolInstance != null) { return m_isRemoved; } for (int index = 0; index < getChildCount(); index++) { ToolTreeNode node = (ToolTreeNode) getChildAt(index); assert (node.getId() != null); // node must have a tool if (!node.isRemoved()) { return false; } } return true; } COM: <s> if the node has an item it will return the items removed state </s>
funcom_train/13319815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpConfigAttributes(ConfigAttributeDefinition definition, List<WSRole> roles) { for (final WSRole role : roles) { // logger.debug("ROLENAME: " + role.getName()); definition.addConfigAttribute(new SecurityConfig(role.getName().toUpperCase())); } } COM: <s> reads wsrole collection and associates roles from collection </s>
funcom_train/2572927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String Send_SSH_CMSG_WINDOW_SIZE(int c, int r) throws IOException { SshPacket1 p = new SshPacket1(SSH_CMSG_WINDOW_SIZE); p.putInt32(r); // Int32 rows p.putInt32(c); // Int32 columns p.putInt32(0); // Int32 x pixels p.putInt32(0); // Int32 y pixels sendPacket1(p); return ""; } COM: <s> send ssh cmsg window size </s>
funcom_train/7881106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mul(String bin) { int r1 = Integer.parseInt(bin.substring(8, 11), 2); int r2 = Integer.parseInt(bin.substring(11, 14), 2); int r3 = Integer.parseInt(bin.substring(14, 17), 2); try { int temp = twosCompliment(getBinReg(r2)) * twosCompliment(getBinReg(r3)); setReg(r1, temp); } catch (NumberFormatException e) { // overflow occurs } } COM: <s> description multiplies the values in two registers if register values </s>
funcom_train/29922524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void grantRead(UserDO user, ResourceDO resource, UserGroupDO userGroup ) throws ResourceStoreAuthorisationException { //verify method attribute this.verifyAttribute(readResourceAttr); //checking user is valid this.authenticatedCheck(user); this.administratorCheck(user,resource); //adding attribute to user or group this.grantAttribute(userGroup,readResourceAttr,resource); }//end method COM: <s> grants the read resource attribute to user or group </s>
funcom_train/23452994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPortTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WsdlOperationRef_portType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WsdlOperationRef_portType_feature", "_UI_WsdlOperationRef_type"), WsdlGroundingPackage.Literals.WSDL_OPERATION_REF__PORT_TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the port type feature </s>
funcom_train/36684041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeFrame() { setTitle(Constants.getMessage("FRAME_TITLE")); setPreferredSize(new Dimension(Constants.getInteger("FRAME_WIDTH"), Constants.getInteger("FRAME_HEIGHT"))); getContentPane().setLayout(new BorderLayout()); getContentPane().add(myReplayPanel, BorderLayout.NORTH); getContentPane().add(myResumePanel, BorderLayout.CENTER); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); pack(); } COM: <s> initializes the game history view frame </s>
funcom_train/23898459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChildNode(XMLTreeNode treeNode, XMLTreeNode newTreeNode) { //add newTreeNode as a child to treeNode. treeNode.appendChildXMLTreeNode(newTreeNode); // Add New Node at the end of tree. this.insertNodeInto(newTreeNode, treeNode, treeNode.getChildCount()); } COM: <s> add a child node to the tree and xml </s>
funcom_train/32356732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton2() { if (jButton2 == null) { jButton2 = new JButton(); jButton2.setText("Cancel"); jButton2.setBounds(new Rectangle(193, 107, 73, 26)); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.exit(0); } }); } return jButton2; } COM: <s> this method initializes j button2 </s>
funcom_train/15627655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog(@NotNull final MapView<G, A, R> mapView) { if (instance == null) { instance = new ReplaceDialog<G, A, R>(parent, copyBuffer, objectChooser, faceObjectProviders, insertionModeSet); } instance.display(mapView); } COM: <s> displays the replace dialog </s>
funcom_train/40682170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(BoundWidget model) { if (model instanceof BoundTable) { BoundTable contacts = (BoundTable) model; Contact c = (Contact) contacts.getSelected().get(0); FlowController.call(contacts, ContactsEntryPoint.EDIT, c); } if (model instanceof Button) { Contact c = new Contact(); FlowController.call((Button) model, ContactsEntryPoint.EDIT, c); } } COM: <s> upon execute determine what widget made the call the button or the table </s>
funcom_train/43852636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String name) { double value = 0.0; String sValue = getString(name); try { value = Double.parseDouble(sValue); } catch (NumberFormatException e) { // Convert to an IllegalArgumentException throw new IllegalArgumentException("Cannot convert \"" + sValue + "\" to double."); } return value; } COM: <s> get an attribute value as double </s>
funcom_train/47270886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrameTitle() { if (FileStatus.getName() != "") { mainUI.setTitle(FileStatus.getName() + ((FileStatus.isEdited())? "*" : " ") + " - " + mainUIbaseTitle); } else { mainUI.setTitle(mainUIbaseTitle); } } COM: <s> places name of file currently being edited into the title bar </s>
funcom_train/19811511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasCollaboration(String name) { /* if (!this.collaborations.getCollaboration().contains(this.uniqueIdCollaboration.get(name))) { System.out.println("Fixed a invalid link."); this.uniqueIdCollaboration.remove(name); } */ return this.uniqueIdCollaboration.containsKey(toUniqueId(name)); } COM: <s> return true if the given name of collaboration is contained in the system </s>
funcom_train/3159333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringAttributeValue(String attributeName) { String strRet = null; HdfAttributeContainer cont = (HdfAttributeContainer) _attributes.get(attributeName); if (cont != null) { if ((cont.getHdfType() == HDFConstants.DFNT_CHAR) || (cont.getHdfType() == HDFConstants.DFNT_CHAR)) { strRet = cont.getStringValue(); } } return strRet; } COM: <s> retrieves the string value of the attribute with the given name </s>
funcom_train/14157013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendToDoc(StructuredDocument doc) { Element e, e2; e = doc.createElement(ROOT_XML_TAG); doc.appendChild(e); e2 = doc.createElement(peerIDTag, id); e.appendChild(e2); e2 = doc.createElement(valueTag, "" + value); e.appendChild(e2); } COM: <s> append an xml representation of a clock element to an existing </s>
funcom_train/15601323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(IListener Listener) { if (Listener instanceof ILoginFailedListener) { m_LoginFailedListeners.add((ILoginFailedListener)Listener); } if (Listener instanceof ILoginSucceededListener) { m_LoginSucceededListeners.add((ILoginSucceededListener)Listener); } if (Listener instanceof ISecurityCodeUpdateListener) { m_SecurityCodeUpdatedListeners.add((ISecurityCodeUpdateListener)Listener); } } COM: <s> p register the listener </s>
funcom_train/32750246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AcceleratorNode getNodeWithId( final String label ) { // first check if this sequence is itself a match if ( getId().equals( label ) ) return this; final Iterator sequenceIter = getBaseConstituents().iterator(); while( sequenceIter.hasNext() ) { final AcceleratorSeq sequence = (AcceleratorSeq)sequenceIter.next(); final AcceleratorNode node = sequence.getNodeWithId(label); if ( node != null ) return node; } return null; } COM: <s> search deeply for and get the node with the specified id </s>
funcom_train/3516750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void hide(MarshalledObject<DUID> id, String spaceName, String mgrName) throws RemoteException { // inform the corresponding SwingTreeExplorer instance EventEntry evt = new EventEntry(mgrName, Constants.HIDE_MANAGER); evt.addAttribute(Constants.SPACE_NAME, spaceName); /* throws RemoteException */ dispatchEvent(evt, id); } COM: <s> this generic protected method hides the subtree representing the </s>
funcom_train/25710061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDirectoryOption(String option) { String directory = directoryOptions.get(option); if (! directory.endsWith("/") && ! directory.endsWith("\\")) { directory = directory + System.getProperty("file.separator"); } checkDirectory(directory); return directory; } COM: <s> return the specified directory option </s>
funcom_train/32740072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addJava2JavaRelation(String fromFile, String className, String reason) { String toFile = "/WEB-INF/classes/" + className.replace(".", File.separator); Dictionary<String, Object> relationOrigin = new Hashtable<String, Object>(); relationOrigin.put("reason", reason); rc.addRelation(fromFile, toFile, "java2java", relationOrigin); } COM: <s> adds a java java relation </s>
funcom_train/19673549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() throws DatabaseException { try { String parent = getParent(); File dir = new File(parent); dir.mkdirs(); if(!exists()) createNewFile(); Document d = docbuild.newDocument(); writeFile(d); } catch (IOException ex) { throw new DatabaseException(ex.getMessage()); } } COM: <s> this method initializes the file to a black document </s>
funcom_train/15410254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runDdl() { if (runDdl) { try { if (dropContent == null){ dropContent = readFile(getDropFileName()); } if (createContent == null){ createContent = readFile(getCreateFileName()); } runScript(true, dropContent); runScript(false, createContent); } catch (IOException e){ String msg = "Error reading drop/create script from file system"; throw new RuntimeException(msg, e); } } } COM: <s> run the ddl drop and ddl create scripts if properties have been set </s>
funcom_train/13558629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeObject(OutputStream outputStream) throws IOException { ByteArrayOutputStream recordOut = new ByteArrayOutputStream(); writeFacialRecordData(recordOut); byte[] facialRecordData = recordOut.toByteArray(); long faceImageBlockLength = facialRecordData.length + 4; DataOutputStream dataOut = new DataOutputStream(outputStream); dataOut.writeInt((int)faceImageBlockLength); dataOut.write(facialRecordData); dataOut.flush(); } COM: <s> writes this face image info to output stream </s>
funcom_train/23267851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFechaPago() { System.out.println("getFechaPago"); Amortizaciones instance = new Amortizaciones(); String expResult = ""; String result = instance.getFechaPago(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get fecha pago method of class capa negocios </s>
funcom_train/22489992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { while ( true ){ if ( !goOn ) { c = Color.gray; repaint(); break; } show = ! show; if ( show ) c = c1; else c = c2; repaint(); t.sleep(interv); } } catch ( InterruptedException ie ) { log.debug(ie.toString()); } } COM: <s> thread switches between the specified colors </s>
funcom_train/43541113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play() { printWelcome(); // Enter the main command loop. Here we repeatedly read commands and // execute them until the game is over. Player player1 = new Player("Hero", bedroom); boolean finished = false; while (! finished) { Command command = parser.getCommand(); finished = processCommand(command); } System.out.println("Thank you for playing. Good bye."); } COM: <s> main play routine </s>
funcom_train/10366159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Certificate getCertificate() throws CertificationAuthorityException { if(caCert == null) throw new CertificationAuthorityException("CA Certificate is null. CA may be locked."); try { return caCert = caKeystore.getCertificate(alias, password); } catch (KeystoreException e) { log.error("Error getting CA's certificate.", e); } return null; } COM: <s> this method returns cas own certificate </s>
funcom_train/31804834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConfidentiality(String confidentiality) { if (confidentiality.equalsIgnoreCase(NOCONFIDENTIALITY) || confidentiality == null || confidentiality.equals("")) { _confidentiality = NOCONFIDENTIALITY; } else if (confidentiality.equalsIgnoreCase(NORMALCONFIDENTIALITY)) { _confidentiality = NORMALCONFIDENTIALITY; } else if (confidentiality.equalsIgnoreCase(STRONGCONFIDENTIALITY)) { _confidentiality = STRONGCONFIDENTIALITY; } else { // no changes } } COM: <s> sets the confidentiality for aglet transfer and message </s>
funcom_train/18050993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f.isDirectory()) return true; for (int i = 0; i < types.length; ++i) { if (f.getName().toUpperCase().endsWith(types[i])) { return true; } } return false; } COM: <s> whether the given file is accepted by this filter </s>
funcom_train/11345213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addElement(Element elem) { if (m_elements == null) { m_elements = new Element[] { elem }; } else { Element[] newElementsList = new Element[m_elements.length + 1]; System.arraycopy(m_elements, 0, newElementsList, 0, m_elements.length); newElementsList[m_elements.length] = elem; m_elements = newElementsList; } } COM: <s> adds an element to the </s>
funcom_train/40735793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMailAuthRequired(Boolean newVal) { if ((newVal != null && mailAuthRequired != null && newVal.equals(mailAuthRequired)) || (newVal == null && mailAuthRequired == null && mailAuthRequiredIsInitialized)) { return; } mailAuthRequired = newVal; mailAuthRequiredIsModified = true; mailAuthRequiredIsInitialized = true; } COM: <s> setter method for mail auth required </s>
funcom_train/20043777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _removeConfigurationListener() { requiredMethod("addConfigurationListener()"); oObj.removeConfigurationListener(xListener); xListener.reset(); xListener.fireEvent(); tRes.tested("removeConfigurationListener()", !xListener.actionWasTriggered()); } COM: <s> removes the listener and calls an event </s>
funcom_train/7308791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void analyse(String inFileName) throws IOException { System.out.println("FLAX Analysis for " + inFileName); FileInputStream is = new FileInputStream(inFileName); FLACDecoder decoder = new FLACDecoder(is); decoder.addFrameListener(this); decoder.decode(); } COM: <s> analyse an input flac file </s>
funcom_train/4835295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { // Get references to the drawing surfaces and the game maze Graphics2D buffedG2D = (Graphics2D)bufferStrategy.getDrawGraphics(); // Set rendering settings loadSettings(buffedG2D); // Centre the maze in the PacCanvas transformCenter(maze, buffedG2D); // Draw the game elements drawBackBuffer(buffedG2D); // Dispose of the old graphics surface, show the buffered surface bufferStrategy.show(); g.dispose(); } COM: <s> paints the current maze status onto the pac canvas </s>