__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/42887437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hash = size() + numberOfAntecedents(); for(IntIterator iter = literals(); iter.hasNext(); ) { hash = Ints.superFastHashIncremental(iter.next(), hash); } for(Iterator<Clause> iter = antecedents(); iter.hasNext(); ) { hash = Ints.superFastHash(iter.next().hashCode(), hash); } return Ints.superFastHashAvalanche(hash); } COM: <s> returns the hashcode for this clause </s>
funcom_train/16526203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getFactorBounds(Factor f) { int height = sMetrics.getAscent() + sMetrics.getDescent() + 2 * sBorder; int width = sMetrics.stringWidth(f.getName()) + 2 * sBorder; Rectangle r = new Rectangle(f.getX() - width/2, f.getY() - height/2, width, height); return r; } COM: <s> return the bounding rect for the factor </s>
funcom_train/13525289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getIntrinsicShrinkX() { if (intrinsicShrinkX < 0.0) { Iterator iter = cells.iterator(); Cell cell; intrinsicShrinkX = 0.0; while (iter.hasNext()) { cell = (Cell) iter.next(); if (!cell.isMultiColumnCell()) { intrinsicShrinkX = Math.max(intrinsicShrinkX, cell.constraints.shrinkX); } } } return intrinsicShrinkX; } COM: <s> gets the intrinsic horizontal shrink value of this column </s>
funcom_train/51349297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String getCommandString(final ProcessBuilder processBuilder) { final StringBuilder sb = new StringBuilder(); boolean first = true; for(String s : processBuilder.command()) { if(!first) { sb.append(' '); } sb.append("\""); sb.append(escape(s)); sb.append("\""); first = false; } return sb.toString(); } COM: <s> return the command line that would be executed </s>
funcom_train/46570923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connect(final IProgressMonitor monitor) throws Exception { if (!_debugger.connect(this, monitor)) { return false; } _thread = new EXThread(this, _debugger); _threads = new IThread[] { _thread }; DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener( this); fireCreationEvent(); installDeferredBreakpoints(); _debugger.resume(); return true; } COM: <s> connects to the debugger </s>
funcom_train/14180390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMovePlayer() { assertFalse(server.movePlayer("", new Point(0, 1))); assertFalse(server.movePlayer("client2", new Point(0, 1))); assertFalse(server.movePlayer("client5", new Point(0, 1))); assertTrue(server.movePlayer("client1", new Point(0, 1))); } COM: <s> testet move player client id </s>
funcom_train/33303180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String jsxFunction_getPropertyValue(final String name) { if (name != null && name.contains("-")) { final Object value = getProperty(this, camelize(name)); if (value instanceof String) { return (String) value; } } return getStyleAttribute(name, null); } COM: <s> gets the value of the specified property of the style </s>
funcom_train/9235884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAlias() { final Alias alias = tableModel.getAlias(table.getRowSorter(). convertRowIndexToModel(selectedRow)); alias.update(aliasDetails.getNewAlias()); tableModel.fireTableRowsUpdated(tableModel.indexOf(alias), tableModel.indexOf(alias)); } COM: <s> updates the selected alias with the edited details </s>
funcom_train/4174104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Action getAction(String name, String label, String template) { // switch (this.type) { // case MYSQL: { // return new MySQLAction(this, name, label, template); // } // case MSSQL: { // return null; // } // default: { // return null; // } // } // } COM: <s> parses the designated uri template and returns a new action object </s>
funcom_train/37091339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NBNode createNewLoadQueryNode(String id,String name,String desc, int dbId) { NBNode n = createNode(id,name,dbId); n.setDescription(desc); //graph().addQueryNode(n); // don't add to graph here - only if correct to do so return n; } COM: <s> dont add query node to either gnb all nor gnb front </s>
funcom_train/26319410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInfernoBurning(Coords coords) { boolean result = false; InfernoTracker tracker = null; // Get the tracker for those coordinates // and see if the fire is still burning. tracker = infernos.get(coords); if (null != tracker) { if (tracker.isStillBurning()) { result = true; } } return result; } COM: <s> determine if the given coordinates has a burning inferno </s>
funcom_train/38396218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean inside(int x, int y, int z) { if ( (x >= 0) && (x<columns_) && (y >= 0) && (y<rows_) && (z >= 0) && (z<slices_)) { return true; } else { return false; } } COM: <s> return true if coordinates are inside block false otherwise </s>
funcom_train/9545092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isFinishedAppSpecific() { if (!getClient().isContinuationNecessary()) { // client does not need lookup to continue return true; } else if (getClient().getTransitCount() == 0 && !this.kClosestNodes.containsValue(ContactState.TO_QUERY)) { // no more nodes to query: closest neighbours found. return true; } else { return false; } } COM: <s> application specific check whether the lookup has already completed </s>
funcom_train/28296439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIsVisible(boolean iIsVisible) { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - setIsVisible"); System.out.println(" ::--> " + iIsVisible); } mIsVisible = iIsVisible; if (_Debug) { System.out.println(" :: SeqActivity --> END - setIsVisible"); } } COM: <s> set this activitys is visible status </s>
funcom_train/34627797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TexRow addRow() { TexRow row = new TexRow(); rows.add(rows.size(), row); Iterator iterator = changeListeners.iterator(); while (iterator.hasNext()) ((ITexRowListViewer) iterator.next()).addRow(row); return row; } COM: <s> adds row to the end of the row list </s>
funcom_train/2883018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateContext(Context context) { if (context != null) { try { context.stop(); } catch (Exception ex) { if (getLogger().isErrorEnabled()) { getLogger().error(" Interrupted on context termination ", ex); } } if (httpServer != null) { httpServer.removeLifeCycle(context); } } } COM: <s> terminate a context log failures but do not throw anything </s>
funcom_train/23350333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("QBWebConnectorSvcSoap".equals(portName)) { setQBWebConnectorSvcSoapEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/16753230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel4() { if (jPanel4 == null) { BorderLayout borderLayout = new BorderLayout(); borderLayout.setHgap(20); borderLayout.setVgap(20); jPanel4 = new JPanel(); jPanel4.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); jPanel4.setLayout(borderLayout); jPanel4.add(getJPanel5(), BorderLayout.NORTH); } return jPanel4; } COM: <s> this method initializes j panel4 </s>
funcom_train/36423948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MoneyAmountStyle withForcedDecimalPoint(boolean forceDecimalPoint) { if (forceDecimalPoint == iForceDecimalPoint) { return this; } return new MoneyAmountStyle( iZeroCharacter, iPositiveCharacter, iNegativeCharacter, iDecimalPointCharacter, iGroupingCharacter, iGroupingSize, iGrouping, forceDecimalPoint); } COM: <s> returns a copy of this style with the specified decimal point setting </s>
funcom_train/39176782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void annotationSetAdded(ServiceDefinitionEvent e) { if(e.getDirection() == direction) { String asName = e.getAnnotationSetName(); int index = Collections.binarySearch(annotationSetNames, asName, COMPARATOR); if(index < 0) { index = -index - 1; annotationSetNames.add(index, asName); fireIntervalAdded(this, index, index); } } } COM: <s> update our list of sets when one is added to the definition </s>
funcom_train/37830533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fire(Player player, Sentence sentence, Entity npc) { EntityManager manager = SingletonRepository.getEntityManager(); int totalKills = 0; for(final Creature c : manager.getCreatures()) { totalKills += player.getSharedKill(c.getName()) + player.getSoloKill(c.getName()); } if (totalKills < total) { return false; } return true; } COM: <s> does the checking for number of creatures killed </s>
funcom_train/37654464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getSwitchParent(Node parentNode, Node lastNode) { int allChildren = parentNode.jjtGetNumChildren(); ASTSwitchLabel label = null; for (int ix = 0; ix < allChildren; ix++) { Node n = parentNode.jjtGetChild(ix); if (n instanceof ASTSwitchLabel) { label = (ASTSwitchLabel) n; } else if (n.equals(lastNode)) { parentNode = label; break; } } return parentNode; } COM: <s> determine which switch label we belong to inside a switch </s>
funcom_train/14597476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addBackLink(BaseNode dtn, boolean mirror) { int oldCount = backLinks.length(); backLinks = backLinks.baseNodeUnion(dtn); if (mirror) { dtn.addForeLink(this, false); } return oldCount != backLinks.length(); } COM: <s> adds a backlink to this node </s>
funcom_train/32734123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeNHPP() { Object[] params = new Object[3]; params[0] = periodicStepFunction.getMaxValue(); params[1] = periodicStepFunction; params[2] = "value"; interarrivalTimeRV = RandomVariateFactory.getInstance( "NPPoissonProcessThinned", params); } COM: <s> a utility method to initialize the nhp process once all parameters have </s>
funcom_train/43889527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(String sql) throws Exception { Connection connection = null; try { connection = getConnection(); Statement statement = null; try { statement = connection.createStatement(); statement.execute(sql); } finally { if (statement != null) { statement.close(); } } } finally { if (connection != null) { connection.close(); } } } COM: <s> execute an sql statement on the database </s>
funcom_train/39366401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertAllValuesInitialized() { for (int frameIndex = 0; frameIndex < _traceMapArray.length; frameIndex++) { if (_traceMapArray[frameIndex] < 1) { throw new RuntimeException("Invalid trace map value (" + _traceMapArray[frameIndex] + ") found at frame index " + frameIndex); } } } COM: <s> asserts that all trace map values have been initialized i </s>
funcom_train/33133566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enqueueVat() { state = VatState.ENQUEUED; boolean attached; try { attached = runner.hasEvents(this, ticket); } catch(Throwable t) { if(log.isLoggable(Level.SEVERE)) { log.log(Level.SEVERE, "Unexpected exception from runner. Vat Detached. ",t); } attached = false; } if (!attached) { state = VatState.PENDING; runner = null; } } COM: <s> enqueue vat into runner </s>
funcom_train/3276800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == home) { setHyperLink(homePage, true); } else if (e.getSource() == back) { if (current > 1) { current--; setHyperLink(urls[current], false); } } else if (e.getSource() == forword) { if (current < maxCurrent) { current++; setHyperLink(urls[current], false); } } } COM: <s> method action performed </s>
funcom_train/36012113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IStatus validate(Object[] selection) { for (int i = 0; i < selection.length; i++) { Object selectionItem = selection[i]; if (selectionItem instanceof File) { File file = (File) selectionItem; if (file.isDirectory()) { return new Status(Status.ERROR, ReviewPlugin.PLUGIN_ID, "Please select only files."); } } } return Status.OK_STATUS; } COM: <s> validates an array of elements and returns the resulting status </s>
funcom_train/46384462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCanonicalName() { /* Check to see if the cell is no longer valid */ super.checkInvalid(); /* * There is no need to protect this with a read lock. Even though a * cell can move around within a file system, this is implemented as * removing a cell and adding it somewhere else. The 'canonicalName' * member variable is invariant in the WFSCell class. */ return this.canonicalName; } COM: <s> returns the canonical name for this cell which is guaranteed to unique </s>
funcom_train/18391638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findResources(File dir) throws BuildException { if (!dir.isDirectory()) { log("Resource directory "+dir.getPath()+" not found",Project.MSG_INFO); return; } for (File file : dir.listFiles()) { if (file.getName().startsWith(".")) { continue; } else if (file.isFile()) { copyResource(file); } else if (file.isDirectory()){ findResources(file); } } } COM: <s> recursively scans a directory for resource files </s>
funcom_train/21877647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getXformUris(Collection targets) throws DepoException { Model m = getKnowledgeMap().readlockXforms(); try { XformDetailQuery xdq = new XformDetailQuery(getKnowledgeMap(), m, (String[]) targets.toArray(new String[0])); Collection c = xdq.execUris(); return c; } finally { getKnowledgeMap().unlockXforms(); } } COM: <s> get the uris of xforms used by the given instances </s>
funcom_train/11045865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prettify(File file, CodeGenConfiguration configuration) { List fileList = configuration.getOutputFileNamesList(); String fileName = null; for (Iterator iter = fileList.iterator();iter.hasNext();){ fileName = (String) iter.next(); if (fileName.toLowerCase().endsWith(fileExtension)) { prettifyFile(new File(fileName)); } } } COM: <s> recursive procedure to prettify the files </s>
funcom_train/40885779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void line(float x, float y, float z, float x2, float y2, float z2) { if(currType != ShapeType.Line) throw new GdxRuntimeException("Must call begin(ShapeType.Line)"); checkDirty(); checkFlush(2); renderer.color(color.r, color.g, color.b, color.a); renderer.vertex(x, y, z); renderer.color(color.r, color.g, color.b, color.a); renderer.vertex(x2, y2, z2); } COM: <s> draws a line </s>
funcom_train/14273579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportDatabase(String s) { java.io.File file=new java.io.File(s); if (file.isFile()) file.delete(); if(!file.exists()) file.mkdirs(); if(isResourceDB()) exportPRC(s); else exportPDB(s); } // end-method COM: <s> export this database to a file </s>
funcom_train/14210940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void noteAddition(Object key, Object newValue) { synchronized (listeners) { Iterator it = listeners.iterator(); while (it.hasNext()) { CacheListener listener = (CacheListener) it.next(); listener.noteKeyAddition(this, key, newValue); } } } COM: <s> send a key addition event to all registered listeners </s>
funcom_train/37435704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int convertColumnIndexToView(final int modelColumnIndex) { final int lockedIndex = lockedTable.convertColumnIndexToView(modelColumnIndex); final int scrollIndex = scrollTable.convertColumnIndexToView(modelColumnIndex); if (lockedIndex >= 0) { return lockedIndex; } else { return scrollIndex; } } COM: <s> maps the index of the column in the table model at </s>
funcom_train/37508287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTextDirectory() { if (m_textDirectory == null) { m_textDirectory = new JTextField(); m_textDirectory.setPreferredSize(new Dimension(200, m_textDirectory.getPreferredSize().height)); } return m_textDirectory; } COM: <s> returns the textfield for the directory </s>
funcom_train/8797127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AGNParameterHandle getIntersectingHandle( int mX, int mY, AGNModelCanvas canvas ) { AGNParameterHandle retVal = null; for( AGNParameterHandle handle : handles ) { if( handle.isClickedOn( mX, mY, canvas ) ) { retVal = handle; break; } } return retVal; } COM: <s> get intersecting handle </s>
funcom_train/35299314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void truncate(long length) throws SerialException { if (length > len) { throw new SerialException ("Length more than what can be truncated"); } else { len = length; // re-size the buffer if (len == 0) { buf = new char[] {}; } else { buf = (this.getSubString(1, (int)len)).toCharArray(); } } } COM: <s> truncates the code clob code value that this code serial clob code </s>
funcom_train/15584875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object x) { // This test is just an optimization, which may or may not help if ((BigInteger) x == this) return true; if (!(x instanceof BigInteger)) return false; BigInteger xInt = (BigInteger) x; if (xInt.signum != signum || xInt.mag.length != mag.length) return false; for (int i=0; i<mag.length; i++) if (xInt.mag[i] != mag[i]) return false; return true; } COM: <s> compares this big integer with the specified object for equality </s>
funcom_train/18518719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String innerName(String outerName) { if (mapNames == null) { buildNameMap(); } String innerName = (String) mapNames.get(outerName); if (innerName == null) { throw new IllegalArgumentException("No inner name found for the given outer name: " + outerName); } return innerName; } COM: <s> obtains the wrapped bean property name that corresponds to the given </s>
funcom_train/26412137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid(){ boolean bValid = false; if(item != null && mTime != null){ long keepAlive = mTime.longValue(); if(keepAlive == 0){ bValid = true; }else if(this.timestamp != null && keepAlive > 0){ Date now = new Date(); long maturityDate = this.timestamp.getTime() + keepAlive; if(now.getTime() < maturityDate)bValid = true; } } return bValid; } COM: <s> establishes the behavior of cache item </s>
funcom_train/12165520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendKeepAlivePackets() { List activeConnections = SPSConnectionPool.getAllActiveConnections(); Iterator iter = activeConnections.iterator(); while(iter.hasNext()) { SPSConnection spsConn = (SPSConnection) iter.next(); spsConn.getBroker().send( new KAPacket( RequestIdentifierManager.getNewRequestId()). createKAPacket()); } } COM: <s> this method is called periodically by start method </s>
funcom_train/44701707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int delete(Contig contig) throws SQLException { Statement statement = connection.createStatement(); int deleted = 0; String delete = "DELETE FROM " + CONTIGS + "_" + contig.getAssemblyId() + " WHERE " + CONTIG_ID + " = '" + contig.getContigId() + "'"; try { deleted = statement.executeUpdate(delete); } catch (SQLException e) { throw e; } finally { statement.close(); } return deleted; } //delete() COM: <s> removes the specified contig from the database </s>
funcom_train/44172627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object peek(Class objectClass, int n) { Object result = null; int count=0; for (int i = 0; i < getCount(); i++) { result = peek(i); if (result != null && objectClass.isInstance(result)) { count++; if (count==n) break; } } return result; } COM: <s> return the n th instance down the stack of the specified </s>
funcom_train/7980745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOrderToManifest() { for (Iterator it = getSettingsHandler().getListOfAllFiles().iterator(); it.hasNext();) { addToManifest((String)it.next(), CrawlController.MANIFEST_CONFIG_FILE, true); } } COM: <s> add order file contents to manifest </s>
funcom_train/9585906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToImTlv(OutputStream out) throws IOException { ByteArrayOutputStream bout = new ByteArrayOutputStream(12); BinaryTools.writeUInt(bout, size); BinaryTools.writeUShort(bout, 0x0001); BinaryTools.writeUShort(bout, sum); BinaryTools.writeUInt(bout, timestamp); bout.writeTo(out); } COM: <s> writes this icon hash block to the given stream in the format normally </s>
funcom_train/37070944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List searchIds(String constraints, String id) throws SQLException { String query = "select " + primary_key + " from " + table_name + " where " + constraints; PreparedStatement stmt = conn.prepareStatement(query); try { stmt.setString(1, id); ResultSet rs = stmt.executeQuery(); return getColumnListFromResultSet(rs); } finally { stmt.close(); } } COM: <s> returns the primary keys of the entries that fulfill a specific </s>
funcom_train/24084276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private MeasurementEventImpl createGeneralWFMeasurementEvent(ExecutionRecordImpl execRec) { MeasurementEventImpl me = new MeasurementEventImpl(execRec); MeasurementAgent agent = new MeasurementAgent(this.getWEEAgent(),MeasurementAgent.AgentType.WORKFLOW); execRec.getMeasurementEvents().add(me); return me; }*/ COM: <s> creates an event thats about the workflow in general </s>
funcom_train/29832008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String applyReplacementList(ArrayList<ReplacementElement> replacementList, String text, DescriptionList descriptionList){ String result = text; for( ReplacementElement replacementElement : replacementList ){ //check whether the element is a group itself if( replacementElement instanceof ReplacementGroup ){ result = applyReplacementGroup( (ReplacementGroup)replacementElement, result, descriptionList ); } else { // ! (replacementElement instanceof ReplacementGroup) result = applySingleReplacement( (Replacement)replacementElement, result, descriptionList ); } } return result; } COM: <s> applies a list of replacements on a given string and returns the result </s>
funcom_train/41531256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendDataEnd() throws RejectException, BackendRejectException { try { smartClient.dataEnd(); } catch (SMTPException e) { throw new BackendRejectException(e, " - Backend server rejected at end of data"); } catch (IOException e) { throw new RejectException(451, e.getMessage()); } } COM: <s> complete the data session on all connected targets </s>
funcom_train/26441653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getChatterEmailInString(String nickname) { String tmp="essai"; if (!nickChatter.isEmpty()) { Object o = nickChatter.get((Object) nickname); Chatter ch = (Chatter) o; tmp = ch.getEmail();} else tmp = null; if(tmp==null) {tmp="-1";} return tmp; } COM: <s> get the e mail from the chatters nickname return a string </s>
funcom_train/48975807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loopImage(int animationPeriodMillis, double sequenceDurationSeconds) { if (imagesLoader.numImages(imageName) == 0) { throw new ConfigurationException(imageName + " is not a sequence of images"); } imagesPlayer = null; imagesPlayer = new ImagesPlayer(imageName, animationPeriodMillis, sequenceDurationSeconds, true, imagesLoader); isLooping = true; } COM: <s> switch on loop playing </s>
funcom_train/47946126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log(String msg) { if(true) { try { outFile = new PrintWriter(new FileOutputStream(new File(ofile.getPath() + ".log"), true)); } catch (Exception e1) { System.out.print(e1.toString()); } outFile.println(msg); outFile.close(); } } COM: <s> simple method for logging debug output to file </s>
funcom_train/40107064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _writePrefixes(final Map<String, String> prefixes, final char locIndicator) throws IOException { String[] keys = prefixes.keySet().toArray(new String[0]); Arrays.sort(keys); for (String ident: keys) { _out.write("#PREFIX " + ident + " " + locIndicator); _writeString(prefixes.get(ident)); super.newline(); } } COM: <s> writes the provided prefixes </s>
funcom_train/19779798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void user(String user) throws IOException, FTPException { String reply = control.sendCommand("USER " + user); // we allow for a site with no password - 230 response String[] validCodes = { "230", "331" }; lastValidReply = control.validateReply(reply, validCodes); } COM: <s> supply the user name to log into an account on the ftp server </s>
funcom_train/1126323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getPropertyHtmlWriter(Object model, String propertyName) { Class htmlWriterClass = null; if (hasModelInfo(model)) { htmlWriterClass = getModelInfo(model).getPropertyHtmlWriter(model, propertyName); } if (htmlWriterClass == null) { htmlWriterClass = getHtmlWriterClassForPropertyType(model, propertyName, this); } return htmlWriterClass; } COM: <s> yeah this code is pretty rough but should do the trick </s>
funcom_train/38573887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeOldLogs(){ File logDir = new File(LOG_DIR); if(!new File(LOG_DIR).exists()){ File dir = new File(LOG_DIR); dir.mkdir(); } File[] logs = logDir.listFiles(); for(int i=0; i<logs.length; i++){ logs[i].delete(); } } COM: <s> removes old log files from previous i tunes dsm executions </s>
funcom_train/45064164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOpenButton() { if (openButton == null) { openButton = new JButton(); openButton.setIcon(new ImageIcon(Tools.loadBufferedImage(iconsPath + "folder.png"))); openButton.setToolTipText("Open"); openButton.addMouseListener(new MouseAdapter() { public void mouseExited(MouseEvent e) { statusBar.setText(""); } public void mouseEntered(MouseEvent e) { statusBar.setText("Open a model"); } }); } return openButton; } COM: <s> this method initializes open button </s>
funcom_train/4376557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuery(String query) throws URIException { if (query == null || query.length() == 0) { _query = (query == null) ? null : query.toCharArray(); setURI(); return; } setRawQuery(encode(query, allowed_query, getProtocolCharset())); } COM: <s> set the query </s>
funcom_train/13200136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIncreasingDownSpeed() { decider.updateCurrentStatus(180*1024); decider.updateCurrentStatus(190*1024); decider.updateCurrentStatus(200*1024); decider.updateCurrentStatus(210*1024); decider.updateCurrentStatus(220*1024); assertEquals(30, decider.getSuggestedUpRate()); } COM: <s> test decider for linear increasing download rate </s>
funcom_train/12187314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void releaseMap(Map map) { Set keys = map.keySet(); for (Iterator iterator = keys.iterator(); iterator.hasNext();) { Object object = iterator.next(); Object removed = map.get(object); ResourceOwnerHelper.releaseIfReleasableResourceOwner(removed); } map.clear(); } COM: <s> this helper method removes each the items in the specified map calling </s>
funcom_train/50333440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toHexString() { StringBuffer buf = new StringBuffer(); buf.append("0x" + Integer.toHexString(0xFF & _dataChars[0])); for (int i=1; i<_nDataChars; i++) { buf.append(", 0x" + Integer.toHexString(0xFF & _dataChars[i])); } return buf.toString(); } COM: <s> returns a string representation of this dcc4 pc reply </s>
funcom_train/34675346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDiscount(String reason, Reference relatesTo, String contributesTo, String dependsOn, Rate rate) { addLine(new RateBehaviour(generateLineId(), reason, relatesTo, contributesTo, dependsOn, BehaviourType.DISCOUNT, rate)); } COM: <s> same as add discount but generates the line id automatically </s>
funcom_train/17680567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getDeleteLinkTableRowSql(CharBuf s) { if (deleteRowSql == null) { s.clear(); s.append("delete from "); s.append(linkTable.name); s.append(" where "); linkTable.appendWherePK(s); deleteRowSql = s.toString(); } return deleteRowSql; } COM: <s> get sql to delete a row from our link table </s>
funcom_train/38566342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeCaptcha(String id, Captcha captcha) throws CaptchaServiceException { // if (store.get(id) != null) { // throw new CaptchaServiceException("a captcha with this id already exist. This error must " + // "not occurs, this is an implementation pb!"); // } store.put(id, new CaptchaAndLocale(captcha)); } COM: <s> store the captcha with the provided id as key </s>
funcom_train/10599431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putIntoPool( final Object poolable ) { this.enteringPool(poolable); synchronized( this.semaphore ) { if( this.size <= this.max ) { this.ready.addLast( poolable ); this.readySize++; } else { // More Poolables were created than can be held in the pool, so remove. this.permanentlyRemovePoolable( poolable ); } } } COM: <s> returns a poolable to the pool </s>
funcom_train/25187081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDataValidator() throws Exception { System.out.println("getDataValidator"); BigFactory instance = BigFactory.getInstance(); assertNull(instance.getDataValidator(BigFactory.F_DUMP)); assertNull(instance.getDataValidator(BigFactory.F_JSON)); assertNull(instance.getDataValidator(BigFactory.F_XML)); } COM: <s> test of get data validator method of class big factory </s>
funcom_train/47506595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateProperty(long pId, String pKey, String pValue) { ContentValues cv = new ContentValues(); cv.put(FIELD_KEY, pKey); cv.put(FIELD_VALUE, pValue); return mDb.update(TABLE_NAME, cv, FIELD_ID + "=" + pId, null) > 0; } COM: <s> update a property in the database and return </s>
funcom_train/46152253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rewind() { if (playerReady()) { logger.info("video player: rewind"); if (isSynced()) { // sync other clients sendCameraRequest(Action.REWIND, null); } else { setPositionRelative(getPosition(), -5); } } } COM: <s> rewinds the video by 5 seconds </s>
funcom_train/1104195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMaxdegerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Alan_maxdeger_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Alan_maxdeger_feature", "_UI_Alan_type"), HarzemliPackage.eINSTANCE.getAlan_Maxdeger(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_validasyonPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the maxdeger feature </s>
funcom_train/25599727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startCapture() { for (PhSensor sensor : sensors) { sensor.setNewDefaultDataRow(); sensor.captureData(); } secondsTimer = new Timer(); secondsTimer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { if (isCaptureing()) { for (ChartInternalFrame frame : frames) { frame.updateZoom(); } } } }, 100, 5000); // inform all frames that DataRow has Changed. for (ChartInternalFrame frame : frames) { frame.informNewDataRow(); } capture = true; } COM: <s> start capturing data on all available sensors </s>
funcom_train/28354587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedSequence(AcceleratorSeq seq) { if (selectedSequence != null) { JOptionPane .showMessageDialog( mainWindow, "You already selected a sequence,\nplease open a new document to play with a different sequence", "Sequence Select Error", JOptionPane.ERROR_MESSAGE); return; } selectedSequence = seq; devTree = new JTree(new XALTreeNode(selectedSequence)); myWindow().getSeqLabel().setText( "Selected Sequence is " + getSelectedSequence().getId()); } COM: <s> only let the sequence get picked once per document </s>
funcom_train/50340792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LayoutBlock getProtectedBlockBySensor(Sensor sensor, LayoutEditor panel){ LayoutBlock pro = getProtectedBlockBySensor(sensor.getUserName(), panel); if(pro == null) pro = getProtectedBlockBySensor(sensor.getSystemName(), panel); return pro; } COM: <s> method to return the layout block that a given sensor is protecting </s>
funcom_train/49317757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void imageLoadFits(URL url, String imageId, String name) throws Exception { DivaMainImageDisplay imageDisplay = _imageFrame.getImageDisplayControl().getImageDisplay(); imageDisplay.setURL(url); // imageDisplay.setImageId(imageId); TODO imageId is not used anywhere yet } COM: <s> loads and displays the fits image pointed to by the given url </s>
funcom_train/33606691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRelabelVertices() { System.out.println("relabelVertices"); instance.relabelVertices(); TreeSet<Integer> expResult=new TreeSet<Integer>(); for(int i=1;i<=11;i++){expResult.add(i);} assertEquals(expResult,instance.getVertices()); } COM: <s> test of relabel vertices method of class scio </s>
funcom_train/18756597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem add(JMenuItem menuItem) { JMenuItem retVal = null; // Use locals for a convenient reference point // to check when debugging. double menuItemSize = menuItem.getPreferredSize().getHeight(); if ((myHeight + menuItemSize) < maximumHeight) { retVal = super.add(menuItem); myHeight += menuItemSize; } else { // Create the more menu if necessary createMoreMenu(); retVal = moreMenu.add(menuItem); } return retVal; } COM: <s> override the jpopup menu functionality try to provide illusion of a </s>
funcom_train/50062219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String infoString(int[] chars) { StringBuilder sb = new StringBuilder(); int len = chars.length; for (int index = 0; index < len; ++index) { sb.append(chars[index]) .append("(") .append(Integer.toString(chars[index])) .append("), "); } // for return sb.toString(); } // infoString COM: <s> creates an argument information string for error logging </s>
funcom_train/42385562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPathChanger() throws Exception { SheetManager live = new MemorySheetManager(); live.addSingleSheet("o1"); testSheet(live, "global"); testSheet(live, "o1"); SheetManager stub = new MemorySheetManager(false); stub.addSingleSheet("o1"); testSheet(stub, "global"); testSheet(stub, "o1"); } COM: <s> run the test </s>
funcom_train/12901354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDiagramData(DiagramData dd) { if (linkageHelper == null) throw new IllegalStateException(); // Clear out any DIAGRAM from all viewers. if (viewerData != null) { Iterator itr = viewerData.values().iterator(); while (itr.hasNext()) { HashMap value = (HashMap) itr.next(); value.remove(DIAGRAM_KEY); } } diagramData = dd; if (diagramData != null) linkageHelper.initializeLinkages(diagramData); } COM: <s> set the diagram data for this domain </s>
funcom_train/45394814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void visit (IComponentVisitor visitor, Component component) { this.skip = false; visitor.visit(this.setVisited(component)); if (this.isAborted() || this.isSkipped()) return; if (component instanceof Container) { Container container = (Container) component; for (int i=0; i<container.getComponentCount(); i++) { this.visit(visitor, container.getComponent(i)); if (this.isAborted() || this.isSkipped()) break; } } } COM: <s> the actual tree loop for visiting the components </s>
funcom_train/50880524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killUpdateConnection(Connection inConnection) throws SQLException{ // if there is a null sent in, just return if (inConnection == null) return; // look for the connection in the UpdatetInUse queue. MyConnection tempConnection = removeUpdateConnection(inConnection); // close the connection try{ inConnection.close(); } catch (SQLException e){ } } COM: <s> this connection is corrupted do not reuse it for later update operations </s>
funcom_train/26467806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRepeatElement () { return (base.getNamespaceURI().equals (XFORMS_NS) && base.getLocalName().equals ("repeat")) || ((base.getAttributeNodeNS (XFORMS_NS, "repeat-bind") != null) || (base.getAttributeNodeNS (XFORMS_NS, "repeat-nodeset") != null)); } COM: <s> indicate if the element is a repeat element </s>
funcom_train/42822722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitWOReportCommand() { if (exitWOReportCommand == null) {//GEN-END:|153-getter|0|153-preInit // write pre-init user code here exitWOReportCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|153-getter|1|153-postInit // write post-init user code here }//GEN-BEGIN:|153-getter|2| return exitWOReportCommand; } COM: <s> returns an initiliazed instance of exit woreport command component </s>
funcom_train/17951956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Category getCategoryByTitle(String title) { title = title.substring(0,1).toUpperCase() + title.substring(1) ; Integer id = env.getDbCategoriesByTitle().retrieve(title) ; if (id == null) return null ; Page page = Page.createPage(env, id) ; if (page.getType() == PageType.category) return (Category) page ; else return null ; } COM: <s> returns the category referenced by the given case sensitive title </s>
funcom_train/34341994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOtroPedido() { if (otroPedido == null) {//GEN-END:|52-getter|0|52-preInit // write pre-init user code here otroPedido = new Command("Otro Pedido", Command.BACK, 0);//GEN-LINE:|52-getter|1|52-postInit // write post-init user code here }//GEN-BEGIN:|52-getter|2| return otroPedido; } COM: <s> returns an initiliazed instance of otro pedido component </s>
funcom_train/6334325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(1000); sb.append( "[FileCache, max size: ").append( maximumSize ). append( " bytes]" ); for( String fileName : cache.keySet() ) { sb.append( "\n" ).append( fileName ); } return sb.toString(); } COM: <s> returns a string representation of the file cache </s>
funcom_train/1562660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullMacroXML(ArrayList macros) { StringBuilder sb = new StringBuilder(); addXMLHeader(sb); addGeoGebraHeader(sb, true, null); //sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"); //sb.append("<geogebra format=\"" + GeoGebra.XML_FILE_FORMAT // + "\">\n"); // save construction sb.append(kernel.getMacroXML(macros)); sb.append("</geogebra>"); return sb.toString(); } COM: <s> returns xml representation of given macros in the kernel </s>
funcom_train/21470356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RosterItemPresenter addRosterItem(final RosterItem item) { // FIXME: no mola nada toda esta basura selenium final RosterItemDisplay itemDisplay = display.newRosterItemDisplay(Idify.id(group.getName()), Idify.id(item .getJID())); final RosterItemPresenter presenter = new RosterItemPresenter(group.getName(), itemMenu, itemDisplay, rosterConfig); presenter.setItem(item); addRosterItemPresenter(presenter); return presenter; } COM: <s> adds a new </s>
funcom_train/12735600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processGame() { switch (fsm) { case RESET: // play background sound track if (ALEXTvorbis) { AL10.alGenSources(alSource); AL10.alSourcef(alSource.get(0), AL10.AL_GAIN, 0.5f); AL10.alSourcei(alSource.get(0), AL10.AL_BUFFER, alBuffer.get(0)); AL10.alSourcei(alSource.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); AL10.alSourcePlay(alSource.get(0)); } fsm = FSM.RUN; break; } } COM: <s> process game logic here in the main finite state machine </s>
funcom_train/44591239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match(ArrayCreation node, Object other) { if (!(other instanceof ArrayCreation)) { return false; } ArrayCreation o = (ArrayCreation) other; return ( safeSubtreeMatch(node.getType(), o.getType()) && safeSubtreeListMatch(node.dimensions(), o.dimensions()) && safeSubtreeMatch(node.getInitializer(), o.getInitializer())); } COM: <s> returns whether the given node and the other object object match </s>
funcom_train/43451164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public LinkedList execute(SvnRepository repository, SvnRuntime rt) throws SvnException { // if (rt != null) { // final String cmd = prepareCommand(repository); // try { // OutputStream os = new ByteArrayOutputStream(); // os = rt.exec(cmd); // if (os != null) { // m_offspring = parse(os); // } else { // return null; // } // } catch (IOException e) { // e.printStackTrace(); // } // } // return m_offspring; // } COM: <s> execute svn export command to specific node and revision </s>
funcom_train/13221410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { PeerID pid = (PeerID)o; int result = port - pid.port; if (result != 0) { return result; } result = address.hashCode() - pid.address.hashCode(); if (result != 0) { return result; } for (byte element : id) { result = element - element; if (result != 0) { return result; } } return 0; } COM: <s> compares port address and id </s>
funcom_train/23833405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Graph parseRdf(HttpMethod method, RDFFormat format) throws RDFParseException, RDFHandlerException, IOException { LimitedInputStream lis = new LimitedInputStream(method.getResponseBodyAsStream(), maxfilesize); Graph graph = new GraphImpl(); URI urlContext = graph.getValueFactory().createURI(task.getURI().toString()); addData(graph, lis, format, task.getURI().toString(), urlContext); return graph; } COM: <s> parses an rdf string </s>
funcom_train/41413075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLanguageFromSystem() { String systemLang=System.getProperty("microedition.locale"); if (systemLang==null){ return DEFAULT_LANG; } else if (systemLang.length()>2) { return systemLang.substring(0, 2); } else { return systemLang; } } COM: <s> get language from the system </s>
funcom_train/21633548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDiv(final int index, final Tag tag) { final Div div = new Div(this.page); final String classAttribute = tag.getAttributeValue("class"); final String idAttribute = tag.getAttributeValue("id"); div.setIdAttribute(idAttribute); div.setClassAttribute(classAttribute); div.setBegin(index); div.setEnd(findEndTag(index + 1, tag)); addHierarchyElement(div); } COM: <s> called by load contents to load a div tag </s>
funcom_train/13995125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultipleModelSaveBug() { assertEquals( "invalid enable state of save action", true, saveAction.isEnabled()); saveAction.actionPerformed(new ActionEvent(this, -1, "")); presentations[0].container.createVO(); assertEquals( "invalid modification state of value object container", true, presentations[0].container.isModified()); assertEquals( "invalid enable state of save action", true, saveAction.isEnabled()); } COM: <s> shows save bug 1 and 2 </s>
funcom_train/1012656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canExpand(Level level, int height) { if (levels.isEmpty()) return false; // Should not happen if (levels.get(levels.size() - 1) == level && (h - nextAddY >= height - level.h())) return true; return false; } COM: <s> indicates whether its legal to trivially increase the height of </s>
funcom_train/1842987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void linkFieldAndRadio() { radio.setFieldEntity(scene.getField().getProxy()); scene.getField().addRadio(radio.getRadioInfo(), radioEntity, location); scene.getField().startMobility(radio.getRadioInfo().getUnique().getID()); } COM: <s> link field with radio layer and vice versa </s>