__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/8568661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printReachability(RunStats data) { long maximas = data.getPointStats().getStat(CountStat.MAXIMA); long found = data.getPathStats().getStat(CountStat.EVOLVABLE); System.out.println("Found " + found + " paths to maxima out of " + maximas); System.out.println("Reachable paths percentage: " + percent(found, maximas)); } COM: <s> local reachability how many evolvable paths from the starting point reach </s>
funcom_train/13319511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnName(String[] names) { if (names == null) { throw new NullPointerException("Column names are null"); } columnNames = new String[names.length]; System.arraycopy(names, 0, columnNames, 0, names.length); } COM: <s> copies the content of the specified array to the table header </s>
funcom_train/19066311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logout() throws IOException, IMAPException { checkState(NON_AUTHENTICATED); IMAPCommand command = new IMAPCommand(tagFactory.nextTag(), "LOGOUT"); IMAPResponse[] responses = communicate(command); // handle any responses that do not directly // relate to the command for (int i = 0; i < responses.length; i++) { if (!responses[i].isBYE()) { handleResponse(responses[i]); } } state = NOT_CONNECTED; // Close the streams in.close(); in = null; out.close(); out = null; } COM: <s> close the socket to the server </s>
funcom_train/14402092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CimNamespace getNamespace(CIMObjectPath pPath) { String namespaceName = pPath.getNamespace(); if (namespaceName != null && namespaceName.startsWith("/")) { namespaceName = namespaceName.substring(1); } for (ITreeElement ns : getAllNamespaces()) { if (namespaceName.equalsIgnoreCase(((CimNamespace) ns) .getNamespace())) { return (CimNamespace) ns; } } return null; } COM: <s> this method searches for a namespace object below the owned </s>
funcom_train/13995661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecute() throws Exception { HttpServletRequest request = new MockHttpServletRequest(); ParameterParser parameters = new ParameterParser(); parameters.putParameter(RedirectCommand.REDIRECT_TEMPLATE_PARAMETER, new String[] { TEST_PATH }); request.setAttribute(PATH_INFORMATION_ATTRIBUTE, "original"); new RedirectCommand().execute(request, parameters); assertEquals( "invalid path information", TEST_PATH, request.getAttribute(PATH_INFORMATION_ATTRIBUTE)); } COM: <s> tests that the code redirect command code changes the </s>
funcom_train/23021067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HttpURLConnection getRequestConnection(URL requestUrl) throws IOException { if (!requestUrl.getProtocol().startsWith("http")) { throw new UnsupportedOperationException("Unsupported scheme:" + requestUrl.getProtocol()); } HttpURLConnection uc = (HttpURLConnection) requestUrl.openConnection(); // Should never cache GData requests/responses uc.setUseCaches(false); // Always follow redirects uc.setInstanceFollowRedirects(true); return uc; } COM: <s> obtains a connection to the gdata service </s>
funcom_train/140021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BookmarkList getSubListByName(String name, boolean create) { BookmarkList result = null; @SuppressWarnings("unchecked") Enumeration<BookmarkList> childs = children(); while (childs.hasMoreElements()) { BookmarkList tn = childs.nextElement(); Object o = tn.getUserObject(); if (o instanceof String) { if (name.equals(o)) { result = tn; break; } } } if (create && result == null) { result = new BookmarkList(name); this.add(result); } return result; } COM: <s> finds a sublist with the given name </s>
funcom_train/1589715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { DateTimeFormatter printer = ISODateTimeFormat.dateHourMinuteSecondFraction(); printer = printer.withChronology(getChronology()); StringBuffer buf = new StringBuffer(48); printer.printTo(buf, getStartMillis()); buf.append('/'); printer.printTo(buf, getEndMillis()); return buf.toString(); } COM: <s> output a string in iso8601 interval format </s>
funcom_train/42068274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberOfSilentSamplesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkSilent_numberOfSilentSamples_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkSilent_numberOfSilentSamples_feature", "_UI_ChunkSilent_type"), WavPackage.Literals.CHUNK_SILENT__NUMBER_OF_SILENT_SAMPLES, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number of silent samples feature </s>
funcom_train/29863040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void linkActivated(HyperlinkEvent e) { IWorkbenchBrowserSupport browserSupport = Plugin.getActiveWorkbenchWindow().getWorkbench().getBrowserSupport(); URL url; try { url = new URL(e.getHref().toString()); } catch (MalformedURLException e1) { Plugin.LOGGER.error(e1); return; } IWebBrowser browser; try { browser = browserSupport.createBrowser( IWorkbenchBrowserSupport.AS_EDITOR| IWorkbenchBrowserSupport.LOCATION_BAR| IWorkbenchBrowserSupport.NAVIGATION_BAR, null,null,null); browser.openURL(url); } catch (PartInitException e1) { Plugin.LOGGER.error(e1); return; } } COM: <s> called when a hyperlink is activated </s>
funcom_train/46761494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReportModel getReport(final long reportId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ReportsData.getReport(reportId, chain, call); }}; return (ReportModel) call(method, call); } COM: <s> same transaction return the single report model for the primary key </s>
funcom_train/28208336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doFinish(String containerName, IFile file, IProgressMonitor monitor) throws CoreException { String fileName = file.getName(); // create a blank file monitor.beginTask("Creating " + fileName, 2); final IEditorInput editorInput = createEditorInput(file); monitor.worked(1); monitor.setTaskName("Opening file for editing..."); getShell().getDisplay().asyncExec(new Runnable() { public void run() { openEditor(editorInput); } }); monitor.worked(1); } COM: <s> the worker method </s>
funcom_train/41329343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (CLEAR_CMD.equals(command)) { handleClearCmd(); } else if (SAVE_CMD.equals(command)) { handleSaveCmd(); } else if (COPY_CMD.equals(command)) { handleCopyCmd(); } else if (ADD_CMD.equals(command)) { handleAddAttributeCmd(); } else if (DELETE_CMD.equals(command)) { handleDeleteCmd(); } } COM: <s> depending on which button is clicked do the right thing </s>
funcom_train/18378782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getPeerBounds() { Rectangle result = new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height); int trim = getTrim(); result.x += trim; result.y += trim; result.width -= 2*trim; result.height -= 2*trim; return result; } COM: <s> method get peer bounds </s>
funcom_train/18950575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCmdPropertySet( PropertySet pCmdPropertySet ) { if( null == pCmdPropertySet ) { throw new JostracaException( "Argument pCmdPropertySet was null for method: setCmdPropertySet( PropertySet pCmdPropertySet )" ); } // this ensures that internally set settings are preserved if not specified by user mCmdPropertySet.overrideWith( pCmdPropertySet ); } COM: <s> specifically set some configuration properties </s>
funcom_train/37022032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResIterator getWorkspaces(Model model) { ResIterator ri = null; try { Resource r = model.getResource("vwe:Workspace"); ri = model.listSubjectsWithProperty(com.hp.hpl.mesa.rdf.jena.vocabulary.RDF.type, r); } catch (RDFException e) { e.printStackTrace(); } return ri; } COM: <s> gets all workspace bases </s>
funcom_train/37832187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addIgnore(final String name, final int duration, final String reply) { final StringBuilder sbuf = new StringBuilder(); if (duration != 0) { sbuf.append(System.currentTimeMillis() + (duration * 60000L)); } sbuf.append(';'); if (reply != null) { sbuf.append(reply); } return setKeyedSlot("!ignore", "_" + name, sbuf.toString()); } COM: <s> add a player ignore entry </s>
funcom_train/3170097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableStepper stepper(OrderSpec order) { if (order == null) { return TableEntry.bucketStepper(myHashEntries); } else { throw new UnsupportedOperationException(); // unimplemented(); } /* udanax-top.st:51297:SetTable methodsFor: 'enumerating'! {TableStepper} stepper: order {OrderSpec default: NULL} "ignore order spec for now" order == NULL ifTrue: [^TableEntry bucketStepper: myHashEntries] ifFalse: [self unimplemented. ^NULL "fodder"]! */ } COM: <s> ignore order spec for now </s>
funcom_train/47106278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon14() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_14.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_14); } }); return menuItem; } COM: <s> creates the fifteenth choice for the weapon menu </s>
funcom_train/26570502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveFile(Socket s, OutputStream out, Representation representation) throws IOException { InputStream in = representation.getInputStream(s); byte buf[] = new byte[this.bufferSize]; int nread; while ((nread = in.read(buf, 0, this.bufferSize)) > 0) { out.write(buf, 0, nread); } in.close(); } COM: <s> reads data from the given socket and converts it from the specified </s>
funcom_train/43214408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireCreatedCallback(RemoteCallback rc) { ServerCallbackEvent sce = new ServerCallbackEvent(IOUtil.createURL(this), rc.getID(), ServerCallbackEvent.TYPE_CREATED, rc.getName(), rc.getDescription()); for (RemoteTrancheServerListener l : getListeners()) { try { l.requestCreated(sce); } catch (Exception e) { } } } COM: <s> p notify server listeners that a new callback has been created </s>
funcom_train/45079071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToTaskSeries (TrackTaskSeries tasks){ tasks.add (this); Item kid = null; Iterator children = this.children.iterator (); while(children.hasNext ()){ // recurse in next level ((Item) children.next ()).addToTaskSeries (tasks); } } COM: <s> adds the current task and all subtasks to the specified task series object </s>
funcom_train/19825015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int hashCode(URL u) { int h = 0; if (PROTOCOL.equals(u.getProtocol())) { String host = u.getHost(); if (host != null) h = host.hashCode(); String file = u.getFile(); if (file != null) h += file.hashCode(); h += u.getPort(); } else { h = u.hashCode(); } return h; } COM: <s> provides the hash calculation </s>
funcom_train/44771937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element put(Path path) { Path.PathElement[] elements = path.getElements(); Element current = root; for (int i = 1; i < elements.length; i++) { Element next = current.getChild(elements[i]); if (next == null) { next = current.createChild(elements[i]); } current = next; } return current; } COM: <s> create an empty child given by its path </s>
funcom_train/36063133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLogServerPort( int port ) throws NoDatabaseConnectionException, SQLException, InputValidationException{ if( port < 0 || port > 65535){ throw new InputValidationException("The port is invalid, must be between within the range of 0-65535", "Syslog Server Port", String.valueOf(port)); } appParams.setParameter("Administration.LogServerPort", String.valueOf(port)); setupSyslog(); } COM: <s> set the port to be used to send the log messages to </s>
funcom_train/11947026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String readFile(String directory, String fileName) throws IOException { FileReader in = new FileReader(new File(directory, fileName)); StringBuilder s = new StringBuilder(); char[] buffer = new char[1024]; int read = -1; while ((read = in.read(buffer)) >= 0) { s.append(buffer, 0, read); } return s.toString(); } COM: <s> convenience method for reading a text file </s>
funcom_train/9339808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyHyperoperation(int o, BigInteger a, BigInteger b) { if (b.compareTo(BigInteger.ONE) != 1) { throw new IllegalArgumentException("b must be positive"); } if (a.compareTo(BigInteger.ONE) != 1) { throw new IllegalArgumentException("b must be positive"); } } COM: <s> verifies that the passed arguments are consistent and applicable for a </s>
funcom_train/26449326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hyperlinkUpdate(HyperlinkEvent event) { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { try { htmlPane.setPage(event.getURL()); } catch(IOException ioe) { warnUser("Can't follow link to " + event.getURL().toExternalForm() + ": " + ioe); } } } COM: <s> follow any links that are clicked </s>
funcom_train/32057430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDisconnectable() { System.out.println("testSetDisconnectable"); jgraph.setDisconnectable( true ); boolean b = jgraph.isDisconnectable(); assertEquals( b, true ); jgraph.setDisconnectable( false ); b = jgraph.isDisconnectable(); assertEquals( b, false ); } COM: <s> test of set disconnectable method of class jgraph </s>
funcom_train/31563495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void explain(Configuration config) { NamePool pool = config.getNamePool(); System.err.println("declare variable " + pool.getDisplayName(nameCode) + " := "); if (value != null) { value.display(4, System.err, config); } System.err.println(";"); } COM: <s> produce diagnostic output showing the compiled and optimized expression tree for a function </s>
funcom_train/8010030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlSubmitImage newSubmitImage(String buttonName, String displayCaption) { HtmlSubmitImage submit = new HtmlSubmitImage(buttonName, displayCaption, 24, _theme, _page); if (_sl != null) submit.addSubmitListener(_sl); return submit; } COM: <s> this method creates a new submit image </s>
funcom_train/21848412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(GridComponent gc) { m_current_comp = gc; if (gc == null) { setEnabled(false); } else { GridView view = gc.getParentView(); if (view != null) { setEnabled(true); int row = gc.getRow(); int col = gc.getColumn(); if (isRowView()) { RowSpec spec = view.getRowSpec(row); updateView(spec, gc); } else { ColumnSpec spec = view.getColumnSpec(col); updateView(spec, gc); } } else { setEnabled(false); } } } COM: <s> updates the panel using the specs from the currently selected cell in the </s>
funcom_train/6435313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getReferenceElement(Element e, List<Element> elements, ArrayList<String> examples) { int r = e.getMatch().getTokenRef(); Element newElement = new Element(examples.get(r), elements.get(r).getCaseSensitive(), false, false); newElement.setNegation(e.getNegation()); return newElement; } COM: <s> returns an element with the string set as the previously matched element </s>
funcom_train/15416427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getCookiesFromConnection(URLConnection urlconnection) { String headerKey; for (int i = 1; (headerKey = urlconnection.getHeaderFieldKey(i)) != null; i++) { if (headerKey.equalsIgnoreCase("set-cookie")) { String rawCookieHeader = urlconnection.getHeaderField(i); HttpCookie cookie = new HttpCookie(rawCookieHeader, dateParser); cookieMap.put(cookie.getName(), cookie); } } } COM: <s> read the cookies from the url connection </s>
funcom_train/888202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleEvent (HmeEvent event) { switch (event.getOpCode()) { case StreamResource.EVT_RSRC_STATUS : { HmeEvent.ResourceInfo info = (HmeEvent.ResourceInfo)event; //If the currently playing track has finished: if ( info.getStatus() == RSRC_STATUS_CLOSED || info.getStatus() == RSRC_STATUS_COMPLETE || info.getStatus() == RSRC_STATUS_ERROR ) { //Play the next track. audioPlaylist.nextFile(); } } break; } return super.handleEvent(event); } COM: <s> process hme events </s>
funcom_train/2292835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentPage(int currentPage) throws CmsIllegalArgumentException { if (getSize() != 0) { if ((currentPage < 1) || (currentPage > getNumberOfPages())) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_LIST_INVALID_PAGE_1, new Integer(currentPage))); } } m_currentPage = currentPage; } COM: <s> sets the current page </s>
funcom_train/44166906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentPlayer(Player newCp) { if (newCp != null) { if (currentPlayer != null) { currentPlayer.removeModelMessages(); currentPlayer.invalidateCanSeeTiles(); } } else { logger.info("Current player set to 'null'."); } currentPlayer = newCp; } COM: <s> sets the current player </s>
funcom_train/50923017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeSDFFields(List<String> lines) { Nodes properties = cml.query(".//*[local-name()='"+CMLProperty.TAG+"']"); List<CMLProperty> propertyList = new ArrayList<CMLProperty>(); for (int i = 0; i < properties.size(); i++) { propertyList.add((CMLProperty) properties.get(i)); } writeSDFFields(propertyList, lines); } COM: <s> override by specialised sdf writer </s>
funcom_train/7292351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int handleGetMonthLength(int extendedYear, int month) { switch (month) { case HESHVAN: case KISLEV: // These two month lengths can vary return MONTH_LENGTH[month][yearType(extendedYear)]; default: // The rest are a fixed length return MONTH_LENGTH[month][0]; } } COM: <s> returns the length of the given month in the given year </s>
funcom_train/2026059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dumpTestCaseInfos() { TestLogger.info("Testcase ID: " + testCaseID); TestLogger.info("Testcase Short Description: " + testCaseShortDescr); TestLogger.info("Testcase Description: " + testCaseDescr); TestLogger.info("Testcase Quality: " + testCaseQuality); TestLogger.info("Testcase Profile: " + testCaseProfile); } COM: <s> print all test case infos at log appenders </s>
funcom_train/7545796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDocument getDocument() { if (fDocument != null) return fDocument; if (fPart instanceof ITextEditor) { ITextEditor editor = (ITextEditor) fPart; IDocumentProvider provider = editor.getDocumentProvider(); if (provider != null) return provider.getDocument(editor.getEditorInput()); } IDocument doc = (IDocument) fPart.getAdapter(IDocument.class); if (doc != null) { return doc; } return null; } COM: <s> returns the document on which this action operates </s>
funcom_train/24081719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSpecials(Properties t){ for(int i=0; i < n_special; i++){ int j = Integer.parseInt(t.getProperty("index"+i)); String s = t.getProperty("title"+i); int c = Integer.parseInt(t.getProperty("type"+i)); int v = Integer.parseInt(t.getProperty("value"+i)); squares.remove(j); squares.add(j, new Special(s, 0, 0, false, null, c, v)); } } COM: <s> creates special squares </s>
funcom_train/806275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getItemCount(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } double[][] seriesArray = (double[][]) this.seriesList.get(series); return seriesArray[0].length; } COM: <s> returns the number of items in the specified series </s>
funcom_train/3078466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void confirmDeleteVcs(IRequestCycle cycle) { ensureCurrentTab(); // in case user go back to this page through browser's back button and click on this if (getVcsIndexToDelete() == -1) { // avoid re-submit return; } getProjectPage().getProject().getVcsList().remove(getVcsIndexToDelete()); getProjectPage().saveProject(); setVcsIndexToDelete(-1); Luntbuild.getSchedService().rescheduleBuilds(); setAction(null); } COM: <s> actually delete the vcs </s>
funcom_train/31128315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveStopped(Move event, MoveProvider mp) { if (!sendMoveStop) return; try { synchronized(receiver) { if (debug) log("Sending move stopped"); dos.writeByte(NavEvent.MOVE_STOPPED.ordinal()); event.dumpObject(dos); if (pp != null && autoSendPose) { if (debug) log("Sending set pose"); dos.writeByte(NavEvent.SET_POSE.ordinal()); pp.getPose().dumpObject(dos); } } } catch (IOException ioe) { fatal("IOException in moveStopped"); } } COM: <s> called when a move stops </s>
funcom_train/6418787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean jdoIsTransactional() { Session ses = SessionManager.getDefaultManager().getSession(); if(ses != null && ses.getCurrentTransaction() != null ) { if( jdoIsPersistent() ) return ! adapt.isProxy(); else return ! isTransient(); } //No transaction support enabled return false; } COM: <s> jdo doesnt consider it to be transactional until a read or write has </s>
funcom_train/50702924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateChildrenPanelConstraints() { SpringLayout chdsLayout = (SpringLayout) childrenPanel.getLayout(); SpringUtilities.alignVTop(chdsLayout, Spring.constant(0), Spring .constant(0), childrenPanel); SpringUtilities.alignHDistr(chdsLayout, Spring.constant(0), Spring .constant(10), Spring.constant(0), childrenPanel); } COM: <s> update the constraints for the springlayout of the </s>
funcom_train/43526218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPackageNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NodeContainer_packageName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NodeContainer_packageName_feature", "_UI_NodeContainer_type"), CallGraphPackage.Literals.NODE_CONTAINER__PACKAGE_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the package name feature </s>
funcom_train/4021145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParseNode descendant( int head, int tail, int content ) { for( ParseNode child : children() ) if( child.from <= head && tail <= child.to ) if( child.contains(content) ) return child; else return child.descendant(head, tail, content); return null; } COM: <s> the closest descendant of this root with the content covering head tail </s>
funcom_train/33967401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsStory(String text, String category) { if (mStories != null) { Iterator<FMDStoryDetails> iter = mStories.iterator(); while (iter.hasNext()) { FMDStoryDetails elt = iter.next(); if ((elt.getId() == 0) && (elt.getText().equals(text)) && (elt.getCategory().equals(category))) { return true; } } } return false; } COM: <s> returns if the list contains a story for the given text and category </s>
funcom_train/44137446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEditBaseModel(boolean b) { m_TitleFormat.setEditBaseModel(b); m_BodyFormat.setEditBaseModel(b); m_NumberFormat.setEditBaseModel(b); // m_TextFormat.setEditBaseModel(b); // m_Transition; m_Chips.setEditBaseModel(b); m_BackGround.setEditBaseModel(b); m_Medias.setEditBaseModel(b); // m_Constraints; } COM: <s> to set the base model </s>
funcom_train/34954850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PropertyDescriptor getPropertyDescriptorInternal(String propertyName) throws BeansException { Assert.notNull(propertyName, "Property name must not be null"); JBeanWrapperImpl nestedBw = getBeanWrapperForPropertyPath(propertyName); return nestedBw.getCachedIntrospectionResults().getPropertyDescriptor(getFinalPath(nestedBw, propertyName)); } COM: <s> internal version of </s>
funcom_train/32234811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(String fieldName, String fieldType, String attributeName, String comment) { StructureFieldInfo field = new StructureFieldInfo(this, fieldName, fieldType, attributeName, comment); fields.add(field); maxFieldNameLength = Math.max(maxFieldNameLength, fieldName.length()); maxFieldTypeLength = Math.max(maxFieldTypeLength, fieldType.length()); maxAttributeNameLength = Math.max(maxAttributeNameLength, attributeName.length()); } COM: <s> adds a field to the structure </s>
funcom_train/25085091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createNote(int x, int y, int width, int height) { final Note note = new Note(this, x, y, width, height); notifyNoteCreated(note); taskQueue.post(new CreateNoteTask(getSelectedSurface(), note)); } COM: <s> creates a note with no content at a particular location on the </s>
funcom_train/2586140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Insets getInsetsValue() { return new Insets( Math.abs(stringToInt(this.topValueEditor.getText())), Math.abs(stringToInt(this.leftValueEditor.getText())), Math.abs(stringToInt(this.bottomValueEditor.getText())), Math.abs(stringToInt(this.rightValueEditor.getText()))); } COM: <s> returns a new code insets code instance to match the values entered </s>
funcom_train/2882196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseURL(byte[] buf, int[] ia) { ia[0] += 1; // skip one byte for reserved lifetime = Util.parseInt(buf, ia, 2); // lifetime url = Util.parseString(buf, ia); // URL if (Util.parseInt(buf, ia, 1) != 0) { System.err.println("URL authentication blocks are present"); } return url; } COM: <s> parse a specific slp header </s>
funcom_train/24234055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ lock.lockInterruptibly(); long nanos = units.toNanos(timeout); try { for (;;) { if (numValidChunks.get() != 0) { return poll(); } if (nanos <= 0) return null; try { nanos = notEmpty.awaitNanos(nanos); } catch (InterruptedException ie) { notEmpty.signal(); // propagate to non-interrupted thread throw ie; } } } finally { lock.unlock(); } } COM: <s> return a data chunk guaranteed to be in order waiting up to the </s>
funcom_train/42262430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefenceDecision randomDefenceMovement() { CoveredObject[] cover = new CoveredObject[robotQuantity]; for (int i=0; i<robotQuantity; ++i) { double r = Math.random() * 4; if (r < 1.0) cover[i] = CoveredObject.GOAL; else if (r < 2.0) cover[i] = CoveredObject.ANOTHER_ROBOT; else if (r < 3.0) cover[i] = CoveredObject.ROBOT_WITH_BALL; else cover[i] = CoveredObject.ATTACK_OPPONENT; } return new DefenceDecision(cover[0], cover[1]); } COM: <s> random robots new position from permitted ranges </s>
funcom_train/35423293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer returnMove(Board b, byte nextMark) { // Decide which function to call if (nextMark == Board.Player1) { // Call Min function for Player1 that is we are marking X AlphaBeta(b, true, Board.Player1, Board.Player2); } else { // Call Max Function for Player 2 that is we are marking O AlphaBeta(b, false, Board.Player1, Board.Player2); } // Return the next move return markNextMove; } COM: <s> this is the method exposed to external classes </s>
funcom_train/5437204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSeconds(PacketInputStream input, PacketAnalysisDescriptor root) { int start = input.getOffset(); try { int secs = input.readShort(); addNode("Seconds Elapsed: " + secs, start, start+1, root); } catch (IOException e) { } } COM: <s> the number of seconds elapsed since bootup </s>
funcom_train/4416976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLong(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number)object).longValue() : Long.parseLong((String)object); } catch (Exception e) { throw new JSONException("JSONObject[" + quote(key) + "] is not a long."); } } COM: <s> get the long value associated with a key </s>
funcom_train/34340780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodigoBanco() { if (codigoBanco == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here codigoBanco = new TextField("Codigo del Banco", null, 10, TextField.ANY);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return codigoBanco; } COM: <s> returns an initiliazed instance of codigo banco component </s>
funcom_train/14401054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setToolbar() { IToolBarManager toolbar = getViewSite().getActionBars() .getToolBarManager(); toolbar.add(new CollapseAction(iViewer)); toolbar.add(new FilterDiscoveryViewAction(iViewer)); toolbar.add(new SynchronizeDiscoveryViewAction(this)); for (ICommand command : iDiscoveryRoot.getToolbarCommands()) { toolbar.add(new CommandWrapperAction(command)); } } COM: <s> adds the code icommand code s of the root tree element and other </s>
funcom_train/24120882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_SETROP2); WMFConstants.writeLittleEndian(out, drawMode); WMFConstants.writeLittleEndian(out, (short)0); } COM: <s> writes the content of the set rop2 record to a stream </s>
funcom_train/35273360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String personDetails () { return String.format("%s\n Degree: %s in %s" + "\n Salary: $%.2f" + "\n Hours: %.2f per week\n\n", super.toString(), degree.name(), subjectTaught.name(), salary, hoursWorked ); }//personDetails() COM: <s> detailed information about this teacher </s>
funcom_train/17733672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(int minCapacity) { modCount++; int oldCapacity = elementData.length; if (minCapacity > oldCapacity) { Row[] oldData = elementData; int newCapacity = ((oldCapacity * 3) / 2) + 1; if (newCapacity < minCapacity) { newCapacity = minCapacity; } elementData = new Row[newCapacity]; System.arraycopy(oldData, 0, elementData, 0, size); } } COM: <s> increases the capacity of this tt array list tt instance if </s>
funcom_train/51057885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String trimExtensionByCapabilities(String file) { if (!pack200Supported) { file = file.replace(".pack", ""); } if (!lzmaSupported && file.endsWith(".lzma")) { file = file.replace(".lzma", ""); System.out.println("LZMA decoder (lzma.jar) not found, trying " + file + " without lzma extension."); } return file; } COM: <s> trims the passed file string based on the available capabilities </s>
funcom_train/8527665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XmlDocument getOdtPartByEntryPath(String path) { try{ path=path.replace("./", ""); XmlDocument ret = new XmlDocument(); ret.ignoreDTD(); ret.setValidating(false); ret.loadFromInputStream(this.mZipFile.getInputStream(this.mZipFile.getEntry(path))); return ret; }catch(Exception e){ logger.warning("a problem has been found loading "+path+" from zip file"); return null; } } COM: <s> gets the odt part by entry path </s>
funcom_train/20965659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getSelectedLayerIndex() { // control on layer number int nLayer = sheet.getLayerNumber(); if(nLayer==0) return -1; // get selected row int row = table.getSelectedRow(); // get index of selected layer int selected = nLayer-1-row; // format between 0 and number of layers selected = Math.min(Math.max(selected, 0), nLayer-1); return selected; } COM: <s> return the index of the selected layer in sheet reference </s>
funcom_train/43920669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CoordinateReferenceSystem findPropertyCRS(PropertyName propertyName) { AttributeType at = (AttributeType) propertyName.evaluate(featureType); if (at instanceof GeometryAttributeType) { GeometryAttributeType gat = (GeometryAttributeType) at; return gat.getCoordinateSystem(); } else { throw new IllegalArgumentException("Property '" + propertyName + "' is not a geometric one, the filter is invalid"); } } COM: <s> returns the crs associated to a property in the feature type or throws </s>
funcom_train/13711561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PreparedStatement getUpdateDeleteStatement() throws ProDataExc{ final StringBuffer deleteBuffer = new StringBuffer("DELETE FROM "); deleteBuffer.append(tableName); deleteBuffer.append(" WHERE "); deleteBuffer.append(containerColumName); deleteBuffer.append(" = ? AND "); deleteBuffer.append(collectionColumName); deleteBuffer.append(" = ?;"); System.out.println(deleteBuffer.toString()); return dataBaseConnector.createPreparedStatement(deleteBuffer.toString()); } COM: <s> returns the prepared statement to delete items that have been taken </s>
funcom_train/2879287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Phases parse(File file) throws SmartFrogException { String fileUrl; try { fileUrl = file.toURI().toURL().toString(); } catch (MalformedURLException ignore) { String msg = MessageUtil. formatMessage(MessageKeys.MSG_URL_TO_PARSE_NOT_FOUND, file.toString()); throw new SmartFrogParseException(msg); } return parse(fileUrl); } COM: <s> parse a smartfrog file throw an exception if something went wrong </s>
funcom_train/5867972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CollectionItem getBindingCollectionItem(Component comp){ String name = comp.getClass().getName(); if (comp instanceof Listitem) { name = Listitem.class.getName(); } else if (comp instanceof Row) { name = Row.class.getName(); } else if (comp instanceof Comboitem) { name = Comboitem.class.getName(); } CollectionItem decorName = (CollectionItem)_collectionItemMap.get(name); if(decorName != null){ return decorName; }else{ throw new UiException("Cannot find associated CollectionItem:"+comp); } } COM: <s> returns a collection item by the comp accordingly </s>
funcom_train/36911524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isHash(int hash) { // calculate the bit depth (i.e. the left-most '1' bit) int depth = (int) (Math.log(hash) / Math.log(2) + 1); // compare the hash codes return (getHash(depth) == hash); } // public boolean isHash(int hash) COM: <s> returns true if the search key matches the given hash value false </s>
funcom_train/35236268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String applyFilteredBody() { String body = message.getFilteredBody(); HotKeys hotKeys = message.getHotKeys(); Iterator iter = hotKeys.getProps().iterator(); while(iter.hasNext()){ Property prop = (Property)iter.next(); String regEx = prefix_regEx + prop.getName() + suffix_regEx; String replcaement = getKeyUrlStr(prop.getName(), prop.getValue()); body = body.replaceAll(regEx, "$1" + replcaement); } return body; } COM: <s> space keyword space will be replaced </s>
funcom_train/35778799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDocumentEntry(DocumentListEntry doc) { String shortId = doc.getId().substring(doc.getId().lastIndexOf('/') + 1); out.println( " -- Document(" + doc.getTitle().getPlainText() + "/" + shortId + ")"); } COM: <s> prints out the specified document entry </s>
funcom_train/26020288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(String sessionId, int status) { if (logger.isActivated()) { logger.debug("Update status of session " + sessionId + " to " + status); } ContentValues values = new ContentValues(); values.put(RichCallData.KEY_STATUS, status); cr.update(databaseUri, values, RichCallData.KEY_SESSION_ID + " = " + sessionId, null); } COM: <s> update the status of an entry in the call history </s>
funcom_train/22703697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(int booleanAssignments) { Integer integerKey = new Integer(booleanAssignments); LongContainer counter = this.counters.get(integerKey); if (counter == null) { this.counters.put(integerKey, new LongContainer(1L)); } else { counter.increment(); } return true; } COM: <s> add a bit mask </s>
funcom_train/13668417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureRead(byte[] buffer, int offset, int len) throws IOException { for (int read, readSoFar = 0; readSoFar < len; readSoFar += read) { read = in.read(buffer, offset + readSoFar, len - readSoFar); if (read == -1) { throw new IOException("Unexpected EOS"); } } } COM: <s> reads the specified number of bytes from sockets stream </s>
funcom_train/21394828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object create(Class<?>[] ifaces, StateMachine sm) { ClassLoader cl = defaultCl; if (cl == null) { cl = Thread.currentThread().getContextClassLoader(); } InvocationHandler handler = new MethodInvocationHandler(sm, contextLookup, interceptor, eventFactory, ignoreUnhandledEvents, ignoreStateContextLookupFailure, name); return Proxy.newProxyInstance(cl, ifaces, handler); } COM: <s> creates a proxy for the specified interfaces and which uses the specified </s>
funcom_train/22209507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getConfig(final TMNavEnvironment env) throws ConfigurationException { final String file = getTMNavConfigFilename(); parseConfigResource(file, new ParseAction() { public Object parse() throws Exception { // Digesting abstractor, renderer, provider context FileInputStream is = new FileInputStream(file); digester.parseEnvironment(env,is); return null; // do need the return value } }); } COM: <s> parses the tmnav enviroment file </s>
funcom_train/14201402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getFrom(final String[] fromTo) { assert (fromTo.length == 1 || fromTo.length == 2); if (fromTo[0].trim().equals("")) { return this.minimum; } else { int from = Integer.parseInt(fromTo[0].trim()); checkValue(from); return from; } } COM: <s> get the left boundary of an pre parsed interval </s>
funcom_train/21998505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDataItem(QuoteDataItem dataItem) { synchronized (this) { if (!data.containsKey(dataItem.getTradingDateTime())) { data.put(dataItem.getTradingDateTime(), dataItem); pointsInTime = (TradingDateTime[]) data.keySet().toArray(); Arrays.sort(pointsInTime); } } } COM: <s> adds a series to the dataset </s>
funcom_train/47887353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshLightLevel(Integer value, String fvalue) { this.progLightLevel.setValue(value); this.lblLightLevel.setText(String.format("%.2f", //$NON-NLS-1$ Float.parseFloat(fvalue)) + " %"); //$NON-NLS-1$ } COM: <s> refresh refresh the light level </s>
funcom_train/19437096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("Zs710View["); buffer.append("dataModel = ").append(dataModel); buffer.append(", controller = ").append(controller); buffer.append("]"); return buffer.toString(); } COM: <s> to string methode creates a string representation of the object </s>
funcom_train/27948751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayDeclaratedRelation() { System.out.println("Definited relations are:"); Iterator it = relations.values().iterator(); while (it.hasNext()) { Relation r = (Relation) it.next(); System.out.println(" "+r.getJudeObject()); } } COM: <s> display the declarated relations for debug porpouse only </s>
funcom_train/12857181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCompressor(String type, String compressionType) { mStorableCodecFactory = null; compressionType = compressionType.toUpperCase(); if (mCompressionMap == null) { mCompressionMap = new HashMap<String, CompressionType>(); } CompressionType compressionEnum = CompressionType.valueOf(compressionType); if (compressionEnum != null) { mCompressionMap.put(type, compressionEnum); } } COM: <s> set the compressor for the given class overriding a custom storable codec factory </s>
funcom_train/2294807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFiltered(String path) { for (int j = 0; j < m_filterRules.size(); j++) { Pattern pattern = (Pattern)m_filterRules.get(j); if (isPartialMatch(pattern, path)) { return m_type.equals(TYPE_EXCLUDE); } } return m_type.equals(TYPE_INCLUDE); } COM: <s> checks if a path is filtered out of the filter or not </s>
funcom_train/8094977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copyValues(Instance instance, boolean isInput) { RelationalLocator.copyRelationalValues( instance, (isInput) ? m_InputFormat : m_OutputFormat, (isInput) ? m_InputRelAtts : m_OutputRelAtts); StringLocator.copyStringValues( instance, (isInput) ? m_InputFormat : m_OutputFormat, (isInput) ? m_InputStringAtts : m_OutputStringAtts); } COM: <s> copies string relational values contained in the instance copied to a new </s>
funcom_train/11310797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cache(MetaBean beanInfo) { cacheById.put(beanInfo.getId(), beanInfo); if (beanInfo.getBeanClass() != null && beanInfo.getId().equals(beanInfo.getBeanClass().getName())) { cacheByClass.putIfAbsent(beanInfo.getBeanClass(), beanInfo); } } COM: <s> cache the specified meta bean </s>
funcom_train/26509418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(String s) { //System.err.println("start("+s+")"); startMillis=System.currentTimeMillis(); if (started) throw new IllegalArgumentException("Stopwatch already started."); started=true; timings.add(desc+s); timings.add("<overall>"); } COM: <s> starts the stop watch with a start text </s>
funcom_train/50916628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCalculatedFormalCharge() throws RuntimeException { List<CMLAtom> atoms = this.getAtoms(); int charge = 0; for (int i = 0; i < atoms.size(); i++) { CMLAtom atom = atoms.get(i); try { charge += atom.getFormalCharge(); } catch (RuntimeException e) { } } return charge; } COM: <s> calculate formal charge from atom charges </s>
funcom_train/35531902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { Label name = new Label(); Label password = new Label(); TextBox tbName = new TextBox(); PasswordTextBox tbPassword = new PasswordTextBox(); Button button = new Button(); name.setText("name:"); password.setText("password"); button.setText("submit"); HorizontalPanel hPanel = new HorizontalPanel(); HorizontalPanel hPanel2 = new HorizontalPanel(); hPanel.add(name); hPanel.add(tbName); hPanel2.add(password); hPanel2.add(tbPassword); RootPanel.get().add(hPanel); RootPanel.get().add(hPanel2); RootPanel.get().add(button); } COM: <s> this is the entry point method </s>
funcom_train/31668859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rescaleVectorField(){ double maxLength=0.0; Arrow[] arrows = getArrows(); for(int i=0;i < arrows.length;i++) if(arrows[i].getLength() > maxLength) maxLength = arrows[i].getLength(); for(int i=0;i < arrows.length;i++) arrows[i].setLength(arrows[i].getLength() *maxArrowLength/maxLength); } COM: <s> this method finds the maximum rise and run throughout the entire </s>
funcom_train/28757810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLink(String newVal) { if ((newVal != null && this.link != null && (newVal.compareTo(this.link) == 0)) || (newVal == null && this.link == null && link_is_initialized)) { return; } this.link = newVal; link_is_modified = true; link_is_initialized = true; } COM: <s> setter method for link </s>
funcom_train/18071633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawMainFrame(Graphics g) { Point offset = this.scroller.getOffset(); double zoom = this.scroller.getZoom(); int left = - offset.x; int top = - offset.y; int width = (int)((double)(StaticData.WORLD_MAX - StaticData.WORLD_MIN) * zoom); int height = width; g.drawRect(left, top, width, height); } COM: <s> draw outter frame </s>
funcom_train/10509995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Resource getReferencedOrProxied() { if (isReference()) { return (Resource) getCheckedRef(Resource.class, "resource"); } Object o = getObjectValue(); if (o instanceof Resource) { return (Resource) o; } throw new IllegalStateException( "This PropertyResource does not reference or proxy another Resource"); } COM: <s> get the referenced or proxied resource if applicable </s>
funcom_train/48356921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findTupleIndex(long tupleTime) { if (logger.isTraceEnabled()) { logger.trace("ENTER findTupleIndex() tuple time to find " + tupleTime); } int index = 0; for (Object ob : buffer) { TaggedTuple tuple = (TaggedTuple) ob; if (tuple.getEvalTime() >= tupleTime) { break; } else { index++; } } if (logger.isTraceEnabled()) { logger.trace("RETURN findTupleIndex() tuple index " + index); } return index; } COM: <s> find the index of the tuple in the buffer with a timestamp </s>
funcom_train/45211817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringHelper highlightSubstring(String substring) { int index = indexOf(substring); if (index >= 0) { string = string.substring(0, index) + "<span style=\"color: "+ HIGHLIGHT_COLOR +"; font-weight: bold;\" >" + string.substring(index, index + substring.length()) + "</span>" + string.substring(index + substring.length()); } return this; } COM: <s> this function highlights a substring in the given string </s>
funcom_train/46764746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replay(){ // start new thread only when no one is running if (!running){ running = true; thread = new ReplayThread(this,conversation); thread.setSpeedfactor(jSlider.getValue()); thread.start(); replayOnLabel.setText(Resources.getString("lab_replayrunning")); } else { if (pause){ // end of pause replayOnLabel.setText(Resources.getString("lab_replayrunning")); thread.resumeReplay(); pause = false; } // else: thread ist already running: do nothing } } COM: <s> plays or replays the conversation </s>