__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19838855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertPiece(int color, int x, int y, Board b ){ Piece p = new Piece( color, x, y, b ); table[x][y] = p; if (color == Piece.WHITE) { whitePieces.insertFront(p); } if (color == Piece.BLACK) { blackPieces.insertFront(p); } } COM: <s> inserts piece on board </s>
funcom_train/25413834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void client() { if (spawnLogger.isDebugEnabled()) { spawnLogger.debug("SATIN '" + ident + "': starting client!"); } while (!exiting) { // steal and run jobs noWorkInQueue(); // Maybe the master crashed, and we were elected the new master. if (master) return; } } COM: <s> implements the main client loop steal jobs and execute them </s>
funcom_train/35458701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void interpolate(Vector3f finalVec, float changeAmnt) { this.x = (1 - changeAmnt) * this.x + changeAmnt * finalVec.x; this.y = (1 - changeAmnt) * this.y + changeAmnt * finalVec.y; this.z = (1 - changeAmnt) * this.z + changeAmnt * finalVec.z; } COM: <s> sets this vector to the interpolation by change amnt from this to the </s>
funcom_train/9360285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream openInputStream() throws IOException { ensureOpen(); if (mPrivateInputOpen) throw new IOException("no more input streams available"); if (mGetOperation) { // send the GET request here validateConnection(); } else { if (mPrivateInput == null) { mPrivateInput = new PrivateInputStream(this); } } mPrivateInputOpen = true; return mPrivateInput; } COM: <s> open and return an input stream for a connection </s>
funcom_train/17117728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean determinePromtRunStarted(long promt_id) { // sample IDs for that specific class List sampleIDs = this.findSampleIDsByPromtID(promt_id); Iterator iterator = sampleIDs.iterator(); while (iterator.hasNext()) { long sampleID = Long.parseLong(iterator.next() + ""); boolean sampleStarted = determineSampleRun(sampleID); if (sampleStarted) { return true; } } return false; } COM: <s> checkes if a promt with a specific id has been started yet </s>
funcom_train/18357603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startStoreAndController() { // create the store - this is the server that will // do all the work. try { theStore = new GlobalMissionStoreImpl(); } catch (RemoteException e) { System.err.println("Could not create global mission store " + e.getMessage()); System.exit(1); } // create the controller try { missCntrl = new GlobalMissionControllerImpl(); } catch (RemoteException e) { System.err.println("Could not create global mission controller " + e.getMessage()); System.exit(1); } } COM: <s> start store and controller will start the </s>
funcom_train/5551528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double nextUniform(double lower, double upper) { if (lower >= upper) { throw new IllegalArgumentException ("lower bound must be <= upper bound"); } RandomGenerator rand = getRan(); // ensure nextDouble() isn't 0.0 double u = rand.nextDouble(); while(u <= 0.0){ u = rand.nextDouble(); } return lower + u * (upper - lower); } COM: <s> strong algorithm description strong scales the output of </s>
funcom_train/14652766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean executeNormAction(){ Set<Entry<ProcedureChunk, Double>> entries = procedureChunks.entrySet(); for (Entry<ProcedureChunk, Double> entry: entries ){ entry.getKey().addNormAction(this); } if (sendNormMessage){ this.sendNormMessage(); } return true; } COM: <s> add normaction to procedures in map </s>
funcom_train/37831101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOnFreeFertileGround() { if (this.getZone() == null) { return false; } else { final StendhalRPZone zone = this.getZone(); boolean passes = false; for (Entity entity : zone.getEntitiesAt(getX(), getY())) { if (entity instanceof FlowerGrower) { if (!equals(entity)) { // There's already something else growing here return false; } } else { if (entity instanceof FertileGround) { passes = true; } } } return passes; } } COM: <s> checks if this entity is on a free fertile spot </s>
funcom_train/30009241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetType() { System.out.println("setType"); int type = 0; Document instance = new Document(); int expResult = 0; int result = instance.setType(type); 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 set type method of class papyrus </s>
funcom_train/41247242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFile(String aFileName, RawSceneRepresentation aScene) { try { // Initialize writers _fileWriter = new FileWriter(aFileName); _bufferedWriter = new BufferedWriter(_fileWriter, 64); // Write the xml header writeHeader(); // Write the scene } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> writes a raw scene to a file in the lcf file format </s>
funcom_train/35607163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void preInitComponent() { try { formatter = new MaskFormatter("**-**-****"); formatter.setPlaceholder("DD-MM-YYYY"); // formatter.setValidCharacters("0123456789"); } catch (ParseException ex) { logger.debug("preInitComponent Fail: " + ex.toString()); } } COM: <s> pre init component using key event instead of formatter </s>
funcom_train/26095052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadSurvivalRate() throws Exception { try { Properties props = (Properties) TEST_PROPERTIES.clone(); props.setProperty(NeatConfiguration.SURVIVAL_RATE_KEY, "0.60"); uut = new NeatConfiguration(props); fail("should have failed"); } catch (InvalidConfigurationException e) { // success } catch (Throwable t) { fail("unexpected exception: " + t); } } COM: <s> test configuration with invalid survival rate set </s>
funcom_train/43896496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FilterCapabilities convertFilterTypeToMask(short type) { if (type == FilterType.ALL) { return FilterNameTypeMapping.NO_OP_CAPS; } if (type == FilterType.NONE) { return FilterNameTypeMapping.ALL_CAPS; } Object object = FilterNameTypeMapping.filterTypeToFilterCapabilitiesMap.get(new Short(type)); return (FilterCapabilities) object; } COM: <s> returns the mask that is equivalent to the filter type constant </s>
funcom_train/25369355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(File file, String[] args) { Script script; try { script = (Script) new SerializedObject(this).getObject(); script.m_Filename = file; script.m_Modified = false; script.start(args); } catch (Exception e) { e.printStackTrace(); } } COM: <s> executes the script without loading it first </s>
funcom_train/12923531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAltStyle(final FillStyle style) { int index; if (fillStyles.contains(style)) { index = fillStyles.indexOf(style); } else { index = fillStyles.size(); fillStyles.add(style.copy()); } objects.add(new ShapeStyle().setAltFillStyle(index + 1)); } COM: <s> set the style used to fill overlapping enclosed areas </s>
funcom_train/45623069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAssemblyNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UsingTaskType_assemblyName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UsingTaskType_assemblyName_feature", "_UI_UsingTaskType_type"), MSBPackage.eINSTANCE.getUsingTaskType_AssemblyName(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the assembly name feature </s>
funcom_train/26447896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object generateUniqueId(Class aHomeInterfaceClass) { // Reverse the VMID String so that the noisy part is at the beginning // This might speed up database comparison. At least it doesn't hurt // so much. // note that we ignore the home interface. The VMID is so strong that // we consider it to be unique over all entity beans. return new StringBuffer(new VMID().toString()).reverse().toString(); } COM: <s> creates a new vmid suitable for primary keys </s>
funcom_train/11004727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getEscherProperty(short propId){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, propId); return prop == null ? 0 : prop.getPropertyValue(); } COM: <s> get the value of a simple escher property for this shape </s>
funcom_train/34781557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSweep(final int time, final boolean decrease, final int shift) { this.sweepTime = this.sweepTimeLeft = ((time + 1) * SoundChip.UPDATES_PER_SECOND) >> 7; this.sweepShift = shift; this.sweepDirection = decrease ? -1 : 1; } COM: <s> set the sweep parameters </s>
funcom_train/11727672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { try { Naming.unbind(url); } catch (NotBoundException e) { // Ignore, perhaps the reference was already manually removed } catch (MalformedURLException e) { // Ignore, we already logged a warning about this during init() } catch (RemoteException e) { log("Failed to unbind repository from RMI: " + url, e); } } COM: <s> unbinds the repository from rmi </s>
funcom_train/12276449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long readInt() throws IOException { int ch1 = read(); int ch2 = read(); int ch3 = read(); int ch4 = read(); if ((ch1 | ch2 | ch3 | ch4) < 0) throw new EOFException(); return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)) & 0xFFFFFFFFL; } COM: <s> read an integer 4 bytes from the array </s>
funcom_train/12554325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(Object n) { Link p = new Link(n, cursor()); if (pre != null) { pre.next = p; if (pre == tail) { tail = p; } } else { if (head == null) { tail = p; } head = p; } pre = p; len++; }; COM: <s> insert before the iterator position </s>
funcom_train/10778723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCandidateClassIsImplicitlySelectedForEntityQuery() { String jpql = "select p from Person p"; CriteriaQuery<Person> c = cb.createQuery(Person.class); Root<Person> p = c.from(Person.class); Selection<Person> term = c.getSelection(); assertNull(term); assertEquivalence(c, jpql); } COM: <s> candidate class is implicitly selected but a null is returned by get selection </s>
funcom_train/36428021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeInternalConnection(DbSession dbSession) { try { if (dbSession.conn != null) { dbSession.conn.close(); } } catch (SQLException e1) { } dbSession.isDisconnected = true; if (dbSession.admin != null) dbSession.admin.isConnected = false; DbAdmin.removeConnection(dbSession.internalId); } COM: <s> internal use for closing connection while validating it </s>
funcom_train/50923661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeCIF(Writer w) throws IOException { Elements childElements = this.getChildElements(); for (int i = 0; i < childElements.size(); i++) { Element child = childElements.get(i); if (child instanceof CIFElement) { ((CIFElement) child).writeCIF(w); } else { throw new RuntimeException("Unexpected element " + child.getLocalName()); } } } COM: <s> writes element as cif </s>
funcom_train/41850849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean stopMonitoring() { String[] files; files = dir1.list(); for (String f: files) { if (killAgent.equalsIgnoreCase(f)) return true; } files = dir2.list(); for (String f: files) { if (killAgent.equalsIgnoreCase(f)) return true; } return false; } COM: <s> looks for a file named specifically to end the program execution </s>
funcom_train/7627333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCycleShortcutCaptionMode(boolean cycleShortcutAndNormal) { if (!cycleShortcutAndNormal) { /* * We're setting back to title, so remove any callbacks for setting * to shortcut */ removeCallbacks(this); setChildrenCaptionMode(false); mMenuBeingLongpressed = false; } else { // Set it the first time (the cycle will be started in run()). setChildrenCaptionMode(true); } } COM: <s> sets the shortcut caption mode for icon menu view </s>
funcom_train/35828426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Coordinates getCoordinates(double[][] xy){ double[] zd = getZ(xy); float [] x = new float[xy.length]; float [] y = new float[xy.length]; float [] z = new float[xy.length]; for(int m=0; m<xy.length; m++){ x[m] = (float)xy[m][0]; y[m] = (float)xy[m][1]; z[m] = (float)zd[m]; } return new Coordinates(x, y, z); } COM: <s> return a structure containing x y and z coordinates as arrays of float </s>
funcom_train/9277015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOnlyTransactionWasCommited() throws SQLException { commit(); assertShutdownOK(); Statement st = createStatement(); JDBC.assertSingleValueResultSet(st.executeQuery("select " + "count(*) " + "from " + "TEST_TABLE "), "1000"); st.close(); } COM: <s> tests shutdown with the only transaction was committed </s>
funcom_train/16783825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRecipeType() { String type = RecipeType.ALL.name(); if (xmlExists()) { String typeTmp = xmlRoot.getAttributeValue(TYPE); if (typeTmp != null) { type = xmlRoot.getAttributeValue(TYPE); } else { changeRecipeType(RecipeType.valueOf(type)); } } return type; } COM: <s> gets the recipe type </s>
funcom_train/10589679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { broadcastEvent(new RepeaterEvent(this, RepeaterEventAction.ROWS_CLEARING)); rows.clear(); broadcastEvent(new RepeaterEvent(this, RepeaterEventAction.ROWS_CLEARED)); // and reset to initial size for (int i = 0; i < this.definition.getInitialSize(); i++) { addRow(); } getForm().addWidgetUpdate(this); } COM: <s> clears all rows from the repeater and go back to the initial size </s>
funcom_train/7276604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeAlternateLocations() { int count = 0; for (AlternateLocation current : _manager.getValidAlts()) { if (count++ >= 10) break; _downloader.addSuccessfulAltLoc(current); } count = 0; for (AlternateLocation current : _manager.getInvalidAlts()) { if (count++ >= 10) break; _downloader.addFailedAltLoc(current); } } COM: <s> initializes the httpdownloader with whatever alt locs we have discovered </s>
funcom_train/7666946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RSAPublicKey getRSAPublicKey() { if (key != null) { return key; } try { KeyFactory kf = KeyFactory.getInstance("RSA"); key = (RSAPublicKey) kf.generatePublic(new RSAPublicKeySpec(par1, par2)); } catch (Exception e) { return null; } return key; } COM: <s> returns rsapublic key generated using server rsaparams </s>
funcom_train/46723303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSectionInUse(Section s) { try { String query = "select ID from SECREFS where SEC_ID = " + s.getId(); ResultSet rs = st.executeQuery(query); if (rs.next()) { return true; } } catch (SQLException e) { // should never happen! e.printStackTrace(); System.exit(1); } return false; } COM: <s> detect if specific section is being used by existing route </s>
funcom_train/10258435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeItem(Command cmd) { for (int i=0; i<menubar.getMenuCount(); i++) { try { CommandTrigger t = (CommandTrigger)menubar.getMenu(i); if (t.getCommand() == cmd) { menubar.remove(i); return true; } } catch (RuntimeException ignored) {} if (removeItem(menubar.getMenu(i), cmd)) { return true; } } return false; } COM: <s> removes the first menu item which is associated with the given command </s>
funcom_train/2800823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateXmlReport(IUnitSuiteResult pSuiteResult, String pOutputFile) throws RaccoonException { StringBuffer buffer = new StringBuffer(); suiteToXml(buffer, pSuiteResult); try { FileWriter writer = new FileWriter(pOutputFile); writer.write(buffer.toString()); writer.close(); } catch (Exception e) { throw new RaccoonException("Unable to generate XML Report file", e); } } COM: <s> generates the xml report from the result of the unit suite </s>
funcom_train/15684152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean shouldUpdateFromContext(Object path) { if ( isUpdateOriginator() ) return false; // update will be done only if data path of component is concerned String strpath = (path != null) ? path.toString() : null; return shouldUpdateFromContext(strpath, getAbsoluteValueDataPath()); } COM: <s> sees if it must be updated </s>
funcom_train/9577002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(Genome C) { // make sure the hashmap exists assert (genes != null); // make sure the collection is valid assert (C != null); // Check all the items passed in Iterator i = C.iterator(); while (i.hasNext()) { if (!this.contains(i.toString())) { return false; } i.next(); } // well its hasn't triggered a false yet, return true // this does mean two null sets will match, which seems ok return true; } COM: <s> checks a whole collection against the data </s>
funcom_train/2040353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendCommand() { ((ScreenButton) getParent()).sendCommand("click", new AsyncSuccessCallback<Void>() { public void onSuccess(Void result) { // do nothing. } public void onFailure(Throwable caught) { failedTimes = failedTimes + 1; if (failedTimes == 1) { cancelTimer(); resetIcon(); super.onFailure(caught); } } }); } COM: <s> send click command </s>
funcom_train/34283983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getDefaultValue(int column) { Object value = null; switch (column) { case F_SVCSTARTS: value = new Long(DEF_STARTS); break; case F_SVCENDS: value = new Long(DEF_STARTS) + DEF_DURATION; break; case F_SVCBREAKSTARTS: value = new Long(DEF_BREAKSTARTS); break; case F_SVCBREAKENDS: value = new Long(DEF_BREAKENDS); break; } return value; } COM: <s> getting default values for some fields </s>
funcom_train/18653567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws JMSException { closed = true; Iterator it = consumers.iterator(); while (it.hasNext()) { ((MockConsumer)it.next()).close(); } it = producers.iterator(); while (it.hasNext()) { ((MockProducer)it.next()).close(); } } COM: <s> closes this session </s>
funcom_train/4709196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ByteBuffer getContentFromEncodedWriteBuffer() { if (encodedWriteBuffer.hasRemaining()) { byte[] b = new byte[encodedWriteBuffer.remaining()]; encodedWriteBuffer.get(b); encodedWriteBuffer.clear(); //then can encode new buffer return ByteBuffer.wrap(b); } return null; } COM: <s> first encode the message </s>
funcom_train/20876646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistributionPenalty() { int penalty = 0; for (ExamDistributionConstraint dc : variable().getDistributionConstraints()) { if (dc.isHard()) continue; boolean sat = dc.isSatisfied(this); if (sat != dc.isSatisfied()) penalty += (sat ? -dc.getWeight() : dc.getWeight()); } return penalty; } COM: <s> distribution penalty i </s>
funcom_train/43245133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetGender() { System.out.println("setGender"); String gender = ""; PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object(); instance.setGender(gender); // 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 gender method of class org </s>
funcom_train/25703954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIsLoading(boolean isLoading) { if (isLoading) { progressBar.setIndeterminate(true); progressBar.setStringPainted(true); progressBar.setString("Loading"); } else { progressBar.setIndeterminate(false); progressBar.setValue(0); progressBar.setStringPainted(false); } } COM: <s> inform the view that a map image reader is being initialized </s>
funcom_train/934348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void defaultForwardsConfig(ModuleConfig config) { ForwardConfig fcs[] = config.findForwardConfigs(); ActionForwards af = new ActionForwards(); af.setFast(false); for (int i = 0; i < fcs.length; i++) { af.addForward( (ActionForward) fcs[i]); } af.setFast(true); getServletContext().setAttribute(Globals.FORWARDS_KEY, af); } COM: <s> perform backwards compatible configuration of an action forwards </s>
funcom_train/26524188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setVariableFromProperty(String pKey, String pValue) { if (super.setVariableFromProperty(pKey, pValue)) { return true; } else if (pKey.equalsIgnoreCase("UseScoreSelector")) { kUseScoreSelector = parseBoolean(pValue); return true; } else { return false; } } COM: <s> sets sym reg specific variables from the specified properties file </s>
funcom_train/16595577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invertSelection(Table table) { try { SelectableDataSource sds = table.getModel().getModelo().getRecordset(); FBitSet selectedRows=sds.getSelection(); selectedRows.flip(0, (int)sds.getRowCount()); sds.setSelection(selectedRows); } catch (ReadDriverException e) { e.printStackTrace(); NotificationManager.addError(e); } } COM: <s> flip the selection inverts selection </s>
funcom_train/33660332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Batch getBatchForGraph() { Batch lastValidBatch = this.batches.isEmpty() ? null : this.batches.get(this.batches.size()-1); if (lastValidBatch != null && lastValidBatch.graphSize() < this.maxBatchSize) return lastValidBatch; else { Batch next = new Batch(this, this.mapper, this.accessToken, this.timeout, this.retries); this.batches.add(next); return next; } } COM: <s> get an appropriate batch for issuing a new graph call </s>
funcom_train/18896490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object object) { // Compare types. int comparison = super.compareTo(object); // If we have not got matching types return the value if (comparison != 0) { return comparison; } // Compare the dates lexiocally return getLexicalForm().compareTo(((SPGDayImpl) object).getLexicalForm()); } COM: <s> compares this g day representation to another object to see if they are </s>
funcom_train/15912960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveSelectedFlagValues(Collection flags) { Collection allSupported = MatchSetFactory.getAllSupportedFlags(); for (Iterator iter = allSupported.iterator(); iter.hasNext();) { Flag element = (Flag)iter.next(); getPreferenceStore().setValue(element.getCode(), flags.contains(element)); } } COM: <s> saves the values of all flags to the preference store where any flag </s>
funcom_train/50310584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() throws ClusterException { try { if (coalition!=null) { coalition.leave(); } if (coalition.getLocalServer() == null) throw new Exception("Cluster is null"); if (socket!=null) { socket.leaveGroup(coalition.getLocalInetAddress()); } Logger.log(Logger.INFO, "Cluster: Server shutting down...", this); } catch (Exception e) { throw new ClusterException("Problems leaving cluster: " + e.toString()); } } COM: <s> call this method to leave the multicast cluster clean up and shut down </s>
funcom_train/47109771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Properties loadProperties(ServletContext context) { InputStream in = null; Properties p = new Properties(); try { URL resource = context.getResource("/WEB-INF/classes/system.properties"); if (resource == null) { logger.warn("No system.properties file found in classpath"); return p; } in = resource.openStream(); p.load(in); return p; } catch (Exception ex) { logger.error("Failed to read system properties", ex); return p; } finally { IOUtils.closeQuietly(in); } } COM: <s> loads and returns content of the tt system </s>
funcom_train/102611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Float getScoreAt(int row, int col) { // for the year column if (col == 0) { return null; } else { // check for year zero if ((row + row_min == 0) && (col == 1)) return null; Year year = getYear(row, col); if (cross.getRange().contains(year)) return cross.getScore(year); else return null; } } COM: <s> get the score at this row col </s>
funcom_train/8165602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(Tag markup) { String name = markup.getDesignator().getIdentifier().getName(); if(environment.isDefinedFunction(name)) { // Call to defined function // Delegate mark-up as call new Markup.Call(markup.getDesignator()).accept(this); } else { Element tag = new Element(name); addContent(tag); // Store tag as element in JDOM structure visit(markup.getDesignator().getAttributes()); // Process attributes } return null; } COM: <s> create next element in jdom tree structure for tag </s>
funcom_train/965239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void propertyChange(PropertyChangeEvent evt) { super.propertyChange(evt); String propertyName = evt.getPropertyName(); if ( "editable".equals(propertyName) || "enabled".equals(propertyName)) { updateBackground((JTextComponent) evt.getSource()); } } COM: <s> this method gets called when a bound property is changed </s>
funcom_train/44554505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SettingsGroup getSettingGroup(String sGroupKey) { Collection settings = getFlatSettingsGroups(); for (Iterator iter = settings.iterator(); iter.hasNext(); ) { SettingsGroup settingsGroup = (SettingsGroup) iter.next(); if (settingsGroup.getKey().equals(sGroupKey)) { return settingsGroup; } } return null; } COM: <s> retrieves a settings group with the key </s>
funcom_train/6437546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar createMenuBar() { JMenuBar menu = new JMenuBar(); menu.add(createLayoutMenu()); menu.add(createFocusViewMenu()); menu.add(createThemesMenu()); menu.add(createPropertiesMenu()); menu.add(createWindowBarsMenu()); menu.add(createViewMenu()); return menu; } COM: <s> creates the frame menu bar </s>
funcom_train/51294634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showMessage() { if (params != null) { msg += '\n'; for (Iterator iter = params.iterator(); iter.hasNext();) { Object item = iter.next().toString(); if (item != null) msg += '\n' + item.toString(); } } JOptionPane.showMessageDialog(sender, msg, title, JOptionPane.ERROR_MESSAGE); } COM: <s> display an error message all of the params are set before </s>
funcom_train/1341517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreerJoueur() { System.out.println("creerJoueur"); testInitialiser(); String nom = "Louison Bobbé"; Joueur joueur = Moteur.creerJoueur(nom); Assert.assertEquals(1,Moteur.getLesJoueurs().size()); Assert.assertEquals(joueur, Moteur.getLesJoueurs().iterator().next()); } COM: <s> test of creer joueur method of class caps land </s>
funcom_train/51699814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransitionDefinition addInitialTransition(String transitionId, String toStateId, String toOwner) { TransitionMap initialTransitions = getInitialTransitionsMap(); TransitionDefinition initialTrans = new TransitionDefinition(initialTransitions); return addTransition(initialTransitions, initialTrans, transitionId, toStateId, toOwner, false); } COM: <s> add an initial transition to the workflow </s>
funcom_train/45895101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMasterGain(float gain) { if (sdl != null) { FloatControl f = (FloatControl) sdl .getControl(FloatControl.Type.MASTER_GAIN); f.setValue(gain); } else if (soundClip != null) { FloatControl f = (FloatControl) soundClip .getControl(FloatControl.Type.MASTER_GAIN); f.setValue(gain); } else if (oggMusic != null) { FloatControl f = (FloatControl) oggMusic.outputLine .getControl(FloatControl.Type.MASTER_GAIN); f.setValue(gain); } this.gain = gain; } COM: <s> set the master gain in d b </s>
funcom_train/34259873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem buildMenuItem(FileAction aFileAction, DesktopTargetSource targetSource) { JMenuItem lMenuItem = new JMenuItem(aFileAction.getName()); lMenuItem.addActionListener(new FileActionHandler(aFileAction.getName(), targetSource)); return lMenuItem; } COM: <s> builds the jmenu item from the file action </s>
funcom_train/16410802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkCollison() { int[] positionInBallTable = ballTable.getField(x, y); return (positionInBallTable[1] == 0 || // collision with soild !ballTable.isEmpty(positionInBallTable[0], positionInBallTable[1] - 1)); // collsion with ball; } COM: <s> checks wether thers a ball or soild below </s>
funcom_train/43245515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetOfficePhoneNumber() { System.out.println("getOfficePhoneNumber"); PatientDemographicsDG4Object instance = new PatientDemographicsDG4Object(); String expResult = ""; String result = instance.getOfficePhoneNumber(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get office phone number method of class org </s>
funcom_train/21881234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object go() throws Exception { String depotName = getDepot(); if ( null==depotName ) { throw new ParameterException(); } // Call the biz logic layer to list all documents in the ViewDoc depot ProcessResult result = new ProcessResultBase(this); result.setName("projectForm"); result.setScope("request"); result.setSingleForm(true); return result; } COM: <s> find a view doc by its document id </s>
funcom_train/24262078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAssociateSourceVariableA1() { try { ArrayList<Variable> sourceVariables = new ArrayList<Variable>(); sourceVariables.add(derivedVariable1); curationService.associateSourceVariables(demoUser, derivedVariable2, sourceVariables); ArrayList<Variable> sourceVariablesSoFar = curationService.getSourceVariables(demoUser, derivedVariable2); assertEquals(1, sourceVariablesSoFar.size()); assertEquals("DerivedVariableNameA", sourceVariablesSoFar.get(0).getName()); } catch(MacawException exception) { log.logException(exception); fail(); } } COM: <s> associate a single source variable with a derived variable </s>
funcom_train/26086109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IViewPart getView(String id) { IViewReference viewReferences[] = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .getViewReferences(); for (int i = 0; i < viewReferences.length; i++) { if (id.equals(viewReferences[i].getId())) { return viewReferences[i].getView(false); } } return null; } COM: <s> retrieves a view with the given id from the view references registry </s>
funcom_train/43901282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double qsfn(final double sinphi) { if (excentricity >= EPSILON) { final double con = excentricity * sinphi; return ((1.0 - excentricitySquared) * ((sinphi / (1.0 - (con * con))) - ((0.5 / excentricity) * Math.log((1.0 - con) / (1.0 + con))))); } else { return sinphi + sinphi; } } COM: <s> calculates var q var snyder equation 3 12 </s>
funcom_train/25500820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAttribute(Attribute a) { if (!insertAttribute(a)) { return false; //insertion failed } // add to the master list attributeList.add(a); // give every individual a null value for this attribute for (Individual i : getAllIndividuals()) { i.set(a.getName(), ""); } dirty = true; // the project has changed return true; } COM: <s> adds an attribute to the appropriate attribute set </s>
funcom_train/36012227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCreationDate(Date creationDate) { this.creationDate = creationDate; // The hash code will be unique (practically hard to generate two same value). // To make digits short, 36 radix are used. this.id = Long.toString(this.creationDate.getTime(), 36).toUpperCase(); } COM: <s> sets creation date </s>
funcom_train/9339812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BigInteger calculate(int o, BigInteger a, BigInteger b) { if (o == 2) { return a.multiply(b); } else if (b.equals(BigInteger.ZERO)) { switch (o) { case 1: return a; case 2: return BigInteger.ZERO; default: return BigInteger.ONE; } } else { return calculate(o - 1, a, calculate(o, a, b.add(BigInteger.ONE.negate()))); } } COM: <s> calculates a hyperoperation performing no sanity checking </s>
funcom_train/36795202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOpeningTag() { String s = "<" + getQName(); Attributes localAttributes = getAttributes(); for (int i = 0; i < localAttributes.getLength(); i++) { s += " " + localAttributes.getQName(i) + "=\"" + localAttributes.getValue(i) + "\""; } return s += ">"; } COM: <s> produces code string code for the opening html tag for this node </s>
funcom_train/51189469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList getDestinations (Integer u) { int node=u.intValue(); ArrayList result = new ArrayList (); for (int count=0;count < this.adjacency.length;count++) { if ( this.adjacency[node][count]!=0.) result.add(new Integer(count)); } return result; } COM: <s> compute new shortest distance for neighboring nodes and update if a better </s>
funcom_train/22115111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HQInvokerLocator cloneWithNewAgentToken(String agentToken) { Map parameters = null; if (this.getParameters() != null) { parameters = new HashMap(this.getParameters()); } return new HQInvokerLocator(this.getProtocol(), this.getHost(), this.getPort(), this.getPath(), parameters, agentToken); } COM: <s> clone this instance of hq invoker locator setting the agent token </s>
funcom_train/43098020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCommunicationLink(Object handle, Object c) { if (handle instanceof MStimulus && c instanceof MLink) { ((MStimulus) handle).setCommunicationLink((MLink) c); return; } throw new IllegalArgumentException("handle: " + handle + " or c: " + c); } COM: <s> sets the communication link between a link c and a stimulus handle </s>
funcom_train/26324592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { try { FCValue[] args = { getProperty(NAME), getParent().getProperty(NAME) }; getRuntime().getFrontStack().callHandler("doMenu", args); } catch (FCException ex) { getRuntime().reportInternalError(ex); } } COM: <s> calss do menu in the current stack when this menu is selected </s>
funcom_train/15418228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deriveSharedInstance() { if (!sharedInstance){ if (Boolean.TRUE.equals(useQueryCache) || (Boolean.TRUE.equals(readOnly) && (Boolean.TRUE.equals(useBeanCache) || Boolean.TRUE.equals(loadBeanCache)))) { // these combinations also producing shared instance beans sharedInstance = true; } } } COM: <s> check other combinations that can make this a shared instance query </s>
funcom_train/3154953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create(File targetDir, int width, int height, int maxTileSize, int numBuffer) throws IOException { ensureValidDirectory(targetDir); _width = width; _height = height; _maxTileSize = maxTileSize; _numBuffer = numBuffer; calculateNumLayers(); createRoot(); createBuffer(); } COM: <s> creates a new test quad tree file in the assigned directory </s>
funcom_train/49465738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String firstDepartment() throws RaciException { try { return raciRulesFilter.firstFilterOn(inputRaci, RaciObjectType.DEPARTMENT); } catch (Exception e) { RaciException eOut = new RaciException("An error occur whilst retrieving the first department for a rule (e: "+e.getMessage()+")"); _logger.error(eOut); throw eOut; } } COM: <s> returns the first filter on department </s>
funcom_train/19318455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeChar(char value) throws JMSException { if(!isBodyModifiable()) { throw new MessageNotWriteableException("StreamMessage read_only"); } try { dos.writeByte((int) TYPE_CHAR); dos.writeChar((int) value); } catch(IOException e) { throw new JMSException(e.getMessage()); } } COM: <s> writes a code char code to the stream message </s>
funcom_train/5695709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showOpenDialog(String title) { String result = null; JFileChooser fc=new JFileChooser(); fc.setDialogTitle(title); fc.setCurrentDirectory(new File(".")); fc.setFileFilter(new FileNameExtensionFilter("XML file", "xml")); int returnVal = fc.showOpenDialog(getMainFrame()); if (returnVal == JFileChooser.APPROVE_OPTION) { // the user confirmed result = fc.getSelectedFile().getAbsolutePath(); } return result; } COM: <s> displays a dialog box to select a configuration file to load </s>
funcom_train/13889447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("["); sb.append(root); if (!root.isTerminal()) { sb.append("|"); sb.append(probability == 0 ? "" : String.valueOf(probability)); sb.append("|"); for (int i = 0; i < daughters.length; i++) sb.append(daughters[i]); } sb.append("]"); return sb.toString(); } COM: <s> builds a bracketed representation of this tree </s>
funcom_train/39372091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTape(Tape t) throws IllegalParameterException { if (!isTape(t)) throw new IllegalParameterException( Turingmachine.class.getCanonicalName() + " / the passed tape is not part of this turingmachine / not removing tape"); tapes.remove(t); if (undoRedo != null && undoEnabled) undoRedo.performedOperation(this, new Operation( Operation.opType.TAPE_REMOVE, new Object[]{t})); } COM: <s> removes a tape from the machine </s>
funcom_train/51011117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readAnswers() throws Exception { try { Connection con = connect(); try { con.setReadOnly(true); if (question == null) question = qdb.getQuestion(con, qid); results = adb.getAnswers(con, qid, question.getCount()); } finally { con.close(); } } catch (Exception e) { Log.error(e); results = null; throw e; } } COM: <s> reads all answers of the current question </s>
funcom_train/13226849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) throws ClassCastException { if (o == null) { throw new NullPointerException(); } else if (o instanceof JMLPositiveInfinity) { return 0; } else if (o instanceof JMLInfiniteInteger || o instanceof BigInteger) { return +1; } else { throw new ClassCastException(); } } COM: <s> compare this to o returning a comparison code </s>
funcom_train/17828175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String doVariable() { StringBuilder sb = new StringBuilder(); sb.append(sql.charAt(idx)); ++idx; while (idx < len && isNameChar(sql.charAt(idx))) { sb.append(sql.charAt(idx)); ++idx; } return sb.toString(); } COM: <s> called to process a </s>
funcom_train/4597619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupService() { if (mService != null) { try { mContext.unbindService(this); } catch (IllegalArgumentException e) { // Somehow we've already been unbound. This is a non-fatal error. Log.e(TAG, "Unable to unbind from licensing service (already unbound)"); } mService = null; } } COM: <s> unbinds service if necessary and removes reference to it </s>
funcom_train/42263068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean walkPathKillaTemp(final RSTile[] path, final int maxDist) { try { final RSTile next = nextTile(path, maxDist); if (next != null && !next.equals(Methods.current) && distanceTo(Methods.current) <= 2) { walkTileMM(next); Methods.current = next; return false; } else if (next != null && next.equals(Methods.current)) { return false; } } catch (final Exception e) { return false; } return true; } COM: <s> temporary might not exist for long </s>
funcom_train/26599173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeader()throws DException{ updateBytes(0,CCzufDpowfsufs.getBytes(versionHandler.BTREECLUSTER_STARTPOINTER)); updateByte(versionHandler.IS_LEAFNODE,versionHandler.TRUE); updateBytes(versionHandler.PARENTNODEADDRESS,CCzufDpowfsufs.getBytes((int)0)); updateBytes(versionHandler.LEVEL_NODE,CCzufDpowfsufs.getBytes((short)0)); } COM: <s> sets header of cluster when any new btree cluster is made </s>
funcom_train/37820305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEbnfDefinition(Definition ebnfdef) { try { this.ebnfDef = ebnfdef.getStrict(); } catch (DefinitionFormatException e) { // TODO Auto-generated catch block e.printStackTrace(); } this.synDiaSystem = new SynDiaSystem(ebnfdef.getStartVariable() .getName()); this.synDiaSystem = TransAlgorithm.transformEbnf(ebnfDef, transMap); } COM: <s> a method to set another ebnf definition to transform </s>
funcom_train/1542347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt() { if (type == TYPE_INTEGER) return intValue; else if (type == TYPE_SHORT) return shortValue; else if (type == TYPE_BYTE) return byteValue; else throw new ClassCastException( "getInt cannot be called for type "+type.toString()); } COM: <s> get the integer value </s>
funcom_train/36460337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStreams(List<Stream> streams) { this.streams = streams; if (streams != null) { for (Stream stream : streams) { stream.setGraph(getGraph()); stream.setRecording(this); stream.setUri(getUri() + STREAM_PATH + stream.getSsrc()); } } } COM: <s> sets the streams </s>
funcom_train/28471777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAuthor() { AuthorSubscription testAutSub = new AuthorSubscription(); String testAuthor1 = "Johnny John"; String testAuthor2 = "Gregor Greg"; testAutSub.setAuthor(testAuthor1); assertTrue(testAutSub.getAuthor().equals(testAuthor1)); testAutSub.setAuthor(testAuthor2); assertTrue(testAutSub.getAuthor().equals(testAuthor2)); } COM: <s> inserts the name of a new author into the object </s>
funcom_train/10231347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getEntryList() { Vector entryList = new Vector(); synchronized (m_serviceDatabase) { /* get the actual values */ Enumeration serviceDatabaseElements = m_serviceDatabase.elements(); while (serviceDatabaseElements.hasMoreElements()) { entryList.addElement(serviceDatabaseElements.nextElement()); } } return entryList; } COM: <s> returns a snapshot of all values in the service database </s>
funcom_train/17946513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateInput() { String errorMessage = null; if (validator != null) { errorMessage = validator.isValid(text.getText()); } // Bug 16256: important not to treat "" (blank error) the same as null (no error) errorMessageLabel.setText(errorMessage == null ? "" : errorMessage); //$NON-NLS-1$ okButton.setEnabled(errorMessage == null); errorMessageLabel.getParent().update(); } COM: <s> validates the input </s>
funcom_train/11324148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() { if (this.element != null) { try { JavaUI.revealInEditor(JavaUI.openInEditor(element), element); } catch (Exception e) { } } if(this.file != null){ try { IDE.openEditor(ClickUtils.getActivePage(), file); } catch(Exception ex){ } } } COM: <s> opens the standard java editor for the given ijava element </s>
funcom_train/32206094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setConnection ( HybridConnection conn ) { // Checks if a connection is already use if ( this.objConnection != null ) { return false; } // Checks if the connection object is of the right type if ( !(conn instanceof ASConnection) ) { return false; } // Sets the connection object this.objConnection = (ASConnection)conn; this.objConnection.registerArena( ASArena.getInstance() ); return true; } COM: <s> sets the connection object to use by this plugin </s>
funcom_train/365581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getMainSplitPane() { if (MainSplitPane == null) { MainSplitPane = new JSplitPane(); MainSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); MainSplitPane.setDividerLocation(300); MainSplitPane.setOneTouchExpandable(true); // Generated MainSplitPane.setContinuousLayout(true); // Generated MainSplitPane.setBottomComponent(getDown()); MainSplitPane.setTopComponent(getUp()); } return MainSplitPane; } COM: <s> this method initializes main split pane </s>