__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37742344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List transitions() { if (transitionsCache == null) { List ts = new ArrayList (); for (Iterator i = transitionsLocal().iterator(); i.hasNext();) { TransitionDefinitionLocal def = (TransitionDefinitionLocal)i.next(); ts.add (new TransitionDefinition(def)); } transitionsCache = ts; } return transitionsCache; } COM: <s> gets a list of transitions for this process </s>
funcom_train/50531340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getNeighboorInfo_menuitem() { if (neighboorInfo_menuitem == null) { neighboorInfo_menuitem = new JMenuItem(); neighboorInfo_menuitem.setText(I18n.getString("neighboorinfo")); neighboorInfo_menuitem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { } }); } return neighboorInfo_menuitem; } COM: <s> this method initializes neighboor info menuitem </s>
funcom_train/18659657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(Token t,boolean genericsType) { int n = encoderTokeniser.lookupOrAddToken(t.image, SimpleNode.vsymbolTable); setType(n,genericsType); //System.out.println("nodeBase.setType "+t+" this="+this+" parent="+parent); } COM: <s> set type from token </s>
funcom_train/38789046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrder(int[] order) throws java.beans.PropertyVetoException { int[] oldOrder = getOrder(); vetoableChangeSupport.fireVetoableChange(PROP_ORDER, oldOrder, order); jData.setOrder(order); propertyChangeSupport.firePropertyChange(PROP_ORDER, oldOrder, order); }// </editor-fold> COM: <s> set the value of order </s>
funcom_train/23010762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mapUpdated() { //setMap() and setLayers() must be called first.. if(items == null) return; updateItemBounds(); //if(true)return; updateItemLocations(); //if(true)return; Layer lyr = map.getActiveLayer(); if(lyr!=null) { selectItem(lyr.id); } repaintNeeded = true; repaint(); } COM: <s> repaint legend in response on following map events </s>
funcom_train/13934965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanup () { log.debug("Starting a session cleanup process."); List<String> list = getExpiredSessions(); Iterator <String> iter = list.iterator(); while (iter.hasNext()) { String key = iter.next(); try { destroy(key); } catch (Exception ex) { //failed to destroy session log.warn ("Failed to destroy session id: "+ key + " from storage.", ex); } sessionMap.remove(key); } log.debug("Finished session cleanup process."); } COM: <s> cleans up expired sessions </s>
funcom_train/50332892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRate(double newRate) { if (DEBUG_SHOW_PUBLIC_CALLS && log.isDebugEnabled()){ log.debug("setRate: " + newRate); } int newRatio = (int)newRate; if (newRatio < 1 || newRatio > 15) { log.error(rb.getString("LogNceClockRatioRangeError")); } else { issueClockRatio(newRatio); } } COM: <s> sets nce clock speed must be 1 to 15 </s>
funcom_train/42612225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String join(String separator) throws JSONException { final int len = length(); final StringBuffer sb = new StringBuffer(); for (int i = 0; i < len; i += 1) { if (i > 0) { sb.append(separator); } sb.append(JSONObject.valueToString(myArrayList.get(i))); } return sb.toString(); } COM: <s> make a string from the contents of this jsonarray </s>
funcom_train/10007297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getImageHeight(Image img) { double h = 0.0; for(int i=0; i<10; i++){ h = img.getHeight(imageLabel); TagUtil.pleaseWait(10); } if(h <= 0.0){ h = 600; } return (int)h; } COM: <s> returns the height of image </s>
funcom_train/14093241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateStartsString2() { String leftside = "ABC"; String rightside = "ab"; int operation = Operator.Operation.STARTSWITH; boolean ignoreCase = true; boolean expectedReturn = true; boolean actualReturn = Operator.evaluate(leftside, rightside, operation, ignoreCase); assertEquals("return value", expectedReturn, actualReturn); } COM: <s> test startswith ignore case true </s>
funcom_train/1549412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(int index, Collection<? extends E> coll) { // gets initial size final int sizeBefore = size(); // adds all elements for (final Iterator it = coll.iterator(); it.hasNext();) { add((E) it.next()); } // compares sizes to detect if collection changed return sizeBefore != size(); } COM: <s> adds a collection of objects to the end of the list avoiding duplicates </s>
funcom_train/45611581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contextDestroyed(ServletContextEvent event) { System.err .println("######## WSServletContextListener.contextDestryed() #########"); if (engine != null) { log.info("Start shutdown of engine"); engine.shutDown(); } } COM: <s> this method is invoked when the web application has been removed and is </s>
funcom_train/22489864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResolvedAttribute (String key, Object value) { if (EComponentDescriptor.PROP_DATAPATH.equals(key) && value != null) { final String dataPath= (String) value; _compDesc.setModel( new EBindingListModel(_compDesc.getDelegate(""), dataPath) ); // TODO cleanup model value binding _compDesc.setProperty( EComponentDescriptor.PROP_MODEL_DATAPATH, dataPath ); return; } super.addResolvedAttribute(key, value); } COM: <s> creates a binding data model if the datapath attribute has been defined </s>
funcom_train/44920777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void start(final int rate, final boolean run) { logStart(rate, run); setEvolutionTask(new EvolutionTask(this, getEvolvables(), getListeners(), getClock(), getClockWatcher())); getEvolutionTask().setPaused(!run); final ScheduledExecutorService executor = Executors.newScheduledThreadPool(2, getThreadFactory()); setScheduledEvolutionTask(executor.scheduleAtFixedRate(getEvolutionTask(), rate, rate, TimeUnit.MILLISECONDS)); setEvolutionExecutor(executor); } COM: <s> this method starts a new evolution with generations potentially occurring </s>
funcom_train/2290092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsGroup readManagerGroup(CmsRequestContext context, CmsProject project) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { result = m_driverManager.readManagerGroup(dbc, project); } finally { dbc.clear(); } return result; } COM: <s> reads the manager group of a project </s>
funcom_train/20751551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleBrowse() { ContainerSelectionDialog dialog = new ContainerSelectionDialog( getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container"); if (dialog.open() == Window.OK) { Object[] result = dialog.getResult(); if (result.length == 1) { projectText.setText(((Path) result[0]).toString()); } } } COM: <s> uses the standard container selection dialog to choose the new value for </s>
funcom_train/31359708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void commonProperty(String property){ JSpinner spin = (JSpinner)spins.get(property); if (spin == null) return; System.out.println("driver prop changed " + property); setit(spin, property); if(driver && MAXIMUM.equals(property)){ setRange((JSpinner)spins.get(MINIMUM), 0, Integer.parseInt((String)properties.get(MAXIMUM)) ); setRange((JSpinner)spins.get(IDLE), 0, Integer.parseInt((String)properties.get(MAXIMUM))); } } COM: <s> update cause common driver property changed </s>
funcom_train/44342246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recognizeToken(byte pTokenType) throws ParsingException { nxtToken(); if(pTokenType != tokenType) { throw new ParsingException("**** Error : " + nameOfTknType(pTokenType) + " is expected instead of " + nameOfTknType(tokenType) + " " + token + " at line : " + this.lineno()); } } COM: <s> like the method nxt token this method assumes that the lexical analysis </s>
funcom_train/7634943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Location getLastKnownLocation(String provider) { if (provider == null) { throw new IllegalArgumentException("provider==null"); } try { return mService.getLastKnownLocation(provider); } catch (RemoteException ex) { Log.e(TAG, "getLastKnowLocation: RemoteException", ex); return null; } } COM: <s> returns a location indicating the data from the last known </s>
funcom_train/102310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cross makeCross() throws IOException, IllegalArgumentException { return Cross.makeCross(algorithms[crossNr], getFixed(), getMoving()); // (PERF: this is inefficient for the d-score, but not // horrible. the i/o problem is much worse than the extra // computation time.) } COM: <s> return a new crossdate of the current pairing </s>
funcom_train/16614247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readPropertiesFileIntoSystem(final String propertiesFileName) { String propsFile = propertiesFileName; System.out.println("Reading properties from " + propsFile); Properties dbProps = readSimplePropertiesFile(propsFile); Enumeration e = dbProps.propertyNames(); String name, value; while (e.hasMoreElements()) { name = (String) e.nextElement(); value = dbProps.getProperty(name); System.setProperty(name, value); } } // readPropertiesFile COM: <s> read the a properties file into the system properties </s>
funcom_train/24130501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPnIcon() { if (jPnIcon == null) { jPnIcon = new JPanel(); jPnIcon.setLayout(null); jPnIcon.setBounds(new Rectangle(15, 15, 91, 87)); jPnIcon.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); jPnIcon.add(jLblIcon, null); } return jPnIcon; } COM: <s> this method initializes j pn icon </s>
funcom_train/43096783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { modifiersPanel = new JPanel(new GridLayout2()); modifiersPanel.setBorder( new TitledBorder(Translator.localize("label.modifiers"))); modifiersPanel.add( new UMLGeneralizableElementAbstractCheckBox()); modifiersPanel.add( new UMLGeneralizableElementLeafCheckBox()); modifiersPanel.add( new UMLGeneralizableElementRootCheckBox()); } COM: <s> initialize the panel with the common fields and stuff </s>
funcom_train/42390135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RSTile getClosestTileOnMap(final RSTile tile) { if (tileOnMap(tile)) { return tile; } final RSTile loc = getMyPlayer().getLocation(); final RSTile walk = new RSTile((loc.getX() + tile.getX()) / 2, (loc .getY() + tile.getY()) / 2); return tileOnMap(walk) ? walk : getClosestTileOnMap(walk); } COM: <s> use by looping walk tile mm with this method as the argument </s>
funcom_train/2955217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRelativeX(int square, int orientation) { switch (orientation % 4) { case 0 : return shapeX[square]; case 1 : return -shapeY[square]; case 2 : return -shapeX[square]; case 3 : return shapeY[square]; default: return 0; // Should never occur } } COM: <s> returns the relative horizontal position of a specified square </s>
funcom_train/38287432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean acceptableArrow(KeyEvent e) { int code = e.keyCode; return (code == SWT.ARROW_LEFT) || (code == SWT.ARROW_RIGHT) || (code == SWT.ARROW_DOWN) || (code == SWT.ARROW_UP) || (code == SWT.HOME) || (code == SWT.END); } COM: <s> tests if key of event is navigation key </s>
funcom_train/28751920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTotal(Long newVal) { if ((newVal != null && this.total != null && (newVal.compareTo(this.total) == 0)) || (newVal == null && this.total == null && total_is_initialized)) { return; } this.total = newVal; total_is_modified = true; total_is_initialized = true; } COM: <s> setter method for total </s>
funcom_train/25615907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(String strType) { if (strType.toLowerCase().equals("open")) { type = Arc2D.OPEN; } else if (strType.toLowerCase().equals("pie")) { type = Arc2D.PIE; } else if (strType.toLowerCase().equals("chord")) { type = Arc2D.CHORD; } } COM: <s> set the type of arc </s>
funcom_train/51782200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawLabels(DrawingContext drawingContext) { if (showMultiplicities) { positionLabel(multiplicity1Label, getNode1(), getEndPoint1()); positionLabel(multiplicity2Label, getNode2(), getEndPoint2()); multiplicity1Label.draw(drawingContext); multiplicity2Label.draw(drawingContext); } if (showName) { positionNameLabel(); nameLabel.draw(drawingContext); } } COM: <s> draws the connection labels </s>
funcom_train/21656340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtNuevoCliente() { if (btNuevoCliente == null) { btNuevoCliente = new JButton(); btNuevoCliente.setBounds(new Rectangle(490, 405, 90, 25)); btNuevoCliente.setMnemonic('n'); btNuevoCliente.setText("Nuevo"); btNuevoCliente.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cliente = null; limpiarTodo(); } }); } return btNuevoCliente; } COM: <s> this method initializes bt nuevo cliente </s>
funcom_train/3079555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calibrateRotation() { setPower(10); while (getSensorInput(LegoRobot.RCX_1) > 35) { pivotRight(3); } while (getSensorInput(LegoRobot.RCX_1) <= 35) { pivotRight(5); } while (getSensorInput(LegoRobot.RCX_1) > 35) { pivotRight(2); } } COM: <s> this simulates the rotational calibration of the robot since </s>
funcom_train/33566825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAlta_Proveedor() { System.out.println("Alta_Proveedor"); Proveedor instance = new Proveedor(); instance = CreacionDeProveedor(); int expResult = 1; int result = instance.Alta_Proveedor(); 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 alta proveedor method of class proveedor </s>
funcom_train/48268890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlightLine(int lineNumber) { if (highlightedRow != null) { highlightedRow.removeClassName(styles.highlightedLine()); } TableRowElement row = getTableRowElement(lineNumber); if (row != null) { highlightedRow = row; highlightedRow.addClassName(styles.highlightedLine()); } } COM: <s> highlights a specified line of source </s>
funcom_train/17044832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUp() { boolean result = false; for (NodeInfo nodeInfo : nodeInfos) { final NodeStatus status = nodeInfo.getStatus(); if (status == NodeStatus.INITIALIZING) { result = false; break; } else if (status == NodeStatus.UP) { result = true; } } return result; } COM: <s> communications are up if none of the nodes are initializing and at least </s>
funcom_train/17620264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgress(Integer value, String text, Boolean stringPainted, Boolean visible) { if (value != null) { progressBar.setValue(value); } if (text != null) { progressBar.setString(text); } if (stringPainted != null) { progressBar.setStringPainted(stringPainted); } if (visible != null) { progressBar.setVisible(visible); } } COM: <s> set progress on progress bar </s>
funcom_train/9924539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTaskDataAttribute(String attrName, Object ticketAttr, TaskAttribute root) { if (ticketAttr == null) { return; } if (ticketAttr instanceof Collection) { root.createAttribute(attrName) .setValues(new ArrayList<String>((Collection) ticketAttr)); } else { root.createAttribute(attrName).setValue(ticketAttr.toString()); } } COM: <s> create task attribute if ticket attr is not null </s>
funcom_train/50301871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accessRead(String resource) throws CmsException { try { return m_rb.accessRead(m_context.currentUser(), m_context.currentProject(), getSiteRoot(resource)); } catch (Exception exc) { throw new CmsException(CmsException.C_UNKNOWN_EXCEPTION, exc); } } COM: <s> checks if the user may read this resource </s>
funcom_train/36906687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean open() { File f = getFile(false); // Only de-serialize if the user has NOT selected the cancel option. if (!userSelectedCancelOption) { try { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); Model savedModel = (Model)ois.readObject(); theView.setTheModel(savedModel); } catch(Exception e) { GUIUtils.error(e.getMessage()); } } else { return true; } // Reset. userSelectedCancelOption = false; return false; } COM: <s> replaces existing model with model read from selected file </s>
funcom_train/31887481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MidiEvent getMetaEvent() { String type = metaEventCombo.getSelectedItem().toString(); MidiEvent me = null; try { me = MetaEvent.createMetaEvent( type, metaDataField.getText(), getTick(), mTicksPerBeat); } catch (InvalidMidiDataException ex) { TraceDialog.addTrace(ex.getMessage()); } return me; } COM: <s> create a meta event from the dialog values </s>
funcom_train/8098284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SegmentIterator (Instance instance, Object[] startTags, Object[] inTags, Sequence prediction) { InstanceList ilist = new InstanceList (new Noop (instance.getDataAlphabet(), instance.getTargetAlphabet())); ilist.add (instance); ArrayList predictions = new ArrayList(); predictions.add (prediction); setSubIterator (ilist, startTags, inTags, predictions); } COM: <s> iterate over segments in one instance </s>
funcom_train/49943631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ErrorHandler getNullErrorHandler() { if (errorHandler == null) { errorHandler = new ErrorHandler() { public void error(final SAXParseException exception) { log.error(exception); } public void fatalError(final SAXParseException exception) { log.error(exception); } public void warning(final SAXParseException exception) { log.error(exception); } }; } return errorHandler; } COM: <s> returns an error handler that will not stop the parser on reported errors </s>
funcom_train/32057364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDragEnabled() { System.out.println("testSetDragEnabled"); jgraph.setDragEnabled( true ); boolean b = jgraph.isDragEnabled(); assertEquals( b, true ); jgraph.setDragEnabled( false ); b = jgraph.isDragEnabled(); assertEquals( b, false ); } COM: <s> test of set drag enabled method of class jgraph </s>
funcom_train/47519627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetDataSourceProperties() { PRIDEConverter.getProperties().setSelectedSourceFiles(null); PRIDEConverter.getProperties().setSelectedIdentificationFiles(null); PRIDEConverter.getProperties().setSpectrumTableModel(null); PRIDEConverter.getProperties().setSpectraSelectionCriteria(null); PRIDEConverter.getProperties().setProjectIds(new ArrayList<Long>()); } COM: <s> resets all the data source properties </s>
funcom_train/42784773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTickTimer(int periodInMillis) { String rtiVersion = props.getProperty("RTI_VERSION"); if (!rtiVersion.equalsIgnoreCase("MOCK")) { tickTimer = new Timer("tick"); tickTimer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { tick(); } }, 0, periodInMillis); // tickTimer = new Timer(periodInMillis, new ActionListener() { // public void actionPerformed(ActionEvent e) { // tick(); // } // }); // tickTimer.start(); } } COM: <s> start a background timer to call tick </s>
funcom_train/5214390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PaletteContainer createDependency2Group() { PaletteStack paletteContainer = new PaletteStack(Messages.Dependency2Group_title, null, null); paletteContainer.setId("createDependency2Group"); //$NON-NLS-1$ paletteContainer.setDescription(Messages.Dependency2Group_desc); paletteContainer.add(createDependency1CreationTool()); paletteContainer.add(createAbstraction2CreationTool()); paletteContainer.add(createUsage3CreationTool()); paletteContainer.add(createSubstitution4CreationTool()); return paletteContainer; } COM: <s> creates dependency palette tool group </s>
funcom_train/50155973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getEntryList () { if (entryList == null) { entryList = new ArrayList (); List entries = doc.selectNodes("/RecManageInfo/history/entry"); for (Iterator i=entries.iterator();i.hasNext();) { Element entryElement = (Element)i.next(); entryList.add (new HistoryEntry (entryElement)); } Collections.sort (entryList, new SortRmiHistoryEntries ()); } return entryList; } COM: <s> returns list of managed suggestions records </s>
funcom_train/15410742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeSqlUpdate(SqlUpdate updSql, Transaction t) { PersistRequestUpdateSql request = new PersistRequestUpdateSql(server, updSql, (SpiTransaction) t, persistExecute); try { request.initTransIfRequired(); int rc = request.executeOrQueue(); request.commitTransIfRequired(); return rc; } catch (RuntimeException e) { request.rollbackTransIfRequired(); throw e; } } COM: <s> execute the update sql </s>
funcom_train/25066413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFtpHostLocation(String ftpHostLocation) { // Later, can enforce this, for now just wish to be able to run devs on any platform. // if (ftpHost == null) // throw new IllegalArgumentException("No host provided"); // if (ftpHostLocation == null || ftpHostLocation.length() == 0) return; _ftpHostLocation = ftpHostLocation; } COM: <s> dependency need to be told what ftp server address to hit for information </s>
funcom_train/35300733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setString(int parameterIndex, String x) throws SQLException { checkParamIndex(parameterIndex); if(params == null){ throw new SQLException("Set initParams() before setString"); } params.put(Integer.valueOf(parameterIndex - 1), x); } COM: <s> sets the designated parameter to the given code string code </s>
funcom_train/17848812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zipDirectory(File zipfile, File directory) throws IOException { zipfile.delete(); if (!directory.exists() || !directory.isDirectory()) { return; } ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipfile)); zipDirFiles(out, directory, directory.getAbsolutePath().length()+1); out.close(); } COM: <s> creates a zip file and stores all files in a directory recursively </s>
funcom_train/34666876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initForceData() { forceFields = new ArrayList<ForceField>(); waterModels = new ArrayList<String>(); File forceFile = new File(JSimConstants.FORCEFIELDFILE); if (!forceFile.exists()) return; IXMLReader forceReader = new XMLSAXReader(forceFile, new FieldsDefHandler(forceFields, waterModels)); URL schemaURL = this.getClass().getResource( JSimConstants.FORCEFIELDSCHEMAFILE); try { forceReader.readXML(schemaURL.toString()); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> initalizes force data </s>
funcom_train/7754055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChange(String propertyName, byte oldValue, byte newValue) { if ((changeSupport != null) && (oldValue != newValue)) { changeSupport.firePropertyChange(propertyName, new Byte(oldValue), new Byte(newValue)); } } COM: <s> reports a bound property change </s>
funcom_train/48414443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User create(String login, String passwd, String email) { User user = storage.storageCreate(login, passwd, email); IntHolder holder = countCache.getIntHolder(); if(holder.getValue() == -1) { holder.setValue(storage.storageUserCount()); } holder.inc(); // Remove from missing list return user; } COM: <s> create a new user </s>
funcom_train/18338589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Identifier discoveryCacheArcIDGenerator(Integer noOfWGM, Ontology sdcGraph){ Integer numberID = noOfWGM + 1; String theID = "wgm" + numberID.toString(); Identifier theArcID = wsmoFactory.createIRI(sdcGraph.getDefaultNamespace(), theID); if (sdcGraph.findInstance(theArcID) != null) { theArcID = goalGraphArcIDGenerator(numberID, sdcGraph); } return theArcID; } COM: <s> generates a unique not existing identifier for a wgm </s>
funcom_train/12164787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructImageURLNoMaxSizeNoExtras() throws Exception { String expected = "http://server/cp8/?" + getWidthParameter() + "=256"; expected = addHeight(expected); assertEquals("URL with no maxSize/extras incorrect", expected, this.constructImageURL("http://server/", "cp8", 256, -1, createContext(null))); } COM: <s> test for construct image url </s>
funcom_train/14462713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeriesIndex(int idx) { yi = (short)idx; byte[] rkdata = this.getData(); byte[] num = ByteTools.shortToLEBytes((short)idx); rkdata[2] = num[0]; rkdata[3] = num[1]; this.setData(rkdata); } COM: <s> set the series index </s>
funcom_train/3927311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char charAt( int charOffset, int tokenOffset ) { int line = lineNumberArray[ tokenOffset ]; int lineOffset = lineOffsetArray[ tokenOffset ]; int byteOffset = lineIdx[ line ]; if ( lineOffset < 0 ) { lineOffset += 65536; } return( (char)fileData[ byteOffset + lineOffset + charOffset ] ); } COM: <s> get the character at a particular offset for a token </s>
funcom_train/3594906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLayerAt(int l) { // Find the furthest layer that starts before l String layer = null; int maxy = -1; Iterator layerNames = layerLocations.keySet().iterator(); while (layerNames.hasNext()) { String name = (String) layerNames.next(); int y = ((Integer) layerLocations.get(name)).intValue(); if(y > maxy && y <= l) { maxy = y; layer = name; } } return layer; } COM: <s> get the layer at the specified location </s>
funcom_train/26103311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllContacts() { return mDb.query(CONTACTS_DB_TABLE, new String[] {KEY_CONTACT_ID, KEY_CONTACT_NAME, KEY_RINGTONE, KEY_SUMMARY}, null, null, null, null, KEY_CONTACT_NAME); } COM: <s> fetch a list of all contacts in the database </s>
funcom_train/8072967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int distance(Synset s1, Synset s2) { int d1[] = new int[1]; int d2[] = new int[1]; if (nca(s1, s2, d1, d2) != null) return (d1[0] + d2[0]); else return (-1); } COM: <s> returns the length of s1 nca s2 1 in case of failure </s>
funcom_train/13995506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBooleanAttribute() throws Exception { assertEquals("invalid default value", false, oa1.isBooleanAttribute()); oa1.setBooleanAttribute(true); assertEquals("invalid attribute value", true, oa1.isBooleanAttribute()); oa1.setBooleanAttribute(false); assertEquals("invalid attribute value", false, oa1.isBooleanAttribute()); } COM: <s> tests an code boolean code attribute </s>
funcom_train/43702627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isClaimed(VideoEntry videoEntry) { // currently the element is only available in the extensions blob as an unrecognized extension // TODO - jarekw@ , once the client library supports the extension, this code needs to change XmlBlob xmlBlob = videoEntry.getXmlBlob(); String text = xmlBlob.getFullText(); return text != null && text.contains(CLAIMED); } COM: <s> check to see if yt claimed element is present </s>
funcom_train/13759017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSheetName(int sheet, String name) { validateSheetIndex(sheet); WorkbookUtil.validateSheetName(name); if (containsSheet(name, sheet )) throw new IllegalArgumentException( "The workbook already contains a sheet of this name" ); workbook.getSheets().getSheetArray(sheet).setName(name); } COM: <s> set the sheet name </s>
funcom_train/2586437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(final Object key, final Action action) { if (action == null) { remove(key); } else { if (this.actionMap.containsKey(key)) { remove(key); } this.actionMap.put(key, action); this.actionList.add (key); } } COM: <s> adds a binding for code key code to code action code </s>
funcom_train/46682400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSaveButtonLink() { if (SaveButtonLink == null) { SaveButtonLink = new JButton(); SaveButtonLink.setFont(new Font("Dialog", Font.BOLD, 12)); SaveButtonLink.setText("Insert Link"); SaveButtonLink.setPreferredSize(new Dimension(180, 20)); } return SaveButtonLink; } COM: <s> this method initializes save button link </s>
funcom_train/44216601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedToChildElement(String elementId) { DefaultMutableTreeNode selectedNode = getSelectedNode(); DefaultMutableTreeNode newSelectedNode = getInstanceOf(selectedNode, elementId); if(newSelectedNode != null) { setSelectionPath(new TreePath(newSelectedNode.getPath())); } } COM: <s> set selected element to the specified child element id </s>
funcom_train/6441620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPropertyAsInt(String key) throws OpenEJBException{ int integer = 0; String value = getProperty(key); try{ integer = Integer.parseInt(value); } catch(NumberFormatException nfe){ OpenEJBErrorHandler.propertyValueIsIllegal(key, value); } return integer; } COM: <s> returns the value of the key as an int </s>
funcom_train/15723471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCurrentDir(IDirEntity currentDir) { if (currentDir == null) { myLogger.severe("Can't set current directory to null!"); throw new FileManagerException("Can't set current directory to null!"); } myCurrentDir = currentDir; myCurrentChildren = myModel.getChildren(myCurrentDir); myCanGoToUpperDir = checkUpperDir(); countCurrentDirectoryStatistics(); checkSelection(); //firePanelDataChanged(); } COM: <s> sets specified directory as current </s>
funcom_train/14400284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cutStarting(String pStr, boolean pIgnoreCase) { if (pStr.length() > length()) return false; String subStr = substring(0, pStr.length()); if (pIgnoreCase ? pStr.equalsIgnoreCase(subStr) : pStr.equals(subStr)) { this.iStart += pStr.length(); return true; } return false; } COM: <s> cuts out code p str code from the beginning if it is there </s>
funcom_train/4205128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleHover(Event event) { final Control c = (Control) event.widget; final Rectangle eventArea = c.getDisplay().map(c, null, event.x, event.y, event.width, event.height); for (final DecorationData dd : myDecorations.values()) { if (dd.intersects(eventArea, true)) { setHoverDecoration(dd, event); return; } } setHoverDecoration(null, event); } COM: <s> handles the hover event </s>
funcom_train/5857053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEdgeState(String _name, int _state) throws HeroException { log.debug("setEdgeState Name="+_name+" state="+Edge.edgeStateName[state]); Edge edge=this.getEdge(_name); edge.setState(_state); jms.sendEdgeEvent(SETEDGESTATE, this.getName(), _name, edge.getNodeIn(), edge.getNodeOut(),context.getCallerPrincipal().getName()); makeDirty(); } COM: <s> describe code set edge state code method here </s>
funcom_train/1344195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { while ( !requestedToCancel ) { final long timeToWaitBeforeNextCheck = periodTime / 25l + 1l; while ( !requestedToCancel && !readyForNextIteration ) sleep( timeToWaitBeforeNextCheck ); sleep( periodTime ); if ( !requestedToCancel ) { readyForNextIteration = false; timeable.signalingNextIteration(); } } } catch ( final InterruptedException ie ) { } } COM: <s> the run method of the timer this will time the timeable object </s>
funcom_train/31123308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Service getService(String name, String version) throws XMLDBException { Service service = null; for (int i=0; i<services.size(); i++) { service = (Service)services.elementAt(i); if (service.getName().equals(name)) { service.setCollection(this); return service; // support version } } return null; // service not found } COM: <s> returns a code service code instance for the requested service name and version </s>
funcom_train/43246236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAdmitDate() { System.out.println("setAdmitDate"); Calendar admitDate = null; AdmissionObject instance = new AdmissionObject(); instance.setAdmitDate(admitDate); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set admit date method of class org </s>
funcom_train/3761690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException { xpathHandler.startElement(uri, loc, raw, a); if (super.contentHandler != null) super.contentHandler.startElement(uri,loc,raw,a); } COM: <s> receive notification of the beginning of an element </s>
funcom_train/31947690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUsersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EPortal_users_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EPortal_users_feature", "_UI_EPortal_type"), SailuserdataPackage.Literals.EPORTAL__USERS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the users feature </s>
funcom_train/25098536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProviderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AXLOperation_provider_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AXLOperation_provider_feature", "_UI_AXLOperation_type"), TransactioneditorPackage.Literals.AXL_OPERATION__PROVIDER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the provider feature </s>
funcom_train/2624459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPath() { JFileChooser chooser = new JFileChooser(); chooser.setCurrentDirectory(new java.io.File(".")); chooser.setDialogTitle("Select Application Path"); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setAcceptAllFileFilterUsed(false); if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { textApplicationPath.setText(chooser.getSelectedFile().getPath()); } } COM: <s> opens a window that lets you choose the path to the application </s>
funcom_train/36680186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Game startServerGame() throws NetworkException { try { battleServerConnection.canPlay(serverGame, user); Map map = battleServerConnection.downloadMap(serverGame); ServerGameInfo serverInfo = battleServerConnection.getServerGameInfo(serverGame.getGameName()); return createGame(map, serverInfo); } catch (IOException ex) { throw new NetworkException(ex); } } COM: <s> start a servergame </s>
funcom_train/10536110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Reference ref; while ((ref = this.q.poll()) != null) { IKey keyedRef = (IKey)ref; // remove unused lock; may fail but that's fine. synMap.remove(keyedRef.getKey(), ref); // referent should have been cleared by GC. if (debug) this.count.incrementAndGet(); } } COM: <s> executes one cycle of stale entries removal </s>
funcom_train/3370724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForegroundAt(int index, Color foreground) { Color oldFg = pages.get(index).foreground; pages.get(index).setForeground(foreground); if (foreground == null || oldFg == null || !foreground.equals(oldFg)) { Rectangle tabBounds = getBoundsAt(index); if (tabBounds != null) { repaint(tabBounds); } } } COM: <s> sets the foreground color at code index code to </s>
funcom_train/12182310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEditorValue(StyleValueEditor editor, StyleValue newValue) { editor.updateEditor(newValue, false); // the priority checkbox is shared between the child style value // editors - need to determine if it should be disabled every time an // editor value changes. updatePriorityCheckbox(); } COM: <s> convenience method which updates the child </s>
funcom_train/23779584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLog() { if (_logCollector == null) return null; // we will skip the first and last three lines // as they contain the log output of the PROC PRINT // log redirection String logText = _logCollector.getResultAsString(3, 3); // finally we filter out doubled lines return LogHelper.filter(logText); } COM: <s> returns the log data as string </s>
funcom_train/11678291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadConnectionFactoryFromProperies() { if (properties != null) { Context context = null; try { context = new InitialContext(properties); } catch (NamingException e) { handleException("Could not get an initial context using " + properties, e); } connectionFactory = getConnectionFactory(context, properties); destination = getDestination(context, targetEPR); replyDestination = getReplyDestination(context, targetEPR); } } COM: <s> provides a lazy load when created with a target epr </s>
funcom_train/4675989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int toInt() { int res = 0; int pow = 0; char[] val = value; for (int i = length - 1; i >= 0; i--) { char c = val[i]; if (c < '0' || c > '9') { throw new NumberFormatException("Bad character : " + val[i]); } res += (c - '0') * (int) Math.pow(10, pow++); } return res; } COM: <s> returns the decimal value represented by this string messenger </s>
funcom_train/25703983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rotateEntity (Entity entity, float [] newRotation) { int transactionID = model.issueTransactionID(); RotateEntityTransientCommand cmd = new RotateEntityTransientCommand( model, transactionID, entity.getEntityID(), newRotation); cmd.setErrorReporter(errorReporter); model.applyCommand(cmd); } COM: <s> rotate an entity to a new rotation by issuing a transient command </s>
funcom_train/38308421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLegalAncestor(String token) { TokenAncestor[] ancestorRules = getAncestorRules(); if (ancestorRules == null) { return false; } for (int i = nextLegalAncestor; i < ancestorRules.length; i++) { TokenAncestor ancestor = ancestorRules[i]; if (ancestor.getToken().equals(token)) { return true; } } return false; } COM: <s> tells whether or the given token is a legal ancestor </s>
funcom_train/18503847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == exitMenuItem) adaptee.exitMenuItem_actionPerformed(e); else if (e.getSource() == partnersMenuItem) adaptee.partnersMenuItem_actionPerformed(e); else if (e.getSource() == partners2MenuItem) adaptee.partners2MenuItem_actionPerformed(e); } COM: <s> the menu action to be performed </s>
funcom_train/5418098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar createMenuBar() { JMenuBar menu = new JMenuBar(); menu.add(createLayoutMenu()); menu.add(createFocusViewMenu()); menu.add(createThemesMenu()); menu.add(createPropertiesMenu()); menu.add(createWindowBarsMenu()); return menu; } COM: <s> creates the frame menu bar </s>
funcom_train/25066167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void displayInitialSiteDataPanel() { if (showingSiteTabs() && currentSites != null && currentSites.size() > 4) { toggleSiteTabLink(); // toggleSiteTabLink will call recreateSiteDataPanel(); } else { recreateSiteDataPanel(-1); } } COM: <s> this method is called when map has been displayed </s>
funcom_train/11004234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeader(int pageNumber) { // First page header is optional, only return // if it's set if(pageNumber == 1) { if(getFirstHeader().length() > 0) { return getFirstHeader(); } } // Even page header is optional, only return // if it's set if(pageNumber % 2 == 0) { if(getEvenHeader().length() > 0) { return getEvenHeader(); } } // Odd is the default return getOddHeader(); } COM: <s> returns the correct defined header for the given </s>
funcom_train/1535792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLabel(Renderer renderer){ //if (!getView3D().isStarted()) return; if(!getGeoElement().isEuclidianVisible()) return; if (!getGeoElement().isLabelVisible()) return; //Application.debug("ici"); for(DrawLabel3D label : labels.values()) label.draw(renderer); super.drawLabel(renderer); } COM: <s> draw label is used here for ticks </s>
funcom_train/173714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document createDocument() throws JDOMException { try { return (Document)Class.forName( "oracle.xml.parser.XMLDocument") .newInstance(); } catch (Exception e) { throw new JDOMException(e.getClass().getName() + ": " + e.getMessage() + " when creating document", e); } } COM: <s> this creates an empty code document code object based </s>
funcom_train/48668601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleDocumentChanged() { try { if(!fDocumentChanged && fEditor.getAction(EmbeddedEditorPanel.SAVE).isEnabled()) { fDocumentChanged = true; String title = getTitle(); if(title != null) { int idx = title.indexOf('*'); if(idx < 0) { setTitle(getTitle() + "*"); } } } } catch(Exception e) { UIExceptionMgr.userException(this, e); } } COM: <s> handles document changed events </s>
funcom_train/9528618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model createDBModel(DBConnectionInfo dbConnectionInfo, String dbModelName) { DBConnector dbConnector = new DBConnector(dbConnectionInfo); DBConnection dbConnection = dbConnector.getJenaConnection(); // create a model maker with the given connection parameters ModelMaker maker = ModelFactory.createModelRDBMaker(dbConnection); log.trace("Creating Model of name '" + dbModelName + "'."); Model model = maker.createModel(dbModelName, true); return model; } COM: <s> creates a new jena arq model or opens an existing jena model </s>
funcom_train/50869772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public List fetchStringList(String section, String key, int maxItems) { List retVal = new LinkedList(); for (int i = 1; i <= maxItems; i++) { String cur = properties.getProperty(section + "-" + key + "-" + i); if (cur != null) { retVal.add(cur); } } return retVal; } COM: <s> retrieves a list of strings </s>
funcom_train/31980594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadConfig() throws IOException { InputStream propStream = getClass().getClassLoader() .getResourceAsStream(propFile); if (propStream == null) { throw new IOException("Config properties file " + propFile + " is missing from the classpath."); } properties.clear(); properties.load(propStream); propStream.close(); } COM: <s> loads the configuration from the properties file </s>
funcom_train/23234077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onUsed(RPEntity entity) { if (entity.nextTo(this)) { if (getRipeness() == 1) { onFruitPicked(null); Item grain = MidhedavaRPWorld.get().getRuleManager().getEntityManager().getItem(vegetableName); entity.equip(grain, true); } else if (entity instanceof Player) { ((Player) entity).sendPrivateText("This "+vegetableName+" is not yet ripe enough to pick."); } } } COM: <s> is called when a player tries to harvest this item </s>
funcom_train/37477565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(String userName, ResultList history) throws Exception { if (this.isRunning()) { throw new Exception("Don't call start() on already running wf instances: " + getName()); } enterNode(getStartNode(), userName, history); WorkflowManager.storeWorkflow(this); } COM: <s> start this workflow </s>
funcom_train/37836115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareInspectAutoClose(final SlotWindow window, final IEntity entity, final RPSlot slot) { entity.addContentChangeListener(new ContentChangeListener() { public void contentAdded(RPSlot added) { // Unused } public void contentRemoved(RPSlot removed) { if (slot.size() == removed.size()) { SwingUtilities.invokeLater(new Runnable() { public void run() { window.close(); } }); } } }); } COM: <s> attach a listener to the inspector window so that the window will be </s>