__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24122867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDefined(@Nonnull final SymbolLiteral symbol) { //analyze the stack SymbolType type = symbol.getSymbolType(); switch(type) { case SIMPLE: return isSimpleDefined(symbol); case SPECIAL: return isSpecialDefined(symbol); default: throw new IllegalArgumentException("illegal symbol type"); } } COM: <s> returns code true code if the supplied variable name is currently defined otherwise </s>
funcom_train/25637701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOverviewComment(Content htmltree) { if (root.inlineTags().length > 0) { htmltree.addContent(getMarkerAnchor("overview_description")); HtmlTree div = new HtmlTree(HtmlTag.DIV); div.addStyle(HtmlStyle.subTitle); addInlineComment(root, div); htmltree.addContent(div); } } COM: <s> adds the overview comment as provided in the file specified by the </s>
funcom_train/25731935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSelectedZoom() { if(scalingFactor == 0.5) zoomBox.getModel().setSelectedItem("50%"); else if(scalingFactor == 0.75) zoomBox.getModel().setSelectedItem("75%"); else if(scalingFactor == 1) zoomBox.getModel().setSelectedItem("100%"); else if(scalingFactor == 1.5) zoomBox.getModel().setSelectedItem("150%"); else zoomBox.getModel().setSelectedItem("Custom"); } COM: <s> sets the selected zoom level </s>
funcom_train/7633642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ExpandableParams superSetNumItems() { int numItems = 0; if (mNumChildren != null) { for (int i = mNumChildren.length - 1; i >= 0; i--) { numItems += mNumChildren[i]; } } super.setNumItems(numItems); return this; } COM: <s> sets the number of items on the superclass based on the number of </s>
funcom_train/32351248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEnabled() { Object enabled = getState().get(actionKey(true) + STATE_ENABLED); if(enabled == null) { // set it up the first time /*enabled = NOT_ENABLED; getState().put(actionKey(true) + STATE_ENABLED, enabled);*/ updateEnabled(); enabled = getState().get(actionKey(true) + STATE_ENABLED); } return enabled.equals(ENABLED); } COM: <s> returns the enabled state of this action </s>
funcom_train/1903575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { String[] args = new String[2]; args[0] = "false"; // Set to true if in command line mode or test mode args[1] = SCHEMA_LOCATION; try { Thread.sleep(30000); // Sleep 30 seconds before starting Harvester } catch (InterruptedException e) { System.err.println("InterruptedException: " + e.getMessage()); } Harvester.main(args); } COM: <s> runs the harvester main program in a separate thread </s>
funcom_train/37422300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Privilege findPrivilege(long pId) throws ClassNotFoundException, SQLException { Vector tVect = findPrivilegeByQuery("select * from privilege where id_privilege = " + pId); if (tVect.size() > 0) return (Privilege) tVect.firstElement(); else return null; } COM: <s> finds a privilege in the database </s>
funcom_train/16677955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { GridLayout layout = SWTUtil.setGridLayout(this, 1, true); SWTUtil.resetMargins(layout); XTabFolder folder = new XTabFolder(this, SWT.NONE); SWTUtil.setGridData(folder, true, true, SWT.FILL, SWT.FILL, 1, 1); for (Profile profile : ProfileManager.getProfiles( )) { createTab(profile, folder); } folder.setSelection(0); } COM: <s> initializes the control overview panel by loading the needed </s>
funcom_train/9818953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add_register(Wire d, Wire clk_en, Wire q, String instanceName) { if(clk_en != null) regce_o(d, clk_en, q, instanceName); else reg_o(d, q, instanceName); } COM: <s> convenience method that adds a register appropriately depending </s>
funcom_train/42391073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLastMessage() { final RSInterface chatBox = RSInterface .getInterface(Constants.INTERFACE_CHAT_BOX); for (int i = 157; i >= 58; i--) {// Valid text is from 58 to 157 final String text = chatBox.getChild(i).getText(); if (!text.isEmpty() && text.contains("<")) { return text; } } return ""; } COM: <s> access the last message spoken by a player </s>
funcom_train/33380895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected PyObject Date(int year, int month, int day) { Calendar c = Calendar.getInstance(); c.set(Calendar.YEAR, year); c.set(Calendar.MONTH, month - 1); c.set(Calendar.DATE, day); return DateFromTicks(c.getTime().getTime() / 1000); } COM: <s> this function constructs an object holding a date value </s>
funcom_train/33859970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkLinesAndColumns(int start, int end) { //int lastLineEnd = -1; if (current instanceof String) { String currentStr = (String)current; for (int i = start; i < end; i++) { if (currentStr.charAt(i) == '\n') { line++; //lastLineEnd = i; column = 1; } else { column++; } } } offset += end - start; /*if (lastLineEnd > -1) { column = offset - lastLineEnd; }*/ } COM: <s> seeks end of lines in the matched input and updates the correspondent properties </s>
funcom_train/2302886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FiniteStateAutomaton synchronizedProduct(FiniteStateAutomaton A1, FiniteStateAutomaton A2) { Synchronizer synch = new Synchronizer(A1, A2); FiniteStateAutomaton fsa = synch.synchronize(); if (fsa == null) { return null; } else { FiniteStateAutomaton connected = synch.getConnectedPart(); connected.setColor(fsa.getColor()); return connected; } } COM: <s> builds the synchronized product of the two automata and returns </s>
funcom_train/18721670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getContentFileSize() { String xPath = OFFSET + "Description/MultimediaContent/*/MediaInformation/MediaProfile/MediaFormat/FileSize"; String sizeString = readXmlValue(xPath, ""); if (sizeString.length() > 0) { contentFileSize = Long.parseLong(sizeString); } else { contentFileSize = 0; } return contentFileSize; } COM: <s> content file size in byte </s>
funcom_train/13276116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultCreator(String defaultCreator) { if (defaultCreator != this.defaultCreator || defaultCreator != null && !defaultCreator.equals(this.defaultCreator)) { String oldDefaultCreator = this.defaultCreator; this.defaultCreator = defaultCreator; this.propertyChangeSupport.firePropertyChange(Property.DEFAULT_CREATOR.toString(), oldDefaultCreator, defaultCreator); } } COM: <s> sets the creator used by default for imported furniture </s>
funcom_train/1233503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUserByEmailAndPassword(final String email, final String password) { if (BookstoreUtil.isNotEmpty(email) && BookstoreUtil.isNotEmpty(password)) { List<User> users = userDAO.findByEmail(email); if (BookstoreUtil.isNotEmpty(users)) { User user = users.get(0); if (BCrypt.checkpw(password, user.getPassword())) { return user; } } } return null; } COM: <s> checks if is valid user </s>
funcom_train/20193424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getOrgList() { Object object = getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) { String sql="Select orgid ,parentid,ORGNAME " + "From tsys_org Start With parentid = 0 Connect By Prior orgid= parentid"; Query query = session.createSQLQuery(sql); List list= query.list(); return list; } } ); return (List)object; } COM: <s> list orgid parentid orgname </s>
funcom_train/45121588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNameDbPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractField_nameDb_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractField_nameDb_feature", "_UI_AbstractField_type"), DictionaryPackage.Literals.ABSTRACT_FIELD__NAME_DB, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DatabasePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the name db feature </s>
funcom_train/33294646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void postFlagFound(String flags) throws FormatException { if ((flags.length() > 1) || (flags.charAt(0) != '*')) { ParametersList p = new ParametersList().add(flags); throw new FormatException("UNKNOWN_POST_FLAG", p); } m_takePrecisionAsParameter = true; } COM: <s> this method is called when postflags are found </s>
funcom_train/3596823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCodingPath(String path) { try { Node n=XPathAPI.selectSingleNode(doc, NiteMetaConstants.codingspathxpath); if (n==null) { System.err.println("WARNING: Attempting to set the Coding Path when no codings are present"); return; } else { n.setNodeValue(path); } } catch (TransformerException e) { e.printStackTrace(); } relcodingspath=path; codingspath=null; codingspath=getCodingPath(); } COM: <s> change the path where the codings are loaded and serialized </s>
funcom_train/624631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnion() { LinkedList list = new LinkedList(); LinkedList list2 = new LinkedList(); list.add(new StringInstance("a")); list2.add(new StringInstance("b")); OclSequence seq = new SequenceInstance(Type.AString, list); OclSequence seq2 = new SequenceInstance(Type.AString, list2); OclSequence result = seq.union(seq2); list.add(new StringInstance("b")); assertTrue(result.equals(seq)); } COM: <s> tests the ocl union operation on sequences </s>
funcom_train/2036269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createGrid() { screenTable = new FlexTable(); screenTable.setCellPadding(0); screenTable.setCellSpacing(0); screenTable.addStyleName("panel-table"); add(screenTable); int gridWidth = grid.getWidth(); int gridHeight = grid.getHeight(); screenTable.setPixelSize(gridWidth, gridHeight); refreshGrid(); } COM: <s> creates the grid and init its cells </s>
funcom_train/19434095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Texture getTexture( String fileName, TextureInfo textureInfo ) throws IOException { Texture texture = (Texture) textures.get( fileName ); if ( texture == null ) { texture = getTexture( fileName, GL.GL_TEXTURE_2D, GL.GL_RGBA, GL.GL_LINEAR, GL.GL_LINEAR, textureInfo ); textures.put( fileName, texture ); } return texture; } COM: <s> p load a texture </s>
funcom_train/24357195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { Graphics2D g2 = ((Graphics2D)g); super.paintComponent(g2); if (renderer == null) { return; } // to restore AffineTransform AffineTransform at = g2.getTransform(); // apply the scale factor g2.scale(scale, scale); // render the emf renderer.paint(g2); // rest the AffineTransform g2.setTransform(at); } COM: <s> paints using the renderer </s>
funcom_train/10821128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOneBlockPlusOneEntry() throws IOException { if (skip) return; writeRecords(records1stBlock + 1); readRecords(records1stBlock + 1); checkBlockIndex(records1stBlock + 1, records1stBlock - 1, 0); checkBlockIndex(records1stBlock + 1, records1stBlock, 1); } COM: <s> one block plus one record </s>
funcom_train/1713804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readGraphicsState(Map rawValues){ Object object; String id; Iterator keys=rawValues.keySet().iterator(); //work through each item in turn while (keys.hasNext()) { id = (String) keys.next(); object = rawValues.get(id); //get values and store Map values; if(object instanceof String) values =currentPdfFile.readObject((String) object,false, null); else values=(Map)object; gs_state.put("/"+id,values); } } COM: <s> examine process graphics state command and store values </s>
funcom_train/39380476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage(String name, Object[] args) { if (args == null) { throw new IllegalArgumentException("Null args parameter"); } String value = getMessage(name); if (value == null) { return null; } return MessageFormat.format(value, args); } COM: <s> return the formatted message for the given resource name </s>
funcom_train/48183744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode(TObjectIntHashMap varMap) { int retval = _slash.hashCode(varMap); // see if this already in map if (varMap.containsKey(this)) { retval += varMap.get(this); } // otherwise add it else { int next = varMap.size() + 1; varMap.put(this, next); retval += next; } return retval; } COM: <s> returns a hash code using the given map from vars to ints </s>
funcom_train/50846478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsAutoIncrement() throws Exception { JDBCResultSetMetaData rsmd = newJdbcResultSetMetaData(); int columnCount = rsmd.getColumnCount(); for (int i = 1; i <= columnCount; i++) { // column 1 is identity (auto-increment) assertEquals("column: " + i, i == 1, rsmd.isAutoIncrement(i)); } } COM: <s> test of is auto increment method of class org </s>
funcom_train/12159965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidSubElement() throws Exception { Element root = document.getRootElement(); ODOMElement shipto = (ODOMElement) getChild(root, "shipto"); // the document should be valid. Pass in an empty expected // errors array. setErrorReporter(new TestErrorReporter(new ExpectedError[]{})); validator.validate(shipto); reporter.assertErrorCount(0); } COM: <s> test that ensures that no errors are reported when validating a sub </s>
funcom_train/46077109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object removeItem(Object o) { for (LinkedNode test = head; test!=null; test=test.next) { if (test.data.equals(o)) { //Remove this item Object res = test.data; if (test.next!=null) test.next.prev = test.prev; if (test.prev != null) test.prev.next = test.next; //If header, footer... if (test.equals(tail)) tail = test.prev; if (test.equals(head)) head = test.next; //Managerial stuff test = null; size--; return res; } } return null; } COM: <s> remove an item from the list </s>
funcom_train/30172344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopAllThread(){ this.debug.println("PooledTransfer: Stop all process"); for(int i=0;i<dThread.length;i++){ ((TransferThread)dThread[i]).stopThread(); } synchronized(pool){ pool.notifyAll(); } } COM: <s> stop all thread </s>
funcom_train/3177313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gedcomPropertyChanged(Gedcom gedcom, Property property) { log("Property "+property.getTag()+" changed to "+property.getDisplayValue()+" in "+property.getEntity()+" in "+gedcom.getName()); touchedEntities.add(property.getEntity()); } COM: <s> notification that a property has been changed </s>
funcom_train/23271577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean unique(JTable table, int column, int row, String value) { if (table == null) { return true; } for (int index = 0; index < row; index++) { if (table.getModel().getValueAt(index, column).equals(value) && table.getModel().getValueAt(index, column) != value) { return false; } } return true; } COM: <s> checks that the values in columns are unique </s>
funcom_train/11009489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addConditionalFormatting( ConditionalFormatting cf ) { XSSFConditionalFormatting xcf = (XSSFConditionalFormatting)cf; CTWorksheet sh = _sheet.getCTWorksheet(); sh.addNewConditionalFormatting().set(xcf.getCTConditionalFormatting().copy()); return sh.sizeOfConditionalFormattingArray() - 1; } COM: <s> adds a copy of hssfconditional formatting object to the sheet </s>
funcom_train/35357785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTable(byte[] table) throws jjil.core.Error { if (table.length != 256) { throw new Error( Error.PACKAGE.ALGORITHM, ErrorCodes.LOOKUP_TABLE_LENGTH_NOT_256, table.toString(), null, null); } this.table = new byte[256]; System.arraycopy(table, 0, this.table, 0, this.table.length); } COM: <s> assign a new lookup table </s>
funcom_train/45715130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ColumnOJ getSelectedColumn() { int index = tblColumns.getSelectedRow(); if ((index >= 0) && (index < OJ.getData().getResults().getColumns().getAllColumnsCount())) { return OJ.getData().getResults().getColumns().getColumnByIndex(index); } return null; } COM: <s> only one column can be selected </s>
funcom_train/1962058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultListModel populateAppointment(int scope) { List<Appointment> apptList = null; if(scope == MONTH_SCOPE) { apptList = apptCtrl.getMonthAppointments(calendar.getPointer()); } else if(scope == WEEK_SCOPE) { apptList = apptCtrl.getWeekAppointments(calendar.getPointer()); } else if(scope == DAY_SCOPE) { apptList = apptCtrl.getDayAppointments(calendar.getPointer()); } DefaultListModel alm = new AppointmentListModel(apptList); return alm; } COM: <s> populates appointment list with this months appointments </s>
funcom_train/22929436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRequiredParameter() { Command command = new Command("abc", array("123", "456")); assertEquals("123", "123", command.getRequiredParameter(0)); assertEquals("456", "456", command.getRequiredParameter(1)); } COM: <s> test the get required parameter method </s>
funcom_train/4224574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkForConflictingRecord(Object[] searchKeyValues, Object[] conflictingPk) { try { for (int i = 0; i < searchKeyValues.length; i++) { if (searchKeyValues[i].equals(conflictingPk[i])) { continue; } else { return false; } } return true; } catch (NullPointerException ex) { return false; } } COM: <s> searches for the conflicting key in search key values </s>
funcom_train/19846331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void gameLoop() throws SlickException { int delta = getDelta(); if (!Display.isVisible() && updateOnlyOnVisible) { try { Thread.sleep(100); } catch (Exception e) { } } else { try { updateAndRender(delta); } catch (SlickException e) { Log.error(e); running = false; return; } } updateFPS(); Display.update(); if (Display.isCloseRequested()) { if (game.closeRequested()) { running = false; } } } COM: <s> strategy for overloading game loop context handling </s>
funcom_train/3117174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuffer sb = new StringBuffer(); final String className = ClassLib.getShortClassName(this); sb.append(className.replaceAll("\\$", ".")); sb.append(getId().toShortString()); return sb.toString(); } COM: <s> returns a short string representation of this element </s>
funcom_train/2292130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createDialogRowsHtml(int startIndex, int endIndex) { StringBuffer result = new StringBuffer((endIndex - startIndex) * 8); for (int i = startIndex; i <= endIndex; i++) { CmsWidgetDialogParameter base = (CmsWidgetDialogParameter)getWidgets().get(i); result.append(createDialogRowHtml(base)); } return result.toString(); } COM: <s> creates the dialog widget rows html for the specified widget indices </s>
funcom_train/2853018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int addName (String path, NodeID id) { int status = checkPath(path); if (status == CallBack.OK) { status = checkNodeID(id); if (status == CallBack.OK) { synchronized (map) { map.put(path, id); } } } return status; } COM: <s> add a name to hash mapping </s>
funcom_train/29904147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getTargetStringIterator() { Iterator iterator = this.element.getElementReferences().iterator(); LinkedList refList = new LinkedList(); while (iterator.hasNext()) { // System.out.println(((IElementReference)iterator.next()).getTargetName()); refList.add(((IElementReference) iterator.next()).getTargetName()); } return refList.iterator(); } COM: <s> returns an iterator for the names of referenced subelements </s>
funcom_train/7639892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoadFrom_InvalidRoot() { assertEquals(0, ui.getUiChildren().size()); MockXmlNode root = new MockXmlNode(null /* namespace */, "blah", Node.ELEMENT_NODE, null); ui.loadFromXmlNode(root); assertEquals(0, ui.getUiChildren().size()); } COM: <s> load from does nothing if the root node doesnt match whats expected </s>
funcom_train/37608419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defaultVDens() { int fgct, stct = this.getStCount(); for (int kkk = 0; kkk < stct; kkk++) { OStreet sss = this.useSt(kkk); fgct = sss.getFragCount(); for (int mmm = 0; mmm < fgct; mmm++) { sss.useFrag(mmm).setEDensity(-1); sss.useFrag(mmm).setSDensity(-1); sss.useFrag(mmm).setDPoisson(-1); } } } // end defaultVDens() COM: <s> sets all tt ocity tt fragment start and end densities and </s>
funcom_train/50073380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { for(Iterator iter = sessions.entrySet().iterator(); iter.hasNext(); ) { try { Map.Entry e = (Map.Entry) iter.next(); QuietWriter qw = (QuietWriter) e.getValue(); qw.close(); } catch (IOException e) { } } sessions.clear(); } COM: <s> called by log4j to close the output file streams </s>
funcom_train/10190456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: //public void onDlgReInviteRedirectResponse(InviteDialog d, int code, String reason, MultipleHeader contacts, Message msg) //{ if (d!=m_inviteDialog) { printLog("NOT the current m_inviteDialog",LogLevel.HIGH); return; } // if (m_callListener!=null) m_callListener.onCallReInviteRedirection(this,reason,contacts.getValues(),msg); //} COM: <s> inherited from class invite dialog listener and called by an invite dialag </s>
funcom_train/16411614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layoutContainer(Container c) { int y = 5; int spacing = 3; //set the size of close button int buttonHeight = closeButton.getIcon().getIconHeight(); int buttonWidth = closeButton.getIcon().getIconWidth(); int x = getWidth() - (buttonWidth+spacing); closeButton.setBounds( x, y, buttonWidth, buttonHeight); } COM: <s> performs layout for the component </s>
funcom_train/17202117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNextHeapVariableNumber(Object type) { Integer current = nextNumber.get(type); if (current == null) { // no number found. Create one. Integer one = 1; nextNumber.put(type, one); return 0; } // bump up the number Integer next = current + 1; nextNumber.put(type, next); return current; } COM: <s> get the next number to be assigned to a new heap variable </s>
funcom_train/5863545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply(Component comp) { if (_attrs != null && isEffective(comp)) { final Evaluator eval = _evalr.getEvaluator(); for (Iterator it = _attrs.entrySet().iterator(); it.hasNext();) { final Map.Entry me = (Map.Entry)it.next(); final String name = (String)me.getKey(); final Object value = me.getValue(); comp.setAttribute( name, Utils.evaluateComposite(eval, comp, value), _scope); } } } COM: <s> applies the custom attributes </s>
funcom_train/18010894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException { setOpenOnRun(false); Display display=Display.getCurrent(); assert display!=null; DialogOpener opener=new DialogOpener(); display.timerExec(fDelay, opener); Cursor busyCursor = display.getSystemCursor(SWT.CURSOR_WAIT); getParentShell().setCursor(busyCursor); try { super.run(true, cancelable, runnable); } finally { opener.cancel(); getParentShell().setCursor(null); } } COM: <s> executes the given runnable in a separate thread regardless of the value </s>
funcom_train/16617154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sampleMethod(int parameter1, int parameter2) { if(parameter1 == parameter2) { // Always use curly braces, even if you have only one // statement here. } else if(parameter1 == 1) { // Code. } else { // Code. } while(parameter1 != parameter2) { // Code. parameter1 = parameter2; } for(int i = 0; i < 5; i++) { System.out.println("HI!"); } do { parameter1 = parameter2l; } while(parameter1 != parameter2); return true; } COM: <s> here you should explain the role of the following method </s>
funcom_train/22470577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ILink editCoverArt(IRequestCycle cycle) { IEngineService service = getExternalService(); ExternalServiceParameter parameter = new ExternalServiceParameter("CoverArtEdit", new Object[] { getPlaylist().getId(), "PlaylistEdit" }); ILink link = service.getLink(false, parameter); return link; } COM: <s> goto the edit cover art page </s>
funcom_train/22076238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List makeList(Pattern pat, String string) { /* list of fragments/variable names */ List l = new ArrayList(); /* first match local vars */ Matcher m = pat.matcher(string); int i = 0; while (m.find()) { String vn = m.group(2); int s = m.start(1); int t = m.end(1); l.add(new Fragment(string.substring(i, s))); l.add(new Variable(vn)); i = t; } if (i < string.length()) l.add(new Fragment(string.substring(i))); return l; } COM: <s> returns a list of fragment variable objects according to pattern </s>
funcom_train/9770002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface NetworkArgument { // public String getNetworkString() {{{ /** * Create a string representation for a network message. * * Returns the string representation of the object, so it can be send over * the network. * * @return The string representation */ public String getNetworkString(); // }}} } COM: <s> interface for a network argument </s>
funcom_train/46494791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getDialogContentPane() { if (dialogContentPane == null) { dialogContentPane = new JPanel(); dialogContentPane.setName("Settings"); dialogContentPane.setLayout(new BorderLayout()); dialogContentPane.setPreferredSize(new Dimension(660, 345)); dialogContentPane.add(getJSplitPaneTreeContent(), BorderLayout.CENTER); dialogContentPane.add(getJPanelDialogButtons(), BorderLayout.SOUTH); } return dialogContentPane; } COM: <s> this method initializes dialog content pane </s>
funcom_train/7346515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int i) { if (i < names.size()) { // Remove from model names.remove(i); finds.remove(i); replaces.remove(i); ignoreCases.remove(i); regExps.remove(i); // Remove from JList ((DefaultListModel) Outliner.findReplace.FIND_REPLACE_LIST.getModel()).removeElementAt(i); } else { System.out.println("Error: attempt to remove a find/replace item with an invalid index: " + i); } } COM: <s> removes the find replace item from this model located at the provided index </s>
funcom_train/47927893
/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(null); jContentPane.add(getButton1()); jContentPane.add(getButton2()); jContentPane.add(getPanel(), null); jContentPane.add(getWallpaperPanel(),null); jContentPane.add(getButton(), null); jContentPane.add(getScrollPane(),null); this.setJTextPaneText("Application started"); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/35838314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onZoomToFit() { UIViewPane pane = getViewPane(); pane.setZoom(1.0); pane.scale(); Dimension panesize = pane.calculateSize(); JViewport viewport = getViewport(); Dimension viewsize = viewport.getExtentSize(); // REMOVE EXTRA FROM ORTSIZE TO ALLOW FOR SCROLL BARS? double xscale = CoreUtilities.divide(viewsize.width, panesize.width); double yscale = CoreUtilities.divide(viewsize.height, panesize.height); double scale = xscale; if (yscale < xscale) scale = yscale; if (scale > 1.0) scale = 1.0; scrollHome(false); pane.setZoom(scale); pane.scale(); isFocusedNode = false; } COM: <s> zoom the current map to fit it all on the visible view </s>
funcom_train/27809298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getParamsSize(Method method) { Type[] params = method.getParameterTypes(); int total = 0; for (int i = 0; i < params.length; i++) { int size = params[i].getSize(); /* PENDING */ if (size == 4) { size = 2; } else if (size == 1) { size = 2; } total += size; } return total / 2; } COM: <s> returns the size in words of the parameters to the given </s>
funcom_train/46110512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLWriter (String path) { try { Util.createDirectories(path); OutputStream output = new BufferedOutputStream(new FileOutputStream(path)); writer = new PrintWriter(new OutputStreamWriter(output, "UTF-8")); } catch ( IOException e ) { throw new OkapiIOException(e); } } COM: <s> creates a new xml document on disk </s>
funcom_train/3563105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEditorTelephones(Integer editorID) throws DbException { NVPair[] parms; parms = new NVPair[1]; parms[0] = new NVPair("editorID", editorID.toString()); simpleRequest(REMOVE_EDITOR_TELEPHONES_PAGE, "Cannot remove editor telephones", parms); } COM: <s> removes all editors telephone numbers </s>
funcom_train/252678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWait(final boolean enabled) { if (enabled) { threads.push(enabled); } else { threads.pop(); } if (enabled || threads.size() == 0) { SwingUtilities.invokeLater(new Runnable() { public void run() { waitPane.setVisible(enabled); } }); } } COM: <s> sets the wait cursor on the xmltool box frame </s>
funcom_train/18603175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveCustomElementSets(Dbms dbms, CustomElementSet customElementSet) throws Exception { dbms.execute("DELETE FROM CustomElementSet"); for(String xpath : customElementSet.getXpaths()) { if(StringUtils.isNotEmpty(xpath)) { dbms.execute("INSERT INTO CustomElementSet (xpath) VALUES (?)", xpath); } } } COM: <s> replaces the contents of table custom element set </s>
funcom_train/4880510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getIrTelaIinicial () { if (irTelaIinicial == null) {//GEN-END:|72-getter|0|72-preInit // write pre-init user code here irTelaIinicial = new Command ("irT_Incial", Command.OK, 0);//GEN-LINE:|72-getter|1|72-postInit // write post-init user code here }//GEN-BEGIN:|72-getter|2| return irTelaIinicial; } COM: <s> returns an initiliazed instance of ir tela iinicial component </s>
funcom_train/26666057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String computeKey(Map<String,?> params) { if( params==null ) throw new IllegalArgumentException("Params to filter and compute key should not be null."); Object okey = params.get(paramKeyName); if( okey instanceof String ) return (String) okey; if( okey instanceof String[] ) throw new IllegalArgumentException("Memory cache key must be single valued."); if( okey==null ) { log.warn("Memory cache must have a key value."); return null; } return okey.toString(); } COM: <s> override this method to use a different parameter value to get the </s>
funcom_train/14070122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SceneDAO getSceneDAO() throws UninitializedException { if (closed) { throw new UninitializedException(DAOFactory.DB_ERROR_MESSAGE); } if (sceneDAO == null) { try { sceneDAO = new SceneDAO(env,dbConfig); } catch (DatabaseException e) { throw new UninitializedException("Cannot access room database",e); } } return sceneDAO; } COM: <s> get the dao in charge of handling scene persistence </s>
funcom_train/21172957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean goOnline (boolean on) { if (on) { // If we're already online, just return if (online) { return (true); } // Try to connect to the database Connection newCon = setupDBConnection ( host ); if (newCon != null) { con = newCon; online = true; tryNextCon = false; return (true); } else { return (false); } } else { this.con = offlineCon; online = false; return (true); } } // method setOnline (boolean) COM: <s> attempts to change the online offline status </s>
funcom_train/8078745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean separable( DoubleVector data, int i0, int i1, double x ) { DoubleVector dataSqrt = data.sqrt(); double xh = Math.sqrt( x ); NormalMixture m = new NormalMixture(); m.setSeparatingThreshold( separatingThreshold ); return m.separable( dataSqrt, i0, i1, xh ); } COM: <s> return true if a value can be considered for mixture estimatino </s>
funcom_train/2585961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension minimumLayoutSize(final Container parent) { final Dimension dim = new Dimension(0, 0); //Always add the container's insets! final Insets insets = parent.getInsets(); dim.width = this.minWidth + insets.left + insets.right; dim.height = this.minHeight + insets.top + insets.bottom; this.sizeUnknown = false; return dim; } COM: <s> returns the minimum size </s>
funcom_train/18517175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ITokenScanner prepareScanner(String text) { CssTextTools tools = new CssTextTools(store, profile); ITokenScanner scanner = tools.getCodeScanner(); IDocument document = new Document(text); scanner.setRange(document, 0, document.getLength()); return scanner; } COM: <s> creates a new code css code scanner code instance and sets its input </s>
funcom_train/44508164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRealms(Collection<Realm> realms) { if (realms == null) { throw new IllegalArgumentException("Realms collection argument cannot be null."); } if (realms.isEmpty()) { throw new IllegalArgumentException("Realms collection argument cannot be empty."); } this.realms = realms; applyCacheManagerToRealms(); } COM: <s> sets the realms managed by this tt security manager tt instance </s>
funcom_train/29618401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisRadioButton getJRadioFreelyAvailable() { if (jRadioFreelyAvailable == null) { jRadioFreelyAvailable = new MgisRadioButton(); jRadioFreelyAvailable.setValue("2"); m_availability.add(jRadioFreelyAvailable); jRadioFreelyAvailable.setText(AppTextsDAO.get("LABEL_FREELY_AVAILABLE")); jRadioFreelyAvailable.setBounds(11, 60, 133, 19); } return jRadioFreelyAvailable; } COM: <s> this method initializes j radio freely available </s>
funcom_train/36430546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPath() { if (path == null) { if (!hasPath) { return path = ""; } int pathEndPos = uri.indexOf('?'); if (pathEndPos < 0) { path = uri; } else { return path = uri.substring(0, pathEndPos); } } return path; } COM: <s> returns the decoded path string of the uri </s>
funcom_train/22655108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePreferenceAttribute(PreferenceAttribute preferenceAttribute) { if (preferenceAttribute.getParent().equals(this) && this.preferenceAttributes.containsValue(preferenceAttribute)) { this.preferenceAttributes.remove(preferenceAttribute.getId()); if (null != preferenceModelManager) { preferenceModelManager.preferenceAttributeChanged(this.getCompleteId(), preferenceAttribute.getId(), PreferenceModelManager.OPERATION_PREF_ATTR_REMOVED); } return true; } else { return false; } } COM: <s> removes a preference attribute from this preference </s>
funcom_train/24934793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EdgeProperty getNodeOnEdge( int x, int y ) { Iterator it = fNodesOnEdge.iterator(); while ( it.hasNext() ) { NodeOnEdge node = (NodeOnEdge) it.next(); if ( node.occupies( x, y ) ) { return node; } } return null; } COM: <s> returns the node laying under the x y coordinate otherwise null </s>
funcom_train/19879840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readPrefs() { xastirLogin = prefs.get("callsign", "SETME"); xastirPassword = prefs.get("password", "SETME"); xastirHostname = prefs.get("serverAddress", "localhost"); xastirPort = prefs.getInt("serverPort", 2023); } COM: <s> read the application preferences from java preferences </s>
funcom_train/29063154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PointcutReference_ref_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PointcutReference_ref_feature", "_UI_PointcutReference_type"), AspectxPackage.eINSTANCE.getPointcutReference_Ref(), true, null, null, null)); } COM: <s> this adds a property descriptor for the ref feature </s>
funcom_train/38552984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() { Cube42Exception entry = new Cube42Exception(null,new Object[] {}); assertEquals("Null constructor should be a null system code", entry.getSystemCode(), LoggingSystemCodes.NULL); entry = new Cube42Exception(ExceptionTestCodes.TEST_CODE, null); assertEquals("Null parameter should do nothing to the message", entry.getMessage(), ExceptionTestCodes.TEST_CODE.getMessage()); } COM: <s> test the constructor of the cube42 exception </s>
funcom_train/45289866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassDocImpl getClassDoc(ClassSymbol clazz) { ClassDocImpl result = classMap.get(clazz); if (result != null) return result; if (isAnnotationType(clazz)) { result = new AnnotationTypeDocImpl(this, clazz); } else { result = new ClassDocImpl(this, clazz); } classMap.put(clazz, result); return result; } COM: <s> return the class doc or a subtype of this class symbol </s>
funcom_train/2863771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateReport(String template) { Object[] args = new Object[] { className, new Integer(bytesRead), new Integer(garbageBytes), new Integer(recordsConverted), new Integer(recordsMade), new Integer(recordsRead), new Integer(skipRecords), System.getProperty("user.name", "unknown") }; return StringResolver.getResolver().resolve(template, args); } COM: <s> generate a verbose report on the actions </s>
funcom_train/9711870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConsumed(boolean consume) { if (consume) { this.consumed = true; busObject = null; busContext = null; omElement = null; if (log.isDebugEnabled()) { // The following stack trace consumes indicates where the message is consumed log.debug("Message Block Monitor: Action=Consumed"); log.trace(JavaUtils.stackToString()); } } else { consumed = false; } } COM: <s> once consumed all instance data objects are nullified to prevent subsequent access </s>
funcom_train/13515346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRelativePath(String fileName) { String colPath = null; int lastPosition = -1; int lastSecPosition = -1; lastPosition = fileName.lastIndexOf(File.separator); colPath = fileName.substring(0, lastPosition); lastSecPosition = colPath.lastIndexOf(File.separator); return fileName.substring(lastSecPosition + 1); } COM: <s> get btree file name on relative path </s>
funcom_train/9954145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean remove(Object searchBounds, Object item) { build(); if (itemBoundables.isEmpty()) { Assert.isTrue(root.getBounds() == null); } if (getIntersectsOp().intersects(root.getBounds(), searchBounds)) { return remove(searchBounds, root, item); } return false; } COM: <s> removes an item from the tree </s>
funcom_train/18837584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDefaultLogger() { if (useDefaultLogger) { logger.setUseGlobalHandlers(false); Handler[] handlers = logger.getHandlers(); for (int i = 0; i < handlers.length; i++) logger.removeHandler(handlers[i]); Handler handler = new ConsoleHandler(); logger.addHandler(handler); logger.setLevel(Level.CONFIG); try { Level level = Level.parse(defaultLogLevel); logger.setLevel(level); } catch (IllegalArgumentException e) { // noop } handler.setLevel(logger.getLevel()); } } COM: <s> initializes the logger that will be used to log this servers actions </s>
funcom_train/32292184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeNode getChildBefore(TreeNode node) { // Variables int index; // Check node if (node == null || node.getParent() != this) { throw new IllegalArgumentException(); } // if // Get index of child node index = getIndex(node); // Check for child before index--; if (index < 0) { return null; } // if // Retrieve Child Before return getChildAt(index); } // getChildBefore() COM: <s> get child before </s>
funcom_train/43747999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { Object value = null; if (this.simpleSource != null) { value = this.simpleSource; } else { try { value = BeanUtil.getProperty(this.source, this.propertyPath); } catch (DataException e1) { e1.printStackTrace(); } } String result = null; try { result = this.converter.fromObjectToString(value); } catch (ConverterException e) { e.printStackTrace(); } return result; } COM: <s> converts the property managed by the value model into string and returns </s>
funcom_train/4425842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createControlOption(Composite parent) { groupOptions = new Group(parent, SWT.NONE); groupOptions.setFont(getFont()); groupOptions.setText("&Options:"); GridLayout layout = new GridLayout(1, false); layout.marginWidth = 0; layout.horizontalSpacing = 0; groupOptions.setLayout(layout); GridData data = new GridData(SWT.FILL, SWT.TOP, true, false); groupOptions.setLayoutData(data); } COM: <s> creates the control for options </s>
funcom_train/35357537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getRegions() throws jjil.core.Error { if (this.vecROk == null) { throw new jjil.core.Error( jjil.core.Error.PACKAGE.CORE, jjil.core.ErrorCodes.NO_RESULT_AVAILABLE, null, null, null); } return this.vecROk.elements(); } COM: <s> return the region list </s>
funcom_train/8400526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showMessage(String message){ if (hasAttachedMessageLabel == true){ attachedMessageLabel.setMessage(message); } else { if (useBottomMessageLabel == true) { showBottomMessageLabel(message); } else { showSideMessageLabel(message); } } this.setForeground(Color.BLACK); } COM: <s> displays a message for this text field </s>
funcom_train/10865351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(DataOutput os) throws IOException { os.writeBoolean(forward); os.writeInt(root); os.writeInt(cmds.size()); for (CharSequence cmd : cmds) os.writeUTF(cmd.toString()); os.writeInt(rows.size()); for (Row row : rows) row.store(os); } COM: <s> write this trie to the given output stream </s>
funcom_train/17832139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateContactItemsPresence(Presence presence, String bareJID) { final Iterator groupIterator = groupList.iterator(); while (groupIterator.hasNext()) { ContactGroup group = (ContactGroup)groupIterator.next(); ContactItem item = group.getContactItemByJID(bareJID); if (item != null) { item.setPresence(presence); group.fireContactGroupUpdated(); } } } COM: <s> updates the presence of one individual based on their jid </s>
funcom_train/8085212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireLayoutCompleteEvent(LayoutCompleteEvent e) { if(layoutCompleteListeners!=null && layoutCompleteListeners.size()!=0) { LayoutCompleteEventListener l; for(int i=0; i<layoutCompleteListeners.size(); i++) { l = (LayoutCompleteEventListener) layoutCompleteListeners.elementAt(i); l.layoutCompleted(e); } } } COM: <s> fires a layout complete event </s>
funcom_train/3810715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JavaQName getImplementationClass() { if (implClass == null) { if (controllerInterface == null) { return null; } else { JavaQName controllerClass = JavaQNameImpl.getInstance(controllerInterface); return JavaQNameImpl.getInstance(controllerClass.getPackageName(), controllerClass.getClassName() + "Impl"); } } else { return implClass; } } COM: <s> p returns the chain implementation classes name </s>
funcom_train/1209455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LineNumberReader getReader() throws FileNotFoundException { if (writer != null) { throw Context.reportRuntimeError("already writing file \"" + name + "\""); } if (reader == null) reader = new LineNumberReader(file == null ? new InputStreamReader(System.in) : new FileReader(file)); return reader; } COM: <s> get the reader checking that were not already writing this file </s>
funcom_train/35751591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getElement(String idElementName, String id) throws Exception{ if(doc==null){ throw new Exception("root has not been initialized!"); } String xquery = "/descendant::*[" + idElementName + "=\"" + id + "\"]"; try { XPath path = XPath.newInstance(xquery); Element e = (Element)path.selectSingleNode(doc); return e; } catch (JDOMException e) { e.printStackTrace(); throw e; } } COM: <s> gets an element based on its id </s>
funcom_train/42135006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDataType() { String packetType = getPacketTypes(); if (packetType == null) { packetType = DEFAULT_PACKET_TYPE; } // String type = (String) Server.getDataTypes() // .get(Integer.valueOf(packetType)); // if (type != null) { // return type; // } return DEFAULT_DATA_TYPE; } COM: <s> returns the data type of the stream </s>
funcom_train/7599378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isType(List inds, ATermAppl c) { c = ATermUtils.normalize(c); if( log.isDebugEnabled() ) log.debug("Checking type " + c + " for individuals " + inds); ATermAppl notC = ATermUtils.negate(c); boolean isType = !isConsistent( inds, notC ); if( log.isDebugEnabled() ) log.debug("Type " + isType + " " + c + " for individuals " + inds); return isType; } COM: <s> returns true if any of the individuals in the given list belongs </s>