__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13866394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeItemElement(UIObject item) { int idx = allItems.indexOf(item); if (idx == -1) { return false; } Element container = getItemContainerElement(); DOM.removeChild(container, DOM.getChild(container, idx)); allItems.remove(idx); return true; } COM: <s> removes the specified item from the </s>
funcom_train/42642908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLastnamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IActor_lastname_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IActor_lastname_feature", "_UI_IActor_type"), DigitalHPSPackage.Literals.IACTOR__LASTNAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the lastname feature </s>
funcom_train/8060232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProxy(String host, int port) { Properties props = System.getProperties(); props.put("proxySet", "true"); props.put("proxyHost", host); props.put("proxyPort", String.valueOf(port)); } COM: <s> set proxy host and port </s>
funcom_train/4824056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(View v) { switch (v.getId()) { case R.id.about_button: Intent i = new Intent(this, About.class); startActivity(i); break; case R.id.new_button: i = new Intent(this, Login.class); startActivity(i); break; case R.id.exit_button: finish(); break; // put rest here } } COM: <s> process button clicks </s>
funcom_train/14233493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPhraseHotkeyByName(String name) throws SQLException{ ResultSet r = c.createStatement().executeQuery("SELECT hotkey FROM phrases WHERE name='"+cleanUp(name)+"'"); while (r.next()){ return r.getInt("hotkey"); } return Phrase.NO_HOTKEY; } COM: <s> gets the phrases hotkey by the given name </s>
funcom_train/10863633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Float getFieldFloat(String field, String param) { String val = getFieldParam(field, param); try { return val==null ? null : Float.valueOf(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } } COM: <s> returns the float value of the field param </s>
funcom_train/11004996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void afterInsert(Sheet sh){ super.afterInsert(sh); EscherBSERecord bse = getEscherBSERecord(); bse.setRef(bse.getRef() + 1); java.awt.Rectangle anchor = getAnchor(); if (anchor.equals(new java.awt.Rectangle())){ setDefaultSize(); } } COM: <s> by default set the orininal image size </s>
funcom_train/39220623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnStop() { if(btnStop == null) { btnStop = new JButton(); btnStop.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage(Thread.currentThread().getContextClassLoader().getResource("images/media-playback-pause.png")))); btnStop.setText("Pause"); btnStop.setSize(110, 25); btnStop.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { stop(); } }); } return btnStop; } COM: <s> return and create stop button </s>
funcom_train/44940102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXML(Document doc) { Element result = doc.createElement("hint"); XMLTools.setAttribute(result, "type", type); XMLTools.setAttribute(result, "link", link); XMLTools.setAttribute(result, "data-name", dataName); return result; } COM: <s> draws this link </s>
funcom_train/167979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxThreads() { Node threads = NodeHandler.getSingleNode(protocol, "/randomizer/@threads"); if (threads == null) { log.debug("Attribute 'threads' was not found in protocol. Set Maxthreads to '1'."); return 1; } else { int numThreads; try { numThreads = Integer.parseInt(threads.getNodeValue()); } catch (NumberFormatException e) { log.error("Thread is not a number. Correct tag randomizer attribute 'threads' in protocol.", e); throw new RuntimeException(e); } return numThreads; } } COM: <s> read tag randomizer attribute threads from file protocol </s>
funcom_train/36552867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeCard (Card aCard) { ArrayList<Integer> myList = new ArrayList<Integer>(); myList.add(mySystems.get(0).getCount()); myList.add(aCard.getNumber()); this.countDraw.add(myList); for (int i=0; i<mySystems.size(); i++) mySystems.get(i).takeCard(aCard); } COM: <s> runs all processes on card </s>
funcom_train/42709420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonAddAdress() { if (jButtonAddAdress == null) { jButtonAddAdress = new JButton(); jButtonAddAdress.setActionCommand("AddAdress"); jButtonAddAdress.setBounds(new Rectangle(10, 270, 121, 21)); jButtonAddAdress.setText("Add"); } return jButtonAddAdress; } COM: <s> this method initializes j button add adress </s>
funcom_train/1961901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getProperty(String key) throws Exception { Session session = getSessionFactory().getCurrentSession(); Transaction tx = session.beginTransaction(); tx.begin(); GServerProperty prop = (GServerProperty) session.createQuery( "from GServerProperty where key=?").setString(0, key) .uniqueResult(); tx.commit(); if (prop != null) return prop.getValue(); else return null; } COM: <s> fetch server property </s>
funcom_train/41483139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnComprar() { if (btnComprar == null) { btnComprar = new JButton(); btnComprar.setText("Comprar"); btnComprar.setPreferredSize(new Dimension(84, 20)); btnComprar.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { libreria.comprar(activo); darComprados(libreria.getComprados()); darRecomendados(libreria.getRecomendados()); } }); } return btnComprar; } COM: <s> this method initializes btn comprar </s>
funcom_train/17006473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertLinkForNode(int linkId, String linkType) { Link newLink = getLink(linkId, linkType); // if the link does not exist previously then only insert it if (newLink == null) { newLink = new Link(linkId, linkType); linksForOneNode.add(newLink); } } COM: <s> inserts a link between the node pair </s>
funcom_train/8743375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean noRecords() { File points = new File(index_path + POINTS_FILENAME); File sorted = new File(index_path + SORTED_FILENAME); if (points.exists() && sorted.exists() && points.length() == 0 && sorted.length() == 0) { return true; } return false; } COM: <s> no records available if after code merge parts code </s>
funcom_train/12173390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkItem(MenuItem item) throws BuilderException { if (item != null) { try { if (item.getHref() == null) { reportBadValue("href", null); } } catch (BuilderException e) { throw e; } catch (Exception e) { throw new BuilderException(e); } checkLabel(item.getLabel(), true); } } COM: <s> helper method that verifies that the menu item is correctly configured </s>
funcom_train/33888920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testInvoke(TActivity value, String target, String source) { assertTrue(value instanceof TInvoke); TInvoke invoke = (TInvoke) value; if (target != null) { assertEquals(target, invoke.getTargets().getTarget().get(0) .getLinkName()); } if (source != null) { assertEquals(source, invoke.getSources().getSource().get(0) .getLinkName()); } } COM: <s> test the invoke activity with specific link name </s>
funcom_train/49789506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPerson() throws Exception { root = loadAndInfer(DomainInheritance.class); Frame page = assertHasFrame(root, "get person"); InputForm form = assertHasInputForm(page, "view person"); InputTextField name = assertHasInputTextField(form, "name"); assertGenerated(name); // the primary key is not rendered assertHasNoInputTextField(form, "id"); // direct subclasses assertHasNoInputTextField(form, "enrolled"); assertHasNoInputTextField(form, "title"); } COM: <s> test the contents of the get person page </s>
funcom_train/5723263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void instituteChanged(ValueChangeEvent vce){ logger.debug(">>> instituteChanged"); if(vce.getNewValue() == null){ return; } Long selectedInstitute = (Long) vce.getNewValue(); extendedSearchResults.setInstituteId(selectedInstitute); // determine the course types offered by the given instutute resetCourseTypes(selectedInstitute); logger.debug("<<< instituteChanged"); } COM: <s> event handler which is called when the institute combo box is changed </s>
funcom_train/44211284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "ID3v1.0\nTagSize:\t\t\t" + getSize() + " bytes\nTitle:\t\t\t\t" + getTitle() + "\nArtist:\t\t\t\t" + getArtist() + "\nAlbum:\t\t\t\t" + getAlbum() + "\nYear:\t\t\t\t" + getYear() + "\nComment:\t\t\t" + getComment() + "\nTrack:\t\t\t\t" + getTrack(); } COM: <s> returns a string representation of this object </s>
funcom_train/35714361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void install() { Control w= fViewer.getTextWidget(); if (Helper2.okToUse(w)) { Shell shell= w.getShell(); fShell= shell; shell.addControlListener(this); w.addMouseListener(this); w.addFocusListener(this); /* * 1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of Internal Errors */ w.addDisposeListener(this); } fViewer.addViewportListener(this); fViewportListenerStartTime= System.currentTimeMillis() + 500; } COM: <s> installs this closer on its viewers text widget </s>
funcom_train/50377697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doPaint(IFigure figure, Graphics graphics, Insets insets) { // Remember the clipping rectangle Rectangle oldClip = new Rectangle(); oldClip = graphics.getClip(oldClip); if (isCollapsed()) { graphics.drawImage(expandImage, rectExpandCollapse.getLocation()); } else { graphics.drawImage(collapseImage, rectExpandCollapse.getLocation()); // Paint the round rectangle around the lower part of the figure // (surrounding the // children figures). graphics.drawRoundRectangle(expandedBounds, WFConstants.ARC_WIDTH, WFConstants.ARC_WIDTH); } } COM: <s> subclasses should call this paint method unless there is a very good </s>
funcom_train/25187276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasProperties() throws Exception { System.out.println("hasProperties"); JSchema instance = new JSchema(); assertFalse(instance.hasProperties()); instance.setProperty("test", new JSchema()); assertNotNull(instance.getProperties()); assertTrue(instance.hasProperties()); } COM: <s> test of has properties method of class jschema </s>
funcom_train/11679834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Mediator getMainMediator() { Object o = mainMediator; if (o != null && o instanceof Property) { Property dp = (Property) o; o = getProperty(dp); if (o == null) { handleException("Invalid Synapse Mainmediator from registry"); } } return (Mediator) o; } COM: <s> return the main or default mediator of synapse </s>
funcom_train/22655106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPreference (String preferenceId) { PreferenceDataHandler dataHandler = null; Preference preference = null; try { dataHandler = PreferenceDataHandlerFactory.getDefaultHandler(); preference = dataHandler.getPreference(preferenceId); } catch (PreferenceHandlerInstantiationException e) { e.printStackTrace(); } if (null != preference) { preference.registerPreferenceModelManager(this); preferenceCache.put(preferenceId, preference); } } COM: <s> loads a preference into the cache </s>
funcom_train/10645498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInActualPath(Element elem) { boolean found = false; Object[] path = currentElemNode.getUserObjectPath(); for (Object obj : path) { found = found || ((TagElement) obj).getElement().getName() .equalsIgnoreCase(elem.getName()); } return found; } COM: <s> it determines whether an </s>
funcom_train/22679549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSolid(int left, int right, int top, int bot, int[] ntsc) { if (right - left < 4) { right = left + 4; } if (bot - top < 1) { bot = top + 1; } for (int y = top; y < bot; y++) { for (int x = left; x < right; x++) { signal[y][x] = ntsc[x%4]; } } } COM: <s> draw a solid rectangle to the frame </s>
funcom_train/41732241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { BorderLayout borderLayout = new BorderLayout(); borderLayout.setHgap(5); borderLayout.setVgap(5); jContentPane = new JPanel(); jContentPane.setLayout(borderLayout); jContentPane.add(getInputID(), BorderLayout.NORTH); jContentPane.add(getCommitBT(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/5462075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlExRuleProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Resource rruleBlankNode = generateAnonymousNode(rdfContainer); crawlRecur(property.getValue(), rruleBlankNode, rdfContainer); addStatement(rdfContainer, parentNode, NCAL.exrule, rruleBlankNode); } COM: <s> crawls the exrule property </s>
funcom_train/49694593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOption() throws PlateUiException{ String option = null; if(_counter < _args.length) { option = _args[_counter]; if(option.startsWith("-") && option.length() == 2) { if (_validator.validate(option, _counter) == false) throw new PlateUiException(PlateUiException.ILL_FORMED_COMMAND); else if(_optionTable.get(option) != null) throw new PlateUiException(PlateUiException.ILL_FORMED_COMMAND); else _optionTable.put(option, Boolean.TRUE); _counter++; } else { option = null; } } return option; } COM: <s> return the next command line option or null if there isnt one </s>
funcom_train/43882581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveFromBackAndClose() throws Throwable { OGRDataStore sds = createDataStore(); String typeName = sds.getTypeNames()[0]; int idx = loadFeatures(sds, typeName).size(); while (idx > 0) { FeatureWriter writer = null; try { writer = sds.getFeatureWriter(sds.getTypeNames()[0], Filter.INCLUDE, Transaction.AUTO_COMMIT); while (writer.hasNext()) { writer.next(); } writer.remove(); } finally { if (writer != null) { writer.close(); writer = null; } } assertEquals(--idx, loadFeatures(sds, typeName).size()); } } COM: <s> create a test file then continue removing the last entry until there are </s>
funcom_train/20660285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHost( CommandComponent oldComponent ){ if(oldComponent!=null) { jPanel1.remove( oldComponent ); jScrollPane1.setViewportView(jPanel1); //to refresh the panel screen System.out.println("The component :" +oldComponent.getText()+". is removed."); } } COM: <s> will be called by the command component itself </s>
funcom_train/18255516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findNeighbors() { if (!(scape.isMutable())) { return Collections.unmodifiableList(neighbors); } else { //Will be slow, special case if we call it often... return ((Discrete) getScape().getSpace()).calculateNeighbors(this); } } COM: <s> returns this cells neighbors that is the set of cells </s>
funcom_train/25312952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(T leftVar, T rightVar) { SetDomain leftDom = leftVar.dom(); SetDomain rightDom = rightVar.dom(); int left = leftDom.lub().getSize() - leftDom.glb().getSize(); int right = rightDom.lub().getSize() - rightDom.glb().getSize(); if (left > right) return 1; if (left < right) return -1; return 0; } COM: <s> compares the cardinality difference of the variables </s>
funcom_train/24196077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWeightedRandom(Hashtable<String, Integer> scores) { int max = scores.values().toArray(new Integer[0])[0]; for (int v : scores.values()) max = (max >= v ? max : v); while (true) { double p = Math.random(); Iterator<Entry<String, Integer>> itr = scores.entrySet().iterator(); while (itr.hasNext()) { Entry<String, Integer> entry = itr.next(); if (p < entry.getValue()) return entry.getKey(); else p -= entry.getValue(); } } } COM: <s> p returns a weighted random value of the given list </s>
funcom_train/40359962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAliasesInPropertyNames() throws Exception { Document filter = createFilter(); Set<String> names = filter.getPropertyNames(); assertTrue(names.contains("foo")); assertTrue(names.contains("bar")); // Make sure all the real properties are there too. assertTrue(names.containsAll(createProperties().keySet())); } COM: <s> test aliases show up in the property names </s>
funcom_train/9371776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeByteArray(int bits, byte[] arr) throws AccessException { for (int i = 0; i < arr.length; i++) { int increment = Math.min(8, bits - (i << 3)); if (increment > 0) { write(increment, (byte)(arr[i] >>> (8 - increment))); } } } COM: <s> write data in bulk from a byte array and increment the current position </s>
funcom_train/37587357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void regionChanged(Breakpoint bp) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).regionChanged(bp); } } finally { _lock.endRead(); } } COM: <s> called when a breakpoint is changed during execution </s>
funcom_train/41164273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoParagraphCheckList2 entity) { EntityManagerHelper.log("deleting CoParagraphCheckList2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoParagraphCheckList2.class, entity.getCheckListId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co paragraph check list2 entity </s>
funcom_train/18479639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3 getScale() { double sx = Math.sqrt(m00 * m00 + m10 * m10 + m20 * m20) ; double sy = Math.sqrt(m01 * m01 + m11 * m11 + m21 * m21) ; double sz = Math.sqrt(m02 * m02 + m12 * m12 + m22 * m22) ; return new Vector3(sx,sy,sz) ; } COM: <s> retrieves the scale factor of this matrix </s>
funcom_train/43592294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(String p_name) { SceneElement scene=adventure.getSceneNamed(p_name); if (scene != null) { scriptExecutor.execute(scene, true); } else { throw new RuntimeException("Scene "+p_name+" doesn't exist !"); } } COM: <s> execute the given named script if it exists </s>
funcom_train/26397149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertStdoutContains(final String string) throws CruiseControlException { if (stdout.indexOf(string) < 0) { throw new CruiseControlException( "The stdout of the command \"" + this.toString() + "\" did not contain the required string \"" + string + "\". \n" + "Stdout: " + stdout + "Stderr: " + stderr); } } COM: <s> asserts that the stdout of the command contains a </s>
funcom_train/21979829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void treeExpanded(TreeExpansionEvent event) { //System.out.println( "treeExpanded: " + event.getPath().getLastPathComponent() ); isExpanding = false; if ( childrenDisplayGroup != null ) { removeAsListener(); // prevent data source refetch: see fetchObjects() childrenDisplayGroup.fetch(); addAsListener(); } } COM: <s> updates the children display group if any </s>
funcom_train/47141193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { synchronized (getStateLock()) { if (getShopState() == DEAD) { JFrame jf = getShopFrame(); if (getShopFrameBounds() != null) { jf.setBounds(getShopFrameBounds()); } else { jf.pack(); } jf.setVisible(true); m_nShopState = SUSPENDED; resume(); } } } COM: <s> start the shop </s>
funcom_train/17705530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeTempFile(JBrickTabItem tab, Boolean remove) { String fileName = tab.getDocument().getFileName(); if (remove && fileName != null && fileName.endsWith(".bak.nxc")) { File deleteFile = new File(tab.getDocument().getFileName()); deleteFile.delete(); tab.dispose(); } } COM: <s> removes a temporary file if a user decided not to change it </s>
funcom_train/18662205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runReconciliationEDT() { stopThread = false; if ( validateDir( scanDir ) ) { logJTextArea.setText( null ); ( new Reconciler() ).execute(); if ( stopThread ) { logJTextArea.append( Settings.jpoResources.getString( "ReconcileInterrupted" ) ); } else { logJTextArea.append( Settings.jpoResources.getString( "ReconcileDone" ) ); } } } COM: <s> this method does some validation and then fires the reconciler </s>
funcom_train/40257546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextListener() { removeTextListener(); text.addListener(SWT.KeyDown, textListener); text.addListener(SWT.MouseDown, textListener); text.addListener(SWT.MouseWheel, textListener); text.addListener(SWT.MouseUp, textListener); text.addListener(SWT.Traverse, textListener); text.addListener(SWT.Verify, textListener); } COM: <s> adds the text listener for the appropriate swt events to handle incrementing fields </s>
funcom_train/28116199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloseForClosedSession() throws Exception { TestContext context = getContext(); Session session = context.getSession(); session.close(); try { session.close(); } catch (Exception exception) { String msg = "Closing a closed session shouldn't generate an " + "exception"; log.debug(msg, exception); fail(msg); } } COM: <s> verifies that closing a closed session has no effect </s>
funcom_train/33148602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeAsXML(Document doc, File file) throws Exception,IOException { Log.getInstance().log(doc.getName() + " is beeing written to by the xml parser"); XMLWriter writer = new XMLWriter(new FileWriter(file), getOutputFormat()); writer.write(doc); writer.close(); } COM: <s> write provided document to the provided file location </s>
funcom_train/36493627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpClient setAcceptableStatuses(int statuses[]) { if (statuses == null) { this.acceptable = null; return this; } for (int x = 0; x < statuses.length; x ++) { final int status = statuses[x]; if ((status < 100) || (status > 599)) throw new IllegalArgumentException("Wrong status " + status); } this.acceptable = statuses; return this; } COM: <s> p set an array of http response status codes considered to be acceptable </s>
funcom_train/46456218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAll(int val[], int nx, double xmin, double xmax, double ymin, double ymax) { if(val.length%nx!=0) { throw new IllegalArgumentException("Raster dimension must match number of values."); } resizeRaster(nx, val.length/nx); setAll(val); raster.setMinMax(xmin, xmax, ymin, ymax); } COM: <s> sets the rasters values and scale </s>
funcom_train/11767311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cryHelp() { /* // Loop through the map and call for help LevelElement[] levelElements = this.getCryLevelElements(); LevelElement l; for (int i = 0; i < levelElements.length; i++) { l = levelElements[i]; if (l instanceof MouseElement) { ((MouseElement) l).helpCried(this); } }*/ } COM: <s> cry for help because this mouse is attacted by a cat </s>
funcom_train/46335616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSqlName(final String sqlName) { final String methodName = "setSqlName(String)"; logger.entering(CLASS_NAME, methodName); logger.logp(Level.FINER, CLASS_NAME, methodName, "sqlName={0}", sqlName); this.sqlName = sqlName; this.name = translationHelper.toJavaMemberName(sqlName); } COM: <s> sets the sql name of this call </s>
funcom_train/2807547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void workOn(Assembly a) { Stack s = a.getStack(); Structure[] sa = new Structure[s.size()]; for (int i = 0; i < s.size(); i++) { sa[i] = (Structure) s.get(i); } s.removeAllElements(); a.push(new Rule(sa)); } COM: <s> pops all of the structures on the stack builds a rule </s>
funcom_train/10914504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getPixelUnitToMillimeter() { Object key = ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER; if (getTranscodingHints().containsKey(key)) { return ((Float)getTranscodingHints().get(key)).floatValue(); } else { // return 0.3528f; // 72 dpi return UnitConv.IN2MM / 96; //96dpi = 0.2645833333333333333f; } } COM: <s> returns the pixel to millimeter conversion factor specified in the </s>
funcom_train/2628545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDComponentType() { System.out.println("getDComponentType"); ComponentTypeWrapper instance = null; instance = new ComponentTypeWrapper(new ComponentType()); ComponentType expResult = new ComponentType(); instance.dComponentType = expResult; ComponentType result = instance.getDComponentType(); assertEquals(expResult,result); } COM: <s> test of get dcomponent type method of class component type wrapper </s>
funcom_train/11725561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean equals(SimpleCredentials o1, SimpleCredentials o2) { if (!equals(o1.getUserID(), o2.getUserID())) { return false; } if (!equals(o1.getPassword(), o2.getPassword())) { return false; } Map m1 = getAttributeMap(o1); Map m2 = getAttributeMap(o2); return m1.equals(m2); } COM: <s> this method compares two simple credentials </s>
funcom_train/51119951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String retValue = ""; for (Iterator i = getItemPropertyIds().iterator(); i.hasNext();) { Object propertyId = i.next(); retValue += getItemProperty(propertyId).toString(); if (i.hasNext()) retValue += " "; } return retValue; } COM: <s> gets the code string code representation of the contents of the </s>
funcom_train/44163636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerSellGoods(Goods goods) { String goldKey = "tradeGold#" + goods.getType().getId() + "#" + goods.getAmount() + "#" + goods.getLocation().getId(); sessionRegister.put(goldKey, null); } COM: <s> called after another code player code sends a code trade code message </s>
funcom_train/3458384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNode(AbstractVAIProductNode root) { rootNode = root; treeModel=new DefaultTreeModel(root); tree.setModel(treeModel); tree.setSelectionRow(0); Enumeration enum = rootNode.preorderEnumeration(); while(enum.hasMoreElements() == true) { AbstractVAIProductNode node = (AbstractVAIProductNode)enum.nextElement(); node.start(); } } COM: <s> sets the node as root in the tree model </s>
funcom_train/14584941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collectConferenceStandings(SeasonStandings standings) { // gathers the given standings for the teams within a conference for (int i = 0; i < conferences.size(); i++) { LeagueConference conf = (LeagueConference)conferences.get(i); SeasonStandings confStandings = standings.subset(conf.getTeamIDs()); conf.setStandings(confStandings); // System.out.println("standings size after collecting conf standings: " + confStandings.getTeamRecords().size()); } } COM: <s> collects season standings for each conference </s>
funcom_train/51782997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayContextMenu(EditorMouseEvent e) { double mx = e.getX(), my = e.getY(); Selection selection = getSelection(mx, my); if (!nothingSelected()) { JPopupMenu menu = menubuilder.createContextMenu(selection); menu.show(editor, e.getMouseEvent().getX(), e.getMouseEvent().getY()); } } COM: <s> displays the context menu </s>
funcom_train/21708858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (o == null) { throw new NullPointerException(); } IN argIN = (IN) o; long argEqualityKey = argIN.getEqualityKey(); long myEqualityKey = getEqualityKey(); if (myEqualityKey < argEqualityKey) { return -1; } else if (myEqualityKey > argEqualityKey) { return 1; } else { return 0; } } COM: <s> sort based on node id </s>
funcom_train/19716227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createNewLinguisticOntologyFolder(String projectName) throws CoreException { CommandLogger.log(getClass().getName() + " createNewLinguisticFolder", new Class[] {String.class}, //$NON-NLS-1$ new Object[] {_folderName}); //$NON-NLS-1$ DatamodelLinguistic.getDefault().createLinguisticFolder(_folderName, projectName); } COM: <s> creates a new linguistic folder in the project </s>
funcom_train/331103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean registerSettings(PamSettings pamUnit, int whichLists) { if ((whichLists & LIST_UNITS) != 0) { owners.add(pamUnit); } if ((whichLists & LIST_DATABASESTUFF) != 0) { databaseOwners.add(pamUnit); } PamControlledUnitSettings settings = findSettings(pamUnit, whichLists); if (settings != null && settings.getSettings() != null) { return pamUnit.restoreSettings(settings); } return false; } COM: <s> register modules that have settings information that </s>
funcom_train/5802713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatNumber(String num) { if (num.indexOf(".") == 0) { num = "0" + num; } if (num.indexOf(".") == -1) { num = num + ".0"; } num = num + "000000"; return (num.substring(0, num.indexOf(".") + 6)); } COM: <s> format the number string and return 6 digits of the number </s>
funcom_train/45541700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getEntireHistory() { HashMap map= new HashMap((int) (fLHSCache.size() / 0.75)); for (Iterator it= fLHSCache.entrySet().iterator(); it.hasNext();) { Entry entry= (Entry) it.next(); String lhs= (String) entry.getKey(); map.put(lhs, getHistory(lhs)); } return Collections.unmodifiableMap(map); } COM: <s> returns a read only map from </s>
funcom_train/42185221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAnagrams() { System.out.println("getAnagrams"); BruteAnagram ba = new BruteAnagram(new IndexDictionary()); //List<Word> result = ba.getAnagramWords("THIEFAV"); //for (Word w: result) System.out.println(w.toString()); } COM: <s> test of get anagrams method of class scrabblehelper </s>
funcom_train/18727174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintFaintBox(final Graphics2D g2) { final Rectangle f = getFaintBoxBounds(); g2.setColor(FBOX_FILL_COLOR); g2.fill(f); g2.draw(f); g2.setColor(FBOX_LINE_COLOR); g2.setStroke(DEFAULT_HELP_STROKE); g2.draw(f); } COM: <s> paints a light gray box that is used for grouping objects </s>
funcom_train/23827815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visit(JSONArray array) { for (int i = 0; i < array.length(); i++) { Object child = null; try { child = array.get(i); } catch (JSONException e) { // Too bad :) } if (child instanceof JSONArray) { visit((JSONArray) child); } else if (child instanceof JSONObject) { visit((JSONObject) child); } } } COM: <s> visit a json array </s>
funcom_train/570641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButtonExit getJButtonExit( ) { if ( jButtonExit == null ) { jButtonExit = new JButtonExit( ); jButtonExit.addActionListener( new java.awt.event.ActionListener( ) { public void actionPerformed( java.awt.event.ActionEvent e ) { dispose( ); System.exit( 0 ); } } ); } return jButtonExit; } COM: <s> this method initializes j button exit </s>
funcom_train/3026805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeProject(Runtime factory, String project) throws IOException { // Create the executable String[] args = new String[3]; args[0] = exeFile; args[1] = "CP"; args[2] = project; Process proc = factory.exec(args); try { proc.waitFor(); } catch (InterruptedException ie) { } } COM: <s> change to the project directory </s>
funcom_train/32070305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeCustomerCustomfield(CustomerCustomfield customerCustomfield) { boolean removedOK = getCustomerCustomfields().remove(customerCustomfield); if (removedOK) { customerCustomfield.setCustomfieldType(null); } else { if (logger.isWarnEnabled()) { logger.warn("remove returned false"); } } return removedOK; } COM: <s> remove the passed customer customfield from the customfield type collection and unset </s>
funcom_train/45317575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendNotAcceptable(String text) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info("Not acceptable " + text); AACCNormalResponse response = new AACCNormalResponse(); response.setCode(AACCNormalResponse.MSG_NOT_ACCEPTABLE); response.setMessage(text); sendMessage(response); } COM: <s> sends text to the client with response code 406 </s>
funcom_train/43245348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECTwoStreetAddr3() { System.out.println("getECTwoStreetAddr3"); EmergencyContactDG4Object instance = new EmergencyContactDG4Object(); String expResult = ""; String result = instance.getECTwoStreetAddr3(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get ectwo street addr3 method of class org </s>
funcom_train/25577200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean registerKeyEvent(EventProperty evt) { KeyStroke stroke = obtainKeyStroke(evt); boolean registered = false; if (stroke != null) { List<EventProperty> events = keyEventMap.get(stroke); if (events == null) { events = new ArrayList<EventProperty>(); keyEventMap.put(stroke, events); } events.add(evt); registered = true; } if (!registered) { Message msg = new Message("IncorrectKeyEventType", logger); msg.addParam(evt.getType()); msg.log(); } return registered; } COM: <s> registers a key event </s>
funcom_train/47967721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getIniData(){ xstream = new XStream(new DomDriver()); xstream.alias("initializeData", IniData.class); String data = getStringFromFile("data.ini"); if(data!=null) iniData = (IniData)xstream.fromXML(data); else{ iniData = new IniData(); iniData.setDefaultValues(); } firstTimeRun = iniData.firstTime; saveFilePath = iniData.savedFilePath; serialPort = iniData.serialPort; setMinMaxGraph(); } COM: <s> method to get the initialize values from data </s>
funcom_train/878473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push(String stackName, Object value) { ArrayStack namedStack = (ArrayStack) stacksByName.get(stackName); if (namedStack == null) { namedStack = new ArrayStack(); stacksByName.put(stackName, namedStack); } namedStack.push(value); } COM: <s> pushes the given object onto the stack with the given name </s>
funcom_train/14465009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean update(){ if(cells==null) return false; // this is an invalid range -- see Mergedcells prob. jm // arbitrarily set the initial vals... firstcellrow = cells[0].getRowNum()+1; firstcellcol = cells[0].getColNum(); lastcellrow = cells[0].getRowNum()+1; lastcellcol = cells[0].getColNum(); for(int t=0;t<cells.length;t++){ CellHandle cx =cells[t]; this.addCellToRange(cx); } this.resetRowColInts(); return true; } COM: <s> update the cell range when the underlying </s>
funcom_train/11023563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor_6() { // ------------- Construct using specified Locale -------- converter = new BigDecimalLocaleConverter(localizedLocale, defaultDecimalPattern); // Perform Tests convertValueNoPattern(converter, localizedDecimalValue, expectedValue); convertValueWithPattern(converter, localizedDecimalValue, defaultDecimalPattern, expectedValue); convertInvalid(converter, null); convertNull(converter, null); } COM: <s> test converter locale pattern constructor </s>
funcom_train/47306587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClear() throws Exception { pm.clear(); assertEquals(0, pm.getResults().size()); assertEquals(0, pm.getResults(t1).size()); assertEquals(0, pm.getResults(t2).size()); } COM: <s> tests that clear empties out the results of the profile manager </s>
funcom_train/1797016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortOrder(SortOrder sortOrder) { // check if setting to existing value if (this.sortOrder == null ? sortOrder != null : !this.sortOrder.equals(sortOrder)) { // set to new value for customer parameter this.sortOrder = sortOrder; setStringCustomParameter("sortorder", sortOrder == null ? null : sortOrder.toValue()); } } COM: <s> sets the order in which to sort entries </s>
funcom_train/14415513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List readUrlList(List pURLExceptions) throws ServiceLocationException, IOException { Integer cntInt = doRead16(); if (cntInt == null) return null; int cnt = cntInt.intValue(); ArrayList urlList = new ArrayList(cnt); ServiceURL url ; while (cnt-- > 0) { try { url = readURL(); if (url == null) break; urlList.add(url); } catch (IllegalArgumentException e) { pURLExceptions.add(e); TRC.warning("Ignoring Invalid URL : "+ e.getMessage()); } } return urlList; } COM: <s> read url list </s>
funcom_train/26273565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = 19; result = 31 * result + ( firstName != null ? firstName.hashCode() : 1 ); result = 31 * result + ( lastName != null ? lastName.hashCode() : 1 ); result = 31 * result + age; result = 31 * result + ( friend != null ? friend.hashCode() : 1 ); return result; } COM: <s> overrides the standard hash code method </s>
funcom_train/19538303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Shape getShape(Rectangle bounds, Token token) { Rectangle2D r = getFlow().getStateBounds2D(bounds, token, getName()); return new Ellipse2D.Double(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } COM: <s> return an ellipse </s>
funcom_train/47104930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon02() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_02.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_02); } }); return menuItem; } COM: <s> creates the third choice for the weapon menu </s>
funcom_train/31909520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnableResetTransformInteractor(boolean b) { if (isResetTransformInteractorEnabled != b) { boolean oldValue = isResetTransformInteractorEnabled; isResetTransformInteractorEnabled = b; if (isResetTransformInteractorEnabled) { getInteractors().add(resetTransformInteractor); } else { getInteractors().remove(resetTransformInteractor); } pcs.firePropertyChange("enableResetTransformInteractor", oldValue, b); } } COM: <s> determines whether the reset transform interactor is enabled or not </s>
funcom_train/12161598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIdAndNameDifferentGeneratesId() throws PAPIException { AnchorAttributes papiAttrs = createTestableAnchorAttributes(); String value = "value"; papiAttrs.setId(value); papiAttrs.setName("ignored"); // NOTE: this should generate a warning as well, but a bit hard to // test for without some infrastructure... checkIdIsGenerated(papiAttrs, value); } COM: <s> ensure that different papi id and name attribute generates a protocol </s>
funcom_train/38993152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void randomCompleteChange() { int idx = r.nextInt(polygons.size()); changedArea = polygons.get(idx).getPolygon().getBounds(); PolygonData randomPoly = PolygonData.randomPoly(imageSize, settings.getMaxPoints()); changedArea = changedArea.union(randomPoly.getPolygon().getBounds()); polygons.set(idx, randomPoly); } COM: <s> generates a random polygon change all values </s>
funcom_train/6263584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doCreateLauncher() { String templateName = ""; //$NON-NLS-1$ if ( templateFile != null ) { try { templateName = templateFile.getCanonicalPath(); } catch ( IOException e ) { } } new LauncherWizard( this, settings, templateName ).setVisible(true); } COM: <s> popup create launcher wizzard </s>
funcom_train/21999136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(int[] rows) { // Remove the last row first, then the second to last, etc... Arrays.sort(rows); for (int i = rows.length - 1; i >= 0; i--) { int row = rows[i]; if (row >= 0 && row < model.getModelRowCount()) model.removeStoredExpression(row); } // For some reason we need to do an explicit repaint call // here to get the table to redraw itself. // model.fireTableDataChanged(); model.refresh(); // repaint(); } COM: <s> delete the stored expressions in the given rows </s>
funcom_train/38524249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { StringBuffer xml = new StringBuffer(); xml.append("<?xml version='1.0' ?>\n"); //xml.append("<" + rootElement.getName() + ">"); generateXMLChildren(xml, rootElement); //xml.append("</" + rootElement.getName() + ">"); return xml.toString(); } COM: <s> generates an xml document from an existing tree </s>
funcom_train/3092107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void monitorProgress() { if(progressive){ int done = ((ProgressiveAlgorithm) algorithm).getPercentageDone(); if ((done <= 100) && (done >= 0)) { percentComplete = done; } if (progressive) { Display.getDefault().asyncExec(new Runnable() { public void run() { if ((bar != null) && !bar.isDisposed()) { bar.setSelection(percentComplete); } } }); } } } COM: <s> monitors the progress of this scheduler items algorithm if the </s>
funcom_train/51639236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeOffsetWithCorrection(int initalOffset) { IRegion lineInfo= null; try { lineInfo= fViewer.getDocument().getLineInformationOfOffset(initalOffset); } catch (BadLocationException ex) { return -1; } int startOffset= lineInfo.getOffset(); int endOffset= startOffset + lineInfo.getLength(); int result= computeOffsetWithCorrection(startOffset, endOffset, initalOffset); if (result > 0 && result != initalOffset) return result; else return -1; } COM: <s> find offset which contains corrections </s>
funcom_train/18566272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getInputStream() throws IOException { InputStream in = null; URL url = new URL(randomBreederURL); HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection(); int resp = httpConnection.getResponseCode(); if (resp == 200) { in = httpConnection.getInputStream(); } return in; } COM: <s> returns the input stream of a http connection </s>
funcom_train/4942526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLongBase16(String key) { String val = prop.getProperty(key); try { return Long.valueOf(val, 16); } catch(NumberFormatException e) { e.printStackTrace(); JOptionPane.showMessageDialog(null, res.getString("commons.error.number.format"), res.getString("commons.error"), JOptionPane.ERROR_MESSAGE); log.error("Galaxy Picture Factory cannot convert " + val + " to long!"); return -1; } } COM: <s> gets long from custom files </s>
funcom_train/36430374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { synchronized (lastTime) { if (!monitorActive.get()) { return; } monitorActive.set(false); resetAccounting(System.currentTimeMillis()); if (trafficShapingHandler != null) { trafficShapingHandler.doAccounting(this); } if (timeout != null) { timeout.cancel(); } } } COM: <s> stop the monitoring process </s>
funcom_train/15411018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getOldValue(Object embBean) { Object oldValues = null; if (embBean instanceof EntityBean) { // get the old embedded bean (with the original values) oldValues = ((EntityBean) embBean)._ebean_getIntercept().getOldValues(); } if (oldValues == null) { // this embedded bean was not modified // (or not an EntityBean) oldValues = embBean; } return oldValues; } COM: <s> get the old bean which will have the original values </s>
funcom_train/23519215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OWLType resolveOwlType(String type) { URI typeURI = resolveOWLName(type); log.debug("Resolving {} via {} to a type", typeURI, type); log.trace("Applicable types are {}", getServiceKB().getClasses(true)); return getServiceKB().getType(typeURI); } COM: <s> resolves a type name from an annotation to a valid owltype either class </s>