__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33517662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean writeRootRegionLocation(HServerAddress address) { if (address == null) { return deleteRootRegionLocation(); } if (!ensureParentExists(rootRegionZNode)) { return false; } String addressString = address.toString(); if (checkExistenceOf(rootRegionZNode)) { return updateRootRegionLocation(addressString); } return createRootRegionLocation(addressString); } COM: <s> write root region location to zoo keeper </s>
funcom_train/179235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ans = ""; ans += N() + "\n"; NodeIterator iterator = nodes(); while (iterator.hasNext()) { Node current = iterator.nextNode(); ans += current.toString() + "\n"; } ans += E() + "\n"; EdgeIterator eiterator = edges(); while (eiterator.hasNext()) { ans += eiterator.nextEdge().toString() + "\n"; } return ans.trim(); } COM: <s> string representation of the graph </s>
funcom_train/31069676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readProperties(org.embedlet.persistence.Properties properties) throws PropertyException { String propertyName = ""; try { timer.setPeriod( properties.getLongProperty( propertyName = PK_COMPONENT_PERIOD, timer.getPeriod() ) ); super.readProperties(properties); } catch (PropertyException ex) { throw new PropertyException("Read Property: " + propertyName); } } COM: <s> read the properties from a persistent store </s>
funcom_train/18480219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify(JComponent c) { InputVerifier v = c.getInputVerifier() ; if (v == null) return true ; boolean verified = v.verify(c) ; if (verified) return true ; if (!verified) { System.err.println(c+"failed verification") ; } return false ; } COM: <s> verifies the given component </s>
funcom_train/17184017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseConnectedPeers(PeerStatusEntry status, Key key) { List<ConnectedPeerStatusEntry> list = new ArrayList<ConnectedPeerStatusEntry>(); for(Object o : key.getContent()) { if(!(o instanceof Item)) continue; Item item = (Item) o; ConnectedPeerStatusEntry cStatus = new ConnectedPeerStatusEntry(); cStatus.setStatus(status); storeItem(cStatus, item); list.add(cStatus); //dao.addConnectedPeerStatusEntry(cStatus); } status.setList(list); } COM: <s> enumerates the connected peers part of a key xml object </s>
funcom_train/21992334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { if (workbenchWindow == null) { // action has been dispose return; } UploadToFlickrWizard wizard = new UploadToFlickrWizard(); WizardDialog dialog = new WizardDialog(workbenchWindow.getShell(), wizard); // Open the wizard dialog dialog.open(); Map<String, String> url = wizard.getUploadedURL(); if (url != null) { insertInEditor(url); } } COM: <s> the action has been activated </s>
funcom_train/14499645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHref(URL url) throws InvalidNavigationException { if (validate() == false) { throw new InvalidNavigationException("No matched string at this position"); } OdfElement parentElement = getContainerElement(); int leftLength = getText().length(); int index = mIndexInContainer; addHref(index, leftLength, parentElement, url.toString()); } COM: <s> add a hypertext reference to the selection </s>
funcom_train/49627533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAggregations(final List<PathTreeAggregation> aggrs) { this.aggregations = aggrs; for (PathTreeAggregation aggr : this.aggregations) { this.hits += aggr.getHits(); this.childHits += aggr.getChildHits(); this.bounces += aggr.getBounces(); this.childBounces += aggr.getChildBounces(); this.entries += aggr.getEntries(); this.leaves += aggr.getLeaves(); } } COM: <s> sets and processes the given </s>
funcom_train/12174521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateCSS() throws IOException { DeferredInheritTransformer transformer = new DeferredInheritTransformer(); document = transformer.transform(this, document); StyledDOMThemeExtractorFactory factory = StyledDOMThemeExtractorFactory.getDefaultInstance(); final ExtractorConfiguration configuration = protocolConfiguration.getExtractorConfiguration(); StyledDOMStyleAttributeRenderer rewriter = factory.createRenderer(configuration,getExtractorContext()); rewriter.renderStyleAttributes(document); } COM: <s> override to generate styles as style attributes on the elements as it </s>
funcom_train/8506588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadTuplesFromFile( File pFile ) { this.fileBase = pFile; try { Scanner scanner = new Scanner( pFile ); String line; while( scanner.hasNextLine() ) { line = scanner.nextLine(); String[] stringTuple = line.replace( "\n", "" ).split( " " ); if( stringTuple != null ) { addTuple( stringTuple ); } } scanner.close(); } catch( Exception e ) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> loads tuples from the specified tuplebase file </s>
funcom_train/13974256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSockIOClientExit(SockIOEvent evt){ Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length; i += 2) { if (listeners[i] == SockIOListener.class) { ((SockIOListener) listeners[i + 1]).sockIOClientExit(evt); } } } COM: <s> when the cilent exits </s>
funcom_train/36148667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void autoSaveWrite() { if (writeFileHelper(tempFile.getPath(), true)) { app.restoreStatusTimer(1); app.setStatus("Auto save completed."); } else { app.restoreStatusTimer(1); app.setStatus("Auto save failed."); } } COM: <s> writes project file to the temporary file path </s>
funcom_train/22395367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSentMailbox(MailboxNode sentMailbox) { if(this.sentMailbox != sentMailbox) { if(sentMailbox == null) { this.sentMailbox = null; this.sentMailboxId = -1L; } else { this.sentMailbox = sentMailbox; this.sentMailboxId = sentMailbox.getUniqueId(); } changeType |= CHANGE_TYPE_MAILBOXES; } } COM: <s> sets the sent message mailbox </s>
funcom_train/11018202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HSSFCellStyle getColumnStyle(int column) { short styleIndex = _sheet.getXFIndexForColAt((short)column); if(styleIndex == 0xf) { // None set return null; } ExtendedFormatRecord xf = _book.getExFormatAt(styleIndex); return new HSSFCellStyle(styleIndex, xf, _book); } COM: <s> returns the hssfcell style that applies to the given </s>
funcom_train/22827804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeForeignReferences(ForeignKey key, StringBuilder ddl) { for (int idx = 0; idx < key.getReferenceCount(); idx++) { if (idx > 0) { ddl.append(", "); } printIdentifier(key.getReference(idx).getForeignColumnName(), ddl); } } COM: <s> writes a list of foreign references for the given foreign key </s>
funcom_train/33177347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(FileListener fileListener) { // Don't add if its already there for (Iterator i = listeners.iterator(); i.hasNext();) { WeakReference reference = (WeakReference) i.next(); FileListener listener = (FileListener) reference.get(); if (listener == fileListener) return; } // Use WeakReference to avoid memory leak if this becomes the // sole reference to the object. listeners.add(new WeakReference(fileListener)); } COM: <s> add listener to this file monitor </s>
funcom_train/39179631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexReaderPool getTokenIndex(String featureName) { for(int i = 0; i < indexConfig.getTokenIndexers().length; i++) { if(indexConfig.getTokenIndexers()[i].getFeatureName().equals(featureName)) { return indexReaderPools[i]; } } return null; } COM: <s> returns the index that stores the data for a particular feature of token </s>
funcom_train/244561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getDirectory(File baseDirectory, String packageName) { StringTokenizer lexer = new StringTokenizer(packageName, "."); StringBuffer directoryPath = new StringBuffer(); directoryPath.append(baseDirectory.getAbsolutePath()); while(lexer.hasMoreTokens()) { directoryPath.append(File.separator); directoryPath.append(lexer.nextToken()); } File dir = new File(directoryPath.toString()); if(!dir.exists() && !dir.mkdirs()) throw new RuntimeException( "Failed to create directory: " + dir.getAbsolutePath()); return dir; } COM: <s> finds or creates a package directory </s>
funcom_train/18868102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal getReconciledBalance() { Lock l = account.getTransactionLock().readLock(); l.lock(); try { BigDecimal balance = BigDecimal.ZERO; for (Transaction t : account.transactions) { if (t.getReconciled(account) == ReconciledState.RECONCILED) { balance = balance.add(t.getAmount(account)); } } return balance; } finally { l.unlock(); } } COM: <s> calculates the reconciled balance of the account </s>
funcom_train/46447909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties loadDBProperties() { InputStream dbPropInputStream = null; dbPropInputStream = DBDao.class.getResourceAsStream("DBConfig.properties"); dbProperties = new Properties(); try { dbProperties.load(dbPropInputStream); } catch (IOException ex) { ex.printStackTrace(); } return dbProperties; } COM: <s> read db config from file </s>
funcom_train/37822059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calcSETableHeight(final int i) { int SETableHeight = tblSE[0][i].getTableHeader().getFont().getSize() + 14 + (tblSE[0][i].getFont().getSize() + TABLE_ROW_PADDING) * tblSE[0][i].getRowCount() + 5; return SETableHeight; } COM: <s> calculates the height of the single event table </s>
funcom_train/2950608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics2D g, DrawingModel d) { if (g == null) { return; } Viewport vp = d.getViewport(); int sw = vp.scaleX(width); int sh = vp.scaleY(height); if (scale) { scale = false; scaled = image.getScaledInstance(sw, sh, 0); } g.drawImage(scaled, vp.transformX(x), vp.transformY(y), observer); } COM: <s> paint this entity </s>
funcom_train/18729795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAll(Collection<?> objects) { boolean touched = false; Iterator iter = objects.iterator(); while (iter.hasNext()) { Object current = iter.next(); if (mark.remove(current)) { selection.remove(current); touched = true; } } if (touched) { changed(); return true; } else { return false; } } COM: <s> remove all elements from collection </s>
funcom_train/40336011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object f(com.google.gwt.dom.client.Element e, int i) { setElement(e); setIndex(i); // This has to be the order of calls return f(e.<com.google.gwt.user.client.Element>cast(), i); } COM: <s> override this for gquery methods which loop over matched elements and </s>
funcom_train/41421867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveUserCommand(String username, String command) { // parse command String[] processArguments = parseCommand(command); if ("shutdown".equalsIgnoreCase(processArguments[0])) { shutDown(); } else if ("restart".equalsIgnoreCase(processArguments[0])) { restart(); } else if ("logOut".equalsIgnoreCase(processArguments[0])) { userLogout(username); } else { createProcess(username, processArguments); } } COM: <s> invoked when the user enters a command in the kernel window </s>
funcom_train/29668016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void testGetAuthorPositive() { String expected_firstname = "Alice B."; String expected_lastname = "Emerson"; String[] author = lcos.getAuthor(line); String actual_firstname = author[1]; String actual_lastname = author[0]; TestCase.assertEquals(expected_firstname, actual_firstname); TestCase.assertEquals(expected_lastname, actual_lastname); } COM: <s> get the correct author from an old style entry </s>
funcom_train/24271189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Vertex vtx1, Vertex vtx2) { if (vtx1.prev == null) { head = vtx2.next; } else { vtx1.prev.next = vtx2.next; } if (vtx2.next == null) { tail = vtx1.prev; } else { vtx2.next.prev = vtx1.prev; } } COM: <s> deletes a chain of vertices from this list </s>
funcom_train/37519148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object next() { if (nextLine == null) throw new java.util.NoSuchElementException(); try { String n = nextLine; nextLine = r.readLine(); //System.out.println("READ " + nextLine); return n; } catch (java.io.IOException e) { throw new RuntimeException("EXCEPTION in next - " + e); } } COM: <s> per a standard iterator returns the next value and throws </s>
funcom_train/9688084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireContentChangedEvent() { // get the list of listeners and notify each one about this event ArrayList listeners = getResultAreaListeners(); for (int i = 0; i < listeners.size(); i++) { ResultAreaListener listener = (ResultAreaListener) listeners.get(i); listener.contentChanged(getUI()); } } COM: <s> it is called by this instance when the content jcomponent is changed </s>
funcom_train/3374825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component getCurrentComponent() { TableColumn aColumn = getColumnModel().getColumn(column); TableCellRenderer renderer = aColumn.getCellRenderer(); if (renderer == null) { Class<?> columnClass = getColumnClass(column); renderer = getDefaultRenderer(columnClass); } return renderer.getTableCellRendererComponent( JTable.this, null, false, false, row, column); } COM: <s> gets the table cell renderer component </s>
funcom_train/3133596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configure() throws IOException { int length = support.getContentLength(); boolean empty = support.isEmpty(); if(empty) { support.setContentLength(0); } else if(length >= 0) { support.setContentLength(length); } else { support.setChunkedEncoded(); } producer = factory.getInstance(); } COM: <s> this method is used to set the required http headers on the </s>
funcom_train/44661455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String renderShortName(String shortName) { Assert.notNull(shortName, "No short name specified"); StringBuffer sb = new StringBuffer(shortName.length() + 5); char[] chars = shortName.toCharArray(); sb.append(Character.toUpperCase(chars[0])); for (int i = 1; i < chars.length; i++) { char c = chars[i]; if (Character.isUpperCase(c)) { sb.append(' '); } sb.append(c); } return sb.toString(); } COM: <s> renders a unqualified bean property string in the format </s>
funcom_train/35324905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Logger getParent() { // Note: this used to be synchronized on treeLock. However, this only // provided memory semantics, as there was no guarantee that the caller // would synchronize on treeLock (in fact, there is no way for external // callers to so synchronize). Therefore, we have made parent volatile // instead. return parent; } COM: <s> return the parent for this logger </s>
funcom_train/31055880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(InputStream is, OutputStream os) { this.output = os; // REHMI - check that "reader" is the right thing input = new BufferedReader(new InputStreamReader(is)); // Fork a thread to read off of the serial port (new Thread(this, "Carpet")).start(); } COM: <s> set up the input and output streams </s>
funcom_train/2878567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResultObjectName() { if ((resultObject != null) && (resultObject instanceof Prim)) { try { return (((Prim) resultObject).sfCompleteName().toString()); } catch (RemoteException ex) { //Note that if the object was terminated this call will throw an exception. return null; } } return null; } COM: <s> get the name of result object only if it is a prim </s>
funcom_train/31816532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAgletList() { // supposing I've already got the proxy list, I can update it this.agletsList.removeAllItems(); if( this.proxies != null && this.proxies.length > 0 ) for( int i=0; i< this.proxies.length; i++ ) this.agletsList.addItem(this.proxies[i]); } COM: <s> updates the aglet proxy list supposing the array of proxies has </s>
funcom_train/4470567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flip(){ StrategoPiece[][] flippedSquares = new StrategoPiece[10][10]; for (int i = 0; i < squares.length; i++) { for (int j = 0; j < squares[i].length; j++) { int newi = 9 - i; int newj = 9 - j; flippedSquares[newi][newj] = squares[i][j]; } } this.squares = flippedSquares; } COM: <s> if youre on the red side you see it all upside down </s>
funcom_train/50076467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IDescription getDescription() { if (archElement==null) return null; switch(sofaaElementConstant){ case SofaaConstants.TYPE_INSTANCE: return ((IArchInstance)archElement).getDescription(); case SofaaConstants.TYPE_STRUCTURE: return ((IArchStructure)archElement).getDescription(); default: return null; } } COM: <s> gets the x arch description of the underlying architecture </s>
funcom_train/44222275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList getLines() throws Exception { ArrayList lines = null; if( this.citationsArray != null ) { lines = this.citationsArray; } else if( this.citationsFile != null ) { lines = this.fileToLines(this.citationsFile); } else { throw new Exception("No citation file or array is set"); } return lines; } COM: <s> get either the citations file or the array as an array list </s>
funcom_train/37482824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double findOneSigmaT(int dof) throws StatisticsException { class tFunc implements Function { int degreesOfFreedom; public tFunc(int freedomDegrees) { degreesOfFreedom = freedomDegrees; } public double valueAt(double x) { try { return Math.abs(0.683 - calculateStudentsT(x, degreesOfFreedom)); } catch (StatisticsException se) { throw new ArithmeticException(se.getMessage()); } } } BrentMethod brent = new BrentMethod(new tFunc(dof)); return brent.xmin(0.9, 1.9, 1.5, 0.001); } COM: <s> calculates t statistic such that </s>
funcom_train/51219725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JDialog getDialog() { if (dialog == null) { dialog = new JDialog(); dialog.setSize(new Dimension(241, 103)); dialog.setContentPane(getDialogPanel()); dialog.setModalityType(ModalityType.APPLICATION_MODAL); dialog.setUndecorated(true); } return dialog; } COM: <s> this method initializes window </s>
funcom_train/50296260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeInt(int v) throws IOException { checkBufferSize(4); buf[count++] = (byte) (v >>> 24); buf[count++] = (byte) (v >>> 16); buf[count++] = (byte) (v >>> 8); buf[count++] = (byte) (v >>> 0); } COM: <s> write an code int code value to the underlying stream in xdr format </s>
funcom_train/17788692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isErterm(int component) { if ((cocParametersList != null) && cocParametersList.containsKey(component)) { return cocParametersList.get(component).erterm; } else if (codParameters != null) { return codParameters.erterm; } else { return parent.isErterm(component); } } COM: <s> check if the erterm flag is active </s>
funcom_train/3107885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteRow(Object row) { if (row instanceof DownloadRequest) { model.removeDownloadRequest((DownloadRequest) row); } else if (row != null) { String error = "Wrong argument class " + row.getClass().getName() + " for row in deleteRow"; logger.error(error); throw new RuntimeException(error); } else { logger.error("Row was null", new NullPointerException()); } } COM: <s> delete the given download request from the underlying model </s>
funcom_train/11296704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object acceptStatement(JexlNode child, Object data) { Object value = accept(child, data); // blocks, if, for & while dont need a ';' at end if (child instanceof ASTBlock || child instanceof ASTIfStatement || child instanceof ASTForeachStatement || child instanceof ASTWhileStatement) { return value; } builder.append(";"); return value; } COM: <s> adds a statement node to the rebuilt expression </s>
funcom_train/10419040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() throws Exception { if( oname != null ) { // Send j2ee.object.deleted notification Notification notification = new Notification("j2ee.object.deleted", this.getObjectName(), sequenceNumber++); broadcaster.sendNotification(notification); } super.destroy(); // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(DESTROY_EVENT, null); instanceListeners = new String[0]; } COM: <s> destroy needs to clean up the context completely </s>
funcom_train/28224843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Canvas createCanvas() { Canvas newCanvas = new Canvas(shell, SWT.BORDER | SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND); GridData gdCanvas = new GridData(world.getWidth(), world.getHeight()); newCanvas.setLayoutData(gdCanvas); newCanvas.addMouseListener(new CanvasMouseListener(this, world)); newCanvas.addPaintListener(new CanvasPaintListener(control, painter, controlPanel, markers)); return newCanvas; } COM: <s> creates the canvas that displays the running simulation </s>
funcom_train/25467487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endElement(String u, String localName, String qName) { if (localName.equals("node") && goodChild) { // save item in "results" results.addItem(lat, lon, idPoi, com); goodChild = false; } else if (localName.equals("node") && !goodChild) { // reset the com value as it's not a poi, we don't need those // informations com = ""; } } COM: <s> when the node end tag is reached save the poi as item </s>
funcom_train/8405507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof MethodDescriptor)) { return false; } MethodDescriptor md = (MethodDescriptor)obj; return ( exact == md.exact && methodName.equals(md.methodName) && cls.equals(md.cls) && java.util.Arrays.equals(paramTypes, md.paramTypes) ); } COM: <s> checks for equality </s>
funcom_train/34525952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateSave() throws Exception { String result = XmlUtils.getStringFromDoc(doc); // System.out.println(result); String expected = "<?xml version=\"1.0\"?>\n" + "<tagesschau><unwatched isGroup=\"true\" title=\"watched\"/><unwatched isGroup=\"true\" title=\"unwatched\"/></tagesschau>"; assertEquals(expected, result); } COM: <s> test create save </s>
funcom_train/11745320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLockType() { // if this entity has an explicit lock, // no need to lookup inheritance hierarchy if (lockType != LOCK_TYPE_NONE) { return lockType; } ObjEntity superEntity = getSuperEntity(); return (superEntity != null) ? superEntity.getLockType() : lockType; } COM: <s> returns the type of lock used by this obj entity </s>
funcom_train/19372165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidFamilyNameBlank() { Contact contact = this.userPopulator.getContact1(); contact.setFamilyName(""); try { this.contactManager.update(contact); fail("FamilyName.length() == 0"); } catch (ValidationException ignore) { } catch (Exception e) { fail(e.getMessage()); } } COM: <s> attempt to update a code contact code with a blank </s>
funcom_train/41990569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double toPitch() { // This is a test for singularities double test = x*y + z*w; // Special case for north pole if (test > SINGULARITY_NORTH_POLE) return Math.PI/2; // Special case for south pole if (test < SINGULARITY_SOUTH_POLE) return -Math.PI/2; return Math.asin(2*test); } COM: <s> returns the pitch component of the quaternion if it is represented </s>
funcom_train/43191727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getStartButton() { if (startButton == null) { startButton = new JButton(); startButton.setBounds(new Rectangle(525, 15, 93, 31)); startButton.setText("Start"); startButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { GCAController.getInstance().StartGCA(); startButton.setEnabled(false); } }); } return startButton; } COM: <s> this method initializes start button </s>
funcom_train/21086211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void teach(LearningNeuralNetwork network, Statistics statistics) throws OCRTeachingException { patterns = createPatterns(network.getMaxOutputValue(), network.getMinOutputValue()); int i=0; float error; do { error = 0; for (Pattern pattern : patterns) { error += network.learn(pattern, LEARNING_RATE); } i++; } while (statistics.continueTeaching(i, error/patterns.size())); } COM: <s> theach the network </s>
funcom_train/50079368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startMethodCall(final long time) { this.callCount++; // if the method was already started (for this thread) we've // had a failure if ((this.methodCall.get() == null) || ((Long) this.methodCall.get()).longValue() < 0L) { this.methodCall.set(new Long(time)); } else { this.failures++; } } COM: <s> begins the method call tracking by placing the start time </s>
funcom_train/49756871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void upbDebug(String theMessage) { synchronized(messageBuffer) { messageBuffer.setLength(0); messageBuffer.append(dateTimeFormatter.format(new Date())); messageBuffer.append(' '); messageBuffer.append(theMessage); System.out.println(messageBuffer); } } COM: <s> internal to upb4 java debug logging primative </s>
funcom_train/39994935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (this.getState() != TaskState.Created) { throw new TweException("task " + this + " cannot be start again!"); } this.setStartTime(DateUtil.currentTime()); this.setState(TaskState.Started); // fire event EventManager.getEventManager().fireTaskStarted( new ProcessInstanceEvent(this.getProcessInstance(), this, this .getToken())); } COM: <s> start this task </s>
funcom_train/5446952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object restoreObject(byte buf[]){ Object object = null; try { ByteArrayInputStream bais = new ByteArrayInputStream(buf); InputStream is = getAlterMethod().getInputStream(bais); ObjectInputStream ois = new ObjectInputStream(is); object = ois.readObject(); ois.close(); is.close(); bais.close(); } catch (InvalidClassException ice) { ice.getMessage(); ice.printStackTrace(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); } return object; } COM: <s> converts a altered byte array into an object using current alter method </s>
funcom_train/49943633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editElement(final Object element, final int column) { if (fCellEditor != null) { applyEditorValue(); } setSelection(new StructuredSelection(element), true); Item[] selection = getSelection(); if (selection.length != 1) return; fTableItem = selection[0]; // Make sure selection is visible showSelection(); fColumnNumber = column; activateCellEditor(); } COM: <s> start editing the given element </s>
funcom_train/45750048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsExtensionalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Collective_isExtensional_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Collective_isExtensional_feature", "_UI_Collective_type"), OntoUMLPackage.Literals.COLLECTIVE__IS_EXTENSIONAL, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is extensional feature </s>
funcom_train/18844040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveData() { pdata.removeKeysPrefixed(getPrefix()); // Clear stale entries. int i = 0; Iterator myIterator = iterator(); while (myIterator.hasNext()) { String spec = (String) myIterator.next(); pdata.put(getPrefix(), i++, spec); } pdata.store(); } COM: <s> saves the state of this object to the persistent store </s>
funcom_train/15918010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Stmt checkIfSimpleBlock_(Stmt s) { Stmt the_one_stmt = null; if (s instanceof Block) { Block b = (Block) s; List<Stmt> l = b.statements(); if (l.size() == 1) the_one_stmt = (Stmt) l.get(0); } else { the_one_stmt = s; } return the_one_stmt; } COM: <s> returns the single statement that may be replaced for the atomic </s>
funcom_train/2023629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { if (e.getSource() == listTargets) { if ( (listTargets.getSelectedIndex() > -1) && (e.getButton() == MouseEvent.BUTTON1) && (e.getClickCount() == 2) ) { e.consume(); start(); } } } COM: <s> invoked when the mouse button has been clicked pressed and released on </s>
funcom_train/17963732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (super.equals(object) && object instanceof ArrowNeedle) { ArrowNeedle an = (ArrowNeedle) object; return this.isArrowAtTop == an.isArrowAtTop; } return false; } COM: <s> tests another object for equality with this object </s>
funcom_train/44482059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean select(Viewer viewer, Object parent, Object child) { if (!(child instanceof IxNode)) { Log.warn( "A non IxNode child was passed for internal resource filtration: "+child ); return false; } // note there is no short circuit here - this can be achieved by // removing the filter. IxEntry e = ((IxNode) child).getEntry(); String name = RDFXPlugin.RESOLVER.resolveName(e); return !e.equals(name); } COM: <s> p filters out resources nodes that have are </s>
funcom_train/5429477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearLinksFromRegion( TextRegion inRegion ) { if( mLinkMarkerList.size() > 0 ) { int start = inRegion.getStart(); int end = inRegion.getEnd(); for( int i=start; i<=end; i++ ) { mLinkMarkerList.set( i, null ); } updateDocument(); } } COM: <s> clears links from a region </s>
funcom_train/51556876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateFile1() throws Exception { echo("Testing testCreateFile1"); // prepare String resourcePath = "/test/testCreateFile1.xml"; CmsFile file = XmlContentEditorHelper.createFile(getCmsObject(), resourcePath, "onlineForm"); assertNotNull(file); CmsFile result = getCmsObject().readFile(resourcePath); assertNotNull(result); } COM: <s> test case for </s>
funcom_train/4388834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setVisibility(boolean bool) { this.labelFirstName.setVisibilityAllowed(bool); this.firstName.setVisibilityAllowed(bool); this.labelSurname.setVisibilityAllowed(bool); this.surname.setVisibilityAllowed(bool); this.labelMail.setVisibilityAllowed(bool); this.mail.setVisibilityAllowed(bool); this.labelPhone.setVisibilityAllowed(bool); this.phone.setVisibilityAllowed(bool); this.labelComment.setVisibilityAllowed(bool); this.comment.setVisibilityAllowed(bool); } COM: <s> set visibility group of components which are only for request form </s>
funcom_train/38528901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadList() { final JFileChooser fileChooser = new JFileChooser(lastFile); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.setFileFilter(new ExtensionFileFilter( new String[] { "lst" }, "List Files (*.lst)")); final int option = fileChooser.showOpenDialog(frame); if (option == JFileChooser.APPROVE_OPTION && fileChooser.getSelectedFile() != null) { readFileList(fileChooser.getSelectedFile()); } } COM: <s> load a list of items to sort from a file </s>
funcom_train/3703226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllActive(boolean flagActive) { Iterator it = map.iterator(); Access access; //// 1. Set active / inactive. while (it.hasNext()) { access = (Access) it.next(); access.setActive(flagActive); } //// 2. Force repaint. table.repaint(); } // of method COM: <s> set all as active or inactive </s>
funcom_train/48525926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Continuation removePending(int uid) { if (logger.level <= Logger.FINER) logger.log("Removing and returning continuation " + uid + " from pending table"); CancellableTask timer = (CancellableTask) timers.remove(new Integer(uid)); if (timer != null) timer.cancel(); return (Continuation) outstanding.remove(new Integer(uid)); } COM: <s> removes and returns the provided continuation from the pending table </s>
funcom_train/11075238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { NodePointer ptr = (NodePointer) super.clone(); if (parent != null) { ptr.parent = (NodePointer) parent.clone(); } return ptr; } catch (CloneNotSupportedException ex) { // Of course it is supported ex.printStackTrace(); } return null; } COM: <s> clone this node pointer </s>
funcom_train/19074078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeSet check() { // Get the parent's cehck messages. TreeSet checks = new TreeSet(); StreamInputSynapse inp; for (int i=0; i < inputs.size(); ++i) { inp = (StreamInputSynapse)inputs.elementAt(i); checks.addAll(inp.check()); } return checks; } COM: <s> check that parameters are set correctly </s>
funcom_train/24601945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetaData getClassImages(int index) { try { long id = ids[index]; int ref = md.getValueInt(MDLabel.MDL_REF, id); String blockName = Filename.getClassBlockName(ref); if (containsBlock(blockName)) { return new MetaData(blockName + Filename.SEPARATOR + filename); } } catch (Exception e) { e.printStackTrace(); } return null; } COM: <s> get the metadata with assigned images to this classes </s>
funcom_train/26318694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getVehiclesLeft(int playerId) { Player player = getPlayer(playerId); int remaining = 0; for (Entity entity : entities) { if (player.equals(entity.getOwner()) && entity.isSelectableThisTurn() && (entity instanceof Tank)) { remaining++; } } return remaining; } COM: <s> returns the number of vehicles that code player id code has not moved </s>
funcom_train/16102106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String rollAttr(){ //intro String ch=" "+attrib+ ((mod!=0)?( (mod>0)?"+"+mod:mod ):"")+":\t"; //roll int f = Challenge.dice(20); ch += "rolled: "+f; //calculate if(f==1){ //good roll ch += "automatic success"; }else if(f==20){ //bad roll ch += "automatic fail"; }else{ int over =attrValue - (f+mod); ch+=(over < 0)?" failed: missing "+Math.abs(over)+" points": " success: left over "+ over +" points"; } return ch; } COM: <s> execute attribute challenge </s>
funcom_train/7980349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long deepestUri() { // While shouldrun is true we can use info direct from the crawler. // After that our last snapshot will have to do. return shouldrun && this.controller != null && this.controller.getFrontier() != null ? controller.getFrontier().deepestUri() : deepestUri; } COM: <s> ordinal position of the deepest uri eligible </s>
funcom_train/13648052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeystoreCertificate getKeystoreCertificateByFingerprintSHA1NonNull(String fingerprintSHA1) throws Exception { KeystoreCertificate certificate = this.getKeystoreCertificateByFingerprintSHA1(fingerprintSHA1); if (certificate == null) { throw new Exception(this.rb.getResourceString("certificate.not.found.fingerprint", fingerprintSHA1)); } else { return (certificate); } } COM: <s> throws an exception if the requested certificate does not exist in the keystore </s>
funcom_train/5380784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCancelEnabled(boolean enabled) { fCancelEnabled = enabled; if (fProgressIsVisible && !fCancelButtonIsVisible && enabled) { showButton(); layout(); } if (fCancelButton != null && !fCancelButton.isDisposed()) fCancelButton.setEnabled(enabled); } COM: <s> controls whether the progress indication provides ui for canceling </s>
funcom_train/174129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void transferNamespaces(Element element) { Iterator i = declaredNamespaces.iterator(); while (i.hasNext()) { Namespace ns = (Namespace)i.next(); if (ns != element.getNamespace()) { element.addNamespaceDeclaration(ns); } } declaredNamespaces.clear(); } COM: <s> this will take the supplied code </s>
funcom_train/9437198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPushOptionIMAP() { Intent i = getTestIntent("Name", "imap://user:[email protected]", "smtp://user:[email protected]"); this.setActivityIntent(i); getActivityAndFields(); boolean hasPush = frequencySpinnerHasValue(Account.CHECK_INTERVAL_PUSH); assertFalse(hasPush); } COM: <s> test that imap accounts arent displayed with a push option </s>
funcom_train/50429641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getStateSetProbability(){ double probability = 1.0; for (int i = 0; i < network.size(); i++){ // try{ probability *= getProbabilityOfNodeGivenParents(network.getNodeAt(i)); /* } catch(BBNE_OutOfBounds e){ probability *= 1; }*/ } return probability; } COM: <s> get state set probability returns the probability of an instantiation by using </s>
funcom_train/13750327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canProgram() throws OneWireIOException, OneWireException { try { //synchronized (conn) { // send beginExclusive command getDataOutputStream().writeByte(CMD_CANPROGRAM); getDataOutputStream().flush(); // check return value for success checkReturnValue(); // next parameter should be the return from beginExclusive return getDataInputStream().readBoolean(); //} } catch (IOException ioe) { throw new OneWireException(COMM_FAILED + ioe.getMessage()); } } COM: <s> returns whether adapter can physically support 12 volt power mode </s>
funcom_train/26239897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayQuestionAt(int rowIndex) { if (rowIndex >= questionComboBox.getItemCount()) { guiLog.error("PresentationFrame: "+Messages.getString("PresentationFrame.cannotDisplayQuestionAtIndex")+rowIndex); //$NON-NLS-1$ //$NON-NLS-2$ } questionComboBox.setSelectedIndex(rowIndex); } COM: <s> display the question result pair of the sent question at the </s>
funcom_train/18844696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu getPopupMenu() { if (popupMenu == null) { popupMenu = new JPopupMenu(); JMenuItem clear = new JMenuItem(ClearAction.getInstance()); JMenuItem delete = new JMenuItem(DeleteEventAction.getInstance()); JMenuItem mark = new JMenuItem(MarkAction.getInstance()); JMenuItem unsetmark = new JMenuItem(UnsetMarkAction.getInstance()); popupMenu.add(clear); popupMenu.add(delete); popupMenu.add(unsetmark); popupMenu.add(mark); } return popupMenu; } COM: <s> gets the popup menu attribute of the view object </s>
funcom_train/11792932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Location createLocation(String country, String address) { logger.debug("createLocation started"); Location location = null; if (country != null || address != null) { location = objectFactory.createAuthorTypeLocation(); if (country != null) { location.setCountry(country); } if (address != null) { location.setAddress(address); } } logger.debug("Author country: " + country); logger.debug("Author address: " + address); logger.debug("createLocation finished"); return location; } COM: <s> creates an author location element </s>
funcom_train/22007965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if (o == null) return false; AbstractYKDocument d = null; try { d = (AbstractYKDocument)o; return title.equals(d.getTitle()); } catch (Exception ex){ log.info("Testing equality against " + o.toString() + ", a " + o.getClass().getName()); log.info(ex.getMessage()); } return false; } COM: <s> depends b only b on title </s>
funcom_train/51172368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document newDocument (String name, String publicId, String systemId) { Document doc = null; try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); doc = db.newDocument(); } catch (Exception ex) { doc = null; } return doc; } COM: <s> create a new document object with a specified doctype public id and </s>
funcom_train/33147765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFacetContext create(String facetName, IProfile profile, Object targetObject, FacetDescriptor facetDescriptor) { if (logger.isDebugEnabled()) logger.debug("create() : creating default context..."); DefaultFacetContext ctx = new DefaultFacetContext(facetName, profile, targetObject, facetDescriptor); if (logger.isDebugEnabled()) logger.debug("create() : OK returning " + ctx); return ctx; } COM: <s> creates a default facet context for passed parameters </s>
funcom_train/10510289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class getImplementationClass() throws ClassNotFoundException { String cName = this.classname; if (type != null) { cName = type.getImplementation(); } ClassLoader loader = (classpath == null) ? getClass().getClassLoader() // Memory leak in line below : getProject().createClassLoader(classpath); return Class.forName(cName, true, loader); } COM: <s> gets the class object associated with the mapper implementation </s>
funcom_train/28978085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object loadObject(Integer key) { ObjectInputStream input; try { if (refrences.isEmpty()) { return null; } if (cache.containsKey(key)) { // logger.info("access cache"); return cache.get(key); } else { // logger.info("access harddrive"); } input = new ObjectInputStream(new BufferedInputStream( new FileInputStream(refrences.get(key)))); Object o = input.readObject(); input.close(); input = null; cacheObject(o, key); return o; } catch (Exception e) { logger.error(e.getMessage(), e); } return null; } COM: <s> loads an object fromt he harddrive </s>
funcom_train/8420663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBibleSectionTerm(SearchBibleSection bibleSection) { switch (bibleSection) { case ALL: return ""; case OT: return SEARCH_OLD_TESTAMENT; case NT: return SEARCH_NEW_TESTAMENT; // case R.id.searchCurrentBook: // return "+["+currentBibleBook.getShortName()+"]; default: Log.e(TAG, "Unexpected radio selection"); return ""; } } COM: <s> get ot nt or all query limitation </s>
funcom_train/32129336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileNamePatternDescription() { String[] ext = (String[]) fFileNamePatterns .toArray(new String[fFileNamePatterns.size()]); Arrays.sort(ext); StringBuffer buf = new StringBuffer(); for (int i = 0; i < ext.length; i++) { if (i > 0) { buf.append(", "); //$NON-NLS-1$ } buf.append(ext[i]); } return buf.toString(); } COM: <s> returns a description for the file name patterns in the scope </s>
funcom_train/8420233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onOkay(View v) { Log.i(TAG, "Okay clicked"); // get the labels that are currently checked List<LabelDto> selectedLabels = getCheckedLabels(); //associate labels with bookmark that was passed in bookmarkControl.setBookmarkLabels(bookmark, selectedLabels); finish(); } COM: <s> finished selecting labels </s>
funcom_train/3090983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMouseListeners(DendrogramViewNode node) { this.addMouseMotionListener(node); DendrogramViewNode left = (DendrogramViewNode) node.getLeftChild(); DendrogramViewNode right = (DendrogramViewNode) node.getRightChild(); if (left != null) setMouseListeners(left); if (right != null) setMouseListeners(right); } COM: <s> all the dendrogram view nodes are mouselisteners that allow for each </s>
funcom_train/25705020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewDownload(final String key, final String fileName) { // TODO: enhancement: search for key in shared files, maybe add as shared file final FrostDownloadItem dlItem = new FrostDownloadItem(fileName, key); model.addDownloadItem(dlItem); // false if file is already in table } COM: <s> add a new download item to the download table model </s>
funcom_train/14661981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NumSelector getParticleNumSelector() { if (particleNumSelector == null) { particleNumSelector = new NumSelector(); particleNumSelector.setPreferredSize(new Dimension(100, 20)); particleNumSelector.setIntType(true); particleNumSelector.setNumber(100.0D); particleNumSelector.setEnabled(false); particleNumSelector.setRangeExpr("(0, Infinity)"); } return particleNumSelector; } COM: <s> this method initializes particle num selector </s>
funcom_train/37862927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reindex(Txn transaction, StoredNode reindexRoot, int mode) { if (reindexRoot == null) return; reindexRoot = broker.objectWith(new NodeProxy(reindexRoot.getDocument(), reindexRoot.getNodeId())); setDocument(reindexRoot.getDocument(), mode); getStreamListener(); IndexUtils.scanNode(broker, transaction, reindexRoot, listener); flush(); } COM: <s> re index all nodes below the specified root node using the given mode </s>
funcom_train/45645432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sayFailed(SceneModel scene,SceneMessage message,Reason reason){ if(this.logging) { System.err.println("("+this.tag+"): sayFailed("+scene+","+message+","+reason+")"); } } COM: <s> notification of the e institution about a message that has been </s>