__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10282097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrack(File file, String GUID) { if (!hasTrack(file.getName())) { CacheEntry ct = new CacheEntry(file.getName(), GUID); mList.add(ct); ct.setDataController(this); setModified(); } } COM: <s> add a track to the register </s>
funcom_train/43014754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(Section v) { if (Section_Type.featOkTst && ((Section_Type) jcasType).casFeat_parent == null) { jcasType.jcas.throwFeatMissing("parent", "org.apache.uima.mediawiki.types.Section"); } jcasType.ll_cas.ll_setRefValue(addr, ((Section_Type) jcasType).casFeatCode_parent, jcasType.ll_cas.ll_getFSRef(v)); } COM: <s> setter for parent sets the parent section if any of this current one </s>
funcom_train/38492977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WPoly (Polygon poly, double XCenter, double YCenter) { super (XCenter, YCenter); nPoints = poly.npoints; XCoordinatesOffset = new double [nPoints]; YCoordinatesOffset = new double [nPoints]; for (int i = 0; i < nPoints; i++) { XCoordinatesOffset[i] = poly.xpoints[i] - XCenter; YCoordinatesOffset[i] = poly.ypoints[i] - YCenter; } } COM: <s> creates a new wpoly using the data from a java </s>
funcom_train/45269071
/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(); buffer.append(this.getClass().getName()); buffer.append("[username:"); //$NON-NLS-1$ buffer.append(username); buffer.append(";lastname:"); //$NON-NLS-1$ buffer.append(lastname); buffer.append(";firstname:"); //$NON-NLS-1$ buffer.append(firstname); buffer.append(";password:"); //$NON-NLS-1$ buffer.append(password); buffer.append(";defaultgroup:"); //$NON-NLS-1$ buffer.append(defaultGroup); buffer.append("]"); //$NON-NLS-1$ return buffer.toString(); } COM: <s> returns a string consisting of student information </s>
funcom_train/32723878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(); Iterator iter = transientKeys.keySet().iterator(); while (iter.hasNext()) { String key = (String) iter.next(); String value = (String) transientKeys.get(key); buf.append("Key = ["+key+"] Value = ["+value+"]\n"); } return super.toString()+": "+buf.toString(); } COM: <s> returns list of all keys and values on the map </s>
funcom_train/15717400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void touch() { try { String query = "update entry set date_touched=CURRENT_TIMESTAMP() " + "where id=?"; PreparedStatement stmt = ((JdbcRequestCycle)getRequestCycle()). getConnection().prepareStatement(query); stmt.setInt(1, entry); stmt.executeUpdate(); } catch (SQLException ex) { ex.printStackTrace(); } } COM: <s> update the entrys last access state in the database </s>
funcom_train/14461986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFontColor(int cl){ if (data == null) setData(this.getData()); if(cl != icv){ // don't do it if the font is already this color byte[] newcl = ByteTools.shortToLEBytes((short)cl); System.arraycopy(newcl, 0,data, 4 ,2); icv = cl; } } COM: <s> set the size of the font in 1 20 point units </s>
funcom_train/28104436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void lookForPipeAdInGroup(String name, int limit) { discovery = group.getDiscoveryService(); int queryID = discovery.getRemoteAdvertisements(null, DiscoveryService.ADV, "Name", name, limit); try { Thread.sleep(5000); } catch(InterruptedException error) { } } COM: <s> do a remote search for the name </s>
funcom_train/15617115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseEditComment(ParserInput parserInput, ParserOutput parserOutput, String raw) throws ParserException { if (raw != null && raw.length() == 0) { return raw; } Reader reader = toReader(raw, true); JAMWikiEditCommentLexer lexer = new JAMWikiEditCommentLexer(reader); return this.lex(lexer, parserInput, parserOutput, MODE_EDIT_COMMENT).trim(); } COM: <s> parse an edit comment and return html for online representation </s>
funcom_train/25686511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long diffWithOverflowCheck(long newVal, long oldVal) { if (newVal >= oldVal) { return newVal - oldVal; } else { long vmax; long p32 = 1L << 32; long p64 = 1L << 64; if (oldVal < p32) vmax = p32; // 32 bits else vmax = p64; // 64 bits return newVal - oldVal + vmax; } } COM: <s> computes the difference between the new value and the old value of a </s>
funcom_train/4262440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rowsLoaded(Widget[][] widgets, int firstRow) { if (widgets == null || firstRow < 0) { this.firstRow = UNKNOWN; this.lastRow = UNKNOWN; this.widgets = null; } else { this.firstRow = firstRow; this.widgets = widgets; } updateUi(); } COM: <s> updates the table with rows provided row column array of widgets </s>
funcom_train/25775390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Substitution mgu(ExpressionList target, Substitution sigma) { if ( sigma == null || target.size() != size() ) return null; for (int i = 0, iMax = size(); i < iMax; i++) { sigma = get(i).mgu(target.get(i), sigma); if ( sigma == null ) return null; } return sigma; } COM: <s> this method produces mgu most general unifier a </s>
funcom_train/20885266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testImplicitListWithStringElements() { ImplicitListWithStringElements list = new ImplicitListWithStringElements(); list.list = new ArrayList<String>(); for (int i = 0; i < 10; i++) { list.list.add("stringValue" + i); } JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, list); } COM: <s> tests an implicit list with code string code elements </s>
funcom_train/34636431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateParentTreeItemState(DeletionItem item) { // get parent DeletionItem parent = item.getParent(); if (parent == null) { return; } list1.setGrayed(parent, containsGrayElement(parent.getChildren()) || !sameCheckedStatus(parent.getChildren())); list1.setChecked(parent, !allUnchecked(parent.getChildren())); updateParentTreeItemState(parent); } COM: <s> updates the checked and grayed state of the parent from the given item </s>
funcom_train/9993894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillDestFolderPath() { getJFileChooser().setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); File folderPath = openFolder(); if(folderPath != null) { if (folderPath.isDirectory()) { String fldPath = new String(folderPath.getPath()); if (fldPath.charAt(fldPath.length() - 1) != '\\') { fldPath += "\\"; } getJFolderPath().setText(fldPath); } } } COM: <s> this method automatically fill editbox with copy move directory path </s>
funcom_train/9218812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List executeBatchDetailed() { try { return getSqlMapExecutor().executeBatchDetailed(); } catch (BatchException e) { throw new DaoException("Failed to executeBatch. Cause: " + e, e); } catch (SQLException e) { throw new DaoException("Failed to executeBatch. Cause: " + e, e); } } COM: <s> executes flushes all statements currently batched </s>
funcom_train/51611207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResultNode getNode(ResultNode root, String nodePath) { if(nodePath.equals("0")) return root; String[] path = nodePath.split("_"); ResultNode node = root; for(int i=1;i<path.length;i++) { if(!(node instanceof RComplexNode)) return null; node = ((RComplexNode)node).getChild(Integer.parseInt(path[i])) ; } return node; } COM: <s> decodes node path that is an unique node id in </s>
funcom_train/32058026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddVisibleDependencies() { System.out.println("testAddVisibleDependencies"); GraphModel gm = new DefaultGraphModel(); CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); Object cell = new DefaultGraphCell(); Object port = new DefaultPort(); ((DefaultGraphCell) cell).add((DefaultPort) port); Object[] objs = { cell }; //null pointer exception assertNotNull(cache.addVisibleDependencies(objs, false)); } COM: <s> this function tests add visible dependencies function of graph layout cache </s>
funcom_train/27827018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printObjectPropertyRef(Property property) throws KAONException { m_xmlWriter.openTagIndent(Namespaces.OWLX_NS+"ObjectProperty",true); m_xmlWriter.printAttributeURI(Namespaces.OWLX_NS+"name",property.getURI()); m_xmlWriter.closeLastTag(); } COM: <s> prints the reference to an object property </s>
funcom_train/38552114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWidth() { int componentWidth = (int)component.getPreferredSize().getWidth(); if(component.getWidth() > componentWidth) { componentWidth = component.getWidth(); } if(componentWidth > labelWidth) { labelWidth = componentWidth; } return 2 * COMPONENT_SPACING + labelWidth; } COM: <s> returns the panels width </s>
funcom_train/7291865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restartCaretBlinking(boolean caretIsVisible) { synchronized(this) { fCaretShouldBlink = fStart.equals(fLimit); fCaretCount = 0; fCaretIsVisible = caretIsVisible; if (fCaretShouldBlink) { try { notify(); } catch (IllegalMonitorStateException e) { System.out.println("Caught IllegalMonitorStateException: "+e); } } } } COM: <s> resume blinking the caret if the selection is an insertion point </s>
funcom_train/49997338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFromGroup(Serializable key, String group) { try { JCS.getInstance(this.cacheName).remove(key, group); } catch (CacheException e) { String msg = "Failure to remove: " + key + " cache " + this.cacheName + ":" + e.getMessage(); this.logger.warning(msg); } } COM: <s> implements group based removal of cache elements </s>
funcom_train/23234004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean slowObstacleCheck(Entity entity) { Rectangle2D area; area = getArea(); for (RPEntity zentity : getZone().getPlayerAndFirends()) { /* * Ignore same entity */ if (zentity.getID().equals(entity.getID())) { continue; } /* * Ghosts don't count */ if (zentity.isGhost()) { continue; } /* * Only players (ignore friends) */ if (!(zentity instanceof Player)) { continue; } /* * In area? */ if (area.intersects(zentity.getArea())) { return true; } } return false; } COM: <s> slow occupant check until all area entry methods are handled </s>
funcom_train/25291287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRotationPoint(Point3f point) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_POINT_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("OrientedShape3D4")); if (isLive()) ((OrientedShape3DRetained)retained).setRotationPoint(point); else ((OrientedShape3DRetained)retained).initRotationPoint(point); } COM: <s> sets the new rotation point </s>
funcom_train/7756697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { // All members are either immutable or never modified nor allowed to // be modified: all accessors return clones. IDs are know to be // immutable but that could change. clone() them for safety; their // clone method costs nothing. try { return super.clone(); } catch (CloneNotSupportedException impossible) { return null; } } COM: <s> clone this module spec advertisement </s>
funcom_train/33337012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(final Object object) { if (object instanceof DebugInfo) { indent(); appendTitle(((DebugInfo) object).debugTitle()); ((DebugInfo) object).debugData(this); unindent(); } else { appendIndent(); string.append(object); } } COM: <s> append the specified object by calling it code to string code method </s>
funcom_train/1473570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAppRestrictionChoiceMultivalue(AppRestriction.Name name, String caption, Vector<String> choices, boolean addLevelOfRestrictionOption){ JComboBox comp = new JComboBox(); for (String s: choices) comp.addItem(s); addControlToPanel(EnumEditablePanels.AppRest, name.toString(), caption, comp,true,addLevelOfRestrictionOption); } COM: <s> adds a combobox to the panel for the selection of application restrictions </s>
funcom_train/1803668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExifTagValue(String name, Number value) { if (value != null && value.floatValue() != 0.0F) { setExifTagValue(name, value.toString()); } else { setExifTagValue(name, (String) null); } } COM: <s> convenience method to set an exif tag based on a float value </s>
funcom_train/5381487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String name, long value) { final long longValue = getLong(name); if (value == longValue) return; Long oldValue = new Long(longValue); Long newValue = new Long(value); try { notify = false; if (getDefaultLong(name) == value) getPluginPreferences(true).remove(name); else getPluginPreferences(true).putLong(name, value); firePropertyChangeEvent(name, oldValue, newValue); } finally { notify = true; } } COM: <s> sets the current value of the long valued property with the </s>
funcom_train/265485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { TableModel model = table.getModel(); setText((String) model.getValueAt(row, column)); return new JScrollPane(this); } COM: <s> returns the editor component a jtext area </s>
funcom_train/27959637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListIterator listIterator(int index) { // Check bounds if (index < 0 || index > size) { throw new IndexOutOfBoundsException(); } return new Iter(back, getEntry(index, size, ends, ends), index, size, modCount); } COM: <s> obtain a list iterator over this list starting at a given index </s>
funcom_train/92070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finalize() throws Throwable { super.finalize(); /* ** We mark the activation as not being used and ** that is it. We rely on the connection to sweep ** through the activations to find the ones that ** aren't in use, and to close them. We cannot ** do a activation.close() here because there are ** synchronized methods under close that cannot ** be called during finalization. */ if (activation != null) { activation.markUnused(); } } COM: <s> jdbc states that a statement is closed when garbage collected </s>
funcom_train/46761210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final ItemModel item, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long itemId = store(item, chain, call); chain.execute(); // return primary key return itemId; } catch (Exception ex) { Log.exception(ex); Log.error(item); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the item model model creating a new item or updating existing rows </s>
funcom_train/38787427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void order_fulfill() { if (orderqueue.size() > 0) { if (!orderqueue.get(0).persistent) { orderqueue.remove(0); } else { Order temporder = orderqueue.get(0); orderqueue.remove(0); orderqueue.add(temporder); } fix_all(); } } COM: <s> this function is called when a ship fulfills its order for example </s>
funcom_train/19677901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Questionnaire saveQuestionnaire(Questionnaire oqnr){ PersistenceManager pm = PMF.get().getPersistenceManager(); Questionnaire pqnr; if(null == oqnr.questionnaireID){ pqnr = new Questionnaire(oqnr.title, oqnr.description); }else{//retreive the old one then modify pqnr = pm.getObjectById(Questionnaire.class, oqnr.questionnaireID); } pqnr.title = oqnr.title; pqnr.description = oqnr.description; pqnr.items = oqnr.items; pqnr.choices = oqnr.choices; pm.makePersistent(pqnr); pm.close(); return pqnr; } COM: <s> used when a questionnaire info is edited </s>
funcom_train/1581841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item findItem(final Element element) { for (int i = 0; i < this.items.size(); ++i) { final Item item = (Item) this.items.get(i); if (DOM.isOrHasChild(item.getElement(), element)) { return item; } } return null; } COM: <s> returns the item specified by the html element given </s>
funcom_train/18058296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float tryArg(int k, float f) { float value; try { value = processArg(theArgs[k], f); } catch (ArrayIndexOutOfBoundsException e) { if (optErr) System.err.println("tryArg: no theArgs[" + k + "]"); return f; } return value; } COM: <s> try to process a float argument </s>
funcom_train/35322376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean linkLast(Node<E> node) { // assert lock.isHeldByCurrentThread(); if (count >= capacity) return false; Node<E> l = last; node.prev = l; last = node; if (first == null) first = node; else l.next = node; ++count; notEmpty.signal(); return true; } COM: <s> links node as last element or returns false if full </s>
funcom_train/29272042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Table createTable() { Table table = new Table(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); table.setHeaderVisible(true); content = query.getContent(); header = query.getTableHeadings(); this.createColumns(table); for (String[] strings : content) { TableItem item = new TableItem(table, SWT.NONE); item.setText(strings); } packColumns(table); // width of single columns return table; } COM: <s> creates a table containing the results of the given query </s>
funcom_train/45254235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHelp(Control control, Object[] contexts) { for (int i = 0; i < contexts.length; i++) { Assert.isTrue(contexts[i] instanceof String || contexts[i] instanceof IContext); } control.setData(HELP_KEY, contexts); // ensure that the listener is only registered once control.removeHelpListener(getHelpListener()); control.addHelpListener(getHelpListener()); } COM: <s> sets the given help contexts on the given control </s>
funcom_train/31477515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeCommand() throws IOException { StringTokenizer tokenizer = new StringTokenizer(commandLine); String command = tokenizer.nextToken(); if (command != null) { if (command.equals("GET")) { executeGET(tokenizer); } else { writeHeader(501, "Only GET method implemented."); printError("501: The '"+command + "' command is not supported.", out); } } else { writeHeader(400, "Request not understood."); printError("400: Request not understood.", out); } } COM: <s> parses the command and executes it if it is get </s>
funcom_train/43893210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removeQuotes(final String source) { // checks if it has initial an final quote final String quote = "'"; if (!(source.startsWith(quote) && source.endsWith(quote))) { return source; } int length = source.length(); // removes the first and last quote String result = source.substring(1, length - 1); // removes internal quotes result = result.replaceAll("''", "'"); return result; } COM: <s> removes initial and final from string </s>
funcom_train/18836254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login(String username, String password) throws Exception { QueryStore query = new QueryStore("login", 3); query.addString(username); query.addString(password); query.addString(myproxy); ResultStore results = rpc(query); try { expiration = System.currentTimeMillis() + results.getLong(0); } catch(NumberFormatException nfe) { expiration = Long.MAX_VALUE; } store(); } COM: <s> logins to the server uses credentials from myproxy server </s>
funcom_train/4388223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MailMessage createMailMessage() throws Exception { MailMessage mailMessage = new MailMessage(); mailMessage.setContentType(TEXT_PLAIN_TYPE); mailMessage.addFrom(new InternetAddress(mailbox.getProperty("mailbox.address"), mailbox .getProperty("mailbox.personal"))); mailMessage.addTo(new InternetAddress(mailbox.getProperty("mailbox.address"), mailbox .getProperty("mailbox.personal"))); mailMessage.setSubject(mailbox.getProperty("mailbox.subject")); mailMessage.setText(TEXT_PLAIN_CONTENT); return mailMessage; } COM: <s> creates the mail message </s>
funcom_train/13913410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws ServiceException { m_closed = true; if (m_serviceRegistry != null) { m_serviceRegistry.close(); } if (m_serviceManager != null) { m_serviceManager.close(); } if (m_timeoutManager != null) { m_timeoutManager.close(); } if (m_transport != null) { m_transport.setMessageListener(null); m_transport.close(); } if (m_endpointReferenceResolver != null) { m_endpointReferenceResolver.close(); } try { synchronized(this) { notifyAll(); } } catch(Exception e) { // Ignore for now } } COM: <s> this method closes the runtime </s>
funcom_train/8207792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopWebcamLoadTask() { //stop execution of webcam task when the activity is destroyed, if a task is in progress if (null != mLoadWebcamTask && AsyncTask.Status.RUNNING == mLoadWebcamTask.getStatus()) { mLoadWebcamTask.cancel(true); mLoadWebcamTask = null; } mReloadPaused = true; } COM: <s> stops the async task that loads webcam image </s>
funcom_train/16762610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Vector3f camPos) { if (trailVectors.size() < 2) { return; } if (invalid || facingMode == FacingMode.Billboard) { if (updateMode == UpdateMode.Step) { updateStep(camPos); } else { updateInterpolate(camPos); } invalid = false; } } COM: <s> update the vertices of the trail </s>
funcom_train/12566435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exec(String cmdName) { try { Process process = Runtime.getRuntime().exec(cmdName); //process.waitFor(); } catch (IOException ie) { getOut().println(ie.getMessage()); // } catch (InterruptedException ite) { // getOut().println(ite.getMessage()); } } COM: <s> exec the command </s>
funcom_train/19036516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PostCollection getAllPosts() { PostCollection allPost = new PostCollection(); Iterator i = this.posts.values().iterator(); StoredPost tempPost; while(i.hasNext()) { tempPost = (StoredPost)i.next(); allPost.addPost(tempPost.getPost()); } return allPost; } COM: <s> returns all the post </s>
funcom_train/43327980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double calcMinX() { if (graphs==null) return 0.0; double rv; Graphable2D gr; gr = (Graphable2D)graphs.elementAt(0); rv = gr.minX(); for (int i=1; i<graphs.size(); i++) { gr = (Graphable2D)graphs.elementAt(i); double m = gr.minX(); if (m < rv) rv = m; } return rv; } COM: <s> returns the minimum x value from all the graphs </s>
funcom_train/46526830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStructure(RootsStructuralAttributes newStructure) { double oldDepthRootingSystem_cm = immutableStructure .getDepthRootingSystem_cm(); RootsStructuralAttributes oldStructure = immutableStructure.clone(); AttributesServiceFacade factory = AttributesServiceFacade .getInstanceFor(getSpecName()); immutableStructure = factory.addToBaseCoarseRoots(oldStructure, newStructure); this.nitrogenInStructure_g = immutableStructure.getInitialNitrogen_g(); this.navigation.moveForward((immutableStructure .getDepthRootingSystem_cm() - oldDepthRootingSystem_cm) / 2.0d); } COM: <s> this method perfomrs all actions related to addition of new struture </s>
funcom_train/43531692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ProductPriceHistory entity) { Logger.info(getClass(),"deleting ProductPriceHistory instance"); try { //entity = entityManager.getReference(ProductPriceHistory.class, entity.getPpriceId()); entityManager.remove(entity); Logger.info(getClass(),"delete successful"); } catch (RuntimeException re) { Logger.error(getClass(),"delete failed"); throw re; } } COM: <s> delete a persistent product price history entity </s>
funcom_train/45539976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addVM() { AddVMInstallWizard wizard = new AddVMInstallWizard((IVMInstall[]) fVMs.toArray(new IVMInstall[fVMs.size()])); WizardDialog dialog = new WizardDialog(getShell(), wizard); if (dialog.open() == Window.OK) { VMStandin result = wizard.getResult(); if (result != null) { fVMs.add(result); fVMList.refresh(); fVMList.setSelection(new StructuredSelection(result)); } } } COM: <s> bring up a wizard that lets the user create a new vm definition </s>
funcom_train/46336347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOpb_initial_value() { System.out.println("opb_initial_value"); String s = "x"; OpbField instance = new OpbField(); instance.opb_initial_value(s); assertEquals("x", instance.getSqlInitialValue()); } COM: <s> test of opb initial value method of class opb field </s>
funcom_train/22183788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Panel getPanel3() { Panel panel3 = new Panel(); panel3.setLayout(new FlowLayout()); panel3.setMaximumSize(new Dimension(n01, n02)); panel3.setBounds(new Rectangle(n15, n16, n17, n06)); panel3.add(getTextField2(), null); panel3.add(getMessageButton(), null); return panel3; } COM: <s> this method initializes panel3 </s>
funcom_train/1953266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDurationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TimeInfo_duration_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TimeInfo_duration_feature", "_UI_TimeInfo_type"), TemporalPackage.Literals.TIME_INFO__DURATION, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the duration feature </s>
funcom_train/32630324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleShutdownHook() { final boolean shutdownhook = DNotesFactory.getBooleanProperty("de.bea.domingo.shutdownhook", true); if (shutdownhook) { if (checkPermission("shutdownHooks")) { Runtime.getRuntime().addShutdownHook(new DNotesShutdownThread()); } else { getMonitor().warn(RESOURCES.getString("shutdownhook.not.allowed")); } } } COM: <s> if requested and possible adds a shutdown hook to dispose domingo </s>
funcom_train/9978227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Struts2LinkSpecificPart copy() { Struts2LinkSpecificPart ret = new Struts2LinkSpecificPart(); ret.parameters = new String[parameters.length][]; for (int i=0; i < parameters.length; i++) { ret.parameters[i] = new String[parameters[i].length]; for (int j=0; j < parameters[i].length; j++) ret.parameters[i][j] = parameters[i][j]; } return ret; } COM: <s> performs a copy </s>
funcom_train/10496349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String findLibrary(String libname) { ResourceHandle md = getLibraryHandle(libname); if (md == null) return null; URL url = md.getURL(); if (!"file".equals(url.getProtocol())) return null; return new File(URI.create(url.toString())).getPath(); } COM: <s> returns the absolute path name of a native library </s>
funcom_train/41207923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convertBidiLogicalToVisual(String s) { if (bidi) { if (s.length() >= 2) { char[] c = s.toCharArray(); swapBidiChars(c, 0, s.length(), -1); return new String(c); } } return s; } COM: <s> converts the given string from logical bidi layout to visual bidi layout so </s>
funcom_train/10858282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLowerCaseTokenizer() throws Exception { Reader reader = new StringReader("What's this thing do?"); LowerCaseTokenizerFactory factory = new LowerCaseTokenizerFactory(); factory.init(DEFAULT_VERSION_PARAM); Tokenizer stream = factory.create(reader); assertTokenStreamContents(stream, new String[] {"what", "s", "this", "thing", "do"}); } COM: <s> test lower case tokenizer factory </s>
funcom_train/25365876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInitHpPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Creature_initHp_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Creature_initHp_feature", "_UI_Creature_type"), LeveleditorPackage.Literals.CREATURE__INIT_HP, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the init hp feature </s>
funcom_train/24621966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verifyPipeline() { Component component = MainWindow.instance.getCenterPane().getSelectedComponent(); if ( component instanceof mxGraphComponent ) { Pipeline pipeline = ((PipelineGraphModel)((mxGraphComponent)component).getGraph().getModel()).getPipeline(); pipelineStatusIndicator.setOpaque(true); if ( pipeline.isValid() ) pipelineStatusIndicator.setBackground(Color.GREEN); else pipelineStatusIndicator.setBackground(Color.RED); } else pipelineStatusIndicator.setBackground(defaultPanelColor); } COM: <s> verifies the current pipeline and colors the pipeline status panel </s>
funcom_train/129897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseWheelMoved(final MouseWheelEvent e) { if (isViewportZoomable()) { int rotation = e.getWheelRotation(); double scale = getVVDisplay().getWorldViewScale(); scale += ((scale * 0.15) * rotation); getVVDisplay().setWorldViewScale(scale); } } COM: <s> invoked when the mouse wheel is rotated </s>
funcom_train/14376706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convert(InputStream Md2Stream,OutputStream o) throws IOException { if (Md2Stream==null) throw new NullPointerException("Unable to load null streams"); Md2ConverterCopy mcc= new Md2ConverterCopy(Md2Stream); Node newnode=new Node(mcc.tm.getName()); newnode.attachChild(mcc.tm); BinaryExporter.getInstance().save(newnode,o); } COM: <s> it creates a node from a </s>
funcom_train/14156630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JXTAGroup lookupAddr(String addr) { int l = (groups == null ? 0 : groups.length); if (addr == null) return null; String a; for (int i = 0; i < l; i++) { a = groups[i].getStreamingInfo().getAddress(); if (a != null && a.equals(addr)) return groups[i]; } return null; } COM: <s> find a group in the cache given its multicast address </s>
funcom_train/18593845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean reachableInHierarchy(Component c) { Window w = AWT.getWindow(c); if (w == null) return false; Window parent = (Window)resolver.getHierarchy().getParent(w); return (parent == null) ? resolver.getHierarchy().getRoots().contains(w) : reachableInHierarchy(parent); } COM: <s> returns whether the given component is reachable from the root of the </s>
funcom_train/9449440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String name, int value) throws IllegalArgumentException { ObjectSlot slot = findSlot(name, Integer.TYPE); if (slot == null) { throw new IllegalArgumentException("no integer field '" + name + "'"); } slot.fieldValue = Integer.valueOf(value); slot.defaulted = false; // No longer default value } COM: <s> find and set the int value of a given field named </s>
funcom_train/18254664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveToRandomLocation() { //mtp 11/5/99 HostCell cell = (HostCell) ((Discrete) getHostScape().getSpace()).findRandomUnoccupiedCell(); if (cell != null) { moveTo(cell); } else { System.out.println("Warning: no location to move to. Killing agent."); die(); } } COM: <s> moves this cell to a random unoccupied location on the host scape </s>
funcom_train/13802374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendLocationString(StringBuffer str, SAXParseException ex) { str.append(" line "); str.append(ex.getLineNumber()); str.append("; coloumn "); str.append(ex.getColumnNumber()); str.append("; "); } COM: <s> returns a string of the location </s>
funcom_train/21619863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetChange() throws Exception { System.out.println("getChange"); double total = pmt.getTransaction().getTotal(); double amt = total + 20.0; double change = amt - total; pmt.setAmount(amt); assertEquals(change, pmt.getChange()); } COM: <s> test of get change method of class edu </s>
funcom_train/11054656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double populationVariance(double[] v) { double mean = new Mean().evaluate(v); double sum = 0; for (int i = 0; i < v.length; i++) { sum += (v[i] - mean) * (v[i] - mean); } return sum / v.length; } COM: <s> definitional formula for population variance </s>
funcom_train/35562500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean selected) { if (selected) { addStyleName(UI_STATE_ACTIVE); addStyleName(style.tabSelected()); removeStyleName(style.tabUnselected()); } else { removeStyleName(UI_STATE_ACTIVE); removeStyleName(style.tabSelected()); addStyleName(style.tabUnselected()); } } COM: <s> sets the selected style </s>
funcom_train/20286654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isHoliday(String thisMonth, String thisDay, String thisYear) { if (eventList.containsKey(thisMonth + "/" + thisDay + "/" + thisYear)) { ArrayList tmpEvents = getEvents( thisMonth, thisDay, thisYear, CalendarEventList.EVENT_TYPES[7]); if (tmpEvents.size() > 0) { return true; } } return false; } COM: <s> checks to see if that day is a holiday </s>
funcom_train/12560813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lInvalidate() { if (Logging.REPORT_LEVEL <= Logging.INFORMATION) { Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI_ITEM_LAYOUT, ">>> CustomItemLFImpl -- lInvalidate()"); } setDirtyRegionFull(); lRequestInvalidate(true, true); } COM: <s> notifies l amp f that code custom item code was invalidated </s>
funcom_train/32191660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeMember(int id) { String message = ""; int index = searchID(id); if (index == -1) message = "Invalid ID"; // ID validation else if (getUserInterface().getBorrower().getUnreturnedBooks(id) != 0) message = "You must return the books you borrowed before leaving the system!\n"; else { System.arraycopy(membersArray, index + 1, membersArray, index, membersArray.length - index - 1); dataSize--; message = "Member removed.\n"; } return message; } COM: <s> removes a member given his id </s>
funcom_train/16784790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNewDataObjectAnnotations(long dataObjectInternalID, List<Annotation> annotationList, Connection connection) throws SQLException, IngestException { addAnnotations("exe_data_object_annotation", "object_id", dataObjectInternalID, annotationList, connection); } COM: <s> add new annotations for data object to db </s>
funcom_train/42667309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenu() { if (jMenu == null) { jMenu = new JMenu(); jMenu.setText("Convert"); jMenu.setMnemonic(KeyEvent.VK_C); jMenu.add(getJMenuFileOpen()); jMenu.add(getJMenuConvComp()); jMenu.add(getJMenuCompOnly()); jMenu.add(getJMenuReload()); jMenu.add(getJMenuExit()); } return jMenu; } COM: <s> this method initializes j menu </s>
funcom_train/5551639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (object == this ) { return true; } if (object instanceof AbstractStorelessUnivariateStatistic == false) { return false; } AbstractStorelessUnivariateStatistic stat = (AbstractStorelessUnivariateStatistic) object; return (MathUtils.equals(stat.getResult(), this.getResult()) && MathUtils.equals(stat.getN(), this.getN())); } COM: <s> returns true iff code object code is an </s>
funcom_train/38561238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countTransitionOutputs(DataLayer pnmlData,int TransitionNo) { int[][] forwards=pnmlData.getForwardsIncidenceMatrix(); int count=0; if ((forwards.length<1) || (TransitionNo>=forwards[0].length)) return -1; for (int PlaceNo=0; PlaceNo<forwards.length; PlaceNo++) if (forwards[PlaceNo][TransitionNo]!=0) count++; return count; } COM: <s> counts outputs from given transition </s>
funcom_train/25211918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getEncoding(Context context) { String encoding = context.getToks("fileencoding").toText().trim(); if (encoding.length() == 0) { String enc = System.getProperty("extex.encoding"); encoding = (enc != null ? enc : DEFAULT_ENCODING); } return encoding; } COM: <s> return the encoding for the abstract file code file </s>
funcom_train/32649283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSpacingLeftThemeTextField() { RowData rowData = new org.eclipse.swt.layout.RowData(); rowData.width = 30; spacingLeftThemeTextField = new ThemeTextField(globalComposite, SWT.NONE); spacingLeftThemeTextField.setHelpPage(""); spacingLeftThemeTextField.setIntValued(true); spacingLeftThemeTextField.setEmbeddedInBindableGroup(false); spacingLeftThemeTextField.setBindingSubPath("spacingLeft"); spacingLeftThemeTextField.setLayoutData(rowData); } COM: <s> this method initializes spacing left theme text field </s>
funcom_train/36960718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ToolBarManager createLeftToolBarManager(ViewerPane pane) { ToolBarManager tbm= pane.getToolBarManager(); for (int i= 0; i < fContextSensitiveActions; i++) { tbm.add(fActions[i]); if (i == 1 || i == 3) tbm.add(new Separator()); } tbm.update(true); return tbm; } COM: <s> create a toolbar manager for a given </s>
funcom_train/48667749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reset() { for(Iterator<Counter> it = fCounters.values().iterator(); it.hasNext();) { Counter cnt = it.next(); cnt.setEnabled(false); cnt.reset(); } // clear conf information this.fConfiguration = new EntityConfiguration(); // mark this entity as disabled this.fEnabled = false; // clear the record definition this.fRecordDefinition = null; } COM: <s> resets this entitys settings </s>
funcom_train/50720847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncode_ByteBuffer_ByteBuffer() { System.out.println("encode"); ByteBuffer raw = null; ByteBuffer encoded = null; Base64.encode(raw, encoded); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of encode method of class base64 </s>
funcom_train/21718385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParameterMapImpl getValues() throws Exception { if((mMap==null)||(mView == null)) return null; ParameterMapImpl resultMap = new ParameterMapImpl(); Set<String> set = mMap.keySet(); Iterator<String> iterKeys = set.iterator(); while(iterKeys.hasNext()){ String key = iterKeys.next(); Parameter parameter = getValue(key); resultMap.putParameter(key, parameter); } return resultMap; } COM: <s> retrieves values for all parameters from the current user interface </s>
funcom_train/51591478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SibType getElementAt(int x, int y) { SibType type = null; TreePath path = this.getPathForLocation(x, y); if ( path != null ) { Object last = path.getLastPathComponent(); if ( last instanceof SibType ) type = (SibType)last; } return type; } COM: <s> return the sib type for a given position </s>
funcom_train/14518784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSystemShutdownNotice() { log(internalAdmin, internalAdmin.getCaId(), LogConstants.MODULE_LOG, new Date(), null, null, LogConstants.EVENT_SYSTEM_STOPPED_LOGGING , "Terminating log session for this node.",null); systemShutdownNotice = true; } COM: <s> should only be called by the start services servlet </s>
funcom_train/36930273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ while (true){ _myNumberOfLoops++; try{ Thread.sleep(1); final CCCueNote[] cueNotes = _myNotes.toArray(new CCCueNote[0]); int counter = 0; while ( counter < cueNotes.length && cueNotes.length > 0 && cueNotes[counter]._myOffTime <= _myNumberOfLoops ){ CCCueNote note = cueNotes[counter]; note.trigger(); _myNotes.remove(note); counter++; } }catch (InterruptedException e){ // TODO Auto-generated catch block e.printStackTrace(); } } } COM: <s> here all current note off events are send and deleted afterwards </s>
funcom_train/7298237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeBrowserEngine(String engineName) { if (!engines.containsKey(engineName)) return true; IBrowserEngine engine = (IBrowserEngine) engines.get(engineName); if (engine == activeEngine) { WebBrowserUtil.error("Can't remove active engine!"); return false; } WebBrowserUtil.trace("Engine " + engineName + " will be removed."); return (engines.remove(engineName) == null ? false : true); } COM: <s> removes a browser engine to the list of browser connectors that </s>
funcom_train/4692104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JDialog getD_acercade() { if (d_acercade == null) { d_acercade = new JDialog(); d_acercade.setSize(new Dimension(444, 198)); d_acercade.setTitle("Acerca de RegAdmin"); d_acercade.setResizable(false); d_acercade.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/imagenes/naranjito.png"))); d_acercade.setContentPane(getCp_acercade()); } return d_acercade; } COM: <s> this method initializes d acercade </s>
funcom_train/31823759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); int hwnd = parent.handle; int hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle); return hItem == 0 ? -1 : parent.findIndex (hItem, item.handle); } COM: <s> searches the receivers list starting at the first item </s>
funcom_train/9190161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElseFlowPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CheckNode_elseFlow_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CheckNode_elseFlow_feature", "_UI_CheckNode_type"), FlowPackage.Literals.CHECK_NODE__ELSE_FLOW, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the else flow feature </s>
funcom_train/7627778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendTransferEncodingHeader(OutputStream out) throws IOException { LOG.trace("enter sendTransferEncodingHeader(OutputStream out)"); String transferEncoding = getTransferEncoding(); if (transferEncoding != null) { out.write(CRLF_BYTES); out.write(CONTENT_TRANSFER_ENCODING_BYTES); out.write(EncodingUtils.getAsciiBytes(transferEncoding)); } } COM: <s> write the content transfer encoding header to the specified </s>
funcom_train/40884294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix4 idt () { val[M00] = 1; val[M01] = 0; val[M02] = 0; val[M03] = 0; val[M10] = 0; val[M11] = 1; val[M12] = 0; val[M13] = 0; val[M20] = 0; val[M21] = 0; val[M22] = 1; val[M23] = 0; val[M30] = 0; val[M31] = 0; val[M32] = 0; val[M33] = 1; return this; } COM: <s> sets the matrix to an identity matrix </s>
funcom_train/13647314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performContentCheck() { if (this.issuerName == null || this.issuerName.trim().length() == 0 ) { throw new RuntimeException("CertificateReference: issuerName not set."); } if (this.serialNumber == null || this.serialNumber.trim().length() == 0) { throw new RuntimeException("CertificateReference: serialNumber not set."); } } COM: <s> checks if the element contains its data </s>
funcom_train/7966603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildNodeSet(HashMap<Integer, EvGraph> node_set) { EvGraph v = null; for (EvEdge edge : nodes) { v = edge.getIncNode(this); if (!node_set.containsKey(v.label)) { node_set.put(v.label, v); v.buildNodeSet(node_set); // recursivly from every node } } } COM: <s> recursivly through adjectment graph nodes builds hashmap containg graph </s>
funcom_train/8662577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAstore(int n) { if (n < 4) addOpcode(75 + n); // astore_<n> else if (n < 0x100) { addOpcode(ASTORE); // astore add(n); } else { addOpcode(WIDE); addOpcode(ASTORE); addIndex(n); } } COM: <s> appends astore or wide astore lt n gt </s>
funcom_train/12965707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCreateStatement() { StringBuffer insert = new StringBuffer(); insert = insert.append("CREATE TABLE ").append(name).append("\n"); insert = insert.append("(").append("\n"); for (int i = 0; i < allTableColumns.size(); i++) { insert = insert.append(allTableColumns.get(i).getDefinitionStringForCreateTable()); if (i != allTableColumns.size() - 1) { insert = insert.append(",\n"); } } insert = insert.append("\n").append(");\n"); return insert.toString(); } COM: <s> returns a create table statement </s>
funcom_train/33686796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numLockedOwned(IBoardState state, Player plyr){ int numLocked=0; Player[][] stateArray = state.getBoardSpaceArray(); List<IBoardSpace> ownedPositions = state.getAllSpacesOwnedByPlayer(plyr); for(int i=0; i< ownedPositions.size();i++){ int x= ownedPositions.get(i).getXCoordinate(); int y= ownedPositions.get(i).getYCoordinate(); if(isLockedSpace(x,y,stateArray)){ numLocked ++; } } return numLocked; } COM: <s> calculates locked positions owned by a player on the current board state </s>