__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50847896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateByte() throws Exception { if (!isTestUpdates()) { return; } try { ResultSet rs = this.newUpdateableJdbcResultSet(); rs.next(); rs.updateByte("tinyint_column", (byte) 1); } catch (Exception e) { fail(e.toString()); } } COM: <s> test of update byte method of interface java </s>
funcom_train/43122138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestNewPassword(String email) { // email is unique, so we can find it Account searchAccount; Query q = manager.createQuery("from Account a where a.email = :email"); searchAccount = (Account) q.setParameter("email", email).getSingleResult(); // TODO : if Account not null, send email.. } COM: <s> ask for a new password to be sent by email </s>
funcom_train/36777450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { try { DbCon.getInstance().executeUpdate("UPDATE booking SET closed=1 WHERE bookingNo='" + bookingNo + "'"); } catch (SQLException ex) { new EventMessage("SQL error in Booking.delete()", "There was an error performing the sql inquery\n").showException(ex); } } COM: <s> method for deleting the booking from the database </s>
funcom_train/44710117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(Form f, FormModel m) { super.register(f,m); m.addFormParam(new StringParameter(getParameterModel().getName() + ".x")); m.addFormParam(new StringParameter(getParameterModel().getName() + ".y")); } COM: <s> registers get name </s>
funcom_train/5158122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WebSearchResults webSearch(WebSearchRequest request) throws IOException, SearchException { request.getParameters().put(APPID_KEY, appId); Map results = executeAndParse(request.getRequestUrl(), request.getParameters()); return new XmlParserWebSearchResults(results); } COM: <s> searches the yahoo database for web results </s>
funcom_train/2505026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(String destination) { int index = 0; while (index < reverseRoutes.size()) { AODVRoute route = (AODVRoute) reverseRoutes.get(index); if ((route.getLastTimeUsed() + Constants.ROUTING_TIMEOUT) < System.currentTimeMillis()) { reverseRoutes.remove(index); } else { if (route.getDestination().equalsIgnoreCase(destination)) { return true; } index++; } } return false; } COM: <s> verifies if for the provided destination a reverse route exists in the </s>
funcom_train/32081415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf (String string, int start) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if (!(0 <= start && start < items.length)) return -1; for (int i=start; i<items.length; i++) { if (string.equals(items [i])) return i; } return -1; } COM: <s> searches the receivers list starting at the given </s>
funcom_train/8061115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isWidthLocateBetween(Rectangle r1, int l, int r) { int left = l; int right = r; if (left > right) { left = r; right = l; } if (r1.getLeft() > left && r1.getLeft() + r1.getWidth() < right) { return true; } return false; } COM: <s> if r1s left gt left and r1s right lt right return true </s>
funcom_train/19977378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(PropertyStore properties) { List<String[]> data = properties.getList(); for (int i = 0; i < data.size(); i++) { String[] s = data.get(i); add(s[0], s[1]); } } COM: <s> this method acts as bridge between </s>
funcom_train/23709392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public mxRectangle processChanges(List changes, boolean invalidate) { mxRectangle bounds = null; Iterator it = changes.iterator(); while (it.hasNext()) { mxRectangle rect = processChange(it.next(), invalidate); if (bounds == null) { bounds = rect; } else { bounds.add(rect); } } return bounds; } COM: <s> processes the changes and returns the minimal rectangle to be </s>
funcom_train/16783791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameExistingXMLFile(File file, String newName) { File renamedFile = new File(CookbookConstants.RECIPE_FOLDER + newName + CookbookConstants.XML_FILE_SUFFIX); writeXMLToFile(file); if (!file.renameTo(renamedFile)) { deleteXMLFile(file); writeXMLToFile(renamedFile); } } COM: <s> renames the given file to the new name </s>
funcom_train/46696023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGet_String() { System.out.println("get"); String string = "BasicType"; PropertiesImplementation instance = new PropertiesImplementation(); ParameterInternal expResult = ParameterFactory.newInstance().create("BasicType", String.class); instance.add(expResult); ParameterInternal result = instance.get(string); assertSame(expResult, result); } COM: <s> test of get method of class properties implementation </s>
funcom_train/8748552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisibleButtons(int visibleButtons) { for (ButtonVisibility bv : ButtonVisibility.values()) { if ((bv.getVisibilityIndex() & visibleButtons) != 0) { setVisible(bv.getButton(), true); } else { setVisible(bv.getButton(), false); } } } COM: <s> sets the visible buttons </s>
funcom_train/32094393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void adjustOrientation() { job = SudokuUtil.getPrinterJob(); pageFormat = SudokuUtil.getPageFormat(); if (layoutList.getSelectedIndex() >= 3) { pageFormat.setOrientation(PageFormat.LANDSCAPE); // System.out.println("setting landscape!"); } else { pageFormat.setOrientation(PageFormat.PORTRAIT); } } COM: <s> the orientation of the print pageis defined by the layout selected in </s>
funcom_train/3704392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addValue(Tuple t) { if (TUPLE_VALUE.equals(t.getTupleType()) == false) { throw new IllegalArgumentException("Tuple has type " + t.getTupleType() + ", should have type: " + TUPLE_VALUE); } tupleValues.addTuple(t); sortValuesByConfidence(); } // of method COM: <s> add a value </s>
funcom_train/29556222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { super.clear(); short[] keys = _set; long[] vals = _values; byte[] states = _states; for (int i = keys.length; i-- > 0;) { keys[i] = (short)0; vals[i] = (long)0; states[i] = FREE; } } COM: <s> empties the map </s>
funcom_train/38315425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLink(LinkEntry entry) throws PersistenceException { Session session = null; try { session = this.sessionManager.getHibernateSession(); session.update(entry); } catch (HibernateException he) { log.debug("HibernateException caught updating entry.", he); throw new PersistenceException(he); } finally { this.sessionManager.flushCommitCloseSession(session); } } COM: <s> update a link database using a hibernate session </s>
funcom_train/34479047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlinkRepository() throws SdaiException { if (session == null) { throw new SdaiException(SdaiException.RP_NEXS); } if (schemas == null) { throw new SdaiException(SdaiException.FN_NAVL); } if (active) { throw new SdaiException(SdaiException.RP_OPN, this); } // synchronized (syncObject) { session.known_servers.removeUnorderedRO(this); session = null; // } // syncObject } COM: <s> removes the repository from the current session but does not delete it </s>
funcom_train/7995013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element createUnscheduledEl(Unscheduled unscheduled) { Element unscheduledEl = new Element("unscheduled"); Element idEl = new Element("id"); idEl.setText(unscheduled.getId()); Element userstoriesEl = new Element("userstories"); ArrayList<UserStory> userstories = unscheduled.getUserStories(); for (UserStory story : userstories) { userstoriesEl.addContent(createUserStoryElement(story)); } unscheduledEl.addContent(idEl); unscheduledEl.addContent(userstoriesEl); return unscheduledEl; } COM: <s> utility method to create the proper jdom element structure out of the </s>
funcom_train/27837633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String inspect() { StringBuffer result = new StringBuffer(); result.append("UML VM Information\n"); result.append("" + getContainedElementSize() + " element(s)\n"); Iterator iter = getContainedElementIterator(); while (iter.hasNext()) { UmlElement item = (UmlElement)iter.next(); result.append("Element: " + item.toString() + "\n"); } return result.toString(); } COM: <s> create a string contents of the virtual machine </s>
funcom_train/3291267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration searchWithWhere(String where) { // do the query on the database String query="SELECT * FROM "+getFullTableName()+" where "+where; Vector results=basicSearch(query); if (results!=null) { return results.elements(); } else { return null; } } COM: <s> enumerate all the objects that match the where clause </s>
funcom_train/28545549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertInWorkingMemory(WorkingMemoryEntryPoint aEntryPoint) { if (factHandles.containsKey(aEntryPoint)) { log.warning("Working memory object " + this + " should already be in aWM"); } final FactHandle fh = aEntryPoint.insert(this); // no property change // support assert fh != null; factHandles.put(aEntryPoint, fh); } COM: <s> insert this into a entry point </s>
funcom_train/46758477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addList(java.util.Set<ParameterModel> parameters) throws Exception { for (ParameterModel param : parameters) { ISParameter p = new ISParameter(param.getParameterRef().getDisplay(), param.getValue()); for (ISParameter p1 : createList(parameters)) { if (Converter.isSame(p, p1)) { p.addValue(p1); } } this.addValue(p); } } COM: <s> all all parameters to the list </s>
funcom_train/20333751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof ContextEntity) { ContextEntity cmp=(ContextEntity)obj; if (getInstanceName()!=cmp.getInstanceName() && (getInstanceName()==null || !getInstanceName().equals(cmp.getInstanceName())) ) return false; return true; } return false; } COM: <s> test the equality of this code context entity code </s>
funcom_train/46261284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void receiveServerResponse() { try { System.out.println("Waiting for server response....."); serverMessageHeader = socketReader.readLine(); System.out.println("Received header : " + serverMessageHeader); ServerMessageType type = ClientUtils .getServerMessageType(serverMessageHeader); switch (type) { case ACK: receiveAck(); break; case ASK_RESEND: resendMessage(); break; case ERROR: receiveError(); break; } } catch (IOException e) { e.printStackTrace(); } } COM: <s> receive server response and do appropriate actions </s>
funcom_train/37197560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FormReportEditor newFormReportEditor(String databaseName, String schemaName, String type) throws PropertyVetoException { String formReportName; if(type == DMHeaders.FORM) formReportName = resources.NEW_FORM_STRING; else formReportName = resources.NEW_REPORT_STRING; final FormReportEditor formReportEditor = new FormReportEditor(this, editor, databaseName, schemaName, formReportName, serverAccess, type, desktopManager); return formReportEditor; } COM: <s> create a new form or report for editing </s>
funcom_train/37449898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query getHiddenQuery(Class clazz) { Criteria crit = new Criteria(); // We only need obsolete items crit.addEqualTo("annotations.cvTopic.shortLabel", CvTopic.HIDDEN ); ReportQueryByCriteria query = QueryFactory.newReportQuery(clazz, crit); // Limit to shortlabel query.setAttributes(new String[] { "ac" }); return query; } COM: <s> returns a query to get a list of hidden acs </s>
funcom_train/50502124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(List findings) { super.validate(findings); Iterator iter = settings.values().iterator(); while(iter.hasNext()) { IValidatable validatable = null; try { validatable = (IValidatable) iter.next(); validatable.validate(findings); } catch(ClassCastException cce) { log.warn("Class settings is not validatable: " + validatable); } } } COM: <s> validates the finding list </s>
funcom_train/33717759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AxedChar getLeft(int count, boolean lineWrap) { AxedChar c = this; while (count > 0) { if (c.isPos1()) { return c; } while (c.before != null) { c = c.before(); count--; if (count == 0) { return c; } } assert c.before == null; if (!lineWrap) { return c; } c = line.before().lastChar(); count--; } return c; } COM: <s> gets the char count characters to the left </s>
funcom_train/6226713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g, JComponent c) { if(!c.isOpaque()) return; Color bg = c.getBackground(); if(bg instanceof ColorUIResource) { bg = Theme.menuBarColor.getColor(); } g.setColor(bg); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } COM: <s> paints the menu bar background </s>
funcom_train/174534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void delayedExecute(Runnable command) { if (isShutdown()) { reject(command); return; } // Prestart a thread if necessary. We cannot prestart it // running the task because the task (probably) shouldn't be // run yet, so thread will just idle until delay elapses. if (getPoolSize() < getCorePoolSize()) prestartCoreThread(); super.getQueue().add(command); } COM: <s> specialized variant of thread pool executor </s>
funcom_train/20885394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrimitiveIntXML() { PrimitiveIntDTO dto = new PrimitiveIntDTO(); dto.primitiveIntField = 2106; assertTrue(JSefaTestUtil.serialize(XML, dto).indexOf("2106") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, dto); } COM: <s> tests primitive int xml </s>
funcom_train/43894603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeBounds(Envelope bounds) { try { String boundedBy = geometryTranslator.getDefaultPrefix() + ":" + "boundedBy"; contentHandler.startElement("", "", boundedBy, NULL_ATTS); geometryTranslator.encode(bounds, srsName); contentHandler.endElement("", "", boundedBy); } catch (SAXException se) { throw new RuntimeException(se); } } COM: <s> writes the code gml bounded by code element to output based on </s>
funcom_train/26093488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Properties props) throws Exception { Randomizer randomizer = (Randomizer) props.singletonObjectProperty(Randomizer.class); String componentName = props.getProperty(SimpleTournament.COMPONENT_GAME_KEY); Game aGame = (Game) props.newObjectProperty(componentName); init(aGame, (ScoringWeights) props .singletonObjectProperty(ScoringWeights.class), randomizer.getRand()); } COM: <s> note this object overrides code a match code count opponent results to </s>
funcom_train/3158471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeProductNodes(Product product, Object output) throws IOException { Guardian.assertNotNull("product", product); Guardian.assertNotNull("output", output); if (!isInstanceOfValidOutputType(output)) { throw new IllegalArgumentException("invalid output type"); } _sourceProduct = product; _output = output; writeProductNodesImpl(); } COM: <s> writes the in memory representation of a data product </s>
funcom_train/7641793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildAvdList(ArrayList<AvdInfo> allList) throws AndroidLocationException { File[] avds = buildAvdFilesList(); if (avds != null) { for (File avd : avds) { AvdInfo info = parseAvdInfo(avd); if (info != null) { allList.add(info); } } } } COM: <s> computes the internal list of available avds </s>
funcom_train/17845920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSearchButton() { mGoButton = true; mGoOrCancelButton.setIcon(IconLoader.getInstance().getIconFromTheme("action", "media-playback-start", 16)); mGoOrCancelButton.setToolTipText(mLocalizer.msg("start.tooltip", "Start search")); } COM: <s> make a search button from the combined search cancel button </s>
funcom_train/13996229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleEvent(ActionEvent e) { Object node = tree.getLastSelectedPathComponent(); if (node instanceof URITreeNode) { GUI.getURIHandlerManager().handleURI(((URITreeNode) node).getURI()); } else if (node instanceof ActionTreeNode) { ((ActionTreeNode) node).getAction().actionPerformed(e); } } COM: <s> when the selected tree node is a uritree node the uri is handled </s>
funcom_train/12194048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() throws java.io.IOException { super.flush(); if (position > 0) { if (encode) { out.write(Base64.encode3to4(buffer, position)); position = 0; } // end if: encoding else { throw new java.io.IOException( "Base64 input not properly padded."); } // end else: decoding } // end if: buffer partially full out.flush(); } // end flush COM: <s> appropriately pads base64 notation when encoding or throws an </s>
funcom_train/25986529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RubyClass makeMetaClass(RubyClass superClass) { MetaClass klass = new MetaClass(getRuntime(), superClass); // rb_class_boot setMetaClass(klass); klass.setAttached(this); klass.setMetaClass(superClass.getRealClass().getMetaClass()); superClass.addSubclass(klass); return klass; } COM: <s> rb make metaclass </s>
funcom_train/22361449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem addMenuItem(JMenu parentMenu, MenuAction action) { JMenuItem item = parentMenu.add(action); item.setMnemonic(action.getMnemonic()); if (action.getAccelerator() != null) { DesktopEnvironment.registerActionListener(action.getAccelerator(), action); item.setAccelerator(action.getAccelerator()); } new MenuActionObserver(item, action); return item; } COM: <s> adds a new menu item to the specifie menu associating it with the </s>
funcom_train/20897885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMedlineIDs(Vector medlines) { if (medlineIDs == null) { medlineIDs = new HashSet(); } // end of if () else { medlineIDs.clear(); } // end of if ()else for (Iterator i = medlines.iterator(); i.hasNext();) { medlineIDs.add(i.next()); } // end of () } COM: <s> set the value of medline ids </s>
funcom_train/28874763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setGreen() { if (jLabel[instrument]!=null) { jLabel[instrument].setIcon(new javax.swing.ImageIcon( getClass().getResource("/jitt64/swing/icons/green.png"))); jLabel[instrument].setToolTipText("Ready to play"); jLabel[instrument].repaint(); } } COM: <s> set the semaphore to green </s>
funcom_train/28212001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonAnuluj() { if (jButtonAnuluj == null) { jButtonAnuluj = new JButton(); jButtonAnuluj.setText("Anuluj"); jButtonAnuluj.setSize(new Dimension(75, 20)); jButtonAnuluj.setLocation(new Point(95, 133)); } jButtonAnuluj.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { close(); } }); return jButtonAnuluj; } COM: <s> this method initializes j button anuluj </s>
funcom_train/46460966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playTone(char frequency, char msec) throws IOException { byte [] msg = new byte [6]; msg[0] = (byte)0x80; msg[1] = (byte)0x03; msg[2] = (byte)(frequency & 0xff); msg[3] = (byte)((frequency >> 8) & 0xff); msg[4] = (byte)(msec & 0xff); msg[5] = (byte)((msec >> 8) & 0xff); sendMessage(msg); } COM: <s> this causes the nxt to pay a tone defined by the parameters </s>
funcom_train/41303033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMainEqLabelsGrouped(boolean set) { // removeFromDragGroup(int groupId, Component comp) _groupMainEqLabels = set; if (_groupMainEqLabels) { addToDragGroup(_mainEqLabelsDragGroupId, _mainEqShortLabel); addToDragGroup(_mainEqLabelsDragGroupId, _mainEqDxLabel); addToDragGroup(_mainEqLabelsDragGroupId, _fundamentalEqLabel); } else clearDragGroup(_mainEqLabelsDragGroupId); } COM: <s> creates drag group br </s>
funcom_train/4532735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runProgram(String memLimit) throws IOException { boolean mayExit = false; StreamJob job = new StreamJob(genArgs(memLimit), mayExit); job.go(); String output = TestMiniMRWithDFS.readOutput(outputPath, mr.createJobConf()); assertEquals("output is wrong", SET_MEMORY_LIMIT, output.trim()); } COM: <s> runs the streaming program </s>
funcom_train/27853495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convert(){ StringBuffer sb = new StringBuffer(String.valueOf(ld1)); if(ld1 != lf1) sb.append(',').append(lf1); sb.append('c').append(ld2); if(ld2 != lf2) sb.append(',').append(lf2); sb.append('\n'); for (Iterator iter=a.iterator(); iter.hasNext(); ) sb.append("< ").append(iter.next()).append('\n'); sb.append("---\n"); for (Iterator iter=b.iterator(); iter.hasNext(); ) sb.append("> ").append(iter.next()).append('\n'); return sb.toString(); } COM: <s> returns a string representation of the current hunk </s>
funcom_train/10390300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JspServletWrapper getJspForUnload(final int maxLoadedJsps) { if( jsps.size() > maxLoadedJsps ) { synchronized( jsps ) { JspServletWrapper oldest; synchronized( jspQueue) { oldest = jspQueue.pop(); } if (oldest != null) { removeWrapper(oldest.getJspUri()); return oldest; } } } return null; } COM: <s> returns a jsp servlet wrapper that should be destroyed </s>
funcom_train/26641614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String lookupName(ConstantPool cp) { String name; if (getCachedConstantPool() == null) cachePool(cp); if (cp == null) cp = getCachedConstantPool(); try { name = ((UTFConstant)cp.get(nameIndex)).toString(); } catch (Exception e) { name = "<<invalid name index>>"; } return name; } COM: <s> lookup the name in the the constant pool given </s>
funcom_train/45692119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCutoffPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PartWithCommon_cutoff_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_cutoff_feature", "_UI_PartWithCommon_type"), EsxPackage.Literals.PART_WITH_COMMON__CUTOFF, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cutoff feature </s>
funcom_train/45623026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUtf8OutputPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_utf8Output_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_utf8Output_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_Utf8Output(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the utf8 output feature </s>
funcom_train/49217379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasColumnReferenceTo(int columnIndex) { TextTableCellReference[] textTableCellReferences = textTableFormulaModel .getCellReferences(); for (int i = 0; i < textTableCellReferences.length; i++) { TextTableCellReference textTableCellReference = textTableCellReferences[i]; if (!textTableCellReference.isModified()) { boolean value = textTableCellReference .containsColumn(columnIndex); if (value) return true; } } return false; } COM: <s> returns information whether this formula has a reference to a column with </s>
funcom_train/15530619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintWriter pw) { pw.println(this); if (callingStackTrace != null) { pw.println("Calling stack:"); for (int i = 0; i < callingStackTrace.length; i++) { pw.println("\tat " + callingStackTrace[i]); } pw.println("Stack after call:"); } super.printStackTrace(pw); } COM: <s> prints the calling stack and the exception stack trace </s>
funcom_train/10532978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToObjectArray2() { ControlBeanContextSupport cbcs = getContext(); ControlBeanContextChildSupport child = new ControlBeanContextChildSupport(); assertTrue(cbcs.add(child)); Object[] array = cbcs.toArray(new Object[1]); assertEquals(1, array.length); assertEquals(child, array[0]); } COM: <s> test to array object collection api </s>
funcom_train/6260118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateJmiModifier(AssociationEnd ae1, AssociationEnd ae2) { final String ty = type(ae2); final String param1 = ty + " oldElement"; final String param2 = ty + " newElement"; line("public void " + jmi.modifier(jmi.genName(ae2), param1, param2) + ";"); } COM: <s> generates for this association end modifier method </s>
funcom_train/29779704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void creationComplete(String id) { if (id != null && objectsInCreation != null) { if (!objectsInCreation.containsKey(id)) { throw new NoSuchBeanDefinitionException(id); } Object object = objectsInCreation.remove(id); if (((Builder) definitions.get(id)).isSingleton()) { objects.put(id, object); } } } COM: <s> invoked by the builder when creation is complete </s>
funcom_train/22370951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSliderValues() { int[] eqSettings = playerHandler.getEqualizer().getEqualizerSettingsToShowInGUI(); if (eqSettings != null) { for (int i = 0; i < 10; i++) { bands[i].setValue(eqSettings[i]); } } } COM: <s> updates sliders with current equalizer settings </s>
funcom_train/31301581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean runScript(Properties props) { try { ILoggable log = (ILoggable) getScriptContext().retrieveObject("loggable"); String file = props.getProperty("file"); LogToFile lfile = new LogToFile(new File(file)); lfile.writeRecord(log); return true; } catch (Exception e) { return false; } } COM: <s> runs the script takes a iloggable instance from </s>
funcom_train/40678407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fraction getMinFraction() { GValueAPI.GValue frMin = gst.gst_value_get_fraction_range_min(value); int num = gst.gst_value_get_fraction_numerator(frMin); int denom = gst.gst_value_get_fraction_denominator(frMin); return new Fraction(num, denom); } COM: <s> gets the minimum fraction of the range </s>
funcom_train/35740128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTrustedCertificate(ID id, X509Certificate cert) throws KeyStoreException, IOException { String alias = id.toString(); synchronized (keystore_manager) { KeyStore store = keystore_manager.loadKeyStore(keystore_password); store.deleteEntry(alias); store.setCertificateEntry(alias, cert); keystore_manager.saveKeyStore(store, keystore_password); } } COM: <s> adds a trusted certificate with the specified id to the key store </s>
funcom_train/47806247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWebsite(String url,int delay,boolean cache){ try{ if(!cache) return getWebsite(url,delay); File d=new File("webcache"); if(!d.exists()) d.mkdirs(); File f=new File(d.getAbsolutePath()+"/"+URLEncoder.encode(url,"UTF-8")); if(f.exists()) return IO.readFile(f); String p=getWebsite(url,delay); IO.writeFile(f, p); return p; }catch(Exception e){e.printStackTrace();} return null; } COM: <s> get the website for the given url as a string next request will </s>
funcom_train/15400060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Hashtable getTextDrawingAttributes(Graphics2D g2) { Hashtable textAttrs = (Hashtable)getTextAttributes().clone(); Font ft = (Font)textAttrs.get(TextAttribute.FONT); Font scaledFT = getFont(g2, ft); textAttrs.put(TextAttribute.FONT, scaledFT); return(textAttrs); } COM: <s> parses and returns font type and scaling information from hashtable </s>
funcom_train/48407433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPackageableElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MethodPlugin_packageableElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MethodPlugin_packageableElement_feature", "_UI_MethodPlugin_type"), SpemxtcompletePackage.eINSTANCE.getMethodPlugin_PackageableElement(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the packageable element feature </s>
funcom_train/46575742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startBUTTON(NamedNodeMap nnm) throws AppToyException { JButton btn = new JButton(); btn.setText(getAttribute(nnm, "label", "")); ctx.control = btn; processEventAttributes(nnm, "http://apptoy.sf.net/events"); String id = getAttribute(nnm, "id", null); if (id != null) { presenter.addControl(id, new AButton(btn)); } processControlAttributes((Component)ctx.control,nnm); } COM: <s> creates a jbutton </s>
funcom_train/50862655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAllConstructionSitesProfit(int constructionSkill) { double result = 0D; ConstructionManager manager = settlement.getConstructionManager(); Iterator<ConstructionSite> i = manager.getConstructionSitesNeedingConstructionMission().iterator(); while (i.hasNext()) { double profit = getConstructionSiteProfit(i.next(), constructionSkill); if (profit > result) result = profit; } return result; } COM: <s> gets the overall profit of all existing construction sites at a settlement </s>
funcom_train/3813187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Configurable lookup(String instanceName) throws InternalConfigurationException { // apply all new properties to the model instanceName = getStrippedComponentName(instanceName); PropertySheet ps = getPropertySheet(instanceName); if (ps == null) return null; if (showCreations) getRootLogger().config("Creating: " + instanceName); return ps.getOwner(); } COM: <s> looks up a configurable component by name </s>
funcom_train/7989637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SensorData makeTestSensorDataPrivateSource() throws Exception { return new SensorData(Tstamp.makeTimestamp("2009-07-28T09:40:00.000-10:00"), "JUnit", Source .sourceToUri(defaultPrivateSource, server), new Property(SensorData.POWER_CONSUMED, "3000")); } COM: <s> creates a sensor data for use in testing for the default private source </s>
funcom_train/34353175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeConnection() { if (out != null) { out.close(); out = null; } if (in != null) { try { in.close(); } catch (IOException e) {} in = null; } if (conn != null) { conn.disconnect(); conn = null; } } COM: <s> if not already null closes and sets to null the connection </s>
funcom_train/41165211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoSequenceUserHistory entity) { EntityManagerHelper.log("deleting CoSequenceUserHistory instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoSequenceUserHistory.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co sequence user history entity </s>
funcom_train/8766275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HttpServletRequest processMultipart(HttpServletRequest request) { if (!"POST".equalsIgnoreCase(request.getMethod())) { return (request); } String contentType = request.getContentType(); if ((contentType != null) && contentType.startsWith("multipart/bridge-data")) { return (new MultipartRequestWrapper(request)); } else { return (request); } } COM: <s> if this is a multipart request wrap it with a special wrapper </s>
funcom_train/2574973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeAllOpenResults() { if (this.openResults != null) { for (Iterator iter = this.openResults.iterator(); iter.hasNext();) { ResultSet element = (ResultSet) iter.next(); try { element.realClose(false); } catch (SQLException sqlEx) { AssertionFailedException.shouldNotHappen(sqlEx); } } this.openResults.clear(); } } COM: <s> close any open result sets that have been held open </s>
funcom_train/35419585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Execution invokeAsTester(Invocation pInvocation) { _supervisor.echo("Invoking "+pInvocation.getString()) ; Execution result = null ; executeMethod(pInvocation,pInvocation._callee, pInvocation._method, pInvocation._params) ; result = currentInvocation()._execution ; return result ; } COM: <s> execute the invocation as tester </s>
funcom_train/18107715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String JSP_DEST = ""; String message = null; try { JSP_DEST = "prepare"; } catch (Exception e) { e.printStackTrace(); JSP_DEST = "error"; } return (mapping.findForward(JSP_DEST)); } COM: <s> invoked for upload create new language version of the document </s>
funcom_train/39895344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportTestSuite(TestSuite testSuite,OutputStream stream) throws FileNotFoundException, JiBXException{ IBindingFactory bfact = BindingDirectory.getFactory(TestCase.class); IMarshallingContext mctx = bfact.createMarshallingContext(); mctx.setIndent(2); mctx.marshalDocument(testSuite, "UTF-8", null, stream); } COM: <s> exports test suite to xml </s>
funcom_train/30351598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBPResumeWithWrongArg() throws Exception { try{ this.bpManager.resume(null); fail("Resume report success for null bpxid"); } catch(BPManagerException e){ } catch(Exception ex){ fail("WRONG exception is THROWED: " + ex); } BPThreadResumeRequestVO request2 = new BPThreadResumeRequestVO(); request2.setThreadxId(CommonConfig.THREAD_ID); try{ /*BPResponseVO result = */this.bpManager.resume(request2); fail("Resume report success for wrong threadid"); } catch(BPManagerException e){ } catch(Exception ex){ fail("WRONG exception is THROWED: " + ex); } } COM: <s> test of the business process resume by resume request with legal argument </s>
funcom_train/9989724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String genPrefilter ( prefilter p ) { String col = p.specificColumnName(); // Specific Column in the database (ex. table.column) String op = " " + getPrefilterOp( p.op ) + " "; // JDBC SQL Compliant comparorator String val = "'" + sanitize(p.value) + "'"; // value to be compared against (col) using the opeartor (op) return col + op + val; } COM: <s> creats the syntax for a single prefilter </s>
funcom_train/3717573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(String key) { try { return bundle.getString(key); } catch (java.util.MissingResourceException e) { System.err.println("value for key " + key + " in locale " + bundle.getLocale() + " not found"); e.printStackTrace(); return ""; } } COM: <s> retrieves the value for the given key from this resource bundle </s>
funcom_train/31456378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initObjectList() { try { TriggerRegistryRI triggers = isle.getTriggerRegistry(); objectList.clear(); for ( int id : triggers.getAllTriggers() ) objectList.add( triggers.getTrigger(id) ); } catch(TriggerNotFoundException tnfe) { Log.exception(Log.INFO, "Trigger not found", tnfe); } catch(RemoteException re) { Log.exception(Log.INFO, "Exception while retrieving trigger data", re); } } COM: <s> called to initialize the trigger list </s>
funcom_train/3294469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getProperties() { Hashtable hash=new Hashtable(); Element e = getElementByPath("module.properties"); if (e!=null) { Enumeration enum = getChildElements(e,"property"); Element p; String name, value; while (enum.hasMoreElements()) { p = (Element)enum.nextElement(); name = getElementAttributeValue(p,"name"); value = getElementValue(p); hash.put(name,value); } } return(hash); } COM: <s> get the properties of this builder </s>
funcom_train/4533121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendForfeit() { DefaultPacketExtension forfeit = new DefaultPacketExtension(GameForfeit.ELEMENT_NAME, GameForfeit.NAMESPACE); forfeit.setValue("gameID", Integer.toString(gameID)); Message message = new Message(); message.setTo(opponentJID); message.addExtension(forfeit); connection.sendPacket(message); connection.removePacketListener(gameMoveListener); } COM: <s> sends a forfeit message to the other player </s>
funcom_train/1238946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyBooleanProperty(String name, Object value) { if (!(value instanceof Boolean)) { throw new JAXRPCException( Messages.getMessage("badProp00", new String[] {name, "java.lang.Boolean", value.getClass().getName()})); } } COM: <s> verify that the type of the object is a boolean and throw </s>
funcom_train/18742207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJModel(GraphJModel<?,?> jModel) { if (jModel == getJModel()) { getJGraph().repaint(); } else { getJGraph().setModel(jModel); } boolean enabled = jModel != null; setEnabled(enabled); refreshStatus(); } COM: <s> changes the graph model displayed in this panel </s>
funcom_train/28699247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBackButton(ActionListener listener, String command) { ImageIcon backIcon = PicrossUIHelper.getLocalizedImage("button-back.png"); JButton backButton = new JButton(backIcon); backButton.setActionCommand(command); backButton.addActionListener(listener); backButton.setBorder(null); backButton.setBounds(7, 318, backIcon.getIconWidth(), backIcon.getIconHeight()); this.add(backButton); } COM: <s> adds a back button </s>
funcom_train/118924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(Graphics g, CellView value, Rectangle r) { if (value instanceof EdgeView && g != null && value != null) { setView(value); Graphics2D g2 = (Graphics2D) g; boolean hit = g2.hit(r, view.getShape(), true); if (hit) return true; Rectangle rect = view.getLabelBounds(); if (rect != null) return rect.intersects(r); } return false; } COM: <s> returns true if the edge shape intersects the given rectangle </s>
funcom_train/4557836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoginTickOffHidePassword() { repEng.newStep("302", "Login-Tick off Hide password"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the cart icon. //5. Click Login button. //6. Fill in password, and tick off Hide password. // The filled password is displayed in the textbox. } COM: <s> 302 login tick off hide password </s>
funcom_train/41165564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoEditorReviewerPairT2 entity) { EntityManagerHelper.log("deleting CoEditorReviewerPairT2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoEditorReviewerPairT2.class, entity.getEditorReviewerPairTeacherId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co editor reviewer pair t2 entity </s>
funcom_train/33264825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuGadget getVisibleMenu() { Gadget[] gadgets = getGadgets(); for (int i = 0; i < gadgets.length; i++) { MenuGadget menu = (MenuGadget)gadgets[i]; PopupMenuGadget popup = menu.getPopup(); if (popup.isVisible()&&popup.getShell() != null) { return menu; } } return null; } COM: <s> get visible menu </s>
funcom_train/36534397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCrossingRedTime(String mapName, int number) { int red = 0; try { String selectStatement = "SELECT RedTime FROM crossing WHERE MapID=? and CrossingNum=?;"; PreparedStatement pstmt = con.prepareStatement(selectStatement); pstmt.setInt(1, mdb.getMapID(mapName)); pstmt.setInt(2, number); ResultSet result = pstmt.executeQuery(); while (result.next()) { red = result.getInt(1); } result.close(); pstmt.close(); } catch(SQLException sqle) { System.out.println(sqle); } return red; } COM: <s> gets the red time of a numbered crossing </s>
funcom_train/49469588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEsisVulnerabilityInfo(Integer e_vuln_id, String title, String description, int rank) throws Exception { Db db = getDb(); try { db.enter(); st_upd_generic_info.setString(1, title); st_upd_generic_info.setString(2, description); st_upd_generic_info.setInt(3,rank); st_upd_generic_info.setObject(4,e_vuln_id); db.executeUpdate(st_upd_generic_info); } finally { db.exit(); } } COM: <s> update the information that is common to all vulnerabilities table </s>
funcom_train/18051022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeydbEntry getFoundEntry(int index) throws KeydbLockedException { passLock(); for(int i = 0; i < header.numEntries; ++i) { if (this.entriesSearch[i] == 1) { if (index > 0) --index; else { KeydbEntry entry = new KeydbEntry(this); entry.read(this.entriesOffsets[i], i); return entry; } }; } return null; } COM: <s> get entry by index in search result </s>
funcom_train/45903252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTurret(String buildingId, String race, BuildingTurret turret) { Map<String, List<BuildingTurret>> bt = turrets.get(buildingId); if (bt == null) { bt = JavaUtils.newHashMap(); turrets.put(buildingId, bt); } List<BuildingTurret> ts = bt.get(race); if (ts == null) { ts = JavaUtils.newArrayList(); bt.put(race, ts); } ts.add(turret); } COM: <s> add a turret definition to the </s>
funcom_train/24000690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoBind() { ClassifierReferenceAst instance = new ClassifierReferenceAst(-1, TokenFactory.createToken(-1), "Boolean"); assertEquals(OclTypeRegistry.OclTypeType,instance.doBind(null)); instance = new ClassifierReferenceAst(-1, TokenFactory.createToken(-1), "bob"); assertEquals(null,instance.doBind(null)); } COM: <s> test of do bind method of class classifier reference ast </s>
funcom_train/7443890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExtensions(String[] extensions) { String exts = null; if (extensions != null) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < extensions.length; i++) { if (i > 0) { sb.append('.'); } sb.append(extensions[i]); } exts = sb.toString(); } setExtensions(exts); } COM: <s> sets the extensions based on an array of extension tokens without dots </s>
funcom_train/29319943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHostsScoresReport() { String report = ""; if (matcher != null) { String[] hosts = matcher.getHostingPlayersList(); for (String host : hosts) { Player hostingPlayer = matcher.getHostingPlayerDetails(host); if (hostingPlayer != null) report = report + "Name: " + host + " Score:" + hostingPlayer.getScore() + '\n'; } } return report; } COM: <s> assumes a connection is already established </s>
funcom_train/14228158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConferenceEnable(boolean enable) throws InvalidStateException, MethodNotSupportedException, PrivilegeViolationException, InvalidArgumentException { if (this.getState() != IDLE) { throw new InvalidStateException(this, InvalidStateException.CALL_OBJECT, this.getState(), "Call must be in IDLE state to set ConferenceEnable"); } this.confEnabled = enable; } COM: <s> not currently supported </s>
funcom_train/22234283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCombineAlphaScale() { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_COMBINE_READ)) { throw new CapabilityNotSetException( J3dI18N.getString("TextureAttributes35")); } } return ((TextureAttributesRetained)this.retained).getCombineAlphaScale(); } COM: <s> retrieves the scale factor for the alpha component of the output color </s>
funcom_train/22395375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDraftMailbox(MailboxNode draftMailbox) { if(this.draftMailbox != draftMailbox) { if(draftMailbox == null) { this.draftMailbox = null; this.draftMailboxId = -1L; } else { this.draftMailbox = draftMailbox; this.draftMailboxId = draftMailbox.getUniqueId(); } changeType |= CHANGE_TYPE_MAILBOXES; } } COM: <s> sets the draft message mailbox </s>
funcom_train/40616192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPrepareCommit(int sessionId, int pageId, String transaction) { SessionState state = getOrAddSessionState(sessionId); InDoubtTransaction doubt; if (transaction == null) { doubt = null; } else { doubt = new InDoubtTransaction(store, sessionId, pageId, transaction); } state.inDoubtTransaction = doubt; } COM: <s> this method is called when a prepare commit log entry is read when </s>
funcom_train/15626727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedGameObject(@Nullable final G selectedGameObject) { if (this.selectedGameObject == selectedGameObject) { return; } assert selectedGameObject == null || selectedGameObject.isHead(); this.selectedGameObject = selectedGameObject; for (final GameObjectAttributesModelListener<G, A, R> listener : listeners) { listener.selectedGameObjectChanged(selectedGameObject); } } COM: <s> if a game object is selected the map arch panels bottom right windows </s>