__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44838527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findEntities(String hqlStatement) throws EntityException { List result = null; try { result = entityManager.findEntities(hqlStatement); } catch (RemoteException rex) { System.out.println("Error on the remote server" + rex); throw new EntityException("Error on the remote server" + rex); } return result; } COM: <s> finds entities by hql query </s>
funcom_train/45320617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJt22() { if (jt22 == null) { jt22 = new JTextField(); jt22.setBounds(34, 30, 28, 25); jt22.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent e) { jugadorColoca(jt22, (byte) 1, (byte) 1); } }); } return jt22; } COM: <s> this method initializes j text field4 </s>
funcom_train/25582347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog(){ int ret = JOptionPaneEx.showConfirmDialog(workspace, "Reasoner Property", this, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, this.reasonerComboBox); if (ret == JOptionPane.OK_OPTION) { reasonerID = (String) reasonerComboBox.getSelectedItem(); if(reasonerID == null){ return; } selectedReasonerID = reasonerID; selectedReasonerField.setText(reasonerID); updateConfigurationPanel(); } } COM: <s> display the dialog panel </s>
funcom_train/48664527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQueries(ResourceId id, QueryDef[] q) { ArtefactInfoContainerImpl qc = model.getArtefactContainerImplForResource(id, true); if(qc == null) { if(logger.isTraceEnabled()) { logger.error("Couldn't find query container for: " + id); } return; } qc.setQueries(q, model.isLogReplayMode()); model.refreshNode(id); } COM: <s> sets the queries associated with the given resource </s>
funcom_train/20582117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertElement(ConflictSetElement element) { int ruleIndex = element.getRuleIndex(); ensureFireableRulesCapacity(ruleIndex + 1); Vector rules = (Vector) fireableRules.elementAt(ruleIndex); if (!rules.contains(element)) { rules.addElement(element); elementAdded(element); // Callback method size++; } Integer aux = new Integer(ruleIndex); if (!history.contains(aux)) { history.insertElementAt(aux, 0); } } COM: <s> inserts a rule instantiation </s>
funcom_train/28760906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexOutput createOutput(String name) { ensureOpen(); RAMFile file = new RAMFile(this); synchronized (this) { RAMFile existing = (RAMFile)fileMap.get(name); if (existing!=null) { sizeInBytes -= existing.sizeInBytes; existing.directory = null; } fileMap.put(name, file); } return new RAMOutputStream(file); } COM: <s> creates a new empty file in the directory with the given name </s>
funcom_train/21633394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void learnManhattan(final double learningRate) { this.learningType = TrainFlatNetworkOpenCL.LEARN_MANHATTAN; this.learningRate = learningRate; final Map<String, String> options = getOptions("LEARN_MANHATTAN"); this.kernel = new KernelNetworkTrain(this.profile.getDevice(), this.network, this.training, 1); this.kernel.compile(options, this.profile, this.network); this.kernel.getTempDataArray()[0] = (float) learningRate; } COM: <s> learn using the manhattan update rule </s>
funcom_train/9699932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureProjectLoaded() { if (project != null) { return; // Already loaded } try { project = Utils.createTestRbProject("jsp/mapping"); if (project == null) { fail("Failed to load jsp/mapping test project"); } } catch (Exception e) { throw new ChainableRuntimeException( "Failed to load jsp/mapping test project", e); } } COM: <s> ensures that test project is loaded </s>
funcom_train/45483423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createNew() throws ParserConfigurationException { logger.debug("entering createNew"); try { this.list = new PWList(); } catch (SysInvalidArgumentException ex) { String msg = "Cannot instantiate PWList, this is a bug"; logger.fatal(msg, ex); throw new SysRuntimeException(msg, ex); } this.filePw = null; this.openedFile = null; logger.debug("exiting createNew"); viewer.refresh(); } COM: <s> creates a new empty pwlist </s>
funcom_train/20624436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void out(int[][] res) { for (int i = 0; i < res.length; i++) { Categories.data().info("{ "); for (int j = 0; j < res[i].length; j++) { Categories.data().info(res[i][j] + " "); } Categories.data().info(" }"); } } COM: <s> a public convenience method to sysout log4j now an int </s>
funcom_train/40338853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPathExpressionNextMatchNonRecursive() { GraphModel graph = new GraphModel(); GraphNode[] nodes = fillGraphModel(graph); PathExpression pathExpression = createPathExpression(false, false, false); Collection<GraphNode> output = pathExpression.nextMatch(graph, buildSingleSet(nodes[0])); assertEquals(1, output.size()); assertGraphContainsElement(output, nodes, 6); } COM: <s> tests non recursive version of </s>
funcom_train/50755806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getDocument(HttpMethod method) throws Exception { String response = getResponse(method); XMLInputSource source = new XMLInputSource(null, null, null, new StringReader(response), null); _parser.parse(source); Document doc = _parser.getDocument(); return doc; } COM: <s> execute the method and gets the response as a xml document </s>
funcom_train/34564338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLevelPerY(final int y) { final double f = (y - topMargin) / ((float) levelDistance + nodeHeight); final double b = nodeHeight / (float) (levelDistance + nodeHeight); return f <= ((int) f + b) ? (int) f : -1; } COM: <s> determines the level of a y axis value </s>
funcom_train/51704527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(Level level, String keyOrMessage, Object argument){ if (logger.isLoggable(level)){ try { logger.log(level, MessageFormat.format( rb.getString(keyOrMessage), new Object[]{argument})); } catch (MissingResourceException mre) { logger.log(level, MessageFormat.format( keyOrMessage, new Object[]{argument})); logger.log(Level.FINEST, mre.getLocalizedMessage()); } } } COM: <s> logs a message with a dynamic argument </s>
funcom_train/32648981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRightGroup() { GridData gridData1 = new GridData(); gridData1.grabExcessHorizontalSpace = true; gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData1.grabExcessVerticalSpace = true; rightGroup = new Group(this, SWT.NONE); rightGroup.setText("Background"); rightGroup.setLayout(new FillLayout()); createBackgroundConfigurator(); rightGroup.setLayoutData(gridData1); } COM: <s> this method initializes right group </s>
funcom_train/926622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buff = new StringBuffer("FourCCWrapper[fourCC="); buff.append(fourCC); buff.append(", name="); buff.append(name); buff.append(", owner="); buff.append(owner); buff.append("]"); return buff.toString(); } COM: <s> generates a string representation of this code four ccwrapper code </s>
funcom_train/45018527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElectricFieldPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXsampleElectricField_electricField_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXsampleElectricField_electricField_feature", "_UI_NXsampleElectricField_type"), NexusPackageImpl.Literals.NXSAMPLE_ELECTRIC_FIELD__ELECTRIC_FIELD, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the electric field feature </s>
funcom_train/21969345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int postService ( Request req, Response resp){ synchronized (this){ if ( _tmpReqStore.contains(req)){ /* Operation time */ _processTime = System.currentTimeMillis() - ((Long)_timeStamp.elementAt(_tmpReqStore.indexOf(req))).longValue(); /* We clean the store */ _timeStamp.removeElementAt(_tmpReqStore.indexOf(req)); _tmpReqStore.removeElement(req); } } return 0; } COM: <s> after things gets executed we make some clean and calculate some </s>
funcom_train/17202532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isBarrierClean(Instruction barrier) { OsrTypeInfoOperand typeInfo = OsrBarrier.getTypeInfo(barrier); int totalOperands = countNonVoidTypes(typeInfo.localTypeCodes); totalOperands += countNonVoidTypes(typeInfo.stackTypeCodes); return (totalOperands == OsrBarrier.getNumberOfElements(barrier)); } COM: <s> verify barrier is clean by checking the number of valid operands </s>
funcom_train/50294922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isTestClass( File f ) { String name = f.getName(); return name.endsWith(".class") // Java class files ... && name.startsWith("Test_") // ... beginning with Test_ ... && name.indexOf('$') < 0; // ... that are not inner classes } COM: <s> is f a class file containing a test case the default implementation </s>
funcom_train/2516881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessLevel accessLevel(String propertyName) { AccessLevel accessLevel = AccessLevel.FULL_ACCESS; List<UserAccessPropertyRule> rules = propertyRules(propertyName); if (rules != null) { for (UserAccessPropertyRule rule : rules) { AccessLevel newAccessLevel = rule.accessLevel(); if (accessLevel.compareTo(newAccessLevel) < 0) { accessLevel = newAccessLevel; } } } return accessLevel; } COM: <s> returns the access level for the specified property </s>
funcom_train/46736933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermId(Long termId) { if (!(this.termId.longValue() == termId.longValue())) { Long oldtermId= 0L; oldtermId = this.termId.longValue(); this.termId = termId.longValue(); setModified("termId"); firePropertyChange(String.valueOf(TERMDETAILS_TERMID), oldtermId, termId); } } COM: <s> foreign key to records on term id </s>
funcom_train/7751303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJList() throws IOException { if (jList == null) { // Carico la lista DirectoryLoader d = new DirectoryLoader(); Iterator<String> i = d.getDirectoriesShared().iterator(); listModel = new DefaultListModel(); while (i.hasNext()) { String text = i.next(); // System.out.println(text); listModel.addElement(text); } jList = new JList(listModel); jList.setName("directories shared"); jList.setToolTipText("Directories Shared"); // i.next(); } return jList; } COM: <s> this method initializes j list </s>
funcom_train/28591534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void guaranteePreferredSize() { Dimension preferredSize = getPreferredSize(); // Dimension buttonspreferredSize = buttonPane.getPreferredSize(); Dimension size = getSize(); // Dimension buttonsSize = buttonPane.getSize(); setSize(Math.max(preferredSize.width, size.width), Math.max(preferredSize.height, size.height)); validate(); } COM: <s> guarantee that the size of this dialog is greater than the preferred size </s>
funcom_train/29372580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFormattedTextField getJTextField_TL() { if (jTextField_TL == null) { try { jTextField_TL = new JFormattedTextField(new MaskFormatter("***")); } catch (ParseException e) { e.printStackTrace(); } jTextField_TL.setBounds(new Rectangle(140, 90, 40, 20)); } return jTextField_TL; } COM: <s> this method initializes j text field tl </s>
funcom_train/10228977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateSubviewName() { Collection names = component.subviewNames(); String base = "JStapleSubview"; for (int i = 1; i < 10000; i++) { String name = base + i; if (!names.contains(name)) { return name; } } throw new STException( "Can't come up with unique name... Giving up to prevent endless loop."); } COM: <s> generates a name for the subview that is not in use yet </s>
funcom_train/37457022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readDataset(String datasetFile) throws DatasetException { // always clear previous content clearDatasetContent(); // The file should not be null if (datasetFile == null){ throw new IllegalArgumentException("The name of the file containing the dataset is null and we can't read the dataset."); } File file = new File (datasetFile ); extractDatasetFromFile(file); } COM: <s> read the file containing the dataset content </s>
funcom_train/11005197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSlidePersistAtom(SlidePersistAtom spa) { // Add the new SlidePersistAtom at the end appendChildRecord(spa); SlideAtomsSet newSAS = new SlideAtomsSet(spa, new Record[0]); // Update our SlideAtomsSets with this SlideAtomsSet[] sas = new SlideAtomsSet[slideAtomsSets.length+1]; System.arraycopy(slideAtomsSets, 0, sas, 0, slideAtomsSets.length); sas[sas.length-1] = newSAS; slideAtomsSets = sas; } COM: <s> add a new slide persist atom to the end of the current list </s>
funcom_train/48817072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String replaceString(String s, String search, String replace) { int idx = s.indexOf(search); while (idx != -1) { String first = s.substring(0, idx); String last = s.substring(idx + search.length()); s = first + replace + last; idx = s.indexOf(search); } return s; } COM: <s> replace all instances of search in s with replace </s>
funcom_train/20966518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EuclideSheet addNewSheet(EuclideDoc doc){ // Find a valid name for the new sheet int i=1; String name = "Sheet " + i; boolean ok=false; while(!ok){ ok = true; for(EuclideSheet sheet : doc.getSheets()) if(sheet.getName().equals(name)){ ok = false; name = "Sheet " + (++i); break; } } // Creates a new sheet, with a new layer EuclideSheet sheet = new EuclideSheet(doc, name); sheet.addLayer(new EuclideLayer("layer 0")); // add to current doc doc.addSheet(sheet); return sheet; } COM: <s> creates a new sheet adds it to the document and return the created </s>
funcom_train/257003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void centreWindow() { Toolkit t = Toolkit.getDefaultToolkit(); Dimension d = t.getScreenSize(); Point p = new Point((d.width - (this.getWidth())) / 2, (d.height - (this.getHeight())) / 2); this.setLocation(p); } COM: <s> centers the window on the screen </s>
funcom_train/42635098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPictures() throws Exception { String odtFile = "src/test/resources/odt/simple-image.odt"; String picture = OpenDocumentUtils.PICTURES_FOLDER_NAME + "/" + "10000000000000A500000026FE439750.jpg"; ArrayList<String> expResult = new ArrayList<String>(); expResult.add(picture); ArrayList result = OpenDocumentUtils.getPictures(odtFile); assertEquals(expResult, result); } COM: <s> test of open document utils </s>
funcom_train/43407897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTxtProcessID() { if (txtProcessID == null) { txtProcessID = new JTextField(); txtProcessID.setBounds(new java.awt.Rectangle(77,7,92,22)); // FIXME bug, of can't update ingredience tab // !!!!!!! Very hard to find this bug txtProcessID.setText(IngredienceFilterManager.getProcessIDforIngredience() +""); txtProcessID.setEditable(false); } return txtProcessID; } COM: <s> this method initializes j txt process id </s>
funcom_train/31201372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countAll() throws SystemException { Object[] finderArgs = new Object[0]; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, finderArgs, this); if (count == null) { Session session = null; try { session = openSession(); Query q = session.createQuery(_SQL_COUNT_TILECATEGORY); count = (Long)q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs, count); closeSession(session); } } return count.intValue(); } COM: <s> counts all the tile categories </s>
funcom_train/31983951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearFailedTransfer(String communityId, String resourceId) { String requestString = communityId + "/" + resourceId; synchronized(failedFileTransfers) { Iterator<String> peerIds = failedFileTransfers.keySet().iterator(); while(peerIds.hasNext()) { List<String> peerRequests = failedFileTransfers.get(peerIds.next()); peerRequests.remove(requestString); if(peerRequests.isEmpty()) { peerIds.remove(); } } } } COM: <s> removes all instances of a cached push request for a given community and </s>
funcom_train/3652670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getNGrams(String input) { // remove all non-alphanum characters int len = input.length(); List ngrams = new ArrayList(); String ngram = null; for (int ii = 0; ii <= (len - this.nGramSize); ii++) { ngram = input.substring(ii, ii + this.nGramSize); ngrams.add(ngram); } return ngrams; } COM: <s> for a given string return a list of strings representing </s>
funcom_train/2023055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifySizeListeners() { Iterator iter; Dimension size; SizeChangeEvent event; size = new Dimension(getPreferredSize()); event = new SizeChangeEvent(this, size); iter = sizeListeners.iterator(); while (iter.hasNext()) ((SizeChangeListener) iter.next()).sizeChanged(event); } COM: <s> notifies all the size listeners about the size change </s>
funcom_train/3934162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addClass(String chargroup) { if (chargroup.length() > 0) { char equivChar = chargroup.charAt(0); char[] key = new char[2]; key[1] = 0; for (int i = 0; i < chargroup.length(); i++) { key[0] = chargroup.charAt(i); classmap.insert(key, 0, equivChar); } } } COM: <s> add a character class to the tree </s>
funcom_train/14605933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasOpenItems() { Project subprojects[] = this.getSubprojects(SortCriteria.DEFAULT); for (Project subproject: subprojects) { if (!subproject.isClosed() || subproject.hasOpenItems()) { return true; } } for (Task task: getTasks(SortCriteria.DEFAULT)) { if (!task.isClosed()) { return true; } } return false; } COM: <s> checks if the project has any open items tasks activities subprojects under </s>
funcom_train/28603388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getInitializationString(Class type,ArrayList classes) { String initString = ""; if(type.getName().equals("java.lang.String")){ initString = " = new String()"; }else if(type.equals(Boolean.TYPE)){ initString = " = new Boolean()"; }else if(classKnown(type.getName(),classes)){ initString = " = new "+nonQualify(type.getName())+"()"; } if(type.isArray()|| type.getName().equals("java.util.List") || type.getName().equals("java.util.Set")){ initString = " = new Array()"; } return initString; } COM: <s> maps a classname to its javascript type </s>
funcom_train/31051836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseScanBuf(int size) { int id3subversion = id3ScanBuf [3]; System.out.println ("ID3v2." + id3subversion); if (id3subversion <= 2) parseScanBufID320 (size); else parseScanBufID323 (size); // todo - explicitly look for 2.3 and 2.4 and bail if // it's some newer version? } COM: <s> brancher for id3v2 </s>
funcom_train/1535808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short getCall(float[] pt) { short r = 0xFF; r &= (pt[0] > cntr[0] ? 0x55 : 0xAA); r &= (pt[1] > cntr[1] ? 0x33 : 0xCC); r &= (pt[2] > cntr[2] ? 0x0F : 0xF0); switch (r) { case 0: return 0; case 1: return 1; case 2: return 2; case 4: return 3; case 8: return 4; case 16: return 5; case 32: return 6; case 64: return 7; default: return -1; } } COM: <s> given a point in the octree element computes which child it is in </s>
funcom_train/9280272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int stackWordDelta(ClassHolder ch, int pc, short opcode) { if (SanityManager.DEBUG) { // this validates the OPCODE_ACTION entry instructionLength(opcode); } int stackDelta = OPCODE_ACTION[opcode][0]; if (stackDelta == VARIABLE_STACK) { stackDelta = getVariableStackDelta(ch, pc, opcode); } return stackDelta; } COM: <s> return the number of stack words pushed positive or popped negative </s>
funcom_train/25441542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSourceList() { // Modell erzeugen SourceListModel model = getSourceListModel(); //click listener erzeugen MNDACSSourceListClickListener clickListener = new MNDACSSourceListClickListener(this); // Seitenleiste erzeugen sourceList = new SourceList(model); sourceList.useIAppStyleScrollBars(); sourceList.addSourceListClickListener(clickListener); } COM: <s> create source list load modules and add to list </s>
funcom_train/4135624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debugContextChanged( DebugContextEvent event ) { if (!isAvailable() || !isVisible()) { return; } if( (event.getFlags() & DebugContextEvent.ACTIVATED) != 0 ){ Object contextElement = extractDebugElement( event.getContext() ); /* * View is currently only valid when in a Mozilla Debug session */ if( contextElement instanceof JSDebugElement ){ setViewerInput( contextElement ); } else{ showMessage( "View only valid for the Mozilla Debug context." ); } } } COM: <s> this sets the input of the viewer when the context is activated </s>
funcom_train/51572332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void accumulateLeafFiles(File dir, List<File> acc) { File[] files = dir.listFiles(); for (File file : files) { if (file.isDirectory()) { accumulateLeafFiles(file, acc); } else { acc.add(file); } } } COM: <s> accumulate all regular files in the specified directory </s>
funcom_train/17983456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(AddressRange range) { if (range == null) { throw new NullPointerException(); } if (range.rangeStart < this.rangeStart) { return 1; } else if (range.rangeStart > this.rangeStart) { return -1; } else if (range.rangeEnd < this.rangeEnd) { return 1; } else if (range.rangeEnd > this.rangeEnd) { return -1; } else { return 0; } } COM: <s> compares this object with the specified object for order </s>
funcom_train/34587486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void statusReceived (SyncStatusEvent event) { if (Logger.isLoggable(Logger.DEBUG)) { Logger.debug ("SyncStatusEvent - Received status - command: " + event.getCommand() + " - status: " + event.getStatusCode() + " - sourceUri: " + event.getSourceUri() + " - key: " + event.getItemKey().getKeyAsString() ); } } COM: <s> notify a status received from the server </s>
funcom_train/43244836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMaximumAllowedConnections() throws Exception { System.out.println("setMaximumAllowedConnections"); int maxAllowed = 0; EOServerStatusImpl instance = new EOServerStatusImpl(); instance.setMaximumAllowedConnections(maxAllowed); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set maximum allowed connections method of class org </s>
funcom_train/20892436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNewInstanceWithFactory() throws ConfigurationException { ConfigurableFactory<HierarchicalConfigurableMock> majorFactory = new DefaultConfigurableFactory<HierarchicalConfigurableMock>( HierarchicalConfigurableMock.class); majorFactory.putConfiguration("nestedFactory", factory); HierarchicalConfigurableMock object = majorFactory.newInstance(); assertNotNull(object); assertNotNull(object.getNestedFactory()); Object newObject = object.getNestedFactory().newInstance(); assertNotNull(newObject); } COM: <s> tests the new instance method with the nested factory </s>
funcom_train/13304696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEndDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NegotiationProtocol_endDate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NegotiationProtocol_endDate_feature", "_UI_NegotiationProtocol_type"), NegotiationPackage.Literals.NEGOTIATION_PROTOCOL__END_DATE, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the end date feature </s>
funcom_train/45289644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processLineTerminator(int pos, int endPos) { if (scannerDebug) System.out.println("processTerminator(" + pos + "," + endPos + ")=|" + new String(reader.getRawCharacters(pos, endPos)) + "|"); } COM: <s> called when a line terminator has been processed </s>
funcom_train/34896085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteOldResults() { String apmlPath = this.getProjectDirWebServer()+File.separatorChar+apmlFileName; File apmlFile = new File(apmlPath); if (!apmlFile.exists()) return true; log.debug("Deleting old apml file: "+apmlPath); if (!apmlFile.delete()) { log.error("Could not delete apml file: "+apmlPath); return false; } return true; } COM: <s> this will delete the peak picked apml for feature picking or </s>
funcom_train/34038018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void raise() { INode p = getParentNode(); Browser br = getBrowser(); if (br != null) br.eventq(MSG_RAISED, this); if (p != null && p.getLastChild() != this) { //System.out.println("bbbbbbbbbbbb"); Document doc = getDocument(); //System.out.println(doc.bbox); p.removeChild(this); p.appendChild(this); //System.out.println(doc.bbox); // p.dump(); if (doc != null) { // getBrowser().setCurDocument(doc); doc.repaint(100); // probably done as part of remove/add } } } COM: <s> windows added on top so raise to top remove add </s>
funcom_train/36380112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forEach( TCharProcedure procedure ) { byte[] states = _states; char[] set = _set; for ( int i = set.length; i-- > 0; ) { if ( states[i] == FULL && ! procedure.execute( set[i] ) ) { return false; } } return true; } COM: <s> executes tt procedure tt for each key in the map </s>
funcom_train/18050564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSources(byte[] sources) throws KeePassException, KeydbException { if (sources != null) { UnserializeStream in = new UnserializeStream(sources); byte count; try { count = in.readByte(); } catch (IOException e) { throw new KeePassException(e.getMessage()); } this.setDbSource(DataSourceRegistry.unserializeDataSource(in)); if (count > 1) this.setKeySource(DataSourceRegistry.unserializeDataSource(in)); }; } COM: <s> try get and unserialize last data sources </s>
funcom_train/43881042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FeatureReader getFeatureReader(String typeName) throws IOException { LOGGER.warning("sh: getFeatureReader(tn) "+typeName); FeatureType target = this.getSchema(typeName); if(target == null) { throw new IOException("Type not supported!"); } return new AggregatingFeatureReader(this.dsContainers, typeName, target); } COM: <s> returns a feature reader for the given type name </s>
funcom_train/9238796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { String line; while ((line = reader.readLine()) != null) { if (prefix != null) { System.out.printf("[%s] %s%n", prefix, line); } if (list != null) { list.add(line); } } } catch (IOException e) { e.printStackTrace(); } finally { try { stream.close(); } catch (IOException e) { e.printStackTrace(); } } } COM: <s> wait for input on stream and output throw away save to list </s>
funcom_train/20880642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBrushSize(int brushSize) { if (brushSize < 1) { throw new IllegalArgumentException("Brush must have size greater than or equal to 1"); } if (brushSize / 2 == brushSize - brushSize / 2) { throw new IllegalArgumentException("Brush size must be an uneven number"); } this.brushSize = brushSize; } COM: <s> sets the current size of the brush </s>
funcom_train/17203645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = "EQUATIONS:\n"; Enumeration<GraphNode> v = equations.enumerateNodes(); for (int i = 0; i < equations.numberOfNodes(); i++) { result = result + i + " : " + v.nextElement() + "\n"; } return result; } COM: <s> return a string representation of the system </s>
funcom_train/37739641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close (ConnectionSupport connection) { ConnectionEvent event = new ConnectionEvent (this, ConnectionEvent.CONNECTION_CLOSED); event.setConnectionHandle(connection); for (Iterator i = listeners.iterator(); i.hasNext();) { ((ConnectionEventListener)i.next()).connectionClosed(event); } connection.setManagedConnection(null); connections.remove(connection); } COM: <s> close the managed connection </s>
funcom_train/14514647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFillUserDataWithDefaultValuesUserName() { userData.setUsername(""); UserDataFiller.fillUserDataWithDefaultValues(userData, profile); Assert.assertTrue(!userData.getUsername().equals("userName")); Assert.assertEquals("defaultUserName", userData.getUsername()); } COM: <s> user name is merged </s>
funcom_train/38628573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxPeriod(double maxPeriod) { if (m_counter != null) { m_counter.setMaxPeriod(maxPeriod * decodingScaleFactor()); } else { m_encoder.writeTimerConfig_StallPeriod((int) (maxPeriod * 1.0e6 * decodingScaleFactor())); } } COM: <s> sets the maximum period for stopped detection </s>
funcom_train/26484923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Section insertAfter(Section section, Section afterThis) { if (section == null) { if (afterThis != null) section = new Section(afterThis.getReport()); else throw new IllegalArgumentException("SectionArea.insertAfter:" + " both section and afterThis" + " can't be null"); } sections.add(sections.indexOf(afterThis) + 1, section); imprint(section); return section; } COM: <s> adds a possibly created section after var after this var and </s>
funcom_train/41517084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getConstraintList() { ArrayList list = new ArrayList(); if (first instanceof CompoundConstraint) { list.addAll(((CompoundConstraint) first).getConstraintList()); } else { list.add(first); } if (second instanceof CompoundConstraint) { list.addAll(((CompoundConstraint) second).getConstraintList()); } else { list.add(second); } return list; } COM: <s> returns a list of the constraints in this compound </s>
funcom_train/1872548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int degree(int i) { if( !Network.node[i].isUp() ) return 0; Linkable lble=(Linkable)Network.node[i].getProtocol(protocolID); int numNeighbours = 0; for(int j=0; j<lble.degree(); ++j) { final Node n = lble.getNeighbor(j); // if accessible, we count it if(n.isUp()) numNeighbours++; } return numNeighbours; } COM: <s> returns number of neighbors that are up </s>
funcom_train/21793985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IParticipant findModerator() { IParticipant[] all = getChatRoomModel().getParticipants(); for (int i = 0; i < all.length; i++) { IParticipant p = all[i]; if (Role.MODERATOR.equals( p.getRole() )) return p; } return null; } COM: <s> find the first moderator in the chat room </s>
funcom_train/19101337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { for (int i = 0; i < count; i++) { if (state[i][0].equals(key)) { state[i][1] = value; return null; } } if (!(count < state.length - 1)) { throw new ArrayIndexOutOfBoundsException(STATE_FULL); } count++; state[count][0] = key; state[count][1] = value; return null; } COM: <s> this method returns em always em null in violation of the map interface </s>
funcom_train/123302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object that) { if (that instanceof Map.Entry) { Map.Entry entry = (Map.Entry) that; return _key.equals(entry.getKey()) && ((_value != null) ? _value.equals(entry.getValue()) : (entry.getValue() == null)); } else { return false; } } COM: <s> indicates if this entry is considered equals to the specified entry </s>
funcom_train/4864820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkParam(Object o) throws ClassCastException { if (o == null || o instanceof Boolean || o instanceof Integer || o instanceof byte[] || o instanceof char[] || o instanceof String) { return; } if (o instanceof Holder) { checkParam(((Holder) o).get()); return; } throw new ClassCastException(o.getClass().getName()); } COM: <s> checks one object for illegal unsupported types </s>
funcom_train/28158654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMultilineClosing(final List<Point> points) { if (points.size() > 0) { Point prev = points.get(0); Point cur; for (int i = 1; i < points.size(); i++) { cur = points.get(i); drawLine(prev, cur); prev = cur; } drawLine(prev, points.get(0)); } } COM: <s> draw a freeform line defined by a list of points where the last </s>
funcom_train/11392332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ping() throws IOException { for (List<AbstractDaemonClient> set : daemons.values()) { for (AbstractDaemonClient daemon : set) { LOG.info("Daemon is : " + daemon.getHostName() + " pinging...."); daemon.ping(); } } } COM: <s> ping all the daemons of the cluster </s>
funcom_train/11725132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOrder2() throws RepositoryException { Session another = getHelper().getReadOnlySession(); try { NodeIterator it = ((Node) another.getItem(testRootNode.getPath())).getNodes(); checkOrder(it, children); } finally { another.logout(); } } COM: <s> test if the order of nodes is the same when accessed through another </s>
funcom_train/50237617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void imageSelected( ImageSelectionEvent e ) { ImageInfo info = e.getInfo(); labels[2].setText( info.getFile().getName() ); labels[3].setText( FileInfo.printInfo( info.getFile() ) ); labels[4].setText( info.printDimension() ); } COM: <s> called when an image is selected </s>
funcom_train/31026141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void finish() { if (finished) return; add(Box.createRigidArea(new Dimension(borderx, bordery)), new GridBagConstraints(finishx,finishy,1,1,0,0,GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0)); finished = true; } COM: <s> call this after youve added your last component </s>
funcom_train/23284513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GroupJoinResponse addMember(String memberId) throws IOException, UPNPResponseException { ActionMessage message = messageFactory.getMessage("AddMember"); message.setInputParameter("MemberID", memberId); ActionResponse response = message.service(); return new GroupJoinResponse(response.getOutActionArgumentValue("CurrentTransportSettings"), response.getOutActionArgumentValue("GroupUUIDJoined")); } COM: <s> adds the zone player with the given member id todo to what </s>
funcom_train/29412758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IElementType getEMFIElementType() { if(this == AND_SINGLE || this == AND_DOUBLE || this == AND_N) return EpcElementTypes.AND_2003; if(this == OR_SINGLE || this == OR_DOUBLE || this == OR_N) return EpcElementTypes.OR_2001; if(this == XOR_SINGLE || this == XOR_DOUBLE || this == XOR_N || this == XOR_IT) return EpcElementTypes.XOR_2008; return null; } COM: <s> returns the emfielement type represented by this connector type </s>
funcom_train/49049765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { int result = 0; ContentMap other = (ContentMap) o; float myRating = getRating(); float otherRating = other.getRating(); if (myRating > otherRating) result = 1; else if (myRating < otherRating) result = -1; logger.info("comparison result = "+result); return result; } // end compareTo(Object) COM: <s> implementation of interface comparable </s>
funcom_train/49650051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void collectDependencies(IFile file) { String fromPath = file.getFullPath().toString(); getPlugin().writeInfoMsg( "Collecting dependencies from haxe file: " + file.getName()); // TODO: implement dependency collector // E.g. for each dependency: //fDependencyInfo.addDependency(fromPath, uponPath); } COM: <s> collects compilation unit dependencies for the given file and records </s>
funcom_train/25291259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderOnce() { checkViewState("View28", "View29"); synchronized (startStopViewLock) { if (isRunning) { throw new IllegalStateException(Ding3dI18N.getString("View30")); } renderOnceFinish = false; VirtualUniverse.mc.postRequest(MasterControl.RENDER_ONCE, this); while (!renderOnceFinish) { MasterControl.threadYield(); } renderOnceFinish = true; } } COM: <s> renders one frame for a stopped view </s>
funcom_train/9386851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateSdk(Sdk sdk) { assertTrue("sdk has no targets", sdk.getTargets().length > 0); for (IAndroidTarget target : sdk.getTargets()) { IStatus status = new AndroidTargetParser(target).run(new NullProgressMonitor()); if (status.getCode() != IStatus.OK) { fail("Failed to parse targets data"); } } } COM: <s> checks that the provided sdk contains one or more valid targets </s>
funcom_train/19407219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OpCallProcessNode createOpCallProcessNode(Activator in_Activator) { OpCallProcessNode on; if (m_o2n.containsKey(in_Activator)) { on = (OpCallProcessNode) m_o2n.get(in_Activator); } else { on = new OpCallProcessNode(m_SystemState.createOpCallProcessNode()); m_o2n.put(in_Activator, on); } return on; } COM: <s> creates a opcallprocess node </s>
funcom_train/33388689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean assertExceptions(Class[] ec, Class[] ei) { boolean in; for (int i = 0; i < ec.length; i++) { in = false; for (int j = 0; j < ei.length; j++) { if (isInHeirarchy(ec[i], ei[j])) { in = true; break; } } if (in == false) { return false; } } return true; } COM: <s> exceptions should be subset of exceptions ei </s>
funcom_train/5433455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getSight() { Enumeration e=theUnits.elements(); short ret=0; while(e.hasMoreElements()) { Unit u=(Unit)e.nextElement(); ret=(short)Math.max(ret,u.theDesign.theShell.sight); } return ret; } COM: <s> returns the longest sight of all the units </s>
funcom_train/25217660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int scanNext() throws IOException { int c; do { c = read(); if (c == '%') { do { c = read(); } while (c >= 0 && c != '\n' && c != '\r'); } } while (Character.isWhitespace(c)); return c; } COM: <s> scan to the next non space character </s>
funcom_train/37741049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke (ExtActivityLocal act) { try { ExtProcessLocal process = (ExtProcessLocal)act.containerLocal(); ApplicationDefinition appl = (ApplicationDefinition) process.processDefinition().applicationById(id()); Map params = parameterMap (process, act, appl); act.invokeTool (appl, params, exceptionDataFieldRef); return; } catch (InvalidIdException e) { // cannot happen since procdef is initially verified logger.error (e.getMessage(), e); throw new IllegalStateException (e.getMessage()); } } COM: <s> triggers the execution of the current tool for the given activity </s>
funcom_train/16795077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImagePlus getImagePlus() { draw(); ImagePlus img = new ImagePlus(title, ip); Calibration cal = img.getCalibration(); cal.xOrigin = LEFT_MARGIN; cal.yOrigin = TOP_MARGIN+frameHeight+yMin*yScale; cal.pixelWidth = 1.0/xScale; cal.pixelHeight = 1.0/yScale; cal.setInvertY(true); return img; } COM: <s> returns the plot as an image plus </s>
funcom_train/22369317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToYearStructure(ILocalAudioObject audioFile) { String year = audioFile.getYear(); IYear yearObject = repository.getYear(year); if (yearObject == null) { yearObject = new Year(year); repository.putYear(yearObject); } yearObject.addAudioObject(audioFile); } COM: <s> adds given audio file to year structure of given repository </s>
funcom_train/536096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeCommand(FairdjCommand cmd, List<String> argList) { try { cmd.executeCommand(argList); } catch (Exception e) { LOG.fatal(String.format("Executing command %s resulted in an exception.",cmd.getName())); LOG.fatal("Will log exception and exit...", e); System.exit(3); } } COM: <s> executes a single fairdj command </s>
funcom_train/16783828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initalizeLookNFeel(String name) { boolean found = false; for (int i = 0; !found && i <= lookNfeels.length - 1; i++) { LookAndFeelInfo lookNFeel = lookNfeels[i]; if (name.equals(lookNFeel.getName())) { setLookNFeel(lookNFeel.getClassName()); } } } COM: <s> sets an initial look and feel </s>
funcom_train/14464939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(int[] rc) { boolean ret = true; if(rc[0]+1 < firstcellrow)ret = false; if(rc[0]+1 > lastcellrow) ret = false; if(rc[1] < firstcellcol)ret = false; if(rc[1] > lastcellcol) ret = false; return ret; } COM: <s> returns whether this cell range contains the specified xy coordinate </s>
funcom_train/33426238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context getParentContext() { if (ctx == null) return null; if (parentCtx == null) { ctxService.getParentContext(ctx, new AsyncCallback<Context>() { private ControllerEvent event = new ControllerEvent(); @Override public void onSuccess(Context result) { parentCtx = result; ContextController.this.notify(event); } @Override public void onFailure(Throwable caught) { // TODO Auto-generated method stub } }); return null; } else { return parentCtx; } } COM: <s> returns the parent context of the current </s>
funcom_train/3775961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean portAvailable(int port) { try { Socket s = new Socket("localhost", port); s.close(); } catch(ConnectException e) { System.out.println(FP_ACTION_NAME + ": Connection refused - Port available: " + port); return true; } catch(Exception e) { System.err.println(FP_ACTION_NAME + ": "); e.printStackTrace(); } return false; } COM: <s> check if a tcp ip port is available by trying to connect </s>
funcom_train/33893088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaximum(int n) { int newMin = Math.min(n, min); int newValue = Math.min(n, getValue()); int newExtent = Math.min(n - newValue, theExtent); setRangeProperties(newValue, newExtent, newMin, n, isAdjusting); } COM: <s> sets the maximum to i n i </s>
funcom_train/31406832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCreateParameters(PreparedStatement stmt) throws SQLException { stmt.setString(1, getName()); stmt.setString(2, getFamilyName()); stmt.setString(3, getGivenName()); stmt.setString(4, getEmail()); stmt.setString(5, getAffiliations()); } COM: <s> set the parameters on the given save statement </s>
funcom_train/10255511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(Session session) { Object[] data = new Object[nodes.length]; for (int i = 0; i < nodes.length; i++) { Expression e = nodes[i]; if (e != null) { data[i] = e.getValue(session, e.dataType); } } return getValue(session, data); } COM: <s> evaluates and returns this function in the context of the session </s>
funcom_train/39397997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleCheck(CheckStatReport checkReport) { if (!checkReport.isFirstCheck()) return; // we are interested in first checks only if (!checkReport.getTotalDecision().isSpam()) return; // we are interested in spam results only updateStats(checkReport.getUserName(),StatisticsLogger.TYPES.CHECK.getType()); updateStats(StatisticsLogger.TOTAL_USER,StatisticsLogger.TYPES.CHECK.getType()); } COM: <s> increases the number of checks for the given user and overall by one </s>
funcom_train/13361548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAttachmentToCabinets(List cabinetNames, String workflow, String attachment, SecurityContext secCtx) throws ClientException { String item = formatCabinetItem(workflow, attachment); deleteProjectAssignment(CABINET_PROJECT_TYPE, item, secCtx); saveItemToProjects(CABINET_PROJECT_TYPE, cabinetNames, item, secCtx); } COM: <s> associates an attachment with a list of cabinets </s>
funcom_train/5462476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlPriorityProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.INTEGER); addStatement(rdfContainer, parentNode, NCAL.priority, propertyValue); } COM: <s> crawls the priority property </s>
funcom_train/49770132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringTokenizer useRadix(int radix) { if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) throw new IllegalArgumentException("radix:"+radix); if (this.defaultRadix == radix) return this; this.defaultRadix = radix; // Force rebuilding and recompilation of radix dependent patterns integerPattern = null; return this; } COM: <s> sets this string tokenizers default radix to the specified radix </s>