__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17818311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties loadSwatch(String path) { Properties bundle = new Properties(); try { //create a new InputStream pointing to the properties file. //this method finds the file using the path given, BUT //relative to the package base. InputStream in = this.getClass().getClassLoader() .getResourceAsStream(path); if (in != null) { //load the properties file. bundle.load(in); // Can throw IOException } in.close(); } catch (Exception e) { e.printStackTrace(); } return bundle; } COM: <s> loads the properties file specifing the colours to display </s>
funcom_train/9431010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCountString(int count, int limit) { if (limit == 0 || count < limit) { return String.valueOf(count); } else { if (limit > 10) { // round to nearest lower multiple of 10 count = 10 * ((limit - 1) / 10); } return count + "+"; } } COM: <s> return a rounded representation of a suggestion count if e </s>
funcom_train/35178251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection findAllStructure() { ArrayList values = new ArrayList(); try { Collection col = EntityHomeCache.getInstance().getStructureHome().findAll(); Iterator it = col.iterator(); while (it.hasNext()) { values.add(((StructureLocal) it.next()).getStructureLite()); } } catch (FinderException e) { e.printStackTrace(); } return values; } COM: <s> finds and returns all the structures of the database </s>
funcom_train/16358263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public long stringToMs(String duration, String unit) throws IllegalArgumentException,NumberFormatException { long ms = 0; try { if (unit.equalsIgnoreCase("ms")) ms = Long.valueOf(duration).longValue(); else ms = Long.valueOf(duration).longValue() * getMs(unit) ; } catch (NumberFormatException e) { throw new NumberFormatException("Wrong number format : " + duration); } return ms; } COM: <s> convert the string into duration in ms </s>
funcom_train/12547690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void export() { Production[] p = editingGrammarModel.getProductions(); /* System.out.println("PRINTTITTING"); for (int i=0; i<p.length; i++) { System.out.println(p[i]); }*/ try { p = CNFConverter.convert(p); } catch (UnsupportedOperationException e) { JOptionPane.showMessageDialog(this, e.getMessage(), "Export Error", JOptionPane.ERROR_MESSAGE); return; } try { Grammar g = (Grammar) grammar.getClass().newInstance(); g.addProductions(p); g.setStartVariable(grammar.getStartVariable()); FrameFactory.createFrame(g); } catch (Throwable e) { System.err.println(e); } } COM: <s> takes the grammar and attempts to export it </s>
funcom_train/49331266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeListener(T listener) { checkState(false); Iterator<ListenerData<T>> iterator = listeners.iterator(); while (iterator.hasNext()) { if (iterator.next().listener == listener) { iterator.remove(); log.verbose(1, "Removing listener " + listener); return true; } } log.info(1, "Attempting to remove non-existant listener " + listener); return false; } COM: <s> remove the specified listener from the list </s>
funcom_train/28017263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean readLine() { String buffer ; do { try { buffer = reader_.readLine(); if (buffer == null) { return readLine(""); //EOF } } catch (final IOException e) { return readLine(""); } lineNumber_++; buffer = buffer.trim(); } while (buffer.length() == 0); return readLine(buffer); } COM: <s> stores the next non null line from file buffer in the line buffer </s>
funcom_train/8078870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double classifyInstance(Instance inst) throws Exception { m_ReplaceMissingValues.input(inst); m_ReplaceMissingValues.batchFinished(); Instance filtered = m_ReplaceMissingValues.output(); m_NominalToBinary.input(filtered); m_NominalToBinary.batchFinished(); filtered = m_NominalToBinary.output(); if(m_Balanced) return(makePredictionBalanced(filtered)); else return(makePrediction(filtered)); } COM: <s> outputs the prediction for the given instance </s>
funcom_train/5459486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Logger getLogger(Crawler crawler) { try { if ((crawler!=null)&&(crawler.getDataSource()!=null)&&(crawler.getDataSource().getID()!=null)) return server.getDataSourcePool().getDataSourceLogger(crawler.getDataSource().getID().toString()); } catch (Exception x) { return default_logger; } return default_logger; } COM: <s> get the logger for the specific datasource of the passed crawler </s>
funcom_train/29690510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double increaseH(double hIn, double accuracy) { final double PGROW = -0.2; double increasedH = (SAFETY * hIn * Math.pow(accuracy, PGROW)); increasedH = (increasedH >= 0.0 ? Math.min(increasedH, 5.0 * hIn) : Math.max(increasedH, 5.0 * hIn)); return increasedH; } COM: <s> truncation error has been o </s>
funcom_train/8690703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { resources.removeAllElements(); zipFile = null; baseDir = null; groupfilesets.removeAllElements(); duplicate = "add"; archiveType = "zip"; doCompress = true; emptyBehavior = "skip"; doUpdate = false; doFilesonly = false; encoding = null; } COM: <s> makes this instance reset all attributes to their default </s>
funcom_train/3842514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(WorkView view) { if (view == null) { this.sortableTableModel.setTableModel(tableModel); this.table.setModel(sortableTableModel); } if (view instanceof DomainFilterView) { DomainFilterView domainView = (DomainFilterView)view; this.sortableTableModel.setTableModel(domainView.getTableModel()); this.table.setModel(sortableTableModel); } } COM: <s> selects the appropriate view of the worksurface </s>
funcom_train/15922597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context pushSource(ImportTable it) { assert (depType == null); if (reporter.should_report(TOPICS, 4)) reporter.report(4, "push source"); Context v = push(); v.kind = SOURCE; v.it = it; v.inCode = false; v.staticContext = false; return v; } COM: <s> enter the scope of a source file </s>
funcom_train/14070768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendRoomCommand(String roomName,DeviceCommand cmd) { HouseCommand msg = new HouseCommand(); msg.setType(HouseCommand.Type.ROOM); msg.setCommand(cmd); msg.setIdentifier(roomName); msg.setDeviceLevel(-1); sender.send(msg); } COM: <s> send a direct room command to the server </s>
funcom_train/31645926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(String toBeWritten) throws IOException { try { write(toBeWritten.getBytes("iso-8859-1")); } catch (UnsupportedEncodingException e) { //We're using US-ASCII, so this should essentially] //never happen. If it does, we can't use the 'net anyway //so we're pretty much screwed. Anyway, ignore this. } }// write(String) COM: <s> writes a code string code in ascii format discarding the top byte of </s>
funcom_train/48390834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addCloseClickHandler(com.smartgwt.client.widgets.tab.events.CloseClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tab.events.TabCloseClickEvent.getType()) == 0) setupCloseClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tab.events.TabCloseClickEvent.getType()); } COM: <s> add a on close click handler </s>
funcom_train/19142529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFrom(BaseEntity baseEntity) { setAuthor(baseEntity.getAuthor()); setDescription(baseEntity.getDescription()); setName(baseEntity.getName()); setSince(baseEntity.getSince()); setVersion(baseEntity.getVersion()); } COM: <s> copies the attribute values </s>
funcom_train/10670906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testReturnPrimitiveType() throws Exception { Expression expression = new Expression(Methods.class, "static_return_primitive", new Object[] {}); expression.execute(); assertEquals(expression.getValue(), new Integer(5)); return passed(); } COM: <s> verify that expression invokes static method which returns primitive </s>
funcom_train/11393528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void output(PrintStream out, String prefix) { prefix = prefix==null?name:prefix+"/"+name; if (children.isEmpty()) { out.println(prefix); } else { for (INode child : children) { child.output(out, prefix); } } } COM: <s> output the subtree rooted at the current node </s>
funcom_train/49890699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getDefaultEmptyRequestDelay() { assertLocked(); // Figure out how long we should wait before sending an empty request AttrPolling polling = cmParams.getPollingInterval(); long delay; if (polling == null) { delay = EMPTY_REQUEST_DELAY; } else { delay = polling.getInMilliseconds(); } return delay; } COM: <s> calculates the default empty request delay interval to use for the </s>
funcom_train/5081847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (REQ_CONNECTION_START.equals(request.getType())) return getConnectionCreateCommand((CreateConnectionRequest)request); if (REQ_CONNECTION_END.equals(request.getType())) return getConnectionCompleteCommand((CreateConnectionRequest)request); if (REQ_RECONNECT_TARGET.equals(request.getType())) return getReconnectTargetCommand((ReconnectRequest)request); if (REQ_RECONNECT_SOURCE.equals(request.getType())) return getReconnectSourceCommand((ReconnectRequest)request); return null; } COM: <s> factors the request into one of four abstract methods </s>
funcom_train/20968483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem get_helloStringItem() { if (helloStringItem == null) {// GEN-END:MVDGetBegin4 // Insert pre-init code here helloStringItem = new StringItem("Hello", "Hello, World2!");// GEN-LINE:MVDGetInit4 // Insert post-init code here }// GEN-BEGIN:MVDGetEnd4 return helloStringItem; }// GEN-END:MVDGetEnd4 COM: <s> this method returns instance for hello string item component and should be </s>
funcom_train/33256814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { setVisible(false); daySelector.paintCalendarPane(currentDate); if (showMonthSelector) { String yearString = " " + currentDate.get(java.util.Calendar.YEAR); monthSelector.setMonthName(getMonthSelectorStyle().getMonthName( currentDate.get(java.util.Calendar.MONTH)) + yearString); } setVisible(true); } COM: <s> update the view to display settings for the new date </s>
funcom_train/25791627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Reference resolve(String value, boolean fragment) { Reference result = null; if (fragment) { result = new Reference(this.base.getValue()); result.setFragment(value); } else { result = new Reference(value); if (result.isRelative()) { result = new Reference(this.base.getValue(), value); } } return result.getTargetRef(); } COM: <s> returns the absolute reference for a given value </s>
funcom_train/48911282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfFechaIngreso() { if (txfFechaIngreso == null) { txfFechaIngreso = new JTextField(); txfFechaIngreso.setEditable(false); txfFechaIngreso.setBounds(new Rectangle(121, 25, 145, 22)); txfFechaIngreso.addFocusListener(new FocusAdapter(){ @Override public void focusGained(FocusEvent arg0) { pintarPanel(2); } }); } return txfFechaIngreso; } COM: <s> this method initializes txf fecha ingreso </s>
funcom_train/44881623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVersion(String version) { String[] values = HibernateVersion.getValues(); for (int i = 0; i < values.length; i++) { if (values[i].equals(version)) { this.version = version; return; } } throw new IllegalArgumentException("Incorrect hibernate version : " + version); } COM: <s> specify version of hibernate </s>
funcom_train/654416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspTagException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); try { JspWriter out = pageContext.getOut(); out.print("Simple tag started."); } catch (IOException ioe) { ioe.printStackTrace(); } return EVAL_BODY_INCLUDE; } COM: <s> process the start tag for this instance </s>
funcom_train/18376670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMultiRowViewer() { table = new CompositeTable(sShell, SWT.NONE); table.setRunTime(true); table.setWeights(new int[] {35, 35, 20, 10}); table.addRowContentProvider(rowContentProvider); table.addDeleteHandler(deleteHandler); table.addInsertHandler(insertHandler); table.addRowFocusListener(rowListener); table.setNumRowsInCollection(personList.size()); createHeader(); createRow(); } COM: <s> this method initializes multi row viewer </s>
funcom_train/39350167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addressBulkCopy(ObjectReference src, Offset srcOffset, ObjectReference dst, Offset dstOffset, int bytes) { // Either: bulk copy is supported and this is overridden, or // write barriers are not used and this is never called if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(false); return false; } COM: <s> a number of addresses are about to be copied from object </s>
funcom_train/1996621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPannelloPrincipale() { if (pannelloPrincipale == null) { pannelloPrincipale = new JPanel(); pannelloPrincipale.setLayout(new BorderLayout()); pannelloPrincipale.add(getPannelloBasso(), BorderLayout.SOUTH); pannelloPrincipale.add(getPannelloDestra(), BorderLayout.EAST); pannelloPrincipale.add(getJScrollPane(), BorderLayout.CENTER); } return pannelloPrincipale; } COM: <s> this method initializes pannello principale </s>
funcom_train/8715882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getSample(int[] values, int od) { int mult = 1; int index = 0; for (int i = 0; i < values.length; i++) { index += mult * values[i]; mult *= getSize(i); } return samples[index][od]; } COM: <s> get a component for a sample given i m i indices and output </s>
funcom_train/3079893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PaneUI getRootPaneUI() { Window window = (Window) getComponent(); PaneUI paneUI; if (window.getContent() == null || !window.getContent().isVisible()) { paneUI = null; } else { paneUI = (PaneUI) getPeer(window.getContent()); } return paneUI; } COM: <s> returns the pane ui of the window uis content </s>
funcom_train/23057239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getScheduleNewEventOKjButton() { if (ScheduleNewEventOKjButton == null) { ScheduleNewEventOKjButton = new JButton(); ScheduleNewEventOKjButton.setText("Close Scheduler"); ScheduleNewEventOKjButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { getScheduleJDialog().setVisible(false); } } ); } return ScheduleNewEventOKjButton; } COM: <s> this method initializes schedule new event okj button </s>
funcom_train/10183790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mul(final ComplexD toMul) { final double realT = this.getReal(); final double realM = toMul.getReal(); final double imgT = this.getImg(); final double imgM = toMul.getImg(); this.setReal(realT * realM - imgT * imgM); this.setImg(realT * imgM + realM * imgT); } COM: <s> multiplies two complex numbers </s>
funcom_train/4400054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAscii(int character) { String testStr = Integer.toHexString(character); StringBuffer sb = new StringBuffer(); int len = 4 - testStr.length(); // Add spacers for (int i = 0; i < len; i++) { sb.append("0"); } sb.append(testStr); return "\\u" + sb.toString(); } COM: <s> converts a unicode character to its ascii equivalent </s>
funcom_train/47519342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixIndices() { for (int row = 0; row < ((DefaultTableModel) selectedFilesJTable.getModel()).getRowCount(); row++) { ((DefaultTableModel) selectedFilesJTable.getModel()).setValueAt(new Integer(row + 1), row, 0); } } COM: <s> fixes the indices in the table so that they are in accending </s>
funcom_train/45229934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NavigatorTreeManager rebuild() { clear(); Iterator <String> hostNamesIterator = PersistenceManager.hostNames().iterator(); while (hostNamesIterator.hasNext()) { HostTreeItem item = new HostTreeItem(this, hostNamesIterator.next()); addDefaultOperations(item).add(item); } navigatorTree.rebuildTree(); return this; } COM: <s> rebuild self command rebuild in subordinates </s>
funcom_train/48475987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addEditCompleteHandler(com.smartgwt.client.widgets.grid.events.EditCompleteHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.EditCompleteEvent.getType()) == 0) setupEditCompleteEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.EditCompleteEvent.getType()); } COM: <s> add a edit complete handler </s>
funcom_train/26509330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bendOutEdges(Node node) { if (getGraph() != node.getGraph()) throw new IllegalArgumentException("trying to bend to a node " + "in an alien graph"); Object[] edges = outEdges.toArray(); for (int i = 0; i < edges.length; i++) ((Edge)edges[i]).setStart(node); } COM: <s> bends all outgoing edges of this node to code node code </s>
funcom_train/13582911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateRouteHash(ArrayList<TransitStopFacility> stopsToBeServed){ StringBuffer sB = null; for (TransitStopFacility transitStopFacility : stopsToBeServed) { if (sB == null) { sB = new StringBuffer(); sB.append(transitStopFacility.getId().toString()); } else { sB.append("-"); sB.append(transitStopFacility.getId().toString()); } } return sB.toString(); } COM: <s> generates a unique string from the stops given </s>
funcom_train/37816812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double drawString(String str, double x, double y, int fontSize) { g.setFont(g.getFont().deriveFont((float)fontSize)); if (enableDrawing) { g.drawString(str, (int)Math.round(x), (int)Math.round(y)); } return g.getFontMetrics().getStringBounds(str, g).getWidth(); } COM: <s> draws the code string code on the code graphics code code g code </s>
funcom_train/40409533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCsvDataMap_oneColumnNoHeaderIllegalArgument() throws IOException { try { Map<String, String> dataMap = CsvUtils.getCsvDataMap("test_data/one_column_no_header.csv", false); fail("IllegalArgumentException not thrown."); } catch (IllegalArgumentException e) { // Ignore Exception. } } COM: <s> tests getting a csv data map of one column with ignoring header throwing </s>
funcom_train/18254651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveAway(LocatedAgent targetCell) { HostCell dCell = (HostCell) ((Discrete) getHostScape().getSpace()).findCellAway(this.getHostCell(), (HostCell) targetCell); if (dCell.isAvailable()) { moveTo(dCell); } } COM: <s> move one step away from the occupant of the supplied host cell </s>
funcom_train/49719589
/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.setText("Cancel"); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() dispose(); } }); } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/47906414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int string2int(String inputString) { int result = -1 ; /* error code */ if (inputString==null) return -1; String lookup = inputString; //.toLowerCase(); /* try to look the string up */ if (_tableByString.containsKey(lookup)) { result = _tableByString.get(lookup) ; } else { // add to the table result = _tableByString.size(); _tableByString.put(lookup, result); _tableByInteger.add(result,lookup); } return result; } COM: <s> this uses the existing string int correspondence or creates a new one </s>
funcom_train/4778624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void storeFeatured(List<FeaturedHolder> featuredItems) { if (featuredItems != null) { for (FeaturedHolder featuredHolder : featuredItems) { try { this.featuredItemsManager.addFeaturedItem( featuredHolder.associateId, featuredHolder.uid, -1); } catch (Exception e) { log.warn("Unable to set featured item ("+featuredHolder.uid+"): " + e, e); } } } } COM: <s> store the featured items into persistent storage </s>
funcom_train/24184936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFile(File srcFile, File destFile) { try{ InputStream in = new FileInputStream(srcFile); OutputStream out = new FileOutputStream(destFile); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0){ out.write(buf, 0, len); } in.close(); out.close(); } catch(Exception e) { System.err.println("Could not save file"); e.printStackTrace(); } } COM: <s> this method is used to copy a file </s>
funcom_train/19318566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Context createNextSubcontext(Name name, Hashtable env) throws NamingException { ContextImpl ctx = new ContextImpl(name, env); Object obj = ctx; try { obj = new MarshalledObject(ctx); } catch(IOException e) { throw new NamingException(e.toString()); } setBinding(name, obj, ctx.getClass().getName()); return ctx; } COM: <s> do create a sub context with the name </s>
funcom_train/15677524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StraightLine2D parallel(double d) { double d2 = Math.hypot(this.dx, this.dy); if (Math.abs(d2) < Shape2D.ACCURACY) throw new DegeneratedLine2DException( "Can not compute parallel of degenerated line", this); d2 = d / d2; return new StraightLine2D(x0 + dy * d2, y0 - dx * d2, dx, dy); } COM: <s> return the parallel line located at a distance d from the line </s>
funcom_train/27728857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VectorN gravity(VectorN r, Matrix E){ // Local variables // Evaluate harmonic functions // Rotate from ECI to ECEF VectorN r_bf = E.times(r); VectorN a_bf = bodyFixedGravity(r_bf); // Inertial acceleration VectorN out = E.transpose().times(a_bf); //out.print("acceleration"); return out; } COM: <s> computes the acceleration due to gravity in m s 2 </s>
funcom_train/8348543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public El setWidth(int width, boolean adjust) { if (adjust && !isBorderBox()) { width -= getFrameWidth("lr"); } if (width >= 0) { dom.getStyle().setPropertyPx("width", width); } return this; } COM: <s> sets the elementss width </s>
funcom_train/23747726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fadeLeftMouseDragged(java.awt.event.MouseEvent evt)//GEN-FIRST:event_fadeLeftMouseDragged {//GEN-HEADEREND:event_fadeLeftMouseDragged if((evt.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != MouseEvent.BUTTON3_DOWN_MASK) { offsetPanels(); } }//GEN-LAST:event_fadeLeftMouseDragged COM: <s> called when dragging the mouse on the left transparency panel under </s>
funcom_train/42510212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXEnd(Float xEnd) { if (xEnd != this.xEnd) { Float oldXEnd = this.xEnd; this.xEnd = xEnd; this.propertyChangeSupport.firePropertyChange(Property.X_END.name(), oldXEnd, xEnd); updateLength(); } } COM: <s> sets the edited abscissa of the end point </s>
funcom_train/44710093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Pane getCurrent(PageState data) { Integer i = (Integer) data.getValue(m_currentPaneParam); if (i == null) { if (m_defaultPane!=null) { return m_defaultPane; } else { return (Pane)get(0); } } return (Pane)get(i.intValue()); } COM: <s> get the currently visible code pane code the tab label together </s>
funcom_train/31936884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceCurrentPerspective() { // Add the default perspective first. IPerspectiveRegistry reg = PlatformUI.getWorkbench().getPerspectiveRegistry(); IPerspectiveDescriptor defDesc = reg.findPerspectiveWithId(IWorkbenchConstants.DEFAULT_LAYOUT_ID); if (defDesc != null) { IWorkbenchPage persp = window.getActivePage(); if (persp != null) { persp.setPerspective(defDesc); } } } COM: <s> open the selected resource in a perspective replacing the existing one </s>
funcom_train/46825532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSeatFree (int seatNum) { Vector vPlayers = getPlayers (); // Get read lock rwLock.getReadLock(); for (int i = 0; i < this.players.size(); i++) { Player player = (Player)vPlayers.get(i); if (player.getSeatNum() == seatNum) { rwLock.release(); return false; // seat isn't free! } } // release rwLock.release(); return true; } COM: <s> return true if a seat at a table is free </s>
funcom_train/18862542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doOpenTypeSelectionDialog() { SelectionDialog dialog = EditorUtility .getTypeSelectionDialog(getSection().getShell()); if (dialog != null && dialog.open() == SelectionDialog.OK) { IType selected = (IType) dialog.getResult()[0]; if (selected != null) { typeEntry.setValue(selected.getFullyQualifiedName()); typeEntry.commit(); } } } COM: <s> opens a code selection dialog code to choose a class or interface for </s>
funcom_train/5068501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInput(){ String defaultAnswer = "http://www.?.com"; String title ="Opening a file from the web"; String message = "Please enter the full URL of the file"; String s = (String)JOptionPane.showInputDialog( this,message,title, JOptionPane.QUESTION_MESSAGE, null, null, defaultAnswer); return s; } COM: <s> opens a dialog box and prompts the user for a url to open </s>
funcom_train/20286012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValueFromId(int id) { Iterator i = this.iterator(); while (i.hasNext()) { BlogPostCategory thisCategory = (BlogPostCategory) i.next(); if (thisCategory.getId() == id) { return thisCategory.getName(); } } return "--None--"; } COM: <s> gets the value from id attribute of the news article category list object </s>
funcom_train/14654506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timeElapsed(@SuppressWarnings("unused") Rhythm t) { addJvmTotalMemoryValue(); addJvmUsedMemoryValue(); addJvmMaxMemoryValue(); if (!noSeriesInCollection()) { removeAllSeries(); } addAllXYSeries(); /* * if (chunk_rhythm % 5 == 0){ this.printDataSet(); } */ } COM: <s> updates the series </s>
funcom_train/1026003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LValue foreach(LuaState vm, LFunction function, boolean indexedonly) { LValue key = LNil.NIL; while ( true ) { // push function onto stack vm.resettop(); vm.pushlvalue(function); // get next value if ( ! next(vm,key,indexedonly) ) return LNil.NIL; key = vm.topointer(2); // call function vm.call(2, 1); if ( ! vm.isnil(-1) ) return vm.poplvalue(); } } COM: <s> executes the given f over all elements of table </s>
funcom_train/13364823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMatchingCharGroup() { final Group group = getGroup(NLS_GROUP_MATCHING, tt(NLS_TT_GROUP_MATCHING), 1); final Composite composite_1 = getComposite(group); addField(new JJColorFieldEditor(P_MATCHING_CHAR, NLS_LABEL_MATCHING_CHAR, // tt(NLS_TT_MATCHING_CHAR), composite_1)); } COM: <s> adds the matching character group and field </s>
funcom_train/50558596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCommand(Command command) { command.setApplication(this); //we look if the command was previously inserted Command prevCommand = CommandManager.getInstance().getCommand(command.getName()); if (prevCommand!=null){ actions.remove(prevCommand); logger.info("overwriting previous command: "+command.getName()); } commands.add(command); } COM: <s> adds a feature to the command attribute of the application object </s>
funcom_train/32830402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInteger(String sql, Object... args) { Integer result = getObject(sql, Integer.class, args); if (result == null) { throw new UnitilsException("Unable to get int value. Statement returned a null value: '" + sql + "'."); } return result; } COM: <s> returns the int extracted from the result of the given query </s>
funcom_train/16736608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RuntimeException error(Exception ex, String msg, Object... tkns) { String err = Util.format(msg, tkns); if (ex == null) { log().error(err); return new RuntimeException(err); } else { log().error(err, ex); return new RuntimeException(err, ex); } } COM: <s> logs and wraps the given </s>
funcom_train/49106054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DcBusXmlType createDcBus() { DcBusXmlType busRec = this.getFactory().createDcBusXmlType(); busRec.setOffLine(false); busRec.setAreaNumber(1); busRec.setZoneNumber(1); getBaseCase().getBusList().getBus().add(BaseJaxbHelper.bus(busRec)); return busRec; } COM: <s> add a new bus record to the base case </s>
funcom_train/20915528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Period union(Period p) { if (this.meetsBefore(p)) { return new Period(this.getStart(), p.getEnd()); } if (this.meetsAfter(p)) { return new Period(p.getStart(), this.getEnd()); } throw new IllegalArgumentException(p + " and " + this + " do not match. Union impossible"); } COM: <s> returns the result of the merge of two periods </s>
funcom_train/48436016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void find(Test<T> test, boolean recursive, String... dirNames) { if (dirNames == null) { return; } for (String dir : dirNames) { if (dir.endsWith("/")) { dir = dir.substring(0, dir.length() - 1); } findInDirectory(test, recursive, dir); } } COM: <s> attempts to discover resources that pass the test </s>
funcom_train/23794635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perform() { // (1) Find candidates to split simpleCandidateSearch(ir); // (2) Split them boolean needCleanup = haveCandidates(); while (haveCandidates()) { splitCandidate(nextCandidate(), ir); } // (3) If something was split optimize the CFG if (needCleanup) { branchOpts.perform(); } } COM: <s> do simplistic static splitting to create hot traces </s>
funcom_train/45293438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void view() { DefaultSortableTableModel defaultSortableTableModel = (DefaultSortableTableModel) testCasesTable.getModel(); int row = testCasesTable.getSelectedRow(); row = defaultSortableTableModel.mapFromSorted(row); if (row >= 0) { AbstractTestcase testcase = (AbstractTestcase) app.getTestcases().get(row); showViewLogWindow(); viewLogWindow.viewTestcaseInfo(testcase); } } COM: <s> opens log view window to show log entries that assosiated with selected testcase </s>
funcom_train/51359717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void route(Connection connection) { if (!fixed) { if (connection.getSourceAnchor().getReferencePoint().x > connection.getTargetAnchor().getReferencePoint().x) { bpRouter.setConstraint(connection, routeLeft(connection)); this.expandSize += 5; } else { bpRouter.setConstraint(connection, routeRight(connection)); this.expandSize += 5; } bpRouter.route(connection); } } COM: <s> required implementation method which performs the acutal </s>
funcom_train/10272630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRGB(int r, int g, int b) { Color old = baseColor; baseColor = new Color(r, g, b); newColorPanel.setBackground(baseColor); rgb = new int[] { r, g, b }; hsb = null; pcs.firePropertyChange("rgb", old, baseColor); } COM: <s> sets the color to the rgb value </s>
funcom_train/38519233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBObject getFirst( DBObject keyObj ) { if( searchAttr() == null ) return null; Vector indexVals = indexKeys( keyObj ); for( int i=0; i<indexVals.size(); i++ ) { DBObject dbo = getFirst( (String)indexVals.elementAt(i) ); if( dbo != null ) return dbo; } return null; } COM: <s> get the first object being associated with the keys in the key obj </s>
funcom_train/25233741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFamily(String... family) { if (family.length == 0) { family = null; return; } StringBuilder sb = new StringBuilder(); for (String f : family) { appendString(sb, f, ','); } this.family = sb.toString(); } COM: <s> list of font families </s>
funcom_train/16818566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readInt() throws MarshalException{ if(size() < 4) throw new MarshalException("No data available in buffer"); int i4 = (out() << 24) & 0xFF000000; int i3 = (out() << 16) & 0xFF0000; int i2 = (out() << 8) & 0xFF00; int i1 = out() & 0xFF; return (i4 + i3 + i2 + i1); } COM: <s> reads an integer value from the byte stream </s>
funcom_train/49128265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void place() { logger.info("Starting to move/copy files."); worker = copier; // place files from the common group copier.placeImages(profile, common, events); // place files from remaining collections for (PhotoEvent trip : events.getTrips()) { copier.placeImages(profile, trip, events); } worker = null; logger.info("Finished moving/copying files."); } COM: <s> initiates the process of placing the files </s>
funcom_train/24039546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkDeleted(){ NodeList nlFiles = fXMLDoc.getDocumentElement().getElementsByTagName("*"); for(int i = 0; i < nlFiles.getLength(); i++){ Element eFile = (Element)nlFiles.item(i); File fFile = new File(fSharedFolder.getPath()+eFile.getAttribute(AT_NAME)); if (!fFile.exists()){ eFile.setAttribute(AT_DELE, Boolean.toString(true)); } } } COM: <s> look at the existing xml </s>
funcom_train/38864259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getYr_UrsiMo(int yr) { SubTitle1="Ursi by Month - Number of Days"; SubTitle2="Year="+yr; // Create SQL statement String sql = "SELECT ursi,mo,Ndays"; sql += " FROM ursiInv"; sql += " WHERE yr=" + yr + " ORDER BY ursi,mo"; getVarXMonth("ursi",sql); } COM: <s> create the ursi inventory for a given year </s>
funcom_train/4231773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map createCellAttributes(Point2D point) { Map map = super.createCellAttributes(point); GraphConstants.setOpaque(map, false); map.remove(GraphConstants.BORDERCOLOR); GraphConstants.setInset(map, 5); GraphConstants.setGradientColor(map, new Color(200, 200, 255)); URL iconUrl = getClass().getClassLoader().getResource( "com/informavores/example/centre.gif"); final ImageIcon centreIcon = new ImageIcon(iconUrl); GraphConstants.setIcon(map, centreIcon); return map; } COM: <s> hook from graph ed to set attributes of a new cell </s>
funcom_train/50343862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTreeToEditors(CatalogTree tree) { List <IconAdder> list = getIconEditors(); for (int i=0; i<list.size(); i++){ IconAdder ed = list.get(i); ed.addTreeToCatalog(tree); ed.initDefaultIcons(); } } COM: <s> called by image index editor after it has stored new image files and </s>
funcom_train/37483168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbMaintenanceItem() { if (cbMaintenanceItem == null) { cbMaintenanceItem = new JComboBox(); cbMaintenanceItem.setEditable(true); cbMaintenanceItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { populateInterval(); } }); } return cbMaintenanceItem; } COM: <s> this method initializes cb maintenance item </s>
funcom_train/20889362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double weightFunction(int sensorType, double value) { if (sensorType == 0) { //Themperaturesensor //simple sqrt-function double heavypoint = 25.0; if (value < heavypoint) { return (-1) * Math.sqrt((-1) * (value - heavypoint)); } else { return Math.sqrt((value - heavypoint)); } } else { LOGGER.warn("No weightfunction for SensorType " + sensorType + " is known. Leaving the value untouched"); return value; //TODO put in functions for other sensors. } } COM: <s> this method weights the sensor values by their occurance </s>
funcom_train/48631378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchEntry(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, CLOCK_DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CHARGENO, KEY_TIMEIN, KEY_TIMEOUT }, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the entry that matches the given row id </s>
funcom_train/19747371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SortField getSortFieldByFieldName(String fieldName) { SortField sortField = new SortField(fieldName, SortField.ORDER_ASCENDING); int index = sortFields.indexOf(sortField); if ( index == -1 ) { sortField = new SortField(fieldName, SortField.ORDER_DESCENDING); index = sortFields.indexOf(sortField); } if ( index != -1 ) { // sort field has been found return (SortField) sortFields.get(index); } else { return null; } } COM: <s> gets sort field associated with specified field name </s>
funcom_train/2582799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Vector)) { return false; } Vector that = (Vector) obj; if (this.x != that.x) { return false; } if (this.y != that.y) { return false; } return true; } COM: <s> tests this vector for equality with an arbitrary object </s>
funcom_train/7417600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateID(Element currentElement, int position) { if (isFromBPELNamespace(currentElement) && currentElement.getLocalName().equals("process")){ setID (currentElement, "oryx_0"); } else { Element parent = (Element)currentElement.getParentNode(); String parentID = getIDOfElement (parent); setID (currentElement, parentID + "_" + position); } } COM: <s> generate bounding and id </s>
funcom_train/22210404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RendererView getDefaultRendererView() { RendererView rv = navCtx.getRendererViewManager().getRendererView( rvd.getTargetRendererViewId()); if (rv == null) { // use global default renderer view return navCtx.getRendererViewManager() .getDefaultRendererView(); } else return rv; } COM: <s> returns the renderer view where the demand to display a model shall be </s>
funcom_train/28294601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSelectionTiming() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "getSelectionTiming"); System.out.println(" ::--> " + mSelectTiming); System.out.println(" :: SeqActivity --> END - " + "getSelectionTiming"); } return mSelectTiming; } COM: <s> retrieves the value of the selection control </s>
funcom_train/44656802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { if (logger.isDebugEnabled()) { logger.debug("Setting buffered value to '" + value + "'"); } final Object oldValue = getValue(); this.bufferedValue = value; updateBuffering(); fireValueChange(oldValue, bufferedValue); } COM: <s> sets a new buffered value and turns this buffered value model into </s>
funcom_train/1557820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void packSpaceBetween(StringBuilder sb, String... s){ sb.append(s[0]); for(int i = 1; i < s.length; i++) { if(!compact) sb.append(" " + s[i]); else sb.append(s[i]); } } COM: <s> append spaces between list s to sb if not in compact mode </s>
funcom_train/988169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("XPlanner".equals(portName)) { setXPlannerEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/14328136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void next() { _BEXI_objectIndex++; if (_BEXI_objectIndex > _BEXI_objectIndexMax - 1) { _BEXI_objectIndex = 0; } if (_BEXI_objectIndexMax != 0) { _current_Object = _objects.get(_BEXI_objectIndex); } } COM: <s> set next openbexi object from object list </s>
funcom_train/2288646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CmsXmlContentTypeManager getXmlContentTypeManager() { if (m_xmlContentTypeManager != null) { return m_xmlContentTypeManager; } if (getRunLevel() == OpenCms.RUNLEVEL_1_CORE_OBJECT) { // this is only to enable test cases to run m_xmlContentTypeManager = CmsXmlContentTypeManager.createTypeManagerForTestCases(); } return m_xmlContentTypeManager; } COM: <s> returns the xml content type manager </s>
funcom_train/50297462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSetMetaData getMetaData() throws SQLException { statementListener.executionStarted(this); Object syncObject = getSynchronizationObject(); synchronized(syncObject) { try { prepareFixedStatement(procedureCall.getSQL(selectableProcedure), true); } catch (GDSException ge) { throw new FBSQLException(ge); } } return super.getMetaData(); } COM: <s> since we deferred the statement preparation until all out params are </s>
funcom_train/15908207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSystemCursor(boolean val) { if (!isOpen()) systemCursor = val; else { l = JWintab.WTGet(HCTX); if (val) l[0] |= OPT_SYSTEM; else l[0] &= ~(OPT_SYSTEM | OPT_PEN_WINDOWS); if (JWintab.WTSet(HCTX, getContextName(), l)) systemCursor = val; } if (!systemCursor && penWindows) penWindows = false; } COM: <s> specifies whether this context must be a system cursor context </s>
funcom_train/36253143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCPUPriority(String name) { int res=-1; res = 0; try { Domain d = getDomain(name); SchedParameter[] pars = d.getSchedulerParameters(); for (SchedParameter pri : pars) { if (pri.field=="weight") res=Integer.parseInt(pri.getValueAsString()); } } catch (Exception e) { log.error(" Error: getting CPU priority of \""+name+"\"." + e.getClass()); //e.printStackTrace(); } return res; } COM: <s> returns cpu priority assigned to vm name </s>
funcom_train/31030715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void btnSaveActionPerformed(ActionEvent e) { if (! isValidatedFields()) { return; } if (mode == ValueConstants.CREATE_MODE) { createShop(); if (shop != null) { if (chkShowCreateForm.isSelected()) { resetForm(); } else { makeFormUpdatable(); } } } else { updateShop(); if (chkShowCreateForm.isSelected() ) { resetForm(); } } txtShopnum.requestFocus(); } COM: <s> save button event handler </s>
funcom_train/4286186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Attribute_isId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Attribute_isId_feature", "_UI_Attribute_type"), UmlMMPackage.Literals.ATTRIBUTE__IS_ID, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is id feature </s>
funcom_train/35924669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void substitute(String from, String to) { int i; for (i = 0; i < index; i++) { if ((keepComments) && (buffer[i].startsWith("#"))) continue; buffer[i] = buffer[i].replaceAll(from, to); } } COM: <s> substitute all occurence of a string by another string </s>
funcom_train/22360146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setType(String type) { HashMap<String, String> oldTypes = new HashMap<String, String>(types); this.types.clear(); this.types.put(type, type); for (String old : oldTypes.values()) { this.types.put(old, old); } return this.type = type; } COM: <s> sets the type </s>