__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44442899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class loadClass(String plugin, String className) throws ClassNotFoundException { Plugin p = getPlugin(plugin); if (p == null) { throw new ClassNotFoundException("The plugin " + plugin + " could not be located."); } return p.getClass().getClassLoader().loadClass(className); } COM: <s> load a class and instantiate that is accessable by the specified plugins </s>
funcom_train/28353876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getAvgPhase() { gaps = theCavity.getNodesOfType("RG"); double phase = 0.; int sum = 0; ProbeState state; Iterator itr = gaps.iterator(); while(itr.hasNext()) { RfGap gap = (RfGap) itr.next(); List elementGaps = theModel.elementsMappedTo(gap); IdealRfGap rfgap = (IdealRfGap) elementGaps.get(0); phase += rfgap.getPhase()*rad2deg; sum += 1; } return phase/sum; } COM: <s> find the average phase in the cavity </s>
funcom_train/3424257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BigDecimal getFieldAsBigDecimal(DatatypeConstants.Field f) { if (f == DatatypeConstants.SECONDS) { if (seconds != null) { return seconds; } else { return ZERO; } } else { BigInteger bi = (BigInteger) getField(f); if (bi == null) { return ZERO; } else { return new BigDecimal(bi); } } } COM: <s> p gets the value of the field as a </s>
funcom_train/16082522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connected(Messenger messenger, Identity identity) { identity.setStatus(MessagingConstants.STATUS_AVAILABLE); identity.setSigninTimestamp(new java.util.Date()); if (log.isDebugEnabled()) { log.debug(identity.getUsername() + "." + identity.getMessenger() + "." + identity.getSignin() + " connected."); } } COM: <s> successfully started a new messenger service session </s>
funcom_train/51144567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAperture(float aperture) throws IllegalArgumentException { if( Float.isNaN(aperture) ) { throw new IllegalArgumentException("Aperture cannot be Float.NaN. "); } if( aperture <= 0.0 ) { throw new IllegalArgumentException("Aperture cannot be <= 0.0 "); } this.aperture = aperture; } COM: <s> sets the aperture of the scope </s>
funcom_train/777458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJadeServiceSetGetJadeMXServerClassName() { JadeService jadeService = new JadeService(); final String JADEMX_SERVER_CLASS_NAME = "foo"; jadeService.setJadeMXServerClassName(JADEMX_SERVER_CLASS_NAME); String jadeMXServerClassName = jadeService.getJadeMXServerClassName(); assertEquals( JADEMX_SERVER_CLASS_NAME, jadeMXServerClassName ); } COM: <s> test access to jade mxserver class name </s>
funcom_train/12547927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assignItemsToState(Production[] items, State state) { Set itemSet = new HashSet(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < items.length; i++) { itemSet.add(items[i]); if (i != 0) sb.append('\n'); sb.append(items[i].toString()); } state.setLabel(sb.toString()); stateToItems.put(state, itemSet); itemsToState.put(itemSet, state); } COM: <s> assigns items to a particular state </s>
funcom_train/11731918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(MultiIndex index) throws IOException { if (doc == null) { try { doc = index.createDocument(id); } catch (RepositoryException e) { // node does not exist anymore log.debug(e.getMessage()); } } if (doc != null) { index.volatileIndex.addDocuments(new Document[]{doc}); } } COM: <s> adds a node to the index </s>
funcom_train/11641483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNullString() throws SQLException { assertEquals(null, rs2.getNullString()); // Set what gets returned to something other than the default String s = "hello, world"; rs2.setNullString(s); assertEquals(s, rs.getString(1)); assertEquals(s, rs.getString("column")); } COM: <s> tests the set null string implementation </s>
funcom_train/20885687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertPrefixContentualUniqueness(Collection<RbfEntryPoint> entryPoints) { Set<String> usedPrefixes = new HashSet<String>(); for (RbfEntryPoint anEntryPoint : entryPoints) { assertPrefixContextualUniqueness(anEntryPoint.getDesignator(), anEntryPoint.getDataTypeName(), null, usedPrefixes); } } COM: <s> assert that all prefixes are contextual unique </s>
funcom_train/34132515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLineForOffset( int off) { if (DEBUG) System.out.println( "InputPane.getLineForOffset( "+off+")"); int pos = editor.viewToModel( new Point( 0, off)); if ( pos >= 0) { Element root = editor.getDocument().getDefaultRootElement(); return root.getElementIndex( pos); } return -1; } COM: <s> gets line the indicated by the offset </s>
funcom_train/38416531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getFileStream( String filePath ) { if( inJar ) return this.getClass().getResourceAsStream( filePath ); else { try{ return new FileInputStream( filePath ); }catch( FileNotFoundException fe ) { Debug.signal(Debug.ERROR, this, fe ); return null; } } } COM: <s> to get an inputstream from a wanted file </s>
funcom_train/25807958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AwxLoginUserResponse login() { AwxDefaultLoginService loginInterface = (AwxDefaultLoginService)AwxRpc.getInstance().getServer( DEFAULT_LOGIN_SERVER ); AwxLoginUserResponse response = loginInterface.tryLoginUser( this.loginUser ); if( response.isAnswer() ) { this.menuConfiguration = response.getMenuConfiguration(); this.application.setMenuConfiguration( this.menuConfiguration ); this.application.goToMainMenu(); } return response; } COM: <s> try to login the user and retrieves the server response </s>
funcom_train/12737952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateAutoID(String name) { XView parent = getParent(); String id = ""; if (parent != null && parent.getID() != null) { id += parent.getID(); } if (name == null) { name = String.valueOf(getIndex()); } id += name; return id; } COM: <s> aut o id generation method using the parent id and a given name </s>
funcom_train/13596483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnRemoveGrapheme() { if (btnRemoveGrapheme == null) { btnRemoveGrapheme = new JButton(); btnRemoveGrapheme.setText(Messages .getString("GeneralUI.ButtonRemove")); // Generated // //$NON-NLS-1$ btnRemoveGrapheme .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeGrapheme(); } }); } return btnRemoveGrapheme; } COM: <s> this method initializes btn remove grapheme </s>
funcom_train/41152199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calcBagSize(Instances data) { int result; if (getBagSize() == 0.0) result = data.numInstances(); else if (getBagSize() < 0) result = (int) StrictMath.ceil(-getBagSize() * data.numInstances()); else result = (int) StrictMath.round(getBagSize()); return result; } COM: <s> calculates the bag size depending on the dataset </s>
funcom_train/8492003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancel() { if (cancel == null) { cancel = new JButton(); cancel.setBounds(new java.awt.Rectangle(159, 109, 78, 22)); cancel.setText("Cancel"); cancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setVisible(false); } }); } return cancel; } COM: <s> this method initializes cancel </s>
funcom_train/32734107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reassign() { // Collect data // Set properties to show resource is not engaged. this.disengage(); // Search for the next process to utilize this resource. this.nextProcessID = this.findNextProcess(); // Fire a property change for the process ID of the next process to notify the process. firePropertyChange(AbstractResource.NEXT_PROCESS_ID_NAME, null, this.nextProcessID); } COM: <s> carries out all actions to reassign the resource from the current process </s>
funcom_train/34856047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setEditor(IWorkbenchPage page, IEditorPart editorPart) { if (editorPart == null) { fEditorsByPage.remove(page); } else { fEditorsByPage.put(page, editorPart); } page.addPartListener(this); page.getWorkbenchWindow().addPageListener(this); } COM: <s> sets the editor to use to display source in the given page or </s>
funcom_train/3470509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pause() { if (isRunning() && !isPaused()) { isPaused = true; eventListener.stop(); if (currentReplayInputFilter != null) { currentReplayInputFilter.stop(); } glassPaneManager.setVisible(GlassPaneCompound.PSEUDO_MOUSE_PANE, false); glassPaneManager .setVisible(GlassPaneCompound.MARK_MODE_PANE, false); if (fastForward) { this.replayMode = oldReplayMode; oldReplayMode = null; setFastForward(false); } currentCompound = null; fireReplayEvent(new ReplayEvent(this, ReplayEvent.Type.PAUSED)); } } COM: <s> pauses the replay process </s>
funcom_train/48333708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCompleted(ThreadInfo ti) { Instruction nextPc = ti.getNextPC(); if (nextPc == null) { return ti.isTerminated(); } else { return (nextPc != this) && (ti.getStackFrameExecuting(this, 1) == null); } // <2do> how do we account for exceptions? } COM: <s> this is for listeners that process instruction executed but need to </s>
funcom_train/22929320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(String path) { Assert.notNull(path, "path"); String normalized = normalize(path); int separatorIndex = normalized.lastIndexOf(this.getSeparator()); return (separatorIndex == -1) ? normalized : normalized.substring(separatorIndex + 1); } COM: <s> returns the name of the file or directory denoted by this abstract </s>
funcom_train/14056829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRight(int y) { int right = 0; if(!this.leftFloat && y >= this.y && y < this.y + this.height) { right = this.offsetFromBorder; } FloatingBounds prev = this.prevBounds; if(prev != null) { int newRight = prev.getRight(y); if(newRight > right) { right = newRight; } } return right; } COM: <s> the offset from the right edge not counting padding </s>
funcom_train/10007298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getImageWidth(Image img) { double w = 0.0; for(int i=0; i<10; i++){ w = img.getWidth(imageLabel); TagUtil.pleaseWait(10); } if(w <= 0.0){ w = 600; } return (int)w; } COM: <s> returns the width of image </s>
funcom_train/8655235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnBuffer(CharacterBuffer buffer) { if (buffer.isExternal) { if (fExternalTop < fExternalBufferPool.length - 1) { fExternalBufferPool[++fExternalTop] = buffer; } } else if (fInternalTop < fInternalBufferPool.length - 1) { fInternalBufferPool[++fInternalTop] = buffer; } } COM: <s> returns buffer to pool </s>
funcom_train/12562105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String temp = "offset=" + offset + "\n" + child[0] + "\n"; for (int i = 0; i < NODE_ELEMENTS+1; i++) { temp += i + " " + key[i] + " " + value[i] + " " + child[i+1] + "\n"; } return temp; } COM: <s> returns a string representation of this node object </s>
funcom_train/7903914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyWaypointFiles(File gpxOutputDirectory) { // Get the new location where files related to these waypoints are/should be stored File trackDir = DataHelper.getTrackDirectory(trackId); if(trackDir != null){ Log.v(TAG, "Copying files from the standard TrackDir ["+trackDir+"] to the export directory ["+gpxOutputDirectory+"]"); FileSystemUtils.copyDirectoryContents(gpxOutputDirectory, trackDir); } } COM: <s> copy all files from the osmtracker external storage location to gpx output directory </s>
funcom_train/49249667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildPropertiesMembersInterface(JComboBox cb){ GraphFactory gf = (GraphFactory)cb.getSelectedItem(); HashMap hp = gf.getNeededProperties(); if(hp.isEmpty()){ JLabel noNeededProperties = new JLabel("No needed properties"); propertiesPanel.add(noNeededProperties); }else{ Iterator hpIterator = (hp.values()).iterator(); while (hpIterator.hasNext()){ DefaultValueTypeProperty dvtp = (DefaultValueTypeProperty)hpIterator.next(); createPropertieINput(dvtp); } } } COM: <s> create a properties members inteface from combo box </s>
funcom_train/34814098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean printBlocks(int[][] startStop, String chromosome, File file){ try{ String trunk = Misc.removeExtension(file.getCanonicalPath()); PrintWriter out = new PrintWriter( new FileWriter (new File (trunk+"_"+chromosome+".bed"))); for (int y=0; y< startStop.length; y++){ out.println(chromosome+"\t"+startStop[y][0]+ "\t" + startStop[y][1]); } out.close(); return true; } catch (Exception e){ e.printStackTrace(); return false; } } COM: <s> prints a file containing the block regions </s>
funcom_train/11010433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDescription() { if (!propsPart.getDescriptionProperty().hasValue()) return; Element elem = xmlDoc.getRootElement().element( new QName(KEYWORD_DESCRIPTION, namespaceDC)); if (elem == null) { // missing, we add it elem = xmlDoc.getRootElement().addElement( new QName(KEYWORD_DESCRIPTION, namespaceDC)); } else { elem.clearContent();// clear the old value } elem.addText(propsPart.getDescriptionProperty().getValue()); } COM: <s> add description property element if needed </s>
funcom_train/4523186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlightRow(TimeBarRow row) { if (row != _highlightedRow) { TimeBarRow oldRow = _highlightedRow; _highlightedRow = row; _tbvi.repaint(getRowBounds(_highlightedRow)); if (oldRow != null) { // repaint the row highlighted before _tbvi.repaint(getRowBounds(oldRow)); } } } COM: <s> highlight a row </s>
funcom_train/39915955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetButton2() { System.out.println("getButton2"); Page1 instance = new Page1(); Button expResult = null; Button result = instance.getButton2(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get button2 method of class timesheetmanagement </s>
funcom_train/10790008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConstantJoins(Object[] consts, Column[] pkCols) { Column[] cur = getConstantPrimaryKeyColumns(); for (int i = 0; i < cur.length; i++) removeJoin(cur[i]); if (consts != null) for (int i = 0; i < consts.length; i++) joinConstant(consts[i], pkCols[i]); } COM: <s> set the foreign keys constant joins </s>
funcom_train/20150879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMaxIntraClusterDistance(DistanceMeasure dist) { FeatureVector a; FeatureVector b; float maxIntraClusterDistance =0.0f; for (int i= 0 ; i<this.clusterelements.size() -1 ; i++){ a = this.clusterelements.get(i); for (int j = i+1 ; j<this.clusterelements.size(); j++){ b = this.clusterelements.get(j); float currDist = dist.calculate(a.getFeatures(), b.getFeatures()); if (currDist > maxIntraClusterDistance){ maxIntraClusterDistance = currDist; } } } return maxIntraClusterDistance; } COM: <s> this returns the maximum distance that exists between to feature vectors in </s>
funcom_train/38556872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NSArray selfAndAllLoadedChildren() { NSMutableArray loadedChildren = new NSMutableArray(); loadedChildren.addObject(this); if (!EOFaultHandler.isFault(this)) { if (!EOFaultHandler.isFault(this.children())) { Enumeration e = children().objectEnumerator(); C_Content child; while (e.hasMoreElements()) { child = (C_Content) e.nextElement(); loadedChildren.addObjectsFromArray( child.selfAndAllLoadedChildren()); } } } return loadedChildren; } COM: <s> retrieve an array consisting of the receiver and all </s>
funcom_train/14263025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setElement(String element) { elementText = element; // While we're at it, extract and set the reference identifier (rid) ridM.reset(element); if (ridM.find()) { rid = ridM.group(1); } else { rid = ""; } // Also set the element name } COM: <s> set the characters that make up he element </s>
funcom_train/9415043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getDataSize(int record_size) { record_size -= 5; // - (type + version + length + data_size) if (record_size > MAX_CIPHERED_DATA_LENGTH) { // the data of such size consists of the several packets return MAX_DATA_LENGTH; } if (activeReadState == null) { return record_size; } return activeReadState.getContentSize(record_size); } COM: <s> returns the upper bound of length of data containing in the record with </s>
funcom_train/7510610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyProcessed() throws IOException { if (lastLocus == null) { throw new IllegalStateException( "Internal error when applying processed module. Locus does not saved."); } STORE_FILTERED_IMAGE.start(); try { lastLocus.setFilteredImage(ModuleHelper.convertImageToRaw(this.lastProcessedImage)); lastLocus.setThumbImage(ModuleHelper.convertImageToRaw(this.lastThumbImage)); ModuleHelper.finalyzeParams(this.lastLocus); } finally { STORE_FILTERED_IMAGE.stop(); } } COM: <s> method must be called when you ready to save processed locus into </s>
funcom_train/32633461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addShadow(Identifier orig) { if (isPreserved() && !orig.isPreserved()) orig.setPreserved(); else if (!isPreserved() && orig.isPreserved()) setPreserved(); Identifier ptr = this; while (ptr.right != null) ptr = ptr.right; /* Check if orig is already on the ptr chain */ Identifier check = orig; while (check.right != null) check = check.right; if (check == ptr) return; while (orig.left != null) orig = orig.left; ptr.right = orig; orig.left = ptr; } COM: <s> mark that this identifier and the given identifier must always have </s>
funcom_train/41383270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prune(){ LinkedList<String> staleentries = new LinkedList<String>(); for ( DiscoverListEntry entry : _data.values() ){ if ( entry.isStale() ){ staleentries.add(entry.getDisplayName()); } } for ( String staleentryname : staleentries ){ remove(staleentryname); } } COM: <s> removes old values from the discover list </s>
funcom_train/965331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isRendererBorderRemovable(JComponent rendererComponent) { if (rendererComponent instanceof BasicComboBoxRenderer.UIResource) return true; Object hint = rendererComponent.getClientProperty(Options.COMBO_RENDERER_IS_BORDER_REMOVABLE); if (hint != null) return Boolean.TRUE.equals(hint); Border border = rendererComponent.getBorder(); return border instanceof EmptyBorder; } COM: <s> checks and answer whether the border of the given renderer component </s>
funcom_train/13391194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return (identifier + ":min=" + getMin() + ":max=" + getMax() + ":creat=" + getSize() + ":free=" + getFreedSize() + ":asgn=" + getAllocedSize() + ":audit=" + (getSize() - (getAllocedSize() + getFreedSize()))); } COM: <s> returns a string representation of the resource pool </s>
funcom_train/37483083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(Date serviceDate) throws Exception { for (int i = 0; i < list.size(); i++) { Service findService = (Service) list.get(i); if (findService.getServiceDate().equals(serviceDate)) { return i; } } Exception e = new Exception("The specified service " + "date could not be found."); throw e; } COM: <s> returns the index of the service with the specified date from the </s>
funcom_train/22439626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getExactMappedSubResources(final IResource resource) { Collection mapped = Collections.EMPTY_LIST; final String path = getProjectRelativePath(resource); for (Iterator i = getKeySet(_localFolderMappings).iterator(); i.hasNext();) { final String mappedPath = (String) i.next(); if (mappedPath.startsWith(path)) { if (mapped == Collections.EMPTY_LIST) { mapped = new ArrayList(4); } mapped.add(findResource(mappedPath)); } } return mapped; } COM: <s> returns a collection with all exact mapped subfolders for resource </s>
funcom_train/32871045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearExceptionCatchWatch(Class cls) { if (!isInitialized) throw new NotInitializedException("JVMAspectInterface.clearExceptionCatchWatch: jvmai not initialized"); if (cls == null) throw new NullPointerException("JVMAspectInterface.clearExceptionCatchWatch: null cls parameter"); synchronized(exceptionCatchMap) { doClearExceptionCatchWatch(cls); if (exceptionCatchMap.containsKey(cls)) exceptionCatchMap.remove(cls); else throw new WatchNotSetException(); } } COM: <s> clears a watch on a exception catch joinpoint </s>
funcom_train/22477528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEventListener(String eventType, Function listener, Object useCapture) { if (useCapture == Undefined.instance) { throw new CrosscheckError("null"); } if (useCapture == null) { useCapture = Boolean.TRUE; } boolean capture = ((Boolean) useCapture).booleanValue(); getBaseEventTarget().removeEventListener(eventType, listener, capture); } COM: <s> removes a listener function from the list of event handlers </s>
funcom_train/46735404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueUnitRef(DisplayModel valueUnitRef) { if (Converter.isDifferent(this.valueUnitRef, valueUnitRef)) { DisplayModel oldvalueUnitRef= new DisplayModel(this); oldvalueUnitRef.copyAllFrom(this.valueUnitRef); this.valueUnitRef.copyAllFrom(valueUnitRef); setModified("valueUnitRef"); firePropertyChange(String.valueOf(RECORDITEMS_VALUEUNITREFID), oldvalueUnitRef, valueUnitRef); } } COM: <s> quantitative values stored in the record item are measure in these units </s>
funcom_train/28224825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillCache(final int desiredCacheSize) { Controller.getProgress().reportCachePrefill( Math.min(desiredCacheSize, toc.size())); this.cacheSize = desiredCacheSize; Iterator<String> tocIt = toc.iterator(); while (tocIt.hasNext() && (cache.size() < desiredCacheSize)) { this.get(tocIt.next()); Controller.getProgress().reportCacheElementLoaded(); } Controller.getProgress().reportCachePrefillEnded(); } COM: <s> load the first desired cache size persisted elements to memory for faster </s>
funcom_train/14116557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void verifyOutput(final ProcessUtils pUtils) throws IOException, BinaryDiffException { if (pUtils.hasErrorOccured()) { // The binary checking code here might be useless... as it may // be output on the standard out. final String msg = pUtils.getErrorMessage(); if (isBinaryErrorMessage(msg)) { throw new BinaryDiffException(); } else { throw new IOException(msg); } } } COM: <s> verifies the process error stream </s>
funcom_train/32056711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPopSearchPath() { System.out.println("testPopSearchPath"); String path = "C:/435/TerpPresentSource/src/com/jgraph/pad/resources/"; ImageLoader il = new ImageLoader(); il.pushSearchPath(path); il.popSearchPath(); } COM: <s> test of pop search path method of class image loader </s>
funcom_train/9885832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashSet intersect(HashSet [] sets){ HashSet result = intersect(sets[0], sets[1]); if(sets.length == 2) return result; else{ for(int i = 2; i < sets.length; i++){ result = intersect(result, sets[i]); } } return result; } COM: <s> helper method to perform cluster intersections </s>
funcom_train/4403816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NeuronalNode getOutputNeuron(String __name) { for (int i = 0; i != _outputNeuronsList.size(); i++) if (((NeuronalNode) _outputNeuronsList.get(i)).getName() == __name) return (NeuronalNode) _outputNeuronsList.get(i); System.out.println("NeuronalNode.getOutputNeuron(.) - neuron \"" + __name + "\"not found."); System.exit(-1); return null; } COM: <s> return a specific output neuron with the name given as parameter slower </s>
funcom_train/28418706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pingTimeout(Controller client) { //TODO re-add //eventlog.toLog(3, 0, client.getCachedPrefix() + ":" + client.getCachedID() + " (" + client.getIP() + ") timed out"); // System.out.println(client.getID() + " timed out"); System.out.println(client.getIP() + " timed out"); disconnect(client); } COM: <s> sets the client as timed out </s>
funcom_train/1563946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OAuthMessage parseAuthHeader(OAuthMessage msg, HttpResponse resp) { if (msg == null) { msg = new OAuthMessage(null, null, null); } for (String auth : resp.getHeaders("WWW-Authenticate")) { msg.addParameters(OAuthMessage.decodeAuthorization(auth)); } return msg; } COM: <s> parse oauth www authenticate header and either add them to an existing </s>
funcom_train/29843731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isWriteable(File file) { if (file.exists()) { // Check the existing file. if (!file.canWrite()) { return false; } } else { // Check the file that doesn't exist yet. // Create a new file. The file is writeable if // the creation succeeds. try { file.createNewFile(); } catch (IOException ioe) { return false; } } return true; } COM: <s> checks if the application is allowed to write to the file </s>
funcom_train/37078908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PropertyScorePaint getPropertyScorePaint(FeatureProperty prop,boolean select){ Color color = getColor(prop,select); PropertyScorePaint scorePaint = (PropertyScorePaint)colorToScorePaint.get(color); if (scorePaint == null) { scorePaint = new PropertyScorePaint(color); colorToScorePaint.put(color,scorePaint); } return scorePaint; } COM: <s> the property score paint for the feature property and selection state is </s>
funcom_train/49202807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PasteViewRequest createPasteViewRequest() { PasteViewRequest pasteReq; ICustomData[] data = ClipboardManager.getInstance().getClipboardData( ClipboardCommand.DRAWING_SURFACE, ClipboardContentsHelper.getInstance()); if (data == null) { data = ClipboardManager.getInstance().getClipboardData( ClipboardManager.COMMON_FORMAT, ClipboardContentsHelper.getInstance()); } /* Create the paste request */ pasteReq = new PasteViewRequest(data); return pasteReq; } COM: <s> creates and returns the appropriate code paste view request code that </s>
funcom_train/44296381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertAxisEquals(final String name, final Unit<?> unit, final CoordinateSystemAxis axis) { assertNameEquals(name, axis); final Unit<?> axisUnit = axis.getUnit(); if (axisUnit != null) { // assertEquals(name, unit, axisUnit); } } COM: <s> verifies that the given axis has the expected properties </s>
funcom_train/48403885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDragRepositionStartHandler(com.smartgwt.client.widgets.events.DragRepositionStartHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DragRepositionStartEvent.getType()) == 0) setupDragRepositionStartEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DragRepositionStartEvent.getType()); } COM: <s> add a drag reposition start handler </s>
funcom_train/26353410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Packet createAddEntityPacket(int entityId) { final Entity entity = game.getEntity(entityId); final Object[] data = new Object[2]; data[0] = new Integer(entityId); data[1] = entity; return new Packet(Packet.COMMAND_ENTITY_ADD, data); } COM: <s> creates a packet detailing the addition of an entity </s>
funcom_train/15604792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deregisterPreferenceInterface(Object interfaceKey) { prefEditorsMap.remove(interfaceKey); String tmpString = classToNameMap.get(interfaceKey); if (tmpString!=null) { tabPane.remove(orderedEditorMap.get(tmpString)); classToNameMap.remove(interfaceKey); orderedEditorMap.remove(tmpString); } tabPane.repaint(); } COM: <s> removes the tab from the pane and also removes the item from the </s>
funcom_train/18787293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInOriginalsCache(Class clazz, Integer id) { assert ((clazz != null) && (id != null)); boolean isInOriginalsCache = false; if (cachedEnabled) { DataObjectId objectId = new DataObjectId(clazz, id); isInOriginalsCache = originalsCache.containsKey(objectId); } return isInOriginalsCache; } COM: <s> indicates if the object with the given identifier is in the originals </s>
funcom_train/17053940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchDisplayable(Alert alert, Displayable nextDisplayable) { // write pre-switch user code here Display display = getDisplay(); if (alert == null) { display.setCurrent(nextDisplayable); } else { display.setCurrent(alert, nextDisplayable); } // write post-switch user code here } COM: <s> switches a current displayable in a display </s>
funcom_train/12622796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int isConnected(){ logger.debug(">> ENTER IN ISCONNECTED"); if (dbconn!=null) { logger.debug("CONNECTION ACTIVED"); logger.debug("EXIT ISCONNETED <<"); return 1; } else { logger.debug("CONNECTION DISABLED"); logger.debug("EXIT DA ISCONNETED <<"); return 0; } } COM: <s> check if the db connection is activated </s>
funcom_train/17902541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startShowTimer() { final Runnable runner = new Runnable() { public void run() { showPanel(); } }; TimerTask showPanel = new TimerTask() { public void run() { EventQueue.invokeLater(runner); } }; timer = new Timer(); timerStarted = true; timer.schedule(showPanel, timeout); } COM: <s> creates and starts the set query text panel timer task </s>
funcom_train/4709248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long reset() { long currentTime; long elapsedTime; if (SUPPORT_NANO_TIME) { currentTime = System.nanoTime(); elapsedTime = (long) ((currentTime - startTime) / 1e6); } else { currentTime = System.currentTimeMillis(); elapsedTime = (currentTime > startTime) ? currentTime - startTime : 0; } startTime = currentTime; return elapsedTime; } COM: <s> reset start time </s>
funcom_train/31980378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspException { ServletRequest request = pageContext.getRequest(); String submittedValue = request.getParameter(param); if (submittedValue != null && submittedValue.length() > 0) { if (value != null) { // user has specified a value to match return value.equals(submittedValue) ? EVAL_BODY_INCLUDE : SKIP_BODY; } else if (minLength > 0) { // user has specified a minimum length return submittedValue.length() >= minLength ? EVAL_BODY_INCLUDE : SKIP_BODY; } else { return EVAL_BODY_INCLUDE; } } return SKIP_BODY; } COM: <s> does the parameter validation </s>
funcom_train/22232362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateNodeReferences(NodeReferenceTable referenceTable) { ClipRetained rt = (ClipRetained) retained; BoundingLeaf bl = rt.getApplicationBoundingLeaf(); // check for applicationBoundingLeaf if (bl != null) { Object o = referenceTable.getNewObjectReference(bl); rt.initApplicationBoundingLeaf((BoundingLeaf) o); } } COM: <s> callback used to allow a node to check if any scene graph objects </s>
funcom_train/16912189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void iterate() { if (inputsTrain != null) { som.iterate(); epochs.setText(Integer.toString(som.getEpochs())); learningRate.setText(Double.toString(som.getAlpha())); neighborhoodSize.setText(Double.toString(som.getNeighborhoodSize())); updateCompleted = true; bottomPanel.repaint(); } } COM: <s> iterate network training </s>
funcom_train/31873454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Main(String[] args){ constantsSetup(); this.options = optionsSetup(); System.out.println(APP_NAME+" version "+APP_VERSION); System.out.println("\n"+APP_BANNER+"\n"); if(NEED_OPTIONS && args.length < 1){ System.out.println("Please specify appropriate command line options.\n"); displayUsage(); System.exit(0); } bootstrap(args); start(); } COM: <s> main method for the template </s>
funcom_train/782349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hc = 13 * sort; if (sort == Type.OBJECT || sort == Type.ARRAY) { for (int i = off, end = i + len; i < end; i++) { hc = 17 * (hc + buf[i]); } } return hc; } COM: <s> returns a hash code value for this type </s>
funcom_train/25855529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runCreateIndex() throws IOException { String f1 = "e:/user/jqchen/mapping_count/dbpedia_freebase/dbpedia.temp"; String f2 = "e:/user/jqchen/mapping_count/dbpedia_freebase/freebase.temp"; String idir1 = "e:/user/jqchen/index1"; String idir2 = "e:/user/jqchen/index3"; String output = "e:/user/jqchen/mapping_count/dbpedia_freebase/output"; this.createIndex(f1, idir1); //this.createIndex(f2, idir2); String filename = "e:/user/jqchen/mapping_count/dbpedia_freebase/dbpediaFreebaseInstanceMap.txt"; /* this.scanLinkFile2(filename, idir1, idir2,output); */ } COM: <s> run the create index </s>
funcom_train/3838088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RSSChannel toChannel(Node document) throws Exception { RSSChannel channel = new RSSChannel(); Node channelNode = XPathAPI.selectSingleNode(document, RSS_CHANNEL); channel.setDescription(XPathAPI.eval(channelNode,"description").str()); channel.setLink(XPathAPI.eval(channelNode,"link").str()); channel.setTitle(XPathAPI.eval(channelNode,"title").str()); channel.setItems(toItems(document)); return channel; } COM: <s> rss is organized first by channel then by item s </s>
funcom_train/8140398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ActionForward forward(ActionMapping mapping, HttpServletRequest request, String[] names, Object[] results, String forwardTag) { if (names != null && results != null && names.length == results.length) { for (int i = 0; i < names.length; i++) request.setAttribute(names[i], results[i]); } return mapping.findForward(forwardTag); } COM: <s> forward tag request </s>
funcom_train/25783260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPasswordHash() { String pwdHash = MyNotes.properties.getStringValue("pwd-hash"); if (pwdHash == null) { pwdHash = DEFAULT_HASH; MyNotes.properties.put("pwd-hash", DEFAULT_HASH, Property.PT_STRING); } return pwdHash; } COM: <s> returns current passwords hash </s>
funcom_train/2903718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String tmp = "Menu: separator="+separator+" "; if(draw != null){ tmp += draw.toString(); } Object[] is = getItems(); if((is!=null) && (is.length>0)){ tmp += "\n"; for(int i=0; i<is.length; i++){ tmp += is[i].toString() + "\n"; } } return tmp; } COM: <s> a string representation of this menu </s>
funcom_train/48477394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addRowOverHandler(com.smartgwt.client.widgets.grid.events.RowOverHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.RowOverEvent.getType()) == 0) setupRowOverEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.RowOverEvent.getType()); } COM: <s> add a row over handler </s>
funcom_train/16910834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runOnce() { updates.submit(new Runnable() { public void run() { notifyWorkspaceUpdateStarted(); snychManager.queueTasks(); try { doUpdate(); } catch (Exception e) { // TODO exception handler e.printStackTrace(); } snychManager.releaseTasks(); snychManager.runTasks(); notifyWorkspaceUpdateCompleted(); } }); } COM: <s> submits a single task to the queue </s>
funcom_train/44868788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defaultConcreteMapType(String template) throws XDocletException { try { String type = getEngine().outputOf(template); String concreteType = getDefaultConcreteMapType(type); getEngine().print(concreteType); } catch (TemplateException e) { throw new XDocletException(e, "Exception processing contents of defaultConcreteCollectionType tag"); } } COM: <s> output the default concerte map class for the map class generated by the </s>
funcom_train/2576551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(AxisChangeEvent event) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == AxisChangeListener.class) { ((AxisChangeListener) listeners[i + 1]).axisChanged(event); } } } COM: <s> notifies all registered listeners that the axis has changed </s>
funcom_train/19216698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector createRowData(RssItem item) { Vector result = new Vector(); result.add(item.getPubDate() == null ? "(No date)" : DF.format(item.getPubDate())); result.add(item.getTitle() == null ? "(No title)" : item.getTitle()); return result; } COM: <s> creates the row data for the given item </s>
funcom_train/3276958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { className = name.replace('/', '.'); if (criteria.isMatch(className, access)) { defaultClassVisitor = injector; LOG.debug("not filtering class " + className); } else { defaultClassVisitor = bypass; } defaultClassVisitor.visit(version, access, name, signature, superName, interfaces); } COM: <s> when this method is called method criteria </s>
funcom_train/16912842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double sigm(final double input, Neuron neuron) { double upperBound = neuron.getUpperBound(); double lowerBound = neuron.getLowerBound(); double diff = upperBound - lowerBound; return diff * (1 / (1 + Math.exp(-(slope * input / diff)))) + lowerBound; } COM: <s> returns the results of the standard sigmoidal function </s>
funcom_train/13867814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createElement(String tagName) { try { return (Element) NodeImpl.build(XMLParserImpl.createElement( this.getJsObject(), tagName)); } catch (JavaScriptException e) { throw new DOMNodeException(DOMException.INVALID_CHARACTER_ERR, e, this); } } COM: <s> this function delegates to the native method code create element code </s>
funcom_train/15896952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getEstimate(String objname) throws RWebServiceException, RSrvException { loadModel(objname, "htest", connection); REXP ret = connection.eval(objname + "$estimate"); if (ret == null) throw new RWebServiceException("Couldnt get the result of the t-test"); if (!maintainState) connection.close(); return ret.asDouble(); } COM: <s> gets the estimated mean of difference in means </s>
funcom_train/17025355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(BaseElement child) { if(child instanceof Artifact) { this.getArtifact().add((Artifact) child); } else if(child instanceof FlowElement) { this.getFlowElement().add((FlowElement) child); } if(child instanceof FlowElement) { ((FlowElement) child).setProcess(this); } } COM: <s> adds the child to the processs flow elements if possible </s>
funcom_train/15408303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSummary() { StringBuilder sb = new StringBuilder(); sb.append("FindIds exeMicros[").append(executionTimeMicros) .append("] rows[").append(rowCount) .append("] type[").append(desc.getName()) .append("] predicates[").append(predicates.getLogWhereSql()) .append("] bind[").append(bindLog).append("]"); return sb.toString(); } COM: <s> return a summary description of this query </s>
funcom_train/12561382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { bounds = new int[4]; bounds[X] = 0; bounds[Y] = 0; bounds[W] = ScreenSkin.WIDTH; bounds[H] = ScreenSkin.HEIGHT; dirtyBounds = new int[4]; dirtyBoundsCopy = new int[4]; boundsCopy = new int[4]; cleanDirtyRegions(); // IMPL_NOTE : center the background image by default } COM: <s> finish initialization of this clayer </s>
funcom_train/12118961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC71(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.cercaJToolBarButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c71 cerca jtool bar button </s>
funcom_train/28339452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double totalCharge() { double Q; // total ensemble charge Iterator iter; // ensemble particle iterator Q = 0.0; iter = this.iterator(); while (iter.hasNext()) { Particle p = (Particle)iter.next(); Q += p.getCharge(); } return Q; }; COM: <s> get the total charge of the ensemble </s>
funcom_train/42718993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void read() { try { FileInputStream fstream = new FileInputStream("src/bgl/compiler/config/type_ontology"); DataInputStream in = new DataInputStream(fstream); BufferedReader reader=new BufferedReader(new InputStreamReader(in)); String line; //add a type name for each line while ((line = reader.readLine()) != null) { if(line.trim().length()==0) continue; this.addType(line); } in.close(); } catch(IOException ioe) { System.out.println(ioe.getMessage()); } } COM: <s> adds the names of types specified in src bgl compiler config type ontology </s>
funcom_train/14246143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void myDoubleClick(int tab) { //needs-more-work: should fire its own event and ProjectBrowser //should register a listener //System.out.println("double: " + _tabs.getComponentAt(tab).toString()); JPanel t = (JPanel) _tabPanels.elementAt(tab); if (t instanceof TabSpawnable) ((TabSpawnable)t).spawn(); } COM: <s> called when the user clicks twice on a tab </s>
funcom_train/45289605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanFractionAndSuffix(int pos) { radix = 10; scanFraction(pos); if (reader.ch == 'f' || reader.ch == 'F') { reader.putChar(true); tk = TokenKind.FLOATLITERAL; } else { if (reader.ch == 'd' || reader.ch == 'D') { reader.putChar(true); } tk = TokenKind.DOUBLELITERAL; } } COM: <s> read fractional part and d or f suffix of floating point number </s>
funcom_train/50912066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RealArray euclideanColumnLengths() { RealArray fa = new RealArray(cols); for (int i = 0; i < cols; i++) { try { fa.setElementAt(i, this.euclideanColumnLength(i)); } catch (Exception e) { e.printStackTrace(); throw new EuclidRuntimeException("BUG " + e); } } return fa; } COM: <s> get array of euclidean column lengths </s>
funcom_train/29829124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendSubscriptionRequest(JID jid) { if (connection == null || jid == null) return; PresenceBuilder presenceBuilder = new PresenceBuilder(); presenceBuilder.setToAddress(jid); presenceBuilder.setType("subscribe"); try { connection.send(presenceBuilder.build()); } catch (InstantiationException e) { BSCore.logEvent(name, "presence builder failed\n"); } } COM: <s> sends subscription request to given jid </s>
funcom_train/9889024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AnnoAttributeObj getElementAnnotationObject(int row, String attr) { if (featuresList.size() == 0) { return null; } ISlideData slideData = (ISlideData)featuresList.get(0); return slideData.getSlideMetaData().getAnnotationObj(row, attr); } COM: <s> raktim annotation model method </s>
funcom_train/38857119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Method checkCache(final Method method, final List<Class<?>> paramSignature){ try{ cacheGate.readLock().lock(); Method cachedMethod = null; final Map<List<Class<?>>,Method> map = methodCache.get(method); if(map != null){ cachedMethod = map.get(paramSignature); } return cachedMethod; }finally{ cacheGate.readLock().unlock(); } } COM: <s> check the cache incase this method has already been called once </s>
funcom_train/47135657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOptionTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Option_optionType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Option_optionType_feature", "_UI_Option_type"), TradingPackage.Literals.OPTION__OPTION_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the option type feature </s>
funcom_train/26345221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(String s) { parent = s; if (absolutePath.indexOf("/") != -1) { if (parent.endsWith("/")) { absolutePath = parent + name; } else { absolutePath = parent + "/" + name; } } else if (parent.endsWith("\\")) { absolutePath = parent + name; } else { absolutePath = parent + "\\" + name; } } COM: <s> sets the parent attribute of the ftp file object </s>
funcom_train/3520043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate(String sql) throws RDBException{ logRDB.debug("executeUpdate " + sql); try { if (statement[0] == null) { if (conn == null) { throw new RDBConnectException("Database is closed for " + sql); } statement[0] = conn.createStatement(); } return statement[0].executeUpdate(sql.trim()); } catch (SQLException ex) { throw new RDBException("executeUpdate failed for " + sql +" "+ ex.getMessage()); } } COM: <s> execute a sql statement that does not return a result </s>