__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40735541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProfileName(String newVal) { if ((newVal != null && profileName != null && (newVal.compareTo(profileName) == 0)) || (newVal == null && profileName == null && profileNameIsInitialized)) { return; } profileName = newVal; profileNameIsModified = true; profileNameIsInitialized = true; } COM: <s> setter method for profile name </s>
funcom_train/3787199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isXYinROI(int x, int y) { /* isXYinROI */ if(!isValid()) return(false); /* Assume ROI is entire image size */ if(x>=x1 && y>=y1 && x<=x2 && y<=y2) return(true); else return(false); } /* isXYinROI */ COM: <s> is xyin roi test if xy is in the valid roi region </s>
funcom_train/9990600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String name, Object value) { log.debug("set " + name + " = " + value); for (int i = scopeIndex; i >= 0; i--) { Scope scope = scopes[i]; if (scope.contains(name)) { scope.set(name, value); return; } } global.set(name, value); } COM: <s> change the value of a variable in the innermost scope which defines it </s>
funcom_train/36618381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMime(javax.servlet.ServletContext sc, String name) { if (mime == null) { if (sc!=null && name != null) { mime = sc.getMimeType(name); } } //System.err.println("The file \""+name+"\" has a mime type of \""+mime+"\"."); // Mime could still be unset: return mime==null?"application/octet-stream":mime; } COM: <s> determines the mime type for this resource </s>
funcom_train/37658187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected NodeList generateSourceNodes(Element testElement) throws XPathExpressionException, FileNotFoundException, ParserConfigurationException, SAXException, IOException, URISyntaxException { if (externalSourceFile.isAvailable()) { return externalSourceFile.getNodes(testElement.getOwnerDocument()); } else { return generateSourceNodesFromTDF(testElement); } } COM: <s> generates a node list from the utfx source element </s>
funcom_train/19051231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeCssAttribute(StringBuffer buf, Object key, Object val) { if(buf.length() > 0) { buf.append(htmlAttributeTerminator); } buf.append(key.toString()); buf.append(cssAttributeSeparator); buf.append(val.toString()); buf.append(cssAttributeTerminator); } COM: <s> write a given css attribute to a given output buffer </s>
funcom_train/18254768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomWalk() { if (getHostCell() != null) { Cell candidate = (Cell) getHostCell().findRandomNeighbor(); if ((candidate).isAvailable()) { moveTo((HostCell) candidate); } } else { throw new RuntimeException("Called Random Walk on Agent (" + this + ") that has no current location."); } } COM: <s> picks a random neighboring location on the host cells lattice </s>
funcom_train/11808410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRestrictionSymmetricProperty(OWLObjectProperty prop) { try { OWLAxiom axiom; axiom = factory.getOWLSymmetricObjectPropertyAxiom(prop); AddAxiom addAxiom = new AddAxiom(ontology, axiom); getManager().applyChange(addAxiom); } catch (OWLOntologyChangeException ex) { Logger.getLogger(DataFactory.class.getName()).log(Level.SEVERE, null, ex); } } COM: <s> add restriction of symmentric property </s>
funcom_train/22131602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(Class<?>[] args) { int i; Class<?>[] paras; paras = getParameterTypes(); if (args.length != paras.length) { return false; } for (i = 0; i < args.length; i++) { if (!paras[i].isAssignableFrom(args[i])) { return false; } } return true; } COM: <s> tests if the functions can be called with arguments of the </s>
funcom_train/44169007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLoadableAmount(GoodsType type) { if (canCarryGoods()) { int result = getSpaceLeft() * GoodsContainer.CARGO_SIZE; int count = getGoodsContainer().getGoodsCount(type) % GoodsContainer.CARGO_SIZE; if (count > 0 && count < GoodsContainer.CARGO_SIZE) { result += GoodsContainer.CARGO_SIZE - count; } return result; } else { return 0; } } COM: <s> returns the amount of a goods type that could be loaded </s>
funcom_train/40312456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsWritable_InvalidColumn3() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isWritable(10); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isWritable method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is writable with column index larger than the number of column </s>
funcom_train/31466754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stringToJavaString(String s) { String result = "\""; for (int i = 0; i < s.length(); i++) { switch (s.charAt(i)) { case '\\': case '"': result += "\\" + s.charAt(i); break; default: result += s.charAt(i); } } return result + "\""; } COM: <s> translates a string to a java source string </s>
funcom_train/7602184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getBtnAppend() { if (btnAppend == null) { btnAppend = new Button(); btnAppend.setLabel("Append"); btnAppend.setMinimumSize(new Dimension(0, 0)); btnAppend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { String str = taHistory.getSelectedText(); tfInput.append(str); } }); } return btnAppend; } COM: <s> this method initializes btn append </s>
funcom_train/9164871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullName() { StringBuffer stringBuffer = new StringBuffer(); if (!StringUtils.isBlank(title)) { stringBuffer.append(title).append(" "); } stringBuffer.append(firstName).append(" "); if (!StringUtils.isBlank(initial)) { stringBuffer.append(initial).append(" "); } stringBuffer.append(lastName); return stringBuffer.toString(); } COM: <s> returns the full name by appending the first name initial and last name </s>
funcom_train/2628459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveGUI() { System.out.println("removeGUI"); GUITypeWrapper mGUI = null; GUIStructureWrapper instance = null; instance.removeGUI(mGUI); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of remove gui method of class guistructure wrapper </s>
funcom_train/1038871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addUser(String openID,String userName,String email,String phone) throws DuplicateUserNameException, UserException{ int i = addUserWithPassword(userName, email, phone, "n/a"); try { attachOpenID(openID, i); } catch( SQLException e ) { } return i; } COM: <s> add a user using openid user name email phone number </s>
funcom_train/48184061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ageContext() { oldestContextItems.clear(); oldestContextItems.addAll(evenOlderContextItems); evenOlderContextItems.clear(); evenOlderContextItems.addAll(olderContextItems); olderContextItems.clear(); olderContextItems.addAll(contextItems); contextItems.clear(); } COM: <s> ages the context items clearing the recent ones </s>
funcom_train/20496307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent me) { if (me.getClickCount() == 1) { int position; if (/*status() != OK ||*/ (position = getBoardPosition(me.getX(), me.getY())) == -1 || !yourMove(position)) { Toolkit.getDefaultToolkit().beep(); } } } COM: <s> invoked when the mouse is released </s>
funcom_train/3473109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component getWindowContentPane() { Component result = null; Window window = SwingUtilities.getWindowAncestor(this); if (window instanceof JFrame) { result = ((JFrame) window).getContentPane(); } else if (window instanceof JDialog) { result = ((JDialog) window).getContentPane(); } return result; } COM: <s> returns the content pane of the associated window </s>
funcom_train/44450074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getCommonType() { Iterator<Variable> it = getVariableNodes().iterator(); if (!it.hasNext()) { return null; } Type res = it.next().getTypeNode(); while (it.hasNext()) { res = res.getIntersection(it.next().getTypeNode()); } return res; } COM: <s> returns the common type of a vgroup or null </s>
funcom_train/1156718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(String string, String mimeType, int index, Map<Property, Object> props) { buffer = null; props.put(Property.HYPERLINK_COLOR, linkColor); BookLoader loader = BookLoader.forMimeType(mimeType); StyledDocument doc = doStylesChange(loader.create(string, props)); installDocument(doc, index, null); } COM: <s> parses the given string in format format </s>
funcom_train/8615735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean queuedItemsRemaining() { for (ShapefileDataStore s : this.stores) { try { if (s.getCount(Query.ALL) > 0) { return true; } } catch (IOException ioe) { log.error("Error executing shapefile datastore query", ioe); } } return false; } COM: <s> returns true if any of the queued datastores have items in them </s>
funcom_train/50359685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnsPerRow(int columnsPerRow) { int oldValue = this.columnsPerRow; this.columnsPerRow = Math.max(1, columnsPerRow); if(this.columnsPerRow != oldValue) { firePropertyChange("columnsPerRow", oldValue, columnsPerRow); } } COM: <s> sets the number of columns per row in the list </s>
funcom_train/28257401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireMultiPlayerUpdate(int state) { if (listeners == null) return; Object[] l = listeners.getListenerList(); for (int i = l.length-2; i>=0; i-=2) { if (l[i]== MultiPlayerListener.class) ((MultiPlayerListener)l[i+1]).multiPlayerUpdate(state); } } COM: <s> inform listeners of a state change to multi player </s>
funcom_train/50345502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RouteLocation getLastLocationByName(String name) { List<String> routeSequenceList = getLocationsBySequenceList(); RouteLocation rl; for (int i = routeSequenceList.size()-1; i >= 0; i--){ rl = getLocationById(routeSequenceList.get(i)); if (rl.getName().equals(name)) return rl; } return null; } COM: <s> get location by name gets last route location with name </s>
funcom_train/50995689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editButtonPressed() { // Launch the modal server list editor dialog new ServerListDlg((Frame)getParent(),_serverList); // Reload the server panel combos so newly added/edited servers will show up. setServerPanel1.loadServerList(_serverList,_chatOptions); } COM: <s> this callback is called with the user hits the edit button </s>
funcom_train/26572976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel createHTMLPanel() { contentPane = new JEditorPane(); contentPane.setEditable(false); contentPane.setContentType("text/html"); JPanel panel = new JPanel(new BorderLayout()); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 0)); contentPane.addHyperlinkListener(createHyperLinkListener()); scrollPane = new JScrollPane(contentPane, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); panel.add(scrollPane, BorderLayout.CENTER); return panel; } COM: <s> create the html display panel </s>
funcom_train/51589273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected URL findResource(final String filename) { final String name = stripTrailing(filename); Vector results = findOwnResources(name, false); if (results.size() > 0) { return (URL) results.elementAt(0); } results = findImportedResources(name, false); return results.size() > 0 ? (URL) results.elementAt(0) : null; } COM: <s> find a single resource </s>
funcom_train/41567068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLabelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Connection_label_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Connection_label_feature", "_UI_Connection_type"), MolicPackage.Literals.CONNECTION__LABEL, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_AttributesPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the label feature </s>
funcom_train/31357810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getAllCapabilities() { // Variables TreeSet set; Iterator iterator; DriverCollection collection; // initialize set set = new TreeSet(); // get iterator for collections iterator = driverPool.keySet().iterator(); // Process Each Driver COllection while (iterator.hasNext() == true) { // Get Collection collection = (DriverCollection) driverPool.get(iterator.next()); // Add to Complete Set set.addAll(collection.getCapabilities()); } // while // Return Set return set; } // getCapabilities() COM: <s> gets a set of all capabilities handled by all drivers including drivers that </s>
funcom_train/10533086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetResourceAsStream() throws IOException { ControlBeanContextSupport cbcs = getContext(); ControlBeanContextChildSupport child = new ControlBeanContextChildSupport(); assertTrue(cbcs.add(child)); InputStream is = cbcs.getResourceAsStream("org/apache/beehive/controls/test/controls/beancontext/Resource.txt", child); assertNotNull(is); is.close(); } COM: <s> test the get resource as stream bean context api </s>
funcom_train/7660572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { try { ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE); for (int i = 0; i < SIZE; ++i) { assertTrue(q.add(new Integer(i))); } assertEquals(0, q.remainingCapacity()); q.add(new Integer(SIZE)); } catch (IllegalStateException success){ } } COM: <s> add succeeds if not full throws ise if full </s>
funcom_train/28340380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariables(double start, double steps, double lower, double upper) { double startValue = start; double lowerLim = lower; double upperLim = upper; double stepValue = steps; proxyV.clear(); proxyV = new Vector(); ParameterProxy proxy = new ParameterProxy(" " + 0, startValue, stepValue, lowerLim, upperLim); proxyV.add(proxy); trialPoint = proxy.getValue(); step = proxy.getStep(); } COM: <s> set the variables for the optimization problem </s>
funcom_train/4516199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean isSelected) { this.isSelected = isSelected; if ((selectionMode == TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION) && (children != null)) { Enumeration<?> enumTemp = children.elements(); while (enumTemp.hasMoreElements()) { MyTreeNode node = (MyTreeNode) enumTemp.nextElement(); node.setSelected(isSelected); } } } COM: <s> set the node select </s>
funcom_train/46459095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scale(ArrayList drawables) { if (drawingInImageSpace) { // scale to image units xminPreferred = -imageBorder*imageWidth + xOffset; xmaxPreferred = imageWidth + imageBorder*imageWidth + xOffset; yminPreferred = imageHeight + imageBorder*imageHeight + yOffset; ymaxPreferred = -imageBorder*imageHeight + yOffset; } super.scale(drawables); } COM: <s> overrides drawing panel scale method to handle drawing in imagespace </s>
funcom_train/13867888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text splitText(int offset) { try { return (Text) NodeImpl.build(XMLParserImpl.splitText(this.getJsObject(), offset)); } catch (JavaScriptException e) { throw new DOMNodeException(DOMException.INVALID_MODIFICATION_ERR, e, this); } } COM: <s> this function delegates to the native method code split text code in </s>
funcom_train/34342114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTexto8() { if (texto8 == null) {//GEN-END:|36-getter|0|36-preInit // write pre-init user code here texto8 = new TextField("CAMPO 6", null, 5, TextField.NUMERIC);//GEN-LINE:|36-getter|1|36-postInit // write post-init user code here }//GEN-BEGIN:|36-getter|2| return texto8; } COM: <s> returns an initiliazed instance of texto8 component </s>
funcom_train/50224281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set selectedTypeStrings() { Set types = new HashSet(typeMap.size()); for (Iterator i = typeMap.keySet().iterator(); i.hasNext(); ) { Object key = i.next(); if (((JCheckBox)typeMap.get(key)).isSelected()) { types.add(key); } } return types; } COM: <s> return a set of type names that the user has selected </s>
funcom_train/27762573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int value) { if (value < 0) { throw new IllegalArgumentException("value must be >= 0"); } if (this.value != value || !setValue) { this.value = value; this.setValue = true; handler.wasModified(this,FIELD_VALUE); } } COM: <s> sets the value for this setting </s>
funcom_train/39170370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteRecursively(File file) throws IOException { if(!file.exists()) { return; } if(file.isDirectory()) { for(File f : file.listFiles()) { deleteRecursively(f); } } if(!file.delete()) { throw new IOException("Couldn't delete file " + file); } } COM: <s> recursively delete a file or directory think rm rf file </s>
funcom_train/6249642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertUnequalForeignKeys(ForeignKey foreignKey1, ForeignKey foreignKey2) { assertFalse(foreignKey1.equals(foreignKey2)); assertFalse(foreignKey2.equals(foreignKey1)); assertTrue(foreignKey1.compareTo(foreignKey2) < 0); assertTrue(foreignKey2.compareTo(foreignKey1) > 0); } COM: <s> helper method to assert foreign keys are unequal </s>
funcom_train/5437149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addInsufficient(PacketInputStream input, PacketAnalysisDescriptor parent) { int start = input.getOffset(); int end = start + input.available() - 1; PacketAnalysisDescriptor root = addNode("User Datagram Protocol", start, end, parent); addNode("Insufficient UDP data", start, end, root); } COM: <s> adds a analysis descriptor indicating that there is insufficient </s>
funcom_train/16380310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validatePointsPerTaskType_Min(float pointsPerTaskType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = pointsPerTaskType >= POINTS_PER_TASK_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.POINTS_PER_TASK_TYPE, new Float(pointsPerTaskType), new Float(POINTS_PER_TASK_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em points per task type em </s>
funcom_train/32982246
/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) { jContentPane = new JPanel(); jContentPane.setLayout(new BoxLayout(getJContentPane(), BoxLayout.Y_AXIS)); jContentPane.setPreferredSize(new Dimension(200, 180)); jContentPane.add(getHeadingLabel(), null); jContentPane.add(getSimInfoPanel(), null); jContentPane.add(getNetworkPanel(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/3151602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TableCellRenderer getRenderer(Class cls, JTable tbl) { //check to see if a default renderer was passed in if (this.initRenderer != null) return this.initRenderer; //if not, query the given JTable for the default renderer for the given class else return tbl.getDefaultRenderer(cls); } COM: <s> helper method to retrive renderer </s>
funcom_train/18721882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescriptionTool() { String xPath = OFFSET + "DescriptionMetadata/Instrument/Tool/Name"; //System.out.println(mpeg7.toString()); descriptionTool = readXmlValue(xPath, descriptionTool); if (descriptionTool == null) { descriptionTool = ""; } return descriptionTool; } COM: <s> name of the tool softwareaplication used for createing the desctiption </s>
funcom_train/5244328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fetch(int n) { for (int i=1; i<=n; i++) { Token t = tokenSource.nextToken(); t.setTokenIndex(tokens.size()); //System.out.println("adding "+t+" at index "+tokens.size()); tokens.add(t); if ( t.getType()==Token.EOF ) break; } } COM: <s> add n elements to buffer </s>
funcom_train/32766640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkFunction(double[] arrFunc) throws IllegalArgumentException { if (arrFunc.length != this.getDataSize()) throw new IllegalArgumentException( "SineFilter#checkFunction() - given function has size = " + Integer.toString(arrFunc.length) + ", expected size = " + Integer.toString(this.getDataSize()) ); } COM: <s> check the given discrete function for the proper dimensions </s>
funcom_train/30009133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetName() { System.out.println("getName"); Publisher instance = new Publisher(); String expResult = ""; String result = instance.getName(); 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 name method of class papyrus </s>
funcom_train/3712072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double pow10 (double x) { if (!is_Log10) { if (x < -1.0) { return - Math.pow (10.0, -x); } if (x <= 1.0) { return x * 10.0; } return Math.pow (10.0, x); } else { return Math.pow (10.0, x); } } COM: <s> inverse logarithm function </s>
funcom_train/33385636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { if (fullDescription == null) { if (description == null || isExtensionListInDescription()) { fullDescription = description == null ? "(" : description + " ("; // build the description from the extension list Iterator<String> extensions = filters.iterator(); if (extensions != null) { fullDescription += "." + extensions.next(); while (extensions.hasNext()) { fullDescription += ", ." + extensions.next(); } } fullDescription += ")"; } else { fullDescription = description; } } return fullDescription; } COM: <s> returns the human readable description of this filter </s>
funcom_train/2800680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXmlIndentation(int pXmlIndentation) throws IllegalArgumentException, RaccoonException { mConfigurableManager.isAssignable(PTY_XML_INDENTATION, new Integer(pXmlIndentation)); if (pXmlIndentation > 0) { mXmlIndentation = pXmlIndentation; } else { throw new IllegalArgumentException("The indentation must be strictly greater than 0"); } } COM: <s> defines the number of spaces to use for the xml indentation </s>
funcom_train/26445031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void thisCreateInitPopulation(){ for(int i=0;i<agentsList.getLength();i++){ Node agentList = agentsList.item(i); NodeList agentsNodes; agentsNodes = ((Element)agentList).getElementsByTagName("Agent"); createInitialPopulation(agentsNodes, i); } } COM: <s> agent parameters parsing and initialisation </s>
funcom_train/31363082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { if (e.isShiftDown()) { model.fastMode(true); } startPoint.projectionStoE(e.getX(), e.getY(), model.getSOrigin(), model.getSMax()); } COM: <s> called when a user pressed the mouse button </s>
funcom_train/3598447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePointerIndex(NOMPointer point) { if (removing_pointers) { return; } NOMElement to = point.getToElement(); // Debug.print("REMOVING!@ "); if (to==null) { return; } HashSet hs = (HashSet) pointer_hash.get(to); if (hs!=null) { hs.remove( point); pointer_hash.put(to, hs); } } COM: <s> remove a pointer from our global index the index is required </s>
funcom_train/20317127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String imgSearchResult(String group) { Pattern pattern = Pattern.compile("<a[^>]+><img\\ssrc=\"([^\"]+)\"[^>]+>\\s*</a>"); Matcher matcher = pattern.matcher(group); if (matcher.find()) { return matcher.group(1); } return null; } COM: <s> internal helper method only called from get search results </s>
funcom_train/33890982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getN012Combo() { if (n012Combo == null) { n012Combo = new JComboBox(); n012Combo.setBounds(new Rectangle(713, 197, 129, 19)); displayListN012 = dataInputInvoker.getSeriesNames("E"); int counter =0; for(int i=0;i<Array.getLength(displayListN012);i++){ counter = this.getSeriesNumber(displayListN012[i].getSymbol()); if(counter > 10 && counter<=15){ n012Combo.addItem(displayListN012[i].getText()); } } } return n012Combo; } COM: <s> this method initializes n012 combo </s>
funcom_train/1571604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stringByQuotingIdentifier(final String _id) { // TBD: could use getIdentifierQuoteString() of java.sql.DatabaseMetaData if (_id == null) return null; // TODO: fix me return "\"" + escape(_id, '"') + "\""; } COM: <s> method used for quoting identifiers </s>
funcom_train/49848957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawChart() { // disable zoom boolean hZoomSave = horizontalZoom; boolean vZoomSave = verticalZoom; horizontalZoom = false; verticalZoom = false; createBuffer(); Graphics2D g2 = (Graphics2D) chartBuffer.getGraphics(); chart.draw(g2, bufferExtents, this.info); repaint(); horizontalZoom = hZoomSave; verticalZoom = vZoomSave; } COM: <s> draws the chart on the buffer </s>
funcom_train/7367874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getSeeds(final int row, final int col) { try { return board[1][row * nbrCol + col]; } catch (Throwable e) { e.printStackTrace(); //#ifdef DLOGGING logger.severe("getSeeds error row,col=" + row + "," + col, e); //#endif return 0; } } COM: <s> get the number of seeds for the coordinates </s>
funcom_train/3666000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item newClassItem(final String value) { key2.set('C', value, null, null); Item result = get(key2); if (result == null) { pool.put12(CLASS, newUTF8(value)); result = new Item(index++, key2); put(result); } return result; } COM: <s> adds a class reference to the constant pool of the class being build </s>
funcom_train/32754172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TimerTask newChartUpdateTask( final long period ) { return new TimerTask() { public void run() { try { SwingUtilities.invokeAndWait( newChartUpdater() ); Thread.sleep( period ); // make sure we rest for at least the specified period } catch ( Exception exception ) { System.err.println( "Exception updating the chart..." ); exception.printStackTrace(); } } }; } COM: <s> make a timer task to update the chart </s>
funcom_train/3561886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate() { cal.set(Integer.parseInt(txtYear.getText()), cboMonth.getSelectedIndex(), cboDay.getSelectedIndex() + 1, cboHours.getSelectedIndex(), cboMinutes.getSelectedIndex(), cboSeconds.getSelectedIndex()); return cal.getTime(); } COM: <s> returns the displayed date </s>
funcom_train/9664833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getThElement(int column) { Element thead = getHeaderTable().getTHeadElement(); if (thead.getChildCount() > 0 && thead.getFirstChildElement().getChildCount() > column) { Element tr = DOM.getChild(thead, 0); return DOM.getChild(tr, column); } return null; } COM: <s> this method gets a th element </s>
funcom_train/51632477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createToolItems(ToolBarManager toolBarManager) { super.createToolItems(toolBarManager); IAction a= new ChangePropertyAction(getBundle(), getCompareConfiguration(), "action.Smart.", SMART); //$NON-NLS-1$ fSmartActionItem= new ActionContributionItem(a); fSmartActionItem.setVisible(fThreeWay); toolBarManager.appendToGroup("modes", fSmartActionItem); //$NON-NLS-1$ } COM: <s> overriden to create a smart button in the viewers pane control bar </s>
funcom_train/1320864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodExpression createActionExpression(String actionExpression, Class<?> returnType) { FacesContext facesContext = FacesContext.getCurrentInstance(); return facesContext.getApplication().getExpressionFactory().createMethodExpression(facesContext.getELContext(), actionExpression, returnType, new Class[0]); } COM: <s> delivers an el expression to define a method </s>
funcom_train/42646350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setURI(String URI) { StringObject tmp = new LiteralStringObject( URI, getPObjectReference(), library.securityManager); // StringObject detection should allow writer to pick on encryption. entries.put(URIAction.URI_KEY, tmp); this.URI = tmp; } COM: <s> sets the uri string associated witht this action </s>
funcom_train/28122502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LibraryEntry addEntryUnderHeading(LibraryEntry le, LibraryEntry heading) { LibraryEntry l = le; l = findLibraryEntry(le.getLoadableClassName(), heading); if (l==null) l = addLibraryEntry(new LibraryEntry(le), heading); return l; } COM: <s> add a library entry to a particular heirarchy </s>
funcom_train/3417420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void remove(ThreadLocal key) { Entry[] tab = table; int len = tab.length; int i = key.threadLocalHashCode & (len-1); for (Entry e = tab[i]; e != null; e = tab[i = nextIndex(i, len)]) { if (e.get() == key) { e.clear(); expungeStaleEntry(i); return; } } } COM: <s> remove the entry for key </s>
funcom_train/13993580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidTypeBlock() { try { property.setValue(invalidValue); fail("no IllegalArgumentException thrown"); } catch (IllegalArgumentException expected) { } try { property.setOriginal(invalidValue); fail("no IllegalArgumentException thrown"); } catch (IllegalArgumentException expected) { } } COM: <s> tests if the property block invalid value types </s>
funcom_train/29716916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String renderIncludes() { String s = "<g>"; s += drawDottedLine(x1, y1, x2, y2, 1, SVGColours.BLACK); s += renderHalfwayMessage("includes", true); return s + "</g>"; } COM: <s> use case includes relationship </s>
funcom_train/26397142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertStdoutDoesNotContain(final String string) throws CruiseControlException { if (stdout.indexOf(string) > -1) { throw new CruiseControlException( "The command \"" + this.toString() + "\" returned the forbidden string \"" + string + "\". \n" + "Stdout: " + stdout + "Stderr: " + stderr); } } COM: <s> asserts that the stdout of the command does not contain a </s>
funcom_train/43097977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getDestination(Object link) { Collection con = nsmodel.getFacade().getConnections(link); if (con.size() <= 1) { return null; } MLinkEnd le0 = (MLinkEnd) (con.toArray())[1]; return le0.getInstance(); } COM: <s> returns the destination of a link </s>
funcom_train/3079472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setInitialHeading(int heading) { int setting = -1; // Ensure the heading is in the range 0-360 while (heading < 0) { heading += 360; } if (!headingSet) { setting = heading % 360; velVector.setDirection(setting); previousVel.setDirection(setting); } headingSet = true; return setting; } COM: <s> sets the initial heading in degrees of the mobile element </s>
funcom_train/48878641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Product create() throws DataException { String id = null; try { id = GUID.generate(); } catch(GUIDException guide) { throw new DataException("Could not generate a GUID", guide); } ConceptualRental cp = new ConceptualRental(); cp.setID(id); Cache cache = Cache.getInstance(); cache.put(id, cp); return cp; } //create COM: <s> returns a new conceptual rental business object </s>
funcom_train/15951963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ConfigureTPAInstance(DefaultTPPAManager mgr, Element elem) { String lsClassName = elem.getAttribute(CLASS_ATTRIBUTE_NAME); String lsArchiveName = elem.getAttribute("archive"); String lsCodebase = elem.getAttribute("codebase"); String lsConfiguratorClassName = elem.getAttribute(CONFIGURATOR_ATTRIBUTE_NAME); RegisterTPAInstanceFactory(mgr,elem,lsClassName,lsConfiguratorClassName); } COM: <s> configure tpa specific instance </s>
funcom_train/20067001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { switch (this.status) { case COMMITTED: return "Transaction" + this.startTime + "[committed]"; case ABORTED: return "Transaction" + this.startTime + "[aborted]"; case ACTIVE: return "Transaction" + this.startTime + "[active]"; default: return "Transaction" + this.startTime + "[???]"; } } COM: <s> returns a string representation of this transaction </s>
funcom_train/610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getBoxConfigurationIndex(int boardPositionIndex) { // The board position may just been locked by another thread. However, // this method is only called for already completely stored board positions. // Hence, the index can't hold just the "LOCKED" value but must // always also contain a valid box configuration index. return table.get(boardPositionIndex+BOX_CONFIGURATION_OFFSET)&(~LOCKED); } COM: <s> returns the box configuration index of the passed board position </s>
funcom_train/13365911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObserver(IObserver aObserver, Object aObject) { assert aObject != null && aObserver != null; Set<IObserver> observers = model2Observers.get(aObject); if (observers == null) { observers = new HashSet<IObserver>(1); model2Observers.put(aObject, observers); } observers.add(aObserver); } COM: <s> adds an observer for the passed object </s>
funcom_train/880596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyChangedGen(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(LDAPAttribute.class)) { case LdapPackage.LDAP_ATTRIBUTE__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case LdapPackage.LDAP_ATTRIBUTE__LDAP_VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } COM: <s> this handles model notifications by calling </s>
funcom_train/10255343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clear(int count, int margin) { if (margin < 64) { margin = 64; } int maxlookup = hashIndex.newNodePointer; int accessBase = getAccessCountCeiling(count, margin); for (int lookup = 0; lookup < maxlookup; lookup++) { Object o = objectKeyTable[lookup]; if (o != null && accessTable[lookup] < accessBase) { removeObject(o, false); } } accessMin = accessBase; } COM: <s> clear approximately count elements from the map starting with </s>
funcom_train/44799688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void instantiate() { if (!instantiated) synchronized(this) { // synch'ed to avoid multiple lazy instantations try { instantiated = true; LOG.debug("lazy field becomes instantiated"); form.getModel().removeModelConditionListener(this); builder.instantiateLazyField(this,desc); } catch (Exception e) { LOG.error(e); } } } COM: <s> instantiate lazy field </s>
funcom_train/49608783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IdentityCardType updateIdentityCardType(String username,EntityManager em,IdentityCardType vo) throws Throwable { try { return (IdentityCardType)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } finally { em.flush(); } } COM: <s> update a identity card type </s>
funcom_train/16911318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Group containedInGroup(final Object object) { for (Group group : getGroupList()) { if (object instanceof Neuron) { if (group.getNeuronList().contains(object)) { return group; } } else if (object instanceof Synapse) { if (group.getSynapseList().contains(object)) { return group; } } } return null; } COM: <s> returns the group if any a specified object is contained in </s>
funcom_train/34183623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(float time) { if(parent == null) { return; } timePass += time; if (parent.getLastFrustumIntersection() != Camera.FrustumIntersect.Outside) { if (timePass >= updateInterval || time < 0) { timePass = 0; LightControllerManager.lm.resortLightsFor((LightState) parent .getRenderState(RenderState.RS_LIGHT), parent); } } } COM: <s> update is called internally </s>
funcom_train/18191035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintNow() { log.log(LogL.GUI_SEQ, "GraphPanel.paintNow()"); if(offscreen != null) { draw(offscreen.getGraphics()); myLastPtVersionNumber = pt.getVersionNumber(); newOffscreen = false; this.getGraphics().drawImage(offscreen, 0, 0, this); drawOnTop(this.getGraphics()); } else { this.repaint(); // defer paint to default call } } COM: <s> immediately repaints the graph </s>
funcom_train/36756463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { System.out.println("toString"); Degree instance = null; String expResult = ""; String result = instance.toString(); 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 to string method of class csis543 tfinal project </s>
funcom_train/46448639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLookAndFeel() { try { UIManager.setLookAndFeel(currentLookAndFeel); if (isApplet()) { updateThisSwingSet(); } else { for (NeuroCoSADEBUG ss : swingSets) { ss.updateThisSwingSet(); } } } catch (Exception ex) { System.out.println("Failed loading L&F: " + currentLookAndFeel); System.out.println(ex); } } COM: <s> sets the current l f on each demo module </s>
funcom_train/40443658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(nRow * nCol * 8); int i, j; for (i = 0; i < nRow; i++) { for (j = 0; j < nCol; j++) { buffer.append(values[i][j]).append(" "); } buffer.append("\n"); } return buffer.toString(); } COM: <s> returns a string that contains the values of this gmatrix </s>
funcom_train/10347682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(String fullPath) throws Exception { try { ComBean comBean = new ComBean(); comBean.setCommand("delete"); Hashtable params = new Hashtable(); params.put("fullPath", fullPath); comBean.setParameters(params); ComBean answer = sendCommand(comBean); if (answer.getErrorCode() == 0) { return true; } else { return false; } } finally { cleanUpConnection(); } } COM: <s> delete a full path on remote </s>
funcom_train/42786308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLookupInteractionClassint() throws Exception { rti.expects(once()).method("getInteractionClassHandle") .with(eq("iCls")).will(returnValue(1234)); HLAClass iCls = model.createInteractionClass("iCls", null); HLAClass newICls = model.lookupInteractionClass(iCls.getHandle()); assertNotNull(newICls); assertTrue(iCls == newICls); rti.verify(); } COM: <s> class under test for hlainteraction class lookup interaction class int </s>
funcom_train/9884855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double pExactForMatrix(int a1, int a2, int a3, int a4){ return dhyperg(a1, a1+a3, a1+a2 , a1+a2+a3+a4); //return dhyperg(a1, a1+a3, a2+a3 , a1+a2+a3+a4); } COM: <s> returns an exact hypergeometric p for the contingency matrix values </s>
funcom_train/49704602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GroupedSearchResults executeInRemoteSearcher(IRemoteSearcher searcher) throws RpcException { return searcher.search( (AQuery)params.get(0), (Integer)params.get(1), (Integer)params.get(2), (AGroup)params.get(3), (Integer)params.get(4), (AFilter)params.get(5), (ASort)params.get(6)); } COM: <s> executes the query with the given params in a remote searcher </s>
funcom_train/9813780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSuspension(final PhysicsSpace pSpace) { frontSuspension = new Suspension(pSpace, chassisNode, CarData.FRONT_SUSPENSION_OFFSET, true); this.attachChild(frontSuspension); rearSuspension = new Suspension(pSpace, chassisNode, CarData.REAR_SUSPENSION_OFFSET, false); this.attachChild(rearSuspension); } COM: <s> each suspension is away from the chassis center by an offset </s>
funcom_train/32060746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoxSize(float newwidth, float newheight) { FloatPoint2D cenpoint = getBoxCenterPoint(); float halfwidth = newwidth / 2f; float halfheight = newheight / 2f; box[X1] = cenpoint.x - halfwidth; box[X2] = cenpoint.x + halfwidth; box[Y1] = cenpoint.y - halfheight; box[Y2] = cenpoint.y + halfheight; setNeedsRepaint(); } COM: <s> sets the width and height of the view box to new values </s>
funcom_train/9237992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendCTCPReply(final String sType, String sMessage) { if (sType.isEmpty()) { return; } final char char1 = (char) 1; if (!sMessage.isEmpty()) { sMessage = " " + sMessage; } sendNotice(char1 + sType.toUpperCase() + sMessage + char1); } COM: <s> send a ctcpreply to a target </s>
funcom_train/9994288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrbMultipleClienteIP() { if (jrbMultipleClienteIP == null) { jrbMultipleClienteIP = new JRadioButton(); this.group.add(jrbMultipleClienteIP); jrbMultipleClienteIP.setBounds(new Rectangle(25, 16, 151, 22)); jrbMultipleClienteIP.setSelected(true); jrbMultipleClienteIP.setText("Unico Cliente por IP"); } return jrbMultipleClienteIP; } COM: <s> this method initializes jrb multiple cliente ip </s>
funcom_train/45622737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAdditionalMetadataPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CreateItemType_additionalMetadata_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CreateItemType_additionalMetadata_feature", "_UI_CreateItemType_type"), MSBPackage.eINSTANCE.getCreateItemType_AdditionalMetadata(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the additional metadata feature </s>
funcom_train/26045903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); int expDoc = advance(doc); float phraseFreq = (expDoc == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; } COM: <s> this method is no longer an official member of </s>
funcom_train/45045821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResultSet getAdditionalInfoEpisodeResultSet(int index) { ResultSet resultSet = null; try { /* Gets the fixed additional info... */ resultSet = _sql.executeQuery("SELECT \"Additional Info Episodes\".* "+ "FROM \"Additional Info Episodes\" "+ "WHERE \"Additional Info Episodes\".\"ID\"="+index+";"); } catch (Exception e) { log.error("Exception: ", e); checkErrorMessage(e); } /* Returns the data... */ return resultSet; } COM: <s> returns the additional info with index index </s>