__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17877397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDescendingConcurentAddDuringNextIteration1() { final String[] strings = new String[] { "b", "c" }; add(strings); final Iterator<String> iterator = createDescendingIterator(); if (iterator != null) { add("d"); if (concurrentAccess()) { assertContentDescendingNextToNext(strings, 1, iterator, false); } else { assertConcurrentException(iterator); } } } COM: <s> add element after descending iterator creation </s>
funcom_train/47432539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCondicionNOPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Condicion_condicionNO_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Condicion_condicionNO_feature", "_UI_Condicion_type"), AgroEcoDinPackage.Literals.CONDICION__CONDICION_NO, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the condicion no feature </s>
funcom_train/3415548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { IdentityHashMap<K,V> m = (IdentityHashMap<K,V>) super.clone(); m.entrySet = null; m.table = (Object[])table.clone(); return m; } catch (CloneNotSupportedException e) { throw new InternalError(); } } COM: <s> returns a shallow copy of this identity hash map the keys and values </s>
funcom_train/35920880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int searchShippingDays(String brand) { int availability = -1; Iterator<LaptopBrand> lbIterator= laptopBrandArrayList.iterator(); //iterates through all items, and if the item of the specified //item is found, its availability is returned while (lbIterator.hasNext()) { LaptopBrand laptopBrand = lbIterator.next(); if (laptopBrand.getName().equalsIgnoreCase(brand)) return laptopBrand.getShippingDays(); } return availability; } COM: <s> search for the shipping days for an item </s>
funcom_train/4991566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reloadPropertyValues() { if (availableList == null) return; String[] items; availableList.removeAll(); try { List<String> plist = getProperty().getOrderedValues(this.corpus); Collections.sort(plist); items = new String[plist.size()]; for (int i = 0; i < plist.size(); i++) items[i] = plist.get(i); } catch (CqiClientException e) { e.printStackTrace(); return; } availableList.setItems(items); availableList.setSize(400, 300); for (PartItem p : parts) p.removeAll(); availableList.update(); self.layout(true); self.getParent().layout(true); } COM: <s> reload property values </s>
funcom_train/36081150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // @Override public int read(ByteBuffer b, int offset, int length) throws IOException { // //System.out.println("read: " + b+ " " + offset + " " + length); // // for (int i = offset; i < length; i++) { // b.put(i, (byte)(Math.random() * 200)); // } // return length; // } COM: <s> synthesizes the next audio buffer </s>
funcom_train/47554026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean typeEquals(Type type1, Type type2) { if (type1 == type2) return true; if (type1 == null || type2 == null) return false; if (type1 instanceof ArrayType && type2 instanceof ArrayType) { ArrayType at1 = (ArrayType) type1; ArrayType at2 = (ArrayType) type2; return typeEquals(at1.base(), at2.base()); } return ts.equals((TypeObject) type1, (TypeObject) type2); } COM: <s> returns true iff type1 and type2 are equivalent </s>
funcom_train/3961684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopService() throws Exception { try { log.debug("Stop the BulkServiceImpl"); if (srvSms != null) { srvSms.stopService(); } //Removed, now the Service is Injected //srvSms = null; } catch (Exception exc) { log.error("Exception when try to stop the Service", exc); throw new Exception(exc); } } COM: <s> stop the sms service provider </s>
funcom_train/25576634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createBoxHeader(String textBundleKey, Icon icon, int orientation) { if(orientation != LEFT_TO_RIGHT && orientation != RIGHT_TO_LEFT) throw new IllegalArgumentException( "The value '" + orientation + "' is not permitted for the box header orientation.\n," + "use I18nBox.LEFT_TO_RIGHT or I18nBox.RIGHT_TO_LEFT instead"); header = new BoxHeader(textBundleKey, icon, orientation); } COM: <s> creates the box header component </s>
funcom_train/37444179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean(final String key) { CDebug.checkParameterNotEmpty(key, "key"); boolean resource = false; final String stringResource = getString(key); if (stringResource != null) { try { resource = CBoolean.parseBoolean(stringResource); } catch (final IllegalArgumentException exception) { LOGGER.warn(createNotABooleanMessage(key, stringResource)); resource = false; } } return resource; } COM: <s> gets a boolean resource from the list of resource bundles </s>
funcom_train/13393354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Path createClasspath() { if(compileClasspath == null) { compileClasspath = new Path(getProject()); log("createClasspath::new classpath = "+compileClasspath.toString(), Project.MSG_DEBUG); } else { log("createClasspath::classpath = "+compileClasspath.toString(), Project.MSG_DEBUG); } return compileClasspath.createPath(); } COM: <s> maybe create a nested classpath element </s>
funcom_train/888207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWidth(final int width){ Component[] nodes = getComponents(); for(int i = 0; i < nodes.length; i++){ FreeNode n = (FreeNode)nodes[i]; JComponent contents = n.getContents(); if(contents != null){ java.awt.Dimension dim = contents.getSize(); if(width < dim.width)//resize on grow is already handled by java contents.setSize(width, dim.height);//keep height the same! } } revalidate(); } COM: <s> set width of this code free tree code </s>
funcom_train/21792500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VerticalPanel addServices(Service[] services){ VerticalPanel servicesPanel = new VerticalPanel(); int arrayLength = services.length; //order_buttons = new Button[arrayLength]; //availResultLayouts = new FlexTable[arrayLength]; for(int i=0; i<services.length; i++) { servicesPanel.add(addAService(services[i], i)); } return servicesPanel; } COM: <s> this method creates a vertical panel to display all type of services </s>
funcom_train/34319051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitTypeInsn(int opcode, String desc) { switch (opcode) { case INSTANCEOF: bucket.assertInstanceOf(methodRepresentation, prettyMethodName, getRepresentation(ClassFileFactGenerator.getEscapedClassName(desc), bucket.type_RefType), ClassFileFactGenerator.getQualifiedNameFromTypeDescriptor(desc), 0, 0); break; } } COM: <s> type instructions new instanceof anewarray </s>
funcom_train/35273228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display(Object obj) { if (obj instanceof Customer){ Customer c = (Customer)obj; nameTf.setText(c.getName()); idTf.setText(c.getId()); addrTf.setText(c.getAddr()); }//if }//display() COM: <s> verifies the object passed is a customer object then displays </s>
funcom_train/14156864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sendQuery(String q) { if ((socketToDaemon != null) && socketToDaemon.isConnected()) { try { socketToDaemon.sendQuery(q); } catch (IOException e) { Logs.errorMsg("Daemon: Send query error ! ( " + e + " )"); return false; } return true; } else {} return false; } COM: <s> send raw query to the daemon </s>
funcom_train/35847102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MetalTheme getMetalTheme(String themeClass) { MetalTheme theme = null; for (int i = 0; i < THEMES.length; ++i) { if (THEMES[i].getClass().getName().equals(themeClass)) { theme = THEMES[i]; } } if (theme == null) { theme = DEFAULT_THEME; } return theme; } COM: <s> returns the metal theme for the specified class name </s>
funcom_train/31686079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(String sPropName, ArrayList vVals) { if (m_properties.containsKey(sPropName)) { m_properties.remove(sPropName); } m_properties.put(sPropName, vVals); ContextEvent ce = new ContextEvent(ContextType.CONTEXT_SYSTEM_PROP_CHANGED, sPropName); ContextHandler.getInstance().fireContextEvent(ce); } COM: <s> sets list of values for a given property </s>
funcom_train/15724407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PostalAddress setAddress(PostalAddress pa) { pa.setStreet(street.getText()); pa.setCity(city.getText()); pa.setRegion(region.getText()); pa.setZipCode(zipcode.getText()); pa.setCountry(country.getText()); pa.setType(types.getSelectedIndex()); return (pa); } COM: <s> sets the address attribute of the postal address edit object </s>
funcom_train/23898795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleServiceExported() { waitOnContextCreation("org.osdm.petstore.datasource"); bundleContext.getBundles(); ServiceReference ref = bundleContext .getServiceReference(DataSource.class.getName()); assertNotNull("Service Reference is null", ref); try { DataSource simpleService = (DataSource) bundleContext .getService(ref); assertNotNull("Cannot find the service", simpleService); } finally { bundleContext.ungetService(ref); } } COM: <s> tests functionality of our string reverser service </s>
funcom_train/2876086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element addOrReplaceChild(Element newElement) { Element child = getFirstChildElement(newElement.getLocalName(), newElement.getNamespaceURI()); if (child != null) { replaceChild(child, newElement); return child; } else { appendChild(newElement); return null; } } COM: <s> add an element or if it exists replace it with the new one </s>
funcom_train/20583009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readLine() { String line; try { if (listFile.ready()) { ++currentLine; line = listFile.readLine(); // checking if the line is the end of the needed list if (hasEndLine && line.equals(listEndLine)) { isEOF = true; return ""; } checkIfEOF(); return line; } } catch (Exception e) { System.err.println("File input error"); } return ""; } COM: <s> reading the next line from the file if possible </s>
funcom_train/4779780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addMember(final AuthzGroup group) throws AuthzGroupMemberAlreadyExistsException { assert groups != null; LOGGER.debug("addMember(AuthzGroup) entered. group={}", group); Preconditions.checkNotNull(group, "Group is null"); if (groups.contains(group)) { LOGGER.error("addMember(AuthzGroup) group member already exists"); throw new AuthzGroupMemberAlreadyExistsException(); } if (groups.add(group)) { Collections.sort(groups); return true; } else { return false; } } COM: <s> adds a group member </s>
funcom_train/140901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowClosing(WindowEvent evt) { if (evt.getSource() == frm) { updatePrefs(gview.getColorPrefs()); JFrame frame = (JFrame) evt.getComponent(); String message = "Do you really want to exit?"; if (confirmPanel(message)) { frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } else { frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); } } } COM: <s> close everything and exit upon closing the window </s>
funcom_train/16269519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHostReachable(Friend f, boolean b, int roundtrip) { final Friend ff = f; final boolean fb = b; final int fr = roundtrip; Runnable r = new Runnable() { public void run() { if (_gui != null) { _gui.setHostReachable(ff, fb, fr); } } }; javax.swing.SwingUtilities.invokeLater(r); } COM: <s> set host reachable </s>
funcom_train/25978598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Complex div(Complex w) { double den = w.real() * w.real() + w.imag() * w.imag(); return new Complex((r*w.real()+i*w.imag())/den,(i*w.real()-r*w.imag())/den); } COM: <s> division of complex numbers doesnt change this complex number </s>
funcom_train/44838604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTotal(Student s1, Student s2) throws ComparisonException { int result; try { result = Comparison.compareTotal(s1, s2); } catch (RemoteException re) { System.out.println("Error comparing the students: " + re); throw new ComparisonException("Error comparing the students: " + re); } return result; } COM: <s> comparison of two students to get one value of similarity </s>
funcom_train/19398705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_checksum01() { byte[] data = new byte[100]; r.nextBytes(data); Adler32 adler32 = new Adler32(); adler32.update(data); final int expectedChecksum = (int) adler32.getValue(); assertEquals(expectedChecksum, chk.checksum(ByteBuffer.wrap(data), 0, data.length)); } COM: <s> test verifies that the checksum of the buffer is being computed </s>
funcom_train/13646709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getColumnClass( int col ){ return( new Class[]{ ImageIcon.class, ImageIcon.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class }[col] ); } COM: <s> set how to display the grid elements </s>
funcom_train/13195706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode () { Object obj; int h = 0; Iterator iter = iterator (); while (iter.hasNext ()) { obj = iter.next (); if (obj != null) h += obj.hashCode (); } if (!isFinite ()) h = -h; return h; } // hashCode COM: <s> returns the hash code for this set </s>
funcom_train/38513271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean swapPosition(ProjectItem p1, ProjectItem p2) { int i1, i2; i1 = mProjects.indexOf(p1); i2 = mProjects.indexOf(p2); if (i1 == -1 || i2 == -1) return false; mProjects.set(i1, p2); mProjects.set(i2, p1); fireProjectChanged(p1); fireProjectChanged(p2); return true; } COM: <s> swaps positions of two items </s>
funcom_train/50149168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionModel(javax.swing.ListSelectionModel selectionModel) { if(smodel!=null) smodel.removeListSelectionListener(slistener); javax.swing.ListSelectionModel oldModel = this.smodel; this.smodel = selectionModel; smodel.addListSelectionListener(slistener); propertyChangeSupport.firePropertyChange ("selectionModel", oldModel, smodel); } COM: <s> set the current selection model </s>
funcom_train/45692554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOperationTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParametersMotion_operationType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ParametersMotion_operationType_feature", "_UI_ParametersMotion_type"), EsxPackage.Literals.PARAMETERS_MOTION__OPERATION_TYPE, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the operation type feature </s>
funcom_train/46382350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireCellStatusChanged(CellStatus status) { // update both local and global listeners. This is done after the // lock is released, so the status may change again before the listeners // are called notifyStatusChangeListeners(status); CellManager.getCellManager().notifyCellStatusChange(this, status); } COM: <s> notify listeners that the cell status has changed </s>
funcom_train/11650409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initListenerClient() throws JMSException, NamingException { SUBSCRIBER = new ReceiveSubscriber(0, getUseJNDIPropertiesAsBoolean(), getJNDIInitialContextFactory(), getProviderUrl(), getConnectionFactory(), getDestination(), getDurableSubscriptionId(), isUseAuth(), getUsername(), getPassword()); log.debug("SubscriberSampler.initListenerClient called"); } COM: <s> create the on message subscriber client and set the sampler as the message </s>
funcom_train/12826751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearState() { logger.trace("Clearing state..."); username = null; if (credentials != null) for (int i = 0; i < credentials.length; i++) credentials[i].erase(); if (!isSucceeded() && principals != null) { for (int p = 0; p < principals.length; p++) { if (principals[p] instanceof Erasable) ((Erasable) principals[p]).erase(); } principals = null; } } COM: <s> clears state setting the username to null and erasing all provided </s>
funcom_train/5339896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDirectory(DataLine line, File dir) { // Otherwise, make sure they selected a valid directory that // they can really write to. if (!SaveDirectoryHandler.isSaveDirectoryValid(dir)) { GUIMediator.showError("ERROR_INVALID_SAVE_DIRECTORY_SELECTION"); return; } try { String newDir = dir.getCanonicalPath(); MediaTypeDownloadDirDataLine dl = (MediaTypeDownloadDirDataLine) line; dl.setDirectory(newDir); } catch (IOException ioe) { } } COM: <s> setting of a download directory for a mediatype should be done with this </s>
funcom_train/3112056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisible(boolean visible) { if (visible && (!initialized || !expensive)) // lazy initialization { loadGUI(); try { expensiveOps.join(); } catch (InterruptedException e) { e.printStackTrace(); //Todo: How to handle this properly } expensive = true; } setupDialog(); super.setVisible(visible); } COM: <s> overrides the set visible method to implement lazy initialization and </s>
funcom_train/40688904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder concurrencyLevel(int concurrencyLevel) { if (this.concurrencyLevel != UNSET_CONCURRENCY_LEVEL) { throw new IllegalStateException( "concurrency level was already set to " + this.concurrencyLevel); } if (concurrencyLevel <= 0) { throw new IllegalArgumentException(); } this.concurrencyLevel = concurrencyLevel; return this; } COM: <s> guides the allowed concurrency among update operations </s>
funcom_train/50153303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { DefaultMutableTreeNode top = new DefaultMutableTreeNode( Resource.getResourceString("projects")); createNodes(top); // Create a tree that allows one selection at a time. projectTree = new JTree(top); projectTree.setCellRenderer(new ProjectTreeCellRenderer()); projectTree.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION); // Listen for when the selection changes. projectTree.addTreeSelectionListener(this); treeScrollPane.setViewportView(projectTree); projectTree.addMouseListener(this); expandOrCollapseAll(isExpanded); } COM: <s> refresh the entire tree from the task model </s>
funcom_train/18551687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createJTree(Collection pAXISServiceCollection) { DefaultTreeModel treeModel = new DefaultTreeModel(createRootNode(pAXISServiceCollection)); this.setModel(treeModel); this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); // Set the Cell Renderer this.setCellRenderer(new CustomTreeCellRenderer()); } COM: <s> create the tree </s>
funcom_train/45038622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outAMultiplicativeExpression(AMultiplicativeExpression node) { Node primExpr = node.getUnaryExpression(); Instance value = annotatedValue(primExpr); Iterator mults = node.getMultiplication().iterator(); while (mults.hasNext()) { AMultiplication mult = (AMultiplication) mults.next(); Node op = mult.getMultiplyOperator(); value = invokeOperator(value, op, mult.getUnaryExpression()); } annotate(node, value); } COM: <s> evaluates and annotates the value s of a multiplicative expression </s>
funcom_train/1960131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processDown(NetworkLayerPacketArrivedEventDown event) { jlogger.fine("processing down "+event.getPacket()); ARPProcessor processor = null; try { processor = (ARPProcessor) getLayer().getProcessor(Protocolls.ARP); } catch (NetSimException e) { // this will not happen since the ARP Processor is added fix to this // layer! } processor.resolveAndSend(event.getPacket(), event.getLogger()); } COM: <s> processes down a network layer packet arrived event down </s>
funcom_train/28753066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCdnadttvolume(Long newVal) { if ((newVal != null && this.cdnadttvolume != null && (newVal.compareTo(this.cdnadttvolume) == 0)) || (newVal == null && this.cdnadttvolume == null && cdnadttvolume_is_initialized)) { return; } this.cdnadttvolume = newVal; cdnadttvolume_is_modified = true; cdnadttvolume_is_initialized = true; } COM: <s> setter method for cdnadttvolume </s>
funcom_train/3426312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXPathFunctionResolver(XPathFunctionResolver resolver) { if ( resolver == null ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_ARG_CANNOT_BE_NULL, new Object[] {"XPathFunctionResolver"} ); throw new NullPointerException( fmsg ); } this.functionResolver = resolver; } COM: <s> p establishes a function resolver </s>
funcom_train/10981696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStrutsCookbook() throws Exception { WebClient webClient = new WebClient(); URL url = new URL("http://localhost:" + port + "/struts-cookbook-" + version); HtmlPage page = (HtmlPage) webClient.getPage(url); assertEquals("Struts Cookbook", page.getTitleText()); } COM: <s> verify that the struts cookbook app has started </s>
funcom_train/9871708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLibPath() throws Exception { String libPath = System.getenv("R_HOME"); libPath = libPath.replace("\\", "/"); libPath += "/library"; String rCmd = ".libPaths('" + libPath + "')"; System.out.println("libPath cmd " + rCmd); RHook.evalR(rCmd); rCmd = ".libPaths()"; REXP rx = RHook.evalR(rCmd); System.out.println("Curr libPath " + rx.asStringArray()[0]); } COM: <s> sets r library path to r home library </s>
funcom_train/46011349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String save(DALConnection dc) { if (_stopID.trim().isEmpty()) { throw new IllegalArgumentException("Stop id must be defined"); } DAL.save(dc); DAL.get().getPersistenceManager().close(); return dc.getID(); } COM: <s> save the dal connection that is provided as the parameter </s>
funcom_train/7442213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Representation options() throws ResourceException { Representation result = null; AnnotationInfo annotationInfo = getAnnotation(Method.OPTIONS); // Updates the list of allowed methods updateAllowedMethods(); if (annotationInfo != null) { result = doHandle(annotationInfo, null); } else { setStatus(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED); } return result; } COM: <s> indicates the communication options available for this resource </s>
funcom_train/50095364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testCalcAngle3() { Vector3d b = new Vector3d(4.5, 3.1, 1.7); double angle = b.angle(b)*180.0/Math.PI; Assert.assertEquals(0.0, angle, 0.001); } COM: <s> this method tests the calculation of the angle between one axis </s>
funcom_train/32711897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeInt(int i) throws IOException { out.write(i & 0xFF); out.write((i >>> 8) & 0xFF); out.write((i >>> 16) & 0xFF); out.write((i >>> 24) & 0xFF); written += 4; } COM: <s> writes a four byte code int code to the underlying output stream </s>
funcom_train/31031754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void btnPost_actionPerformed(ActionEvent e) { if (! isValidatedFields()) { return; } if (mode == ValueConstants.CREATE_MODE) { createVoucher(); if (chkShowCreateForm.isSelected()) { populateCombos(); resetForm(); } else { makeFormUpdatable(); } } else if (mode == ValueConstants.UPDATE_MODE) { updateVoucher(); updateVoucherLines(voucherlines); if (chkShowCreateForm.isSelected() ) { resetForm(); } setStatusBarText("Voucher Updated",ValueConstants.INFO); } } COM: <s> method for post button </s>
funcom_train/19537652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSONArray JSONShuffle(Object jsonArray) throws ParserException { if (!(jsonArray instanceof JSONArray)) { throw new ParserException(I18N.getText("macro.function.json.onlyArray", jsonArray == null ? "NULL" : jsonArray.toString(), "json.shuffle")); } // Create a new JSON Array to support immutable types in macros. JSONArray jarr = JSONArray.fromObject(jsonArray); Collections.shuffle(jarr); return jarr; } COM: <s> shuffles the values in a json array </s>
funcom_train/49653018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateFoodItem (FoodItem newFoodItem ,int index) { try { foodItemList.set(index, new FoodItem(newFoodItem)); } catch (IndexOutOfBoundsException e) { return false; } Collections.sort(foodItemList); firstIndex[0] = 0; lastIndex[0] = foodItemList.size() - 1; previousSearchString = null; return true; } COM: <s> updates a food item returns true if successfull updated false otherwise </s>
funcom_train/4046019
/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 ("ServerService".equals(portName)) { setServerServiceEndpointAddress(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/13577742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(E e, double priority) { // if the element is already present in the queue, return false final int index = e.getArrayIndex(); if (this.data[index] != null) return false; this.data[index] = e; this.costs[index] = priority; if (root == null) root = e; else root = compareAndLink(root, e); size++; return true; } COM: <s> adds the specified element to this priority queue with the given priority </s>
funcom_train/5603732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorkdir(File aValue) { if( aValue.exists() ) { if( ! aValue.isDirectory() ) { throw new BuildException( "Workdir ("+ aValue + ") is not a directory" ); } } else { aValue.mkdirs(); } workdir = aValue; } COM: <s> specify the working directory where the generated java source code is </s>
funcom_train/32633812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocalInfo getLocalInfo(LocalVariableInfo lvi) { LocalInfo li = new LocalInfo(this, lvi.getSlot()); if ((Options.options & Options.OPTION_LVT) != 0 && lvi.getName() != null) li.addHint(lvi.getName(), Type.tType(classAnalyzer.getClassPath(), lvi.getType())); allLocals.addElement(li); return li; } COM: <s> create a local info for a local variable located at an </s>
funcom_train/22499179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redrawRange(int start, int length, boolean clearBackground) { checkWidget(); int end = start + length; int contentLength = content.getCharCount(); if (start > end || start < 0 || end > contentLength) { SWT.error(SWT.ERROR_INVALID_RANGE); } int firstLine = content.getLineAtOffset(start); int lastLine = content.getLineAtOffset(end); resetCache(firstLine, lastLine - firstLine + 1); internalRedrawRange(start, length); } COM: <s> redraws the specified text range </s>
funcom_train/18100373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInfo( Item info ) { //#debug //# System.out.println("setInfoItem=" + info + ", current=" + this.infoItem + ", screen.isInitialized=" + this.isInitialized); this.infoItem = info; if (info == null) { this.infoHeight = 0; } this.isInitRequested = this.isInitialized; } COM: <s> sets the information which should be shown to the user </s>
funcom_train/44026082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean addNewFolder(XIDEFolder folderToMake) throws XIDEException { File parentFolder = new File(folderToMake.getParent().getAbsolutePath()); if (parentFolder.exists() && parentFolder.isDirectory()) { File folder = new File(folderToMake.getAbsolutePath()); if (folder.exists()) { throw new XIDEException("Folder with such name alreary exist!"); } else { folder.mkdir(); return true; } } throw new XIDEException("Parent folder does not exist!"); } COM: <s> creates new folder described by parameter </s>
funcom_train/50961598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getDoc(int docNum) { Document d = (Document)docs.get(docNum); if (filters!=null) { for (int i=0; i<filters.length; i++) { if (filters[i]!=null) filters[i].applyFilter(d); } } return d; } COM: <s> retrieve the indicated document </s>
funcom_train/36982137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short stackConsumption() { short consumption = 0;// (short)getParameterTypes().length; String[] paramTypes = getParameterTypes(); for (int i = 0; i < paramTypes.length; i++) { if ("long".equals(paramTypes[i]) || "double".equals(paramTypes[i])) { consumption += 2; } else { consumption++; } } if (getOpcode() != Opcodes.INVOKESTATIC) { consumption++; // 'this' parameter } return consumption; } COM: <s> get the stack consumption of this invocation </s>
funcom_train/4924627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScriplet() throws Exception { // Obtain the user name String userName = System.getProperty("user.name"); assertNotNull("Must have username", userName); // Send request HttpClient client = this.createHttpClient(); HttpGet request = new HttpGet(this.getServerUrl() + "/Scriptlet.jsp"); HttpResponse response = client.execute(request); // Validate the response assertHttpResponse(response, 200, "Hello " + userName); } COM: <s> ensure service with jsp containing a scriptlet </s>
funcom_train/39381219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onEditClick() { Integer id = editLink.getValueInteger(); if (id != null) { Person person = (Person) getDataObject(Person.class, id); PersonEditor personEditor = (PersonEditor) getContext().createPage(PersonEditor.class); personEditor.setPerson(person); setForward(personEditor); } return false; } COM: <s> handle an edit person click forwarding to the </s>
funcom_train/1033016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanup(Throwable whyCleanedUp) { try { if ((this.io != null) && !isClosed()) { realClose(false, false, false, whyCleanedUp); } else if (this.io != null) { this.io.forceClose(); } } catch (SQLException sqlEx) { // ignore, we're going away. ; } this.isClosed = true; } COM: <s> destroys this connection and any underlying resources </s>
funcom_train/25099464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTraceableSpecificationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Context_traceableSpecification_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Context_traceableSpecification_feature", "_UI_Context_type"), ElementsPackage.Literals.CONTEXT__TRACEABLE_SPECIFICATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the traceable specification feature </s>
funcom_train/3527106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void update(String updateSourcePath, String updateLabelName, String resourcePath, int depth, Element multistatusElement) throws NestedSlideException { NestedSlideException nestedSlideException = new NestedSlideException(null); update(updateSourcePath, updateLabelName, resourcePath, depth, multistatusElement, nestedSlideException); if ( ! nestedSlideException.isEmpty() ) { throw nestedSlideException; } } COM: <s> updates the resource identified by code resource path code </s>
funcom_train/3394369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type elemtype(Type t) { switch (t.tag) { case WILDCARD: return elemtype(upperBound(t)); case ARRAY: return ((ArrayType)t).elemtype; case FORALL: return elemtype(((ForAll)t).qtype); case ERROR: return t; default: return null; } } COM: <s> the element type of an array </s>
funcom_train/21952562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component createPreviewPanel(Font f, String previewText) { previewTextArea = new JTextArea(previewText); previewTextArea.setFont(f); JPanel returnValue = new JPanel(); returnValue.add(previewTextArea); returnValue.setBorder(BorderFactory.createEtchedBorder()); returnValue.setMinimumSize(new java.awt.Dimension(50,50)); return returnValue; } COM: <s> creates the preview panel </s>
funcom_train/15409299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPersistControllers(List<BeanPersistController> beanControllerInstances) { if (beanControllerInstances != null) { for (BeanPersistController c : beanControllerInstances) { this.persistControllerInstances.add(c); // don't automatically instantiate this.beanControllerList.remove(c.getClass()); } } } COM: <s> add bean persist controller instances </s>
funcom_train/46321954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set ( float x, float y, float z, float speed, int hitRange ) { setTarget(x, y, z); if ( hitRange < 1 ) hitRange = 1; ((NumberProperty)properties().get("Speed")).set(speed); ((NumberProperty)properties().get("hitRange")).set(hitRange); } COM: <s> set functions to change the target speed and hit range </s>
funcom_train/12639429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String engineGetCertificateAlias(Certificate cert) { Certificate certElem; for (Enumeration e = entries.keys(); e.hasMoreElements(); ) { String alias = (String)e.nextElement(); Object entry = entries.get(alias); if (entry instanceof TrustedCertEntry) { certElem = ((TrustedCertEntry)entry).cert; } else if (((KeyEntry)entry).chain != null) { certElem = ((KeyEntry)entry).chain[0]; } else { continue; } if (certElem.equals(cert)) { return alias; } } return null; } COM: <s> returns the alias name of the first keystore entry whose certificate </s>
funcom_train/3787042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setFieldRowDatum(int row, String fieldName, String datum) { /* setFieldRowDatum */ int fIdx= lookupFieldIdx(fieldName); return(setFieldIdxRowDatum(row, fIdx, datum)); } /* setFieldRowDatum */ COM: <s> set field row datum set datum by field name with row index </s>
funcom_train/37757654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddIncludedVariables() { VariableManager vm = VariableManager.getInstance(); vm.addIncludedVariable("included_test", "hello", "vartest"); String line = "${included_test}"; String ret = vm.replaceVariables(line, "vartest"); assertEquals("hello", ret); HashMap<String, String> all = vm.getVariables("vartest"); assertEquals(2, all.size()); } COM: <s> make sure we do not get back an included variable </s>
funcom_train/8077399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String safeDoubleToString(Double number) { String orig = number.toString(); int pos = orig.indexOf('E'); if ((pos == -1) || (orig.charAt(pos + 1) == '-')) { return orig; } else { StringBuffer buff = new StringBuffer(orig); buff.insert(pos + 1, '+'); return new String(buff); } } COM: <s> inserts a if the double is in scientific notation </s>
funcom_train/51098264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProjectPath registerNodes(TreeNode[] nodes) { ProjectPath path = new ProjectPath(); for (int i = 0; i < nodes.length; i++) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) nodes[i]; path = path.appendToPath(treeNode.getUserObject()); // register node with helper registerNode(treeNode); } return path; } COM: <s> creates a starting point for tree traversal </s>
funcom_train/17939424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makePanel() { text.setFont(moep.getConsoleFont()); input.addActionListener(this); input.setFont(moep.getConsoleFont()); topicfield.setEditable(false); part.setEnabled(false); add(scrollpane, BorderLayout.CENTER); // add scrollpane } COM: <s> makes the panel with textarea inputline and nicklist </s>
funcom_train/2559181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readInt(final int index) { byte[] b = this.b; return ((b[index] & 0xFF) << 24) | ((b[index + 1] & 0xFF) << 16) | ((b[index + 2] & 0xFF) << 8) | (b[index + 3] & 0xFF); } COM: <s> reads a signed int value in </s>
funcom_train/50512353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChannel(String name) { if (conn != null) { if (conn.isConnected()) { if (hm.get(name) == null) { IRCChannel newChannel = new IRCChannel(this, name); hm.put(name, newChannel); tab.add(newChannel, name); tab.setSelectedIndex(tab.getTabCount() - 1); } } } } COM: <s> adds a channel tab to the display and changes to it </s>
funcom_train/31342160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(int index) throws JSONException { Object object = get(index); try { return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble((String) object); } catch (Exception e) { throw new JSONException(NLS.bind("JSONArray[{0}] is not a number.", index)); //$NON-NLS-1$ } } COM: <s> get the double value associated with an index </s>
funcom_train/34353466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDirectMapping(SSWAPGraphNode node) { this.directMappingStmts.put(node, jenaModel.createStatement(getResource(), SSWAP.hasMapping, node.getResource())); jenaModel.add((Statement) directMappingStmts.get(node)); } COM: <s> add the given node to the direct mappings and add a has mapping </s>
funcom_train/4393409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAssignmentComplement(Assignment assm) { boolean isComplement; List<Assign> assList = assm.getAssigns(); for (Assign ass1 : assList) { isComplement = true; for (Assign ass2 : assigns) { if (ass1.getQuerynodeID().compareTo (ass2.getQuerynodeID()) == 0) { isComplement = false; break; } } if (isComplement) { this.assigns.add(ass1); } } } COM: <s> adds assigns of the given assignment that are not contained in the current </s>
funcom_train/35846874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTargetSize() { if (getPanelTarget() == null) { return; } Integer size = (Integer) sizeField.getSelectedItem(); ((FigText) getPanelTarget()).setFontSize(size.intValue()); getPanelTarget().endTrans(); } COM: <s> change font size of the text element according to the selected value </s>
funcom_train/35043791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PublicKey generatePubKey(byte[] encodedKey) { PublicKey pubKey=null; try { KeyFactory KeyFac=KeyFactory.getInstance(getAlgorithm(asymAlgorithm)); X509EncodedKeySpec x509KeySpec=new X509EncodedKeySpec(encodedKey); pubKey=KeyFac.generatePublic(x509KeySpec); } catch(Exception e) { e.printStackTrace(); } return pubKey; } COM: <s> used to reconstitute public key sent in byte form from peer </s>
funcom_train/4193289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate() { Date date=null; if (isDate()) { date=(new SipParser((new Parser(value)).getStringUnquoted())).getDate(); } else { long secs=getDeltaSeconds(); if (secs>=0) date=new Date(System.currentTimeMillis()+secs*1000); } return date; } COM: <s> gets value of expires header as absolute date </s>
funcom_train/28981981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVertex(T vertex) { if ( indexCurrentVertex >= verticesNumber) { // Maybe I should throw another exception because it is not the argument which is illegal ... throw new IllegalArgumentException("Can't add the vertex because all the vertices have been alreay added"); } verticesMap.put(vertex, new Integer(indexCurrentVertex)); objectsArray.set(indexCurrentVertex, vertex); indexCurrentVertex++; } COM: <s> add a new vertex in the graph </s>
funcom_train/13275331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSkyColor(int skyColor) { if (skyColor != this.skyColor) { int oldSkyColor = this.skyColor; this.skyColor = skyColor; this.propertyChangeSupport.firePropertyChange(Property.SKY_COLOR.name(), oldSkyColor, skyColor); } } COM: <s> sets the edited sky color </s>
funcom_train/13680197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StyleRange getRange(int from, int length, int type){ StyleRange range = new StyleRange(from,length,getColor(type),null,getFormat(type)); if (activeEditors[type].getBooleanValue()){ if (underlineEditors[type].getBooleanValue()){ range.underline = true; } } return range; } COM: <s> creates style range for syntax element type using stored preferences </s>
funcom_train/27906463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsValue(String s) { HeaderEntry he; Iterator iter = iterator(); while (iter.hasNext()) { he = (HeaderEntry) iter.next(); if (s == null) { if (he.getValue() == null) { return (true); } } else if (s.equals(he.getValue())) { return (true); } } return (false); } COM: <s> checks whether any header entry exists with given value </s>
funcom_train/25664970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilePref(final String key, final File value) { String str; this.writing.lock(); final String prevValue = this.properties.getProperty(key); try { if (value != null) { str = canonizeFilename(key, value); this.properties.setProperty(key.toLowerCase(), str); } else { this.properties.remove(key.toLowerCase()); str = null; } } finally { this.writing.unlock(); } this.fireChangeEvent(key, str, prevValue); } COM: <s> sets a new value for a file configuration option </s>
funcom_train/4403437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public RangeSensorBelt addSonarBeltSensor(Agent agent) { double agentHeight = agent.getHeight(); double agentRadius = agent.getRadius(); RangeSensorBelt sonarBelt = new RangeSensorBelt((float) agentRadius, 0f, 1.5f, 9, RangeSensorBelt.TYPE_SONAR, 0); sonarBelt.setUpdatePerSecond(3); sonarBelt.setName("sonars"); Vector3d pos = new Vector3d(0, agentHeight / 2, 0.0); agent.addSensorDevice(sonarBelt, pos, 0); return sonarBelt; } COM: <s> adds a prebuild belt of sonar sensor to the agent </s>
funcom_train/4730355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IProject getProjectFromPath(IPath path) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IProject project = null; if (path != null) { if (workspace.validatePath(path.toString(), IResource.PROJECT) .isOK()) { project = workspace.getRoot().getProject(path.toString()); } else { project = workspace.getRoot().getFile(path).getProject(); } } return project; } COM: <s> returns the project that contains the specified path </s>
funcom_train/3484523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsInSecurityGroup(String role) throws WebappException{ try{ return SecurityGroupMember.getIsInSecurityGroup(_person, role); }catch(Exception e){ e.printStackTrace(); throw new WebappException("Could not retrieve SecurityGroup Role for " + _person + " => " + role); } } COM: <s> method to check if a user is in a particular role </s>
funcom_train/20146218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyBindingID getKeyBindingID(Key key) { // Reverse lookup on the map to get corresponding kbID by Key Set<KeyBindingID> kbIDs = this.map.keySet(); for (KeyBindingID kbID : kbIDs) { Key keyFromMap = this.map.get(kbID); if (keyFromMap != null && keyFromMap.equals(key)) { return kbID; } } return null; } COM: <s> do a lookup on the map return the first result </s>
funcom_train/40004023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHealth(float amount) { if (amount < 0) { if (health <= 0 || aiState == WOUNDED_STATE_HURT) { return; } MessageQueue.getInstance().debug(getName() + " hit"); setAiState(WOUNDED_STATE_HURT, null); // make a decison in three seconds elapsedTimeSinceDecision = brain.decisionTime - 3000; } setHealth(health + amount); } COM: <s> adds the specified amount to this bots health </s>
funcom_train/6201003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgress(final int value, final String msg) { this.setProgress(value); if (isContainingProgressBarMessages && !isContainingprogressBarPercent && msg != null) { splashProgress.setString(msg); } else { splashProgress.setString(value + DISPLAY_SEPARATOR_PERC + msg); } } COM: <s> sets the progress bar indicator and message </s>
funcom_train/17937947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String clusteringToString(int[] clustering) { log.debug("clusteringToString()..."); String cls=""; if(clustering.length > 0) { for(int i=0; i < clustering.length - 1; i++) { cls += clustering[i] + ","; } cls += clustering[clustering.length - 1]; } log.debug("clusteringToString() done"); return cls; } COM: <s> helper method writes the clusterinformation from an int array to a string </s>
funcom_train/50072889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSessionChanged(int state) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { iOhioSessionListener target = (iOhioSessionListener)listeners.elementAt(i); target.onSessionChanged(state); } } } COM: <s> notify all registered listeners of the on session changed event </s>
funcom_train/5260654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addJudgedInPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Influencer_judgedIn_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Influencer_judgedIn_feature", "_UI_Influencer_type"), BmmPackage.Literals.INFLUENCER__JUDGED_IN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the judged in feature </s>