__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13275104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLeftSideColor(Integer leftSideColor) { if (leftSideColor != this.leftSideColor) { Integer oldLeftSideColor = this.leftSideColor; this.leftSideColor = leftSideColor; this.propertyChangeSupport.firePropertyChange(Property.LEFT_SIDE_COLOR.name(), oldLeftSideColor, leftSideColor); setLeftSidePaint(WallPaint.COLORED); } } COM: <s> sets the edited color of the left side </s>
funcom_train/2580868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyListeners(MarkerChangeEvent event) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == MarkerChangeListener.class) { ((MarkerChangeListener) listeners[i + 1]).markerChanged(event); } } } COM: <s> notifies all registered listeners that the marker has been modified </s>
funcom_train/4870991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printFactory(String name, CommandInterpreter out) { for (int i = 0; i < m_factories.length; i++) { if (m_factories[i].getName().equalsIgnoreCase(name)) { out.println(m_factories[i].getDescription()); return; } } out.println("Factory " + name + " not found"); } COM: <s> prints factory description </s>
funcom_train/17492095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object visitType(TypeDeclaration node) { String cname = classFinder.getCurrentPackage(); cname = ((cname.equals("")) ? "" : cname + "." ) + node.getName(); classPool.add(cname, new TreeClassInfo(node, classFinder)); return null; } COM: <s> visits a type declaration </s>
funcom_train/5077942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChildren(List list) { List oldChildren = children; for (int i = 0; i < oldChildren.size(); i++) { PaletteEntry entry = (PaletteEntry) oldChildren.get(i); entry.setParent(null); } children = list; for (int i = 0; i < children.size(); i++) { PaletteEntry entry = (PaletteEntry) children.get(i); entry.setParent(this); } listeners.firePropertyChange(PROPERTY_CHILDREN, oldChildren, getChildren()); } COM: <s> sets the children of this palette container to the given list of </s>
funcom_train/35837702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSeparator( Dimension size ) { int ori = JSeparator.HORIZONTAL; if (getOrientation() == SwingConstants.VERTICAL) ori = JSeparator.VERTICAL; UIToolBar.Separator s = new UIToolBar.Separator( size ); s.setAlignmentX(0); Dimension dim = s.getPreferredSize(); s.setOrientation(ori); if (getOrientation() == SwingConstants.VERTICAL) s.setSeparatorSize(new Dimension(dim.height, dim.width)); add(s); } COM: <s> appends a separator of a specified size to the end </s>
funcom_train/33006377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { synchronized (this) { if (processor != null) { processor.stop(); processor.close(); processor = null; } if(rtpMgrs!=null){ for (int i = 0; i < rtpMgrs.length; i++) { if(rtpMgrs[i]!=null){ rtpMgrs[i].removeTargets( "Session ended."); rtpMgrs[i].dispose(); rtpMgrs[i]=null; } } } } } COM: <s> stops the transmission if already started </s>
funcom_train/1821475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeatureCollectionRole getRole(int roleId) { for (int i=0; i<this.roles.length && this.roles[i]!=null; i++){ if (this.roles[i].equalsRole(roleId)){ return this.roles[i]; } } return null; } COM: <s> check if this feature collection has a role with the given id </s>
funcom_train/39783087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClosed(boolean b) throws PropertyVetoException { if (frame != null) frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING)); else if (dialog != null) dialog.dispatchEvent(new WindowEvent(dialog, WindowEvent.WINDOW_CLOSING)); } COM: <s> sets the closed attribute of the skin window window object </s>
funcom_train/37072046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeMap termTypesAsMap() { try { PreparedStatement stmt = conn.prepareStatement ("select title, id from pub_termtype"); try { ResultSet rs = stmt.executeQuery(); TreeMap types = new TreeMap(); while (rs.next()) { types.put(rs.getString("title"), rs.getString("id")); } return types; } finally { stmt.close(); } } catch (SQLException e) { throw new RollbackException(e); } } COM: <s> return all the term type as map </s>
funcom_train/12147803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluateCondition(PropertyProvider provider, String uri){ boolean conditionMet = false; NodeProperty propVal = null; if(propertyName!=null && literal!=null){ try { propVal = provider.getProperty(uri, propertyName, propertyNamespace); } catch (Exception e) { System.err.println("Error retrieving property for stop condition: "+propertyName); } if(propVal!=null) { if(operationType.equals("eq")){ if(propVal.getValue().equals(literal)){ conditionMet = true; } }else { System.out.println("Unknown condition: "+operationType); } } } return conditionMet; } COM: <s> evaluate the stop condition element given in the scope for a uri </s>
funcom_train/46695368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuildingStatus() { System.out.println("buildingStatus"); GraphByActor instance = new GraphByActor(); assertEquals(State.UNINITIALIZED,instance.buildingStatus()); instance.buildQuery(false, new AllGraphs(), new NullActorQuery()); } COM: <s> test of building status method of class graph by actor </s>
funcom_train/45464300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void clearQueueSet(String sessionId) { LOGGER.debug("clearing queue set"); FrameGroupCommandQueueSet queue = FrameGroupCommandQueueSet.queueSets.get(sessionId); if (null != queue) { queue.endOfLife(); FrameGroupCommandQueueSet.queueSets.remove(sessionId); } } COM: <s> deletes the specified frame group command queue set </s>
funcom_train/11729121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestoreWithInvalidVersion() throws RepositoryException { Version invalidVersion = versionableNode2.checkin(); try { versionableNode.restore(invalidVersion, true); fail("Node.restore(Version, boolean): A VersionException must be thrown if the specified version does not exists in this node's version history."); } catch (VersionException e) { // success } } COM: <s> test if restoring a node with an invalid version throws a version exception </s>
funcom_train/27839892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setContentPane(getJContentPane()); this.pack(); this.setContentPane(getJContentPane()); //Set the window's location. setLocation(posX,posY); txtName.requestFocus(); //Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //setLocation((screenSize.width - 2*this.getWidth()) / 2, (screenSize.height - 2*this.getHeight()) / 2); } COM: <s> this method initializes this </s>
funcom_train/25135408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintBackground(SynthContext context, Graphics g, int x, int y, int w, int h) { if (context.isPaintingBackground()) { Color col = context.getStyle().getColor(context, ColorType.BACKGROUND); if (col != null) { if (col.getAlpha() != 0) { g.setColor(col); g.fillRect(x, y, w, h); } } } } COM: <s> paints the background of a label </s>
funcom_train/50332494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOutputCard(int cardNum) { if (cardNum>63) { warn("C/MRI - isOutputCard - cardNum out of range"); return (false); } if (nodeType==SMINI) { if ( (cardNum==0) || (cardNum==1) ) return(true); else return (false); } return (cardTypeLocation[cardNum]==OUTPUT_CARD); } COM: <s> public method to test for output card type </s>
funcom_train/5812787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void purgeEclipsedRangesInDef(final Range range) { Range[] ranges = getConfigDef().getRange(); MergeableRange newRange = new MergeableRange(range); for (int i = 0; i < ranges.length; i++) { Range rng = ranges[i]; if (newRange.eclipses(rng)) { getConfigDef().removeRange(rng); } } } COM: <s> removes in ranges in the defintion that are eclipsed </s>
funcom_train/17753262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitTypeParameter(JCTypeParameter tree) { TypeVar a = (tree.type != null) ? (TypeVar)tree.type : new TypeVar(tree.name, env.info.scope.owner); tree.type = a; if (chk.checkUnique(tree.pos(), a.tsym, env.info.scope)) { env.info.scope.enter(a.tsym); } result = a; } COM: <s> class enter visitor method for type parameters </s>
funcom_train/45758130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareRectangles(Rectangle rect1, Rectangle rect2) { boolean result = true; result &= (rect1.X==rect2.X); result &= (rect1.Y==rect2.Y); result &= (rect1.Width==rect2.Width); result &= (rect1.Height==rect2.Height); return result; } COM: <s> compare two rectangles </s>
funcom_train/4210134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMessageCount() throws XMPPException { DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(null, namespace); Form extendedInfo = Form.getFormFrom(info); if (extendedInfo != null) { String value = extendedInfo.getField("number_of_messages").getValues().next(); return Integer.parseInt(value); } return 0; } COM: <s> returns the number of offline messages for the user of the connection </s>
funcom_train/20630854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkMonitor() { if (monitor != null) { if ((++count * 1.0) / (total * 1.0) * 100.00 > p_comp) { // also log this every 10 percent if ((p_comp % 10) == 0) { getLog().info("finished " + p_comp + "%"); } monitor.worked(1); p_comp += 1; } } } COM: <s> tests if the progress has reached the need threshold and if </s>
funcom_train/11382992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void subView(Class<? extends SubView> cls) { indent(of(ENDTAG)); // not an inline view sb.setLength(0); out.print(sb.append('[').append(cls.getName()).append(']').toString()); out.println(); } COM: <s> sub classes should override this to do something interesting </s>
funcom_train/45256393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveState(IMemento persBarMem) { // save the width of the perspective bar IMemento childMem = persBarMem .createChild(IWorkbenchConstants.TAG_ITEM_SIZE); int x; if (currentLocation == TOP_RIGHT && topBar != null) { x = topBar.getRightWidth(); } else { x = getDefaultWidth(); } childMem.putString(IWorkbenchConstants.TAG_X, Integer.toString(x)); } COM: <s> method to save the width of the perspective bar in the </s>
funcom_train/37908833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List checkCollectionTree(ProgressCallback callback) { User.enablePasswordChecks(false); try { List errors = new ArrayList(); Collection root = broker.getCollection(XmldbURI.ROOT_COLLECTION_URI); checkCollection(root, errors, callback); return errors; } finally { User.enablePasswordChecks(true); } } COM: <s> run some tests on the collection hierarchy starting at the root </s>
funcom_train/19622058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void damageBlock(Pair position) { int square = field.getValue(position); if(square == Constants.MAP_PROOF_WALL) { return; } square +=1; // note that blocks has negative values. field.setValue(position, square); //if after damage block was destroyed then bonus can appear. if (square == Constants.MAP_EMPTY) { tryGenerateBonus(position); } } COM: <s> damage block at the defined position or do nothing if </s>
funcom_train/35200168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create() throws Exception { RHTableDefinition def = getDefinition(); // build the table definition //def.setNumberColumns(7); def.addColumn("title", String.class); def.addColumn("rate", Integer.class); def.addColumn("ingredients", String.class); def.addColumn("steps", String.class); def.addColumn("comments", String.class); def.addColumn("source", String.class); def.addColumn("pictures", String.class); super.create(); } COM: <s> overriding method to apply a definition to the table </s>
funcom_train/2583063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getEndValue(Comparable rowKey, Comparable columnKey) { int r = getRowIndex(rowKey); int c = getColumnIndex(columnKey); if (c != -1) { return this.underlying.getEndValue(r, c + this.firstCategoryIndex); } else { throw new UnknownKeyException("Unknown columnKey: " + columnKey); } } COM: <s> returns the end value for the interval for a given series and category </s>
funcom_train/40860790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void backupIndex(Directory dir, SnapshotDeletionPolicy dp) throws Exception { // To backup an index we first take a snapshot: try { copyFiles(dir, (IndexCommit) dp.snapshot()); } finally { // Make sure to release the snapshot, otherwise these // files will never be deleted during this IndexWriter // session: dp.release(); } } COM: <s> example showing how to use the snapshot deletion policy </s>
funcom_train/33601233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInExec(int inEx) { Logger.println("(TOMLayer.setInExec) modifying inExec from " + this.inExecution + " to " + inEx); proposeLock.lock(); this.inExecution = inEx; if (inEx == -1 && !isRetrievingState()) { canPropose.signalAll(); } proposeLock.unlock(); } COM: <s> sets which consensus is being executed at the moment </s>
funcom_train/40560545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetConstraintInvalidOperator() { // try an operator way off. helpTestSetConstraintInvalid("table", "col", "val", "this is an operator"); helpTestSetConstraintInvalid("table", "col", "val", "!@DSK%(#SNJKAC@#\'\""); // try several operators together helpTestSetConstraintInvalid("table", "col", "val", "=<>"); helpTestSetConstraintInvalid("table", "col", "val", "<<>"); } COM: <s> test setting the constraint with an invalid operator </s>
funcom_train/16676780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Window getWindow() { // Control ctrl = this.getControl(); // if (ctrl != null) { // Object data = ctrl.getShell().getData(); // if (data instanceof Window){ // System.out.println("window: "+((Window)data).toString()); // return (Window) data; // } // } // return null; // } COM: <s> returns the top level window for a part </s>
funcom_train/3472369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Session get(int i) { if (0 <= i && i < sessions.size()) { return sessions.get(i); } else { getLogger() .error(getLanguage() .getString("CleverPHL.SessionList.Error.InvalidIndex") + " " + i); return null; } } COM: <s> returns the session with the given index </s>
funcom_train/10860180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getNow() { if (now == null) { SolrRequestInfo reqInfo = SolrRequestInfo.getRequestInfo(); if (reqInfo == null) { // fall back to current time if no request info set now = new Date(); } else { now = reqInfo.getNOW(); } } return (Date) now.clone(); } COM: <s> returns a cloned of this instances concept of now </s>
funcom_train/20128796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTable(int position) throws SQLException { if (position <= column.length) { return table[position - 1]; } else { final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND; throw new SQLException("The resultset contains only " + String.valueOf(column.length) + " column(s).", state.name(), state.code()); } } COM: <s> returns the designated columns table name </s>
funcom_train/17904734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newConnection(DatabaseConnection dc) { DatabaseHost host = databaseObjectFactory().createDatabaseHost(dc); connections.add(dc); tree.addToRoot(new DatabaseHostNode(host)); EventMediator.fireEvent( new DefaultConnectionRepositoryEvent( this, ConnectionRepositoryEvent.CONNECTION_ADDED, dc)); } COM: <s> creates a new connection based on the specified connection </s>
funcom_train/3481477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { insertChannelMessage_PS = null; fetchAllChannelMessages_PS = null; fetchChannelMessageById_PS = null; fetchNumberOfMessagesOnChannel_PS = null; fetchNumberOfRoutableMessagesOnChannel_PS = null; fetchNextPriorityMessageOnChannel_PS = null; fetchNextFifoMessageOnChannel_PS = null; updateMessageEntryFlags_PS = null; updateMessageSubscribersField_PS = null; } COM: <s> initialise this objects values </s>
funcom_train/13580977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommercialChainExtractor(){ List<Activity> activities = buildActivityList1(); CommercialChainExtractor ce = new CommercialChainExtractor(5); List<Chain> chains = ce.extractChains(activities); assertEquals("Wrong number of chains extracted.", 2, chains.size()); assertEquals("Wrong chain extracted", 4, chains.get(0).getActivities().size()); assertEquals("Wrong chain extracted", 3, chains.get(1).getActivities().size()); } COM: <s> this test builds a chain of activities </s>
funcom_train/3740161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRealLifeRole(AllUser user) throws UserManagerException { String ret=null; try { Session sess= HibernateUtil.currentSession(); if (user.getUser()==null) { ret = user.getDeletedUser().getRealLifeRole(); } else { ret = user.getUser().getRealLifeRole(); } } catch (HibernateException e) { throw new UserManagerException(); } return ret; } COM: <s> return real life role field of the given user </s>
funcom_train/30036484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOKButton() { if (OKButton == null) { OKButton = new JButton(); OKButton.setText("OK"); OKButton.setEnabled(false); OKButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println(byte1.getText()+"."+byte2.getText()+"."+byte3.getText()+"."+byte4.getText()); setVisible(false); } }); } return OKButton; } COM: <s> this method initializes okbutton </s>
funcom_train/46620742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MenuBar getAntMakeMenuBar() { if (iAntMakeMenuBar == null) { try { iAntMakeMenuBar = new MenuBar(); iAntMakeMenuBar.add(getFileMenu()); iAntMakeMenuBar.add(getHelpMenu()); } catch (Throwable iExc) { handleException(iExc); } } return iAntMakeMenuBar; } COM: <s> return the ant make menu bar property value </s>
funcom_train/11010879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigInteger getNumID(){ if(paragraph.getPPr()!=null){ if(paragraph.getPPr().getNumPr()!=null){ if(paragraph.getPPr().getNumPr().getNumId()!=null) return paragraph.getPPr().getNumPr().getNumId().getVal(); } } return null; } COM: <s> if style exist for this paragraph </s>
funcom_train/42717533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Serializable createId(long value) throws IdentifierGenerationException { if (returnClass == Long.class) { return new Long(value); } else if (returnClass == Integer.class) { return new Integer((int) value); } else if (returnClass == Short.class) { return new Short((short) value); } else if (returnClass == Code.class) { return new Code<Object>(new Long(value)); } else { throw new IdentifierGenerationException("this id generator generates long, integer, short or GenericId(Long)"); } } COM: <s> method create id </s>
funcom_train/43050792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFailureInMethodExecution(TracException e, TracProperties tracProperties){ String methodInvocationFailurePattern = tracProperties.getStringProperty(TracProperties.TRAC_INVOCATION_METHOD_FAILURE_PATTERN); String messageException = e.getCause().getMessage(); return messageException != null && messageException.contains(methodInvocationFailurePattern); } COM: <s> finds out which was the cause of error </s>
funcom_train/20880905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getManager(LayoutManager manager) { if (manager == null) { layoutManager = getGameScreenLayout(); contextWidth = layoutManager.contextWidth; contextHeight = layoutManager.contextHeight; } else { layoutManager = manager; contextWidth = layoutManager.getWidth(); contextWidth = layoutManager.getHeight(); } layoutManager.sibings.add(this); } COM: <s> gets the layouts manager s parent layout manager for create layout </s>
funcom_train/12569264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IStructuredSelection selection, String newResourceFileName, boolean enableLocation) { IJavaElement jelem = getInitialJavaElement(selection); this.initContainerPage(jelem); this.initTypePage(jelem); if (!enableLocation) { this.setPackageFragmentRoot(this.getPackageFragmentRoot(), enableLocation); this.setPackageFragment(this.getPackageFragment(), enableLocation); } if (newResourceFileName != null) { this.setTypeName(newResourceFileName, enableLocation); } this.doStatusUpdate(); } COM: <s> the wizard owning this page is responsible for calling this method with </s>
funcom_train/23712792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSendMessage() throws InterruptedException { System.out.println("testSendMessage starting"); producer1.sendMessage("coos://test2/foo/bar", new DefaultMessage()); Thread.sleep(100); // let the consumerthread get chance to process assertFalse(consumer2.getConsumerQueue().isEmpty()); System.out.println("testSendMessage finished"); System.out.println(); } COM: <s> send a message from ep1 to ep2 and check that it has arrived </s>
funcom_train/9489609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void setCoordSystemFromMouseMove(int dx, int dy, int mode) { switch (mode) { case EuclidianController3D.MOVE_ROTATE_VIEW : setRotXYinDegrees(aOld + dx, bOld + dy, true); break; case EuclidianController3D.MOVE_VIEW : setXZero(XZeroOld + dx); setYZero(YZeroOld - dy); updateMatrix(); update(); break; } } COM: <s> sets coord system from mouse move </s>
funcom_train/2300556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model getModelRoot() { Collection c = uml.getModelManagement().getModel().refAllOfClass(); Iterator i = c.iterator(); if( i.hasNext() ) { Model m = (Model)i.next(); if(i.hasNext()) { Util.print( "Mas de un modelo feu hallado" ); } return m; } return null; } COM: <s> gets the root of the uml model </s>
funcom_train/13297917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRelatedToPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Offer_relatedTo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Offer_relatedTo_feature", "_UI_Offer_type"), NegotiationPackage.Literals.OFFER__RELATED_TO, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the related to feature </s>
funcom_train/46694433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuildingStatus() { System.out.println("buildingStatus"); NullPropertyQuery instance = new NullPropertyQuery(); assertEquals(State.UNINITIALIZED,instance.buildingStatus()); instance.buildQuery(true); assertEquals(State.READY,instance.buildingStatus()); } COM: <s> test of building status method of class null property query </s>
funcom_train/3102145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValidSelection(final Object[] selection) { Assertion.valid(selection); if (selection.length != 0) { if (!(fMultiple && selection.length == 1)) { Object element= null; for (int index= 0; index < selection.length; index++) { element= selection[index]; if (!isAccepted(element) || isRejected(element)) { return false; } } return true; } } return false; } COM: <s> is the specified selection valid </s>
funcom_train/25528278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getGrammaticallity(Vector vText) { Iterator<Integer> iIter = vText.iterator(); StringBuffer sbText = new StringBuffer(); while (iIter.hasNext()) { Integer iCurWord = iIter.next(); sbText.append(WordMap.get(iCurWord)); } return Estimator.getNormality(sbText.toString()); } COM: <s> returns a double value indicative of grammaticallity given underlying distributions </s>
funcom_train/20820928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDurationString() { String string = "-"; if (getDuration() > 0L) { float duration = (float) getDuration() / 1000; Formatter f = new Formatter(Locale.US); f.format("%.3f", duration); string = f.toString(); } return string; } COM: <s> gets the test duration in a formatted string </s>
funcom_train/32944071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Mailable convertNotificationToMail(Notification notify, String emailAddress) { Mailable email = new Mailable(); email.setMessage(notify.getMessage()); email.setRecipients(emailAddress); email.setSender(notify.getSender()); email.setSubject(notify.getSubject()); return email; } COM: <s> converts a notification object into something that is mailable </s>
funcom_train/19073676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkInputs(Vector inputListeners) { if (inputListeners == null || inputListeners.isEmpty()) { return true; } for (int x = 0; x < inputListeners.size(); ++x) { if (inputListeners.elementAt(x) instanceof StreamInputSynapse) { return true; } } return false; } COM: <s> determine whether ther are any stream input synapses attached </s>
funcom_train/16498225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKeyListener( KeyListener handler) { if (handler.getClass().getName().equals( "javax.swing.plaf.basic.BasicListUI$KeyHandler")) { super.addKeyListener( new KeyEventDelegator( handler)); } else super.addKeyListener( handler); } COM: <s> wraps the handler in a </s>
funcom_train/42271016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWord() throws Exception { ConvertedDocument cd; DocumentConverter conv = DocumentConverter.getConverterForFileExtension("doc"); //File doc = new File(sampleFilePath + File.separator + "SampleDoc.doc"); File docx = new File("E:/Funambol/tools/tomcat/temp/笑话011656842218170407438742902.docx"); File[] files = new File[] { docx }; for (int i = 0; i < files.length; i++) { cd = new ConvertedDocument(); conv.convertDocument( buildDoc(files[i]), cd ); System.out.println(cd.getContent()); } } COM: <s> tests the word extractor </s>
funcom_train/18846898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createBinaryPCVNotFoundException(String tscToken, String pcvID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80202"; propertyMap.addPropertyValuePair("pcvID", pcvID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct binary pcv not found exception message </s>
funcom_train/11024212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithReadOnlyProperty() { try { new BeanPropertyValueChangeClosure("readOnlyProperty", "foo").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException e) { /* this is what we expect */ } } COM: <s> test execute with read only property </s>
funcom_train/16608647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMatchEnd() { // returns position immediately following if (lastMatched < 0) { return 0; } else if (lastMatched >= tokens.length) { return original.length(); } // else if return tokenPos[lastMatched] + tokens[lastMatched].length(); } // getMatchEnd COM: <s> tells the character position of string which have been matched where </s>
funcom_train/13957365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refaultObject(EOEnterpriseObject eoenterpriseobject, EOGlobalID eoglobalid, EOEditingContext eoeditingcontext) { boolean wasAutoLocked = autoLock("refaultObject"); try { // ak: need to flush caches ERXEnterpriseObject.FlushCachesProcessor.perform(this, eoenterpriseobject); super.refaultObject(eoenterpriseobject, eoglobalid, eoeditingcontext); } finally { autoUnlock(wasAutoLocked); } } COM: <s> overridden to support auto locking and to flush the cache of all </s>
funcom_train/39378680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(HtmlStringBuffer buffer) { super.render(buffer); buffer.elementStart("div"); buffer.appendAttribute("class", "auto_complete"); buffer.appendAttribute("id", getId() + "_auto_complete_div"); buffer.elementEnd(); } COM: <s> render the html representation of the auto complete text field </s>
funcom_train/7508583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMakeCipher() throws ConfigurationException { try { String className = "javax.crypto.spec.SecretKeySpec"; javax.crypto.spec.SecretKeySpec skeySpec = (SecretKeySpec) ObjFactory.make(className, "SecretKeySpec"); assertTrue( skeySpec != null ); } catch(ConfigurationException ex) { Throwable cause = ex.getCause(); assertTrue( cause instanceof InstantiationException); } } COM: <s> test case where no arg ctor does not exist </s>
funcom_train/34134691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isChoice() { Object p = parent.getParent(); while ( p != null) { if ( p instanceof ChoiceModelBox) { return true; } else if ( p instanceof ModelBox) { p = ((ModelBox)p).getParent(); } else if ( p instanceof ParticleList) { p = ((ParticleList)p).getParent(); } else { // should not happen p = null; } } return false; } COM: <s> checks wether this box has a parent that is a choice model </s>
funcom_train/4197294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findElementIndex(final Object key) { if (key == null) { throw new NullPointerException("Item to find must not be null"); //$NON-NLS-1$ } for (int i = 0; i < data.size(); i++) { final ComboBoxItemPair datacon = (ComboBoxItemPair) data.get(i); if (key.equals(datacon.getValue())) { return i; } } return -1; } COM: <s> tries to find the index of element with the given key </s>
funcom_train/12807531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPage(Rectangle rect, int rotation) throws DocumentException { PdfRectangle mediabox = new PdfRectangle(rect, rotation); PageResources resources = new PageResources(); PdfPage page = new PdfPage(mediabox, new HashMap<String, PdfRectangle>(), resources.getResources(), 0); page.put(PdfName.TABS, getTabs()); root.addPage(page); ++currentPageNumber; } COM: <s> adds a blank page </s>
funcom_train/6270871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResourceOccurrence(String topicID, String id, String instanceOf, String scope, String basename,String uri) { String tID = topicID; if (tID.equals("")) tID = currentTopic.getID(); newResourceOccurrence(tID, id, instanceOf, scope,basename,uri); } COM: <s> adds resource based occurrence to selected topic </s>
funcom_train/29031283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Client c) { if (c == null) { throw new IllegalArgumentException("'c' was null"); } this.players.add(new PlayerInGame(c)); Collections.sort( this.players, new Comparator<PlayerInGame>() { public int compare(PlayerInGame p1, PlayerInGame p2) { Client c1 = p1.getClient(); Integer id1 = c1.getClientID(); Client c2 = p2.getClient(); Integer id2 = c2.getClientID(); return id1.compareTo(id2); } }); } COM: <s> add a player which will be wrapped in a player in game object </s>
funcom_train/42751674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFile(File aSrc, File aDest) throws CErrorException{ BufferedInputStream vIn; try { vIn = new BufferedInputStream(new FileInputStream(aSrc)); } catch (FileNotFoundException e) { throw new CErrorException(EErrorMessages.COULDNOTOPEN, e, aSrc.getAbsolutePath()); } copyStreamToFile(vIn, aDest); } COM: <s> copies a given file to another file </s>
funcom_train/28540495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EObject getEObject(String uriFragment) { if (uriFragment == null) return null; try { // Consult the superclass EObject eObject = super.getEObject(uriFragment); if (eObject != null) return eObject; // Consult our helper method eObject = getEObjectExtended(uriFragment); if (eObject != null) return eObject; return null; } catch (RuntimeException e) { // TODO: Should log this instead of printing to stderr. e.printStackTrace(); throw e; } } COM: <s> find and return the eobject represented by the given uri fragment </s>
funcom_train/36663278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isJUnit4TestClass(String[] constantPoolStrings) { for (int i = 0; i < constantPoolStrings.length; i++) { if (constantPoolStrings[i].equals("Lorg/junit/Test;") || constantPoolStrings[i].equals("Ljunit/framework/Test;")) { return true; } } return false; } COM: <s> not exactly the right name </s>
funcom_train/37519271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWindowDimensions() { // If the window state is normal (not maximized), the dimensions // of the window will be preferred width and height. If there // are no preferences specified, the dimensions of the window // will be determined by the preferred size of the window. if (window.getExtendedState() == Frame.NORMAL) { window.setSize(getPreferredSize()); } } COM: <s> set the window to the users preferred window dimensions </s>
funcom_train/23619441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { //stop the tasks tickTask.stop(); PlayTask stopTask = new PlayTask(Midi.NewEv(Midi.typeStop)); seq.ScheduleTask(stopTask, Midi.GetTime()); // clear stuck notes seq.panic(); // switch flag this.playing = false; } COM: <s> stops playing and clears stuck notes </s>
funcom_train/30251415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteCommAccount(CommAccountData_Client account) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = null; try { CommAccount serverCommAccount = new CommAccount(); ServerletUtil.CommAccountData_Client2Server(account, serverCommAccount, account.userId); tx = session.beginTransaction(); _dataAccess.deleteAccount(session, serverCommAccount); tx.commit(); }catch (HibernateException he) { if (tx!=null) { tx.rollback(); } throw he; } finally { if (session.isOpen()) { session.close(); } } } COM: <s> delete a given comunication account from the database </s>
funcom_train/3990170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGardloPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_gardlo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_gardlo_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__GARDLO, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the gardlo feature </s>
funcom_train/46439838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkDate(Timestamp timestamp) { final GregorianCalendar calendar1 = new GregorianCalendar(); calendar1.setTime(new Timestamp(System.currentTimeMillis())); final GregorianCalendar calendar2 = new GregorianCalendar(); calendar2.setTime(timestamp); final Date date1 = calendar1.getTime(); final Date date2 = calendar2.getTime(); final long time1 = date1.getTime(); final long time2 = date2.getTime(); return time1 >= time2; } COM: <s> used to compare a given timestamp against the system date </s>
funcom_train/6451540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Intention o) { //if (o.isAtomic() && !this.isAtomic()) return 1; //if (this.isAtomic() && !o.isAtomic()) return -1; if (o.atomicCount > this.atomicCount) return 1; if (this.atomicCount > o.atomicCount) return -1; return 0; } COM: <s> implements atomic intentions not atomic intentions </s>
funcom_train/9163321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void walk(Definition definition) { if (definition == null) { throw new IllegalArgumentException("definition must not be null."); } if (definition instanceof ClassDef) { walkClassDef((ClassDef)definition); return; } if (definition instanceof Constructor) { walkConstructor((Constructor)definition); return; } if (definition instanceof Function) { walkFunction((Function)definition); return; } if (definition instanceof Record) { walkRecord((Record)definition); return; } if (definition instanceof TypedName) { walkTypedName((TypedName)definition); return; } if (definition instanceof Unit) { walkUnit((Unit)definition); return; } throw new AssertionError(definition.getClass().getName()); } COM: <s> walks the given definition </s>
funcom_train/33398588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getRegistryFile() { /** the name of the file used to store the registry */ final String filename = System.getProperty( "net.sf.fmj.utility.JmfRegistry.filename", ".fmj.registry.xml"); // allow // override String home = System.getProperty("user.home"); return new File(home + File.separator + filename); } COM: <s> return the filepath of the registry file </s>
funcom_train/46796546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveImages() { for (Iterator iter = userList.iterator(); iter.hasNext();) { UserDTO user = (UserDTO) iter.next(); copyImage(user.getPhoto(), PATH, user.getContact_url() + ".jpg"); //LOG.info("Write Image: " + user.getContact_url()); } } COM: <s> saves images from xing users to the hard disk </s>
funcom_train/10780337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertCacheables(Cache cache, boolean expected) { assertCached(cache, CacheableEntity.class, 1, expected); assertCached(cache, NegatedUncacheableEntity.class, 1, expected); assertCached(cache, XmlCacheableEntity.class, 1, expected); } COM: <s> assert whether the cacheable types are in the cache </s>
funcom_train/48960685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public ItemData loadItem(SVNKitWrapperConnection connection, DefaultProject project, String url, boolean binary) { if ((project != null) && hasText(url) && !binary) { return new ItemDataImpl(cat(connection, project.getSourceControlURL() + "/" + url)); } return null; } COM: <s> access subversion to read the contents </s>
funcom_train/10268672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String checkSchema(String xmlFileURL, String version) { _errorsString.delete(0, _errorsString.length()); try { XMLReader parser = setUpChecker(version); parser.parse(xmlFileURL); } catch (SAXParseException e) { } catch (Exception e) { e.printStackTrace(); } return _errorsString.toString(); } COM: <s> checks the schema agsinst the xml schema for that version </s>
funcom_train/45279528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoardDisplayable(boolean boardDisplayable) { if (this.boardDisplayable != boardDisplayable) { this.boardDisplayable = boardDisplayable; Enumeration<Listener> e = listeners.elements(); while (e.hasMoreElements()) { ((ChessOptions.Listener) e.nextElement()).chessBoardDisplayableChanged( boardDisplayable); } } } COM: <s> sets the board displayable </s>
funcom_train/49074528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCommandToggleButton getSelectedButton() { if (this.isSingleSelectionMode) { for (List<AbstractCommandButton> ljrb : this.buttons) { for (AbstractCommandButton jrb : ljrb) { if (jrb instanceof JCommandToggleButton) { JCommandToggleButton jctb = (JCommandToggleButton) jrb; if (jctb.getActionModel().isSelected()) return jctb; } } } } return null; } COM: <s> returns the selected button of this panel </s>
funcom_train/4866412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasEscapeCharacter(StringBuffer sb) { boolean result = false; /* Most cases will not have an escape char */ String cmd = sb.toString(); if ( !StringUtil.empty(cmd) ) { result = cmd.endsWith(ESCAPE_CHARACTER); if ( result ) { sb.delete(sb.length() - ESCAPE_CHARACTER.length(), sb.length()); sb.append(";"); } } return result; } COM: <s> checks to see if the command ends in the escape character </s>
funcom_train/45918259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private UserManager getUserManagerWithPreloadedUsers() throws UserManagerFactoryException, URISyntaxException { final File users = new File( this.getClass().getClassLoader().getResource("test-users.xml").toURI() ); UserManager userManager = UserManagerInMemoryFactory.getInstance().createUserManager( new UserManagerInMemoryConfig(users) ); return userManager; } COM: <s> creates a user manager with a preloaded list of test users </s>
funcom_train/1916991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(String name) { status = STATUS_OK; try { name = name.trim().toLowerCase(); if ((name.indexOf("file:") >= 0) || (name.indexOf(":/") > 0)) { URL url = new URL(name); in = new BufferedInputStream(url.openStream()); } else { in = new BufferedInputStream(new FileInputStream(name)); } status = read(in); } catch (IOException e) { status = STATUS_OPEN_ERROR; } return status; } COM: <s> reads gif file from specified file url source url assumed if name </s>
funcom_train/39046336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setId(byte idSrc[]) { if (this.recordType.getFormat() == 0) throw new IllegalArgumentException( "Can't set ID of record with type NDEFRecordType.EMPTY"); if (idSrc == null) { this.id = null; } else { this.id = new byte[idSrc.length]; for (int i = 0; i < idSrc.length; ++i) this.id[i] = idSrc[i]; } } COM: <s> sets the id </s>
funcom_train/15488335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(int key, int value) { if(key < origin) { ensureCapacity(origin - key + size); System.arraycopy(data, 0, data, origin - key, size); Arrays.fill(data, 0, origin - key - 1, -1); size += origin - key; origin = key; data[0] = value; } else if(key >= origin + data.length) { ensureCapacity(key - origin + 1); data[key - origin] = value; } else { data[key - origin] = value; } } COM: <s> associates the specified value with the specified key in this map </s>
funcom_train/9645494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeAttributeSelection() { if (tableAttribute.getSelectionIndex() > -1) { try { loadAttributeValues(getCurrentAttributeElement(), tableAttributeValue, comboInclude); } catch (XMLNotValidException e) { unexpectedEvent(); } buttonRemove.setEnabled(true); buttonAdd_1.setEnabled(true); comboInclude.setEnabled(true); } else { tableAttributeValue.removeAll(); buttonRemove.setEnabled(false); buttonAdd_1.setEnabled(false); comboInclude.setEnabled(false); } } COM: <s> call it if another attribute was selected </s>
funcom_train/18858435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private boolean isKeychar( final char chr ) { return ( ( chr >= 'a' ) && ( chr <= 'z' ) ) || ( ( chr >= 'A' ) && ( chr <= 'Z' ) ) || ( ( chr >= '0' ) && ( chr <= '9' ) ) || ( chr == '-' ) || ( chr == '.' ); } COM: <s> keychar alpha digit </s>
funcom_train/37756152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderSpanArea(SpanArea area) { writeStartTag("<SpanArea>"); List children = area.getChildren(); for (int i = 0; i < children.size(); i++) { Box b = (Box)children.get(i); b.render(this); } writeEndTag("</SpanArea>"); } COM: <s> render a span area to xml </s>
funcom_train/14640328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRawCols(String rawCols) throws EmeraldjbException { if (rawCols==null) { throw new RuntimeException("Index rawCols must not be null."); } setCols(parseRawCols(rawCols)); String oldRawCols = this.rawCols; this.rawCols = rawCols; this.firePropertyChange("rawCols",oldRawCols,this.rawCols); } COM: <s> sets the raw cols </s>
funcom_train/39269273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isTrueValue(Object aValue) { boolean rc = true; if (SHOULD_ADD_NULL_VALUES) {} else if (aValue == null) {rc = false;} else if (aValue instanceof Double && (Double)aValue == Double.NEGATIVE_INFINITY) {rc = false;} else if (aValue instanceof Integer && (Integer)aValue == Integer.MIN_VALUE) {rc = false;} return rc; } COM: <s> is this a true non null value </s>
funcom_train/18486763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SendFile(String userID, String path) { // When this is a fully functional server this function could be used to // send a file. For now it wraps the server specified. try { client.remoteStore(path); } catch (Exception e) { errorPin.fireOutPin(e); } } COM: <s> description send a file to the server </s>
funcom_train/9810220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short getReceiverRatingLevel(String dimensionName) { for (int i = 0; i < Settings.ReceiverRatingNames.length; i++) { if (dimensionName.equals(Settings.ReceiverRatingNames[i])) { String longName = Settings.ReceiverRatingLevels[i]; return findRatingLevel(dimensionName, longName); } } return (short) -1; } COM: <s> this method gets the rating level to which this receiver </s>
funcom_train/5419844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DownloadableFile getFileToDownload(Session s, HttpServletRequest request, UserSession userSession) throws Exception { // Get the parameters. String groupName = request.getParameter("groupname"); int fileId = Integer.parseInt( request.getParameter("fileid") ); // Get the attach. return File.findById(groupName, fileId , s); } COM: <s> returns the input stream file to download from the request parameters </s>
funcom_train/4257083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpRequest toRequest(HttpServerCall httpCall) { HttpRequest result = new HttpRequest(getContext(), httpCall); result.getAttributes().put(HttpConstants.ATTRIBUTE_HEADERS, httpCall.getRequestHeaders()); if (httpCall.getVersion() != null) { result.getAttributes().put(HttpConstants.ATTRIBUTE_VERSION, httpCall.getVersion()); } return result; } COM: <s> converts a low level http call into a high level uniform request </s>