__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40388209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Annotation getBindingAnnotation(Annotation[] annotations) { Annotation bindingAnnotation = null; for (Annotation annotation : annotations) { if (Annotations.isBindingAnnotation(annotation.annotationType())) { checkArgument(bindingAnnotation == null, "Parameter has multiple binding annotations: %s and %s", bindingAnnotation, annotation); bindingAnnotation = annotation; } } return bindingAnnotation; } COM: <s> returns the unique binding annotation from the specified list or </s>
funcom_train/3169150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EdgeStepper edgeStepper(XnRegion region) { return EdgeStepper.make(!startsInside(region), (transitions(region)), (transitionsCount(region))); /* udanax-top.st:18195:EdgeManager methodsFor: 'private:'! {EdgeStepper} edgeStepper: region {XnRegion} "Create a stepper for iterating through the edges of the region" ^EdgeStepper make: (self startsInside: region) not with: (self transitions: region) with: (self transitionsCount: region)! */ } COM: <s> create a stepper for iterating through the edges of the region </s>
funcom_train/10472842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void triggerStartUpdateServerTask(IServer server) { GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) server.getAdapter(GeronimoServerBehaviourDelegate.class); if (delegate == null) { delegate = (GeronimoServerBehaviourDelegate) server.loadAdapter(GeronimoServerBehaviourDelegate.class, null); } if (delegate != null) { delegate.startUpdateServerStateTask(); } } COM: <s> b trigger start update server task b is invoked from </s>
funcom_train/3813250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(List<String> list) { if (list.isEmpty()) return ""; StringBuilder sb = new StringBuilder(); for (String s : list) sb.append(s).append(' '); sb.setLength(sb.length() - 1); return sb.toString(); } COM: <s> convert the list of words back to a space separated string </s>
funcom_train/11024469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void testGetDescriptorBase(String name, Class type) { try { DynaProperty descriptor = bean.getDynaClass().getDynaProperty(name); assertNotNull("Got descriptor", descriptor); assertEquals("Got correct type", type, descriptor.getType()); } catch (Throwable t) { fail("Threw an exception: " + t); } } COM: <s> base for test get descriptor xxxxx series of tests </s>
funcom_train/22388181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMostRecentBuildForBranch(Integer branchId) { SqlFunction lastBuilt = new SqlFunction(dataSource, " SELECT MAX(ID) FROM BUILDS B " + " WHERE BRANCH_ID = ?"); lastBuilt.declareParameter(new SqlParameter(Types.NUMERIC)); return ((Number) lastBuilt.execute(branchId.intValue()).get(0)).longValue(); } COM: <s> get the most recent finished build </s>
funcom_train/3612852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getCurrentAverageRevisionCount() { int revisions = 0; final Iterator it = this.repository.getFiles().iterator(); while (it.hasNext()) { final VersionedFile file = (VersionedFile) it.next(); if (!file.isDead()) { revisions += file.getRevisions().size(); } } return ((double) revisions) / getCurrentFileCount(); } COM: <s> returns number of revisions done on average </s>
funcom_train/18573843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileHash getHash(String hashType) { FileHash[] hashes = getFileHashes(); for (int i = 0; i < hashes.length; i++) { if (hashes[i].getHashName().equalsIgnoreCase(hashType)) return hashes[i]; } System.out.println("Could not find hash of type " + hashType); return null;// ! } COM: <s> gets the requested hash type </s>
funcom_train/17966126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(LegendChangeEvent event) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == LegendChangeListener.class) { ((LegendChangeListener) listeners[i + 1]).legendChanged(event); } } } COM: <s> notifies all registered listeners that the chart legend has changed in </s>
funcom_train/35196649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFleetEnd(int index, Fleet newFleetEnd) { Fleet oldFleetEnd = this.fleetEnd[index]; this.fleetEnd[index] = newFleetEnd; propertyChangeSupport.fireIndexedPropertyChange(PROP_FLEETEND, index, oldFleetEnd, newFleetEnd); } COM: <s> set the value of fleet end at specified index </s>
funcom_train/38560306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix copy() { Matrix x = new Matrix(m,n); int[][] C = x.getArray(); for (int i = 0; i < m; i++) { System.arraycopy(A[i], 0, C[i], 0, n); } return x; } COM: <s> make a deep copy of a matrix </s>
funcom_train/3703013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOptionSelected(String strName) { //// 1. Ensure that it is a valid option name //// Sets to null if not valid. AccessOption option = getOption(strName); //// 2. Set it inside of the config instance getAccessConfig().setOptionSelected(strName); selectedOption = option; } // of method COM: <s> choose which option to run </s>
funcom_train/9507817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shareEqually(SharedCost sharedCost) { logger.log(Level.FINE, "Sharing equally cost {0}", sharedCost); // Collect participants Set<Person> participants = new HashSet<Person>(); for (Person person : sheet.getPersons()) { TransactionEditor te = transactionEditors.get(new PersonSharedCostPair(person, sharedCost)); if (te.participationButton.isSelected()) { participants.add(person); } } sharedCost.shareEqually(participants); } COM: <s> applies equal sharing of given cost and refreshes the gui </s>
funcom_train/3409248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureLegacyParsed() { if ((legacyChanged == false) || (legacyStrings == null)) { return; } serviceSet = null; if (legacyMap == null) { legacyMap = new LinkedHashMap<ServiceKey,Service>(); } else { legacyMap.clear(); } for (Map.Entry<String,String> entry : legacyStrings.entrySet()) { parseLegacyPut(entry.getKey(), entry.getValue()); } removeInvalidServices(legacyMap); legacyChanged = false; } COM: <s> ensure all the legacy string properties are fully parsed into </s>
funcom_train/36425312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadScript(PrintStream out, PrintStream err, URL url) { URLConnection urlcnx; BufferedReader br; try { urlcnx = url.openConnection(); br = new BufferedReader( new InputStreamReader(urlcnx.getInputStream())); String line = new String(); boolean moreLines = true; while (moreLines) { line = (String) br.readLine(); if (line != null) { out.println(line); } else { moreLines = false; } } } catch (IOException ioe) { ioe.printStackTrace(err); err.flush(); return; } } COM: <s> method name load script </s>
funcom_train/177193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxPosition(double maxPosition) { if (sampleParticle == null) throw new RuntimeException("Need to set sample particle before calling this method (use Swarm.setSampleParticle() method)"); int dim = sampleParticle.getDimension(); this.maxPosition = new double[dim]; for (int i = 0; i < dim; i++) this.maxPosition[i] = maxPosition; } COM: <s> sets every max position to max position </s>
funcom_train/32060617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void centerWindowOnScreen() { IntPoint2D displaysize = vc.getDisplaySize(); IntPoint2D windowsize = this.getSize(); int newposx = (displaysize.x - windowsize.x) / 2; int newposy = (displaysize.y - windowsize.y) / 2; setPos(newposx, newposy); } COM: <s> sets the position of the window to the center of the screen </s>
funcom_train/9538482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrintText(String printText) { if (this.printText == printText) { return; } String old = this.printText; this.printText = printText; if (javalb != null) { javalb.setPrintText(printText); } firePropertyChange(PROP_PRINT_TEXT, old, printText); } COM: <s> sets value of print text property </s>
funcom_train/169076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("Player["); buffer.append("apperarence = " + apperarence); buffer.append("playerId = " + playerId); buffer.append(", name = " + name); buffer.append("]"); return buffer.toString(); } COM: <s> to string methode creates a string representation of the object </s>
funcom_train/22718460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeTables(ArrayList tables) throws IOException { writeStartElement(FileOpener.XML_ELEMENT_TABLES); for (Iterator i = tables.iterator(); i.hasNext(); ) { Table table = (Table)i.next(); writeTable(table); } writeEndElement(FileOpener.XML_ELEMENT_TABLES); } COM: <s> write out the collection of tables in xml format </s>
funcom_train/3419328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void engineInit(int keysize, SecureRandom random) { if (((keysize % 8) != 0) || (!AESCrypt.isKeySizeValid(keysize/8))) { throw new InvalidParameterException ("Wrong keysize: must be equal to 128, 192 or 256"); } this.keySize = keysize/8; this.engineInit(random); } COM: <s> initializes this key generator for a certain keysize using the given </s>
funcom_train/2897720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.setColor(BORDER_COLOR); g.fillRect(0, 0, mDimension.width, mDimension.height); if (mEntry.getScreenShot() != null) g.drawImage(mEntry.getScreenShot(), BORDER_SIZE, BORDER_SIZE, mDimension.width - 2 * BORDER_SIZE, mDimension.height - 2 * BORDER_SIZE, null); } COM: <s> paints this component i </s>
funcom_train/50095356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertOneLiner(String testString) { Assert.assertNotNull("Expected a non-null String.", testString); for (int i=0; i<testString.length(); i++) { char c = testString.charAt(i); Assert.assertNotSame("The String must not contain newline characters", '\n', c); Assert.assertNotSame("The String must not contain newline characters", '\r', c); } } COM: <s> asserts that the given string consists of a single line and thus </s>
funcom_train/8436856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIterator() { System.out.println("iterator"); int n = 0; SpecificGraph instance = null; Iterator<Integer> expResult = null; Iterator<Integer> result = instance.iterator(n); 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 iterator method of class nii </s>
funcom_train/4877942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BranchGroup getLightBranchGroup() { if (lightBranchGroup == null) { lightBranchGroup = new BranchGroup(); lightBranchGroup.setCapability(ALLOW_DETACH); lightBranchGroup.setCapability(ALLOW_CHILDREN_EXTEND); lightBranchGroup.setCapability(ALLOW_CHILDREN_WRITE); } return lightBranchGroup; } COM: <s> gets the value of light branch group </s>
funcom_train/19253979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEnabled() { SwingUtilities.invokeSync(new Runnable() { public void run() { if (SwingWTUtils.isSWTMenuControlAvailable(peer)) retval = new Boolean(peer.isEnabled()); else retval = new Boolean(pEnabled); } }); return ((Boolean) retval).booleanValue(); } COM: <s> returns true if the component is enabled </s>
funcom_train/3840307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer startTurn(String gid, Vector playernames) { Integer res = new Integer(0); if (playernames.isEmpty()) { JDupMServer.getLogger().debug(getLogString(gid, "Turn started for all players")); } else { JDupMServer.getLogger().debug(getLogString(gid, "Turn started for: " + playernames)); } return res; } COM: <s> start turn string gid array string ai name integer retcode </s>
funcom_train/7735742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAspects(IdList<Aspect> aspects, String rootName) { TreeModelEvent event; TreeNode oldRoot = root; /* create new root */ AspectsNode node = new AspectsNode(); node.nameData = rootName; node.aspects = aspects; root = node; /* fire event */ if(oldRoot == null) { event = new TreeModelEvent(this, (TreePath)null); } else { event = new TreeModelEvent(this, new TreePath(oldRoot)); } fireStructureChanged(event); } COM: <s> sets a new aspects tree </s>
funcom_train/1827801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getSelectedItems() { ArrayList selectedItems = new ArrayList(); for (Iterator i = selections.iterator(); i.hasNext();) { AbstractSelection selection = (AbstractSelection) i.next(); selectedItems.addAll(selection.getSelectedItems()); } return selectedItems; } COM: <s> items rather than geometries because the user may have selected a part </s>
funcom_train/37837112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setIndex(final int index) { if ((index < 0) || (index >= frames.length)) { throw new ArrayIndexOutOfBoundsException("Invalid index: " + index); } this.index = index; sprite = frames[index]; /* * Calculate the time into this frame */ cycleTime = 0; for (int i = 0; i < index; i++) { cycleTime += delays[i]; } lastUpdate = System.currentTimeMillis(); } COM: <s> set the frame index to a specific value </s>
funcom_train/8420609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onBeforeCurrentPageChanged() { isPageChanging = true; // save screen offset for current doc before change occurs if (mMainBibleActivity!=null && CurrentPageManager.getInstance().getCurrentPage()!=null) { float screenPosn = mMainBibleActivity.getCurrentPosition(); CurrentPageManager.getInstance().getCurrentPage().setCurrentYOffsetRatio(screenPosn); } HistoryManager.getInstance().beforePageChange(); } COM: <s> first time we know a page or doc will imminently change </s>
funcom_train/18745219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initComponents() { setInFile(Groove.WORKING_DIR); setOutFile(Groove.WORKING_DIR); this.inFileField.setPreferredSize(new Dimension(300, 0)); this.outFileField.setEditable(false); this.logArea.setEditable(false); this.logArea.setRows(10); } COM: <s> initialises the gui components </s>
funcom_train/17011967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String pickOneAddress(String hostname) throws UnknownHostException { if ("localhost".equals(hostname)) return hostname; InetAddress[] addrs = InetAddress.getAllByName(hostname); if (addrs.length > 1) return addrs[ran.nextInt(addrs.length)].getHostAddress(); return addrs[0].getHostAddress(); } COM: <s> randomly pick one from all available ip addresses of a given hostname </s>
funcom_train/14360984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute(String sql) throws SQLException { //execute query Boolean results = null; try { results = (Boolean) executeVerboseQuery("execute", new Class[] { sql .getClass() }); } catch (Exception e) { throw new SQLException( "Could not execute sql command - Original message: " + e.getMessage()); } return results.booleanValue(); } COM: <s> this method is only here for convenience </s>
funcom_train/21171581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logFontChange(String type, float size){ String sqlString = "INSERT INTO BigBrother (EventType, LogUser, LogTime, ParameterKey, ParameterValue) VALUES ('" + type + "', '" + User.getUser().getUserName() + "', GETDATE(), 'New Font Size', '" + String.valueOf(size) + "');"; client.updateQuery(sqlString); } COM: <s> logs a change in the font size </s>
funcom_train/2024098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDisplay() { File file; display = ""; try { file = new File(getFilename()); display = file.getName().replaceAll(".xml", "") + ": " + getTarget(); } catch (Exception e) { e.printStackTrace(); display = ""; } } COM: <s> creates the string that is returned with to string </s>
funcom_train/16770721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long create_pasp_atom(MP4DataStream bitstream) throws IOException { log.trace("Pixel aspect ratio"); int hSpacing = (int) bitstream.readBytes(4); int vSpacing = (int) bitstream.readBytes(4); log.trace("hSpacing: {} vSpacing: {}", hSpacing, vSpacing); readed += 8; MP4Atom child = MP4Atom.createAtom(bitstream); this.children.add(child); readed += child.getSize(); return readed; } COM: <s> creates the pasp atom or pixel aspect ratio </s>
funcom_train/644427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean includesExponents(String input) { int length = input.length(); String currentChar; boolean includesExponents = false; for (int i = 0; i < length; i++) { currentChar = String.valueOf(input.charAt(i)); if (currentChar.equals("^")) { includesExponents = true; break; } else { includesExponents = false; } } return includesExponents; } COM: <s> analyses if the string includes any exponents </s>
funcom_train/2388143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getData() { try { // Use ISO-8859-1 because we may have some values outside the // valid ASCII // range. // // TODO This needs to be reviewed if the format ever changes to // unicode return new String(data, 0, length, DEFAULT_CHARSET); } catch (UnsupportedEncodingException e) { // Should never get here since all Java implementations must // support the above charset. return new String(data, 0, length); } } COM: <s> gets this items data as a code string code </s>
funcom_train/44890475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getReferencedJythonProjects() { List referencedJythonProjects = new ArrayList(); IProject[] referencedProjects; try { referencedProjects = this.getProject().getReferencedProjects(); } catch (CoreException e) { CorePlugin.log(e); return new ArrayList(); } for (int i = 0; i < referencedProjects.length; i++) { JythonProject project = JythonProject.forProject(referencedProjects[i]); if (project == null) continue; referencedJythonProjects.add(project); } return referencedJythonProjects; } COM: <s> return list of jython project </s>
funcom_train/10585928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testResetBuffer() throws Exception { ServletServiceResponse response = new ServletServiceResponse(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); response.setOutputStream(outputStream); response.getOutputStream(); response.resetBuffer(); response.getOutputStream().write(0); assertEquals(1, outputStream.size()); } COM: <s> tests if its possible to write to output stream after </s>
funcom_train/22489469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeComponent (Component comp) { if (DEBUG) { System.out.println("removeComponent " + comp.getName()); } // no longer needed for relayouts removeCustomComponent(comp); final String name= comp.getName(); // -- find the layout descriptor for the component final ELayoutElement compLayout= getLayoutElement(name); if (compLayout != null) { final ELayout parentLayout= compLayout.getParent(); ELayout.unregisterComponent( (Container) parentLayout.getComponent(), comp ); } } COM: <s> removes a component from the container or one of its sub panels </s>
funcom_train/17274555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(C x) throws Exception { if (isFull()) throw new Exception(); // Percolate up int hole = ++currentSize; for (; hole > 1 && x.compareTo(array.get(hole / 2)) < 0; hole /= 2) array.add(hole, array.get(hole / 2)); array.add(hole, x); } COM: <s> insert into the priority queue maintaining heap order </s>
funcom_train/32830179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertDefaultDataSet(Class<?> testClass) { DataSetFactory dataSetFactory = getDefaultDataSetFactory(); String[] dataSetFileNames = new String[]{getDefaultDataSetFileName(testClass, dataSetFactory.getDataSetFileExtension())}; insertDataSet(testClass, dataSetFileNames); } COM: <s> inserts the default dataset for the given test class into the database </s>
funcom_train/15677986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToIdentity() { for (int r = 0; r < nRows; r++) for (int c = 0; c < nCols; c++) el[r][c] = 0; for (int i = Math.min(nRows, nCols) - 1; i >= 0; i--) el[i][i] = 1; } COM: <s> fills the matrix with zeros everywhere except on the main diagonal </s>
funcom_train/3987276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected float textWidthImpl(char buffer[], int start, int stop) { float wide = 0; for (int i = start; i < stop; i++) { // could add kerning here, but it just ain't implemented wide += textFont.width(buffer[i]) * textSize; } return wide; } COM: <s> implementation of returning the text width of </s>
funcom_train/7638388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean elementCanHaveChildren(Object descriptor) { if (descriptor instanceof ElementDescriptor) { ElementDescriptor desc = (ElementDescriptor) descriptor; if (desc.hasChildren()) { return true; } for (AttributeDescriptor attr_desc : desc.getAttributes()) { if (attr_desc instanceof TextValueDescriptor) { return true; } } } return false; } COM: <s> indicates whether this descriptor describes an element that can potentially </s>
funcom_train/30005660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getUserActionArea() { if (this.userActionArea == null) { this.userActionArea = new JTextArea(); this.userActionArea.setEditable(false); this.userActionArea.setLineWrap(true); this.userActionArea.setWrapStyleWord(true); } return this.userActionArea; } COM: <s> gets the user action pane </s>
funcom_train/5433973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFunction(JatoFunction f) throws JatoException { String name = f.getName(); if (fFunctions.containsKey(name)) { throw new JatoException( "A function already exists for the name='" + name + "': " + f); } fFunctions.put(f.getName(), f); } COM: <s> registers a jato function with the script </s>
funcom_train/50327817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeadState(int num) { if (log.isDebugEnabled()) log.debug("asked for state of "+getSEName() +"/"+num+", is "+heads[num].getAppearance()); return heads[num].getAppearance(); } COM: <s> access the state of a specific head </s>
funcom_train/40613788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int index) { if (SysProperties.CHECK) { if (index >= size) { throw new ArrayIndexOutOfBoundsException("i=" + index + " size=" + size); } } System.arraycopy(data, index + 1, data, index, size - index - 1); size--; } COM: <s> remove the value at the given index </s>
funcom_train/46696244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetClassType() { System.out.println("getClassType"); PropertyRestriction instance = new PropertyRestriction(); Class expResult = Object.class; Class result = instance.getClassType(); assertEquals(expResult, result); expResult = String.class; instance.setClassType(String.class); result = instance.getClassType(); assertEquals(expResult,result); } COM: <s> test of get class type method of class property restriction </s>
funcom_train/18114338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintCloseButton(Graphics g) { Dimension d = getSize(); g.setColor(Color.white); g.fillRect(closeRect.x, closeRect.y, closeRect.width, closeRect.height); g.setColor(Color.white.darker()); g.drawRect( closeRect.x, closeRect.y, closeRect.width - 1, closeRect.height - 1); g.setColor(Color.red.darker().darker()); g.setFont(buttonFont); g.drawString("Close", closeRect.x + 5, closeRect.y + 17); } COM: <s> paint method for a close button </s>
funcom_train/14202369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readyImpl(ResourceContext ctxt) { //todo: make capabilities configurable! Ready ready=new Ready("I'm up and running", "mycapabilities are here!"); try { RequestContext requestContext = ctxt.getRequestContext(); ready.processInIgor(requestContext); } catch (NotDefinedException e) { log.warn("Cannot retrieve request context, aborting processing: "+e); } } COM: <s> when a resource becomes ready it sends a ready request </s>
funcom_train/44779408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDistinctProperty(Property [] properties) { for (int i=0, n=properties.length; i<n; i++) { PropertyLabeledList result = new PropertyLabeledList(properties[i], null); myCenterPanel.add(result); myDistinctPanes.put(properties[i], result); } refreshDistinctPanes(); myCenterPanel.validate(); repaint(); } COM: <s> adds the distinct values to the panel for the given properties </s>
funcom_train/7971794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension forButton(Button button, Object... param) { int size = 1; int fontsize = (size + 1) * FONT_SIZE_MULTIPLE; if (button.isIncreasedFontSize()) { fontsize += 4; } return RenderingUtils.getButtonSize(button.getText(), fontsize, button.isBold()); } COM: <s> calculates the size of the button </s>
funcom_train/9489200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableVBO(GL gl){ gl.glEnableClientState(GL.GL_VERTEX_ARRAY); // Enable Vertex Arrays gl.glEnableClientState(GL.GL_NORMAL_ARRAY); // Enable Normal Arrays gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); // Enable texture Arrays } COM: <s> enable use of vbos </s>
funcom_train/28426458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyDownload(IConnection connection, FileObject file, long size) { StatisticsObserver observer = this.observer; if (observer != null) { observer.notifyDownload(); } FileObserver fileObserver = this.fileObserver; if (fileObserver != null) { fileObserver.notifyDownload(connection, file, size); } } COM: <s> observer download notification </s>
funcom_train/17387553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayError(Throwable t) { StackTraceElement[] stack = t.getStackTrace(); display(ColorConstants.getColor("Error") + t); for (int i = 0; i < stack.length; i++) display(ColorConstants.getColor("Error") + stack[i]); } COM: <s> displays a stack trace for an exception </s>
funcom_train/22442167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateDestroy() { if (tagHandlerPoolNames.size() <= 0) return; out.printil("public void _jspDestroy() {"); out.pushIndent(); for (int i = 0; i < tagHandlerPoolNames.size(); i++) { out.printin((String) tagHandlerPoolNames.elementAt(i)); out.println(".release();"); } out.popIndent(); out.printil("}"); out.println(); } COM: <s> generates the destroy method which is responsible for calling the </s>
funcom_train/24937878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String declare(Bus b, String initValue, String postFix) { // This method is really just a lightweight cover for assign, // but it does check that the bus is not already declared. assert !isDeclared(b, postFix) : "Cannot double declare bus " + b + postFix; return assign(b, initValue, postFix); } COM: <s> gets a correct declaration for the specified bus with the specified </s>
funcom_train/48562069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(String name) { Object result = null; Map<String, Object> hBeans = ThreadScopeContextHolder.currentThreadScopeAttributes().getBeanMap(); if (hBeans.containsKey(name)) { result = hBeans.get(name); hBeans.remove(name); } return result; } COM: <s> removes bean from org </s>
funcom_train/42480735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getMiProjectOpen() { if (miProjectOpen == null) { miProjectOpen = new JMenuItem(); miProjectOpen.setText(Msg.getString("label.open.project")); //$NON-NLS-1$ miProjectOpen.setToolTipText(Msg.getString("label.open.project.tooltip")); //$NON-NLS-1$ } return miProjectOpen; } COM: <s> this method initializes mi project open </s>
funcom_train/2742334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContrLocsState() { Map<Location, Value> contrLocationMap = new HashMap<Location, Value>(); Function function; for(Location location: locationMap.keySet()) { function = location.getSignature(); if (Defs.isControlled(function) || Defs.isOut(function)) { contrLocationMap.put(location, locationMap.get(location)); } } return formatString(contrLocationMap, '\n', true); } COM: <s> it prints the controlled part of the state </s>
funcom_train/42982051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEdgeMiddleNode() { Edge selEdge = (Edge) frame.cbEdge.getSelectedItem(); Node node = (Node) frame.cbEdgeMnAdd.getSelectedItem(); engine.addMiddleNode(selEdge.getId(), node.getId()); fillEdgeData(); fullMap(); } COM: <s> adds a middle node to the edges middle nodes list </s>
funcom_train/8103384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPOS(int n_meaning, String current_page_title) { uniques_strings += 1; word_sense_pairs += n_meaning; if(1 == n_meaning) { monosemous += 1; } else { polysemous_words += 1; polysemous_senses += n_meaning; } if(n_meaning > max_senses) { max_senses = n_meaning; page_title = current_page_title; } } COM: <s> increment statistics data </s>
funcom_train/12547618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDone() { int toDo = pToT.size() - alreadyDone.size(); String message = toDo == 0 ? "The conversion is finished!" : toDo + " more transition" + (toDo == 1 ? "" : "s") + " must be added."; javax.swing.JOptionPane.showMessageDialog(parent, message); return toDo == 0; } COM: <s> displays and returns if the automaton is done yet </s>
funcom_train/1884141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadAssociation(StringTree st, List<Association> associations) { Association a = new Association(); a.otherIndividual = getIndividual(st.value); for (StringTree ch : st.children) { if ("RELA".equals(ch.tag)) { a.relationship = ch.value; } else if ("NOTE".equals(ch.tag)) { loadNote(ch, a.notes); } else if ("SOUR".equals(ch.tag)) { loadCitation(ch, a.citations); } else { unknownTag(ch); } } } COM: <s> load an association between two individuals from a string tree node </s>
funcom_train/32058053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsert() { System.out.println("testInsert"); GraphModel gm = new DefaultGraphModel(); CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); Object[] objs = new Object[5]; Map map = null; ConnectionSet cs = null; ParentMap pm = new ParentMap(); UndoableEdit[] ue = new UndoableEdit[5]; //null pointer exception cache.insert(objs, map, cs, pm, ue); } COM: <s> this function tests insert function of graph layout cache class </s>
funcom_train/491232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextTo(char d) { StringBuffer sb = new StringBuffer(); for (;;) { char c = next(); if (c == d || c == 0 || c == '\n' || c == '\r') { if (c != 0) { back(); } return sb.toString().trim(); } sb.append(c); } } COM: <s> get the text up but not including the specified character or the </s>
funcom_train/45377177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhoneParserResultDTO parseBills(String filename, String mime, byte[] data) { PhoneParserResultDTO res = new PhoneParserResultDTO(); try { Reader r = new Reader(filename, mime, data); res = r.getResult(); } catch (Exception e) { e.printStackTrace(); } //return new ArrayList<BillDTO>(); return res; } COM: <s> getting phone bill to parse it into data structure </s>
funcom_train/10238248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButtonVFC() { if (jRadioButtonVFC == null) { jRadioButtonVFC = new JRadioButton(); jRadioButtonVFC.setBounds(new Rectangle(467, 44, 25, 17)); jRadioButtonVFC.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { if(jRadioButtonVFC.isEnabled()){ fileFormatChoose = FileExtension.VFC; } } }); } return jRadioButtonVFC; } COM: <s> this method initializes j radio button vfc </s>
funcom_train/23032338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void populateProcessList() { // This will store all available Processes processList = new ArrayList<Process>(); // Get the singleton ControllerLookup singletonInstance. ControllerLookup controllerLookup = ControllerLookup.getInstance(); // With all controller names... for (String controllerName : controllerLookup.getControllerNames()) { // ...get the real controller... Controller controller = controllerLookup .getController(controllerName); // ...and from it the Process, and add it to our list. processList.add(controller.getProcess()); } } COM: <s> populates the con cern process list </s>
funcom_train/43245863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBNState() { System.out.println("setBNState"); String bNState = ""; EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); instance.setBNState(bNState); // 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 bnstate method of class org </s>
funcom_train/44317747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean startSearch(DMItem node, String clause) { if (node.hasChildren()) { ArrayList kids = node.getChildren(); for (int i=0; i< kids.size(); i++) { if ( searchNode( (DMItem)kids.get(i), clause) ) { return true; } // if } // for i } // if return false; } COM: <s> run a search on each of the nodes children </s>
funcom_train/26658952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleError(MediaDTO mediaDTO, String msg, Throwable x) { log.error(msg, x); if (mediaDTO != null) { try { this.lookupMediaComposer().setMediaStatus(mediaDTO.getPk(), MediaDTO.ERROR, msg); } catch (Exception e) { log.error("cant set error media status for " + mediaDTO.getFilesetId()); } } } COM: <s> handles an error </s>
funcom_train/4014459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadForm(int formId,String xform, String layout, String javaScript, boolean readOnly){ if(leftPanel.formExists(formId)) return; centerPanel.setXformsSource(xform, false); centerPanel.setLayoutXml(layout, false); centerPanel.setJavaScriptSource(javaScript); controller.openFormDeffered(formId,readOnly); } COM: <s> loads a form in the form designer </s>
funcom_train/20043576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getBridge() { executeMethod("getExistingBridges()") ; if (bridgeName == null) { log.println("No name for getting the bridge") ; return ; } XBridge br = oObj.getBridge(bridgeName) ; tRes.tested("getBridge()", br != null && bridgeName.equals(br.getName())) ; } COM: <s> gets bridge by name and checks the bridge name returned </s>
funcom_train/27822344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color getCellBackground(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) { if (isSelected) return table.getSelectionBackground(); else if (hasFocus && table.isCellEditable(row,column)) return UIManager.getColor("Table.focusCellBackground"); else return table.getBackground(); } COM: <s> returns desired background color of a cell </s>
funcom_train/28213977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int initInformationDialog(String displayString) { this.popupShell = new Shell(this.getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); MessageBox messageBox = new MessageBox(this.popupShell, SWT.OK | SWT.ICON_INFORMATION); messageBox.setText("MQ eXplored - About"); messageBox.setMessage(displayString); int answer = messageBox.open(); System.out.println("GenericPopup: Displayed"); return answer; } COM: <s> pop up window to provide information to the user </s>
funcom_train/4753796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IExpr get(final int key) { final int hash = hashOf(key); int index = hash & mask; if (containsKey(key, index)) { return values[index]; } if (states[index] == FREE) { return missingEntries; } int j = index; for (int perturb = perturb(hash); states[index] != FREE; perturb >>= PERTURB_SHIFT) { j = probe(perturb, j); index = j & mask; if (containsKey(key, index)) { return values[index]; } } return missingEntries; } COM: <s> get the stored value associated with the given key </s>
funcom_train/9892781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child){ DefaultTreeModel model = (DefaultTreeModel)tree.getModel(); model.insertNodeInto(child,parent, parent.getChildCount()); this.treeScrollPane.getHorizontalScrollBar().setValue(0); fireDataChanged(); } COM: <s> allows node additions to tree from objects with a framework reference </s>
funcom_train/36993681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int sizeBranches(int count) { int countUpdated = count; for (int ii=0; ii<this.parameters.length; ii++) { // Check if the object is a Statement. if (this.parameters[ii].getClass() == this.getClass()) { countUpdated = ((Statement)this.parameters[ii]).sizeBranches(countUpdated++); } } return countUpdated; } COM: <s> calculates the size of the branches of the tree structure </s>
funcom_train/40415377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSignature() { String s1 = "user: charlie user: adam user: david " // + "user: bill group: b group: c group: a group: d"; String s2 = "user: charlie user: bill group: b " // + "user: adam group: c group: a user:david group: d"; assertAclEquals(true, s1, s2); } COM: <s> tests for the get signature method </s>
funcom_train/25707265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exitSave() throws StorageException { if (updaters != null) { final Enumeration<SettingsUpdater> enumeration = updaters.elements(); while (enumeration.hasMoreElements()) { enumeration.nextElement().updateSettings(); } } if (!writeSettingsFile()) { throw new StorageException("Error while saving the settings."); } } COM: <s> this method asks all of the updaters to update the settings values </s>
funcom_train/41725332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransactionList getPicking(int start, int amount) { TransactionList ans = new TransactionList(); // int n = Math.min(start + amount, trans.size()); // for (int i = n - 1; i >= start; i--) { // ans.addTransaction(getTransaction(i)); // } int i = start; while (i < trans.size() && amount > 0) { ans.addTransaction(getTransaction(i)); i++; amount--; } return ans; } COM: <s> returns a sublist of transaction that starts with offset start and has </s>
funcom_train/22233813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReflectionDelay(float reflectionDelay) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_REFLECTION_DELAY_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes22")); ((AuralAttributesRetained)this.retained).setReflectionDelay(reflectionDelay); } COM: <s> set early refection delay time </s>
funcom_train/10907786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWritingMode(int lrtb, int rltb, int tbrl) { switch (writingMode) { case Constants.EN_LR_TB: return lrtb; case Constants.EN_RL_TB: return rltb; case Constants.EN_TB_RL: return tbrl; default: //nop } return -1; } COM: <s> uses the stored writing mode </s>
funcom_train/35838703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addMemberLink(PCSession session, String sViewID, String sLinkID) throws SQLException { //DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; //boolean added = DBViewLink.insert(dbcon, sViewID, sLinkID); //getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return true; } COM: <s> adds a link to the view with the given view id </s>
funcom_train/12103979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Identifier toIdentifier(int assignedNumber) { for (Map.Entry<Identifier, Woodcutter> entry : avatars.entrySet()) { Woodcutter avatar = entry.getValue(); if (avatar.getAssignedNumber() == assignedNumber) { return entry.getKey(); } } System.err.println("No avatar with assigned number: " + assignedNumber); return null; } COM: <s> converts the number assigned to the avatar to the corresponding client id </s>
funcom_train/2584650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetShape() { BarRenderer r = new BarRenderer(); Shape s = new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0); r.setShape(s); assertEquals(s, r.getItemShape(0, 0)); } COM: <s> test that setting the shape for all series does in fact work </s>
funcom_train/19107224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Song getSong(String pID) { Song song = (Song) mID2Songs.get(pID); if (song == null) { ModelSongs model = SongManagerApp.getModel(); song = new Song(model, model.getSong(pID)); mID2Songs.put(pID, song); } return song; } COM: <s> gets a song </s>
funcom_train/46617029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getToolBar(), BorderLayout.NORTH); jContentPane.add(getJSplitPane(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/50922282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws BuildException { if (property == null) { throw new BuildException("property attribute is required.", getLocation()); } boolean upToDate = eval(); if (upToDate) { getProject().setNewProperty(property, getValue()); } else { getProject().setNewProperty(property, ""); } } COM: <s> sets property to true if target converter is more recent </s>
funcom_train/99191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRemarkSet(TridasValue value) { TridasRemark remark = asTridasRemark(); for(TridasRemark aRemark : value.getRemarks()) { if(RemarkEquals.remarksEqual(remark, aRemark)) { // must test for special 'disabled override' if(aRemark.isSetInheritedCount() && aRemark.getInheritedCount() < 0) return false; return true; } } return false; } COM: <s> check if a remark is set on a given value </s>
funcom_train/41836904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStatusCancelled() { MyLog.v(TAG, "setStatusCancelled()"); if (this.serviceStatus != null) { // notify the user but keep showing the old status ? Utils.notifyTheUser(this, getString(R.string.subway_status_loading_cancelled)); } else { // show the BIG cancel message this.statusMsgTv.setText(getString(R.string.subway_status_loading_cancelled)); this.statusLayout.setVisibility(View.VISIBLE); // hide loading (progress bar) this.statusLoadingLayout.setVisibility(View.GONE); } setStatusNotLoading(); } COM: <s> set the status as cancelled </s>
funcom_train/4108606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEdge() { System.out.println("getEdge"); Edge e = instance.getEdge(1); if (!(e.getTail() instanceof Tree.TreeNode)) fail("Not a TreeEdge"); if (e.getGraph() != instance) fail("Not a TreeEdge from a Tree"); } COM: <s> get edge com </s>
funcom_train/8980609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URI getRequestUri() { List<NameValuePair> queryParams = new ArrayList<NameValuePair>(); try { return URIUtils.createURI("http", ServerConfiguration.ACTIVITY_SERVER, -1, "/search", URLEncodedUtils.format(queryParams, "UTF-8"), null); } catch (URISyntaxException e) { Log.e("SearchMyActivities", QueryHelper.getStrackTrace(e)); return null; } } COM: <s> build a url used in a http post request to create an activity </s>
funcom_train/35492642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinGame(String game, Player player) throws JoinGameException { if(!gamesByName.containsKey(game)) throw new JoinGameException("No game named " + game + " could be found"); GameRoom room = (GameRoom) gamesByName.get(game); room.addPlayer(player); synchronized(gamesByPlayer) { gamesByPlayer.put(player.getNickname(), room); } } COM: <s> attempts to add a player to a named game </s>
funcom_train/28749560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeleted(Long newVal) { if ((newVal != null && this.deleted != null && (newVal.compareTo(this.deleted) == 0)) || (newVal == null && this.deleted == null && deleted_is_initialized)) { return; } this.deleted = newVal; deleted_is_modified = true; deleted_is_initialized = true; } COM: <s> setter method for deleted </s>