__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/23011754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printError(PrintWriter out, String msg) { out.println("<HTML><TITLE>macservhtml Error</TITLE><BODY>"+ "<H1>Error in serving page</H1>"); out.println(msg); out.println("</BODY></HTML>"); } COM: <s> prints specified message to the specified writer </s>
funcom_train/3446114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(CategoricalFormat cf2) { int v = categories.size(); Iterator it = cf2.getCategories().keySet().iterator(); while(it.hasNext()) { String name = it.next().toString(); if (!categories.containsKey(name)) putCategory(name, v++); } } COM: <s> add a set of categories coming from another categorical format </s>
funcom_train/17486371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseScope(Element scopeElement, ScopeImpl parentScope) { //parseStartEvents(scopeElement, parentScope); parseFields(scopeElement, parentScope); //parseEndEvents(scopeElement, parentScope); //parseBoundaryEvents(scopeElement, parentScope); //parseSequenceFlow(scopeElement, parentScope); } COM: <s> parses a scope a process subprocess etc </s>
funcom_train/13551653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int load(int addr) { while (sigRDY==0) { // is RDY low? monitor.opWait(); // subspend Cpu activity } if (addr<2) return ioPort.readFromPort(addr & 0xffff); else return bus.load(addr & 0xffff, view, sigAEC); } COM: <s> load a value from the bus </s>
funcom_train/8065547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FigModifyingMode pop() { if (_modes.isEmpty()) { return null; } FigModifyingMode res = top(); if (res.canExit()) { if (LOG.isDebugEnabled()) { LOG.debug("Removing mode " + res); } _modes.removeElement(res); fireModeChanged(); } return res; } COM: <s> remove the topmost mode if it can exit </s>
funcom_train/50067973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitSequence(Sequence s, Vector visited) { if (visited.contains(s)) { return; } visited.addElement(s); s.setAssembler( new PrettySequenceAssembler( s.getName(), s.getSubparsers().size())); Enumeration e = s.getSubparsers().elements(); while (e.hasMoreElements()) { Parser child = (Parser) e.nextElement(); child.accept(this, visited); } } COM: <s> set a code sequence code parsers assembler to be </s>
funcom_train/15628781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fromXML(@NotNull final PluginParameter<G, A, R> parameter) { assert e != null; parameter.setName(e.getChildText("name")); assert e != null; parameter.setDescription(e.getChildText("description")); } COM: <s> restores generic plugin parameter values </s>
funcom_train/15858961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveEntry(String oldDN, String newDN) throws LDAPException { /* container path (parent/superior) of the destination DN has to exist */ this.ldapAccess.checkConnection(); this.ldapAccess.ldapConnection.rename(oldDN, entryAttributeType + "=" + LDAPStringHelper.dnToEntryID(newDN), LDAPStringHelper.dnToParentDN(newDN), true); } COM: <s> moves a specific entry to a new location in the tree </s>
funcom_train/38881189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(IProgressMonitor monitor) throws IOException, CoreException, InterruptedException, DOMException{ if (dataTestFileSource.fileClassBuilder.isExist()==false) dataTestFileSource.fileClassBuilder.create(); dataTestFileSource.fileClassBuilder.write(dataTestFileSource.mockClassInclude, monitor); monitor.worked(1); dataTestFileSource.fileClassBuilder.write(dataTestFileSource.classOfTest, monitor); monitor.worked(1); dataTestFileSource.fileClassBuilder.write(dataTestFileSource.emptyFixture, monitor); monitor.worked(1); } COM: <s> write the new test file and return the file associated </s>
funcom_train/3087618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDraggable(String dragElementStr, String dragCustomFunction, String dragContextStr, boolean useDragBackground, boolean useDragWindow) { this.dragElementStr = dragElementStr; this.dragCustomFunction = dragCustomFunction; this.dragContextStr = dragContextStr; this.useDragBackground = useDragBackground; this.useDragWindow = useDragWindow; } COM: <s> sets the title bar as being draggable </s>
funcom_train/42049297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getJContentPane() { if (this.jContentPane == null) { this.jContentPane = new JPanel(); this.jContentPane.setLayout(new BorderLayout()); Gui application = new Gui(); application.getJFrame().setVisible(true); this.jContentPane.add(application); } return this.jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/28996709
/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(""); if (getName() != null) { buffer.append(getName()); } if (getName() != null && getCode() != null) { buffer.append(" - "); } if (getCode() != null) { buffer.append(getCode()); } return buffer.toString(); } COM: <s> return a string that allows a human to identify this show </s>
funcom_train/37086311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addWindowSize(String name, Dimension size) { boolean modified = false; if (name != null) { if (size != null) { modified |= addProperty("Jnet.window." + name + ".w", "" + size.width); modified |= addProperty("Jnet.window." + name + ".h", "" + size.height); } } return modified; } COM: <s> adds the window size to the history </s>
funcom_train/50338253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public NamedIcon getIconByName(String pName) { if (pName == null || pName.length() == 0) { return null; } java.io.File file = new java.io.File(jmri.util.FileUtil.getExternalFilename(pName)); if (!file.exists()) { return null; } return new NamedIcon(pName, pName); } COM: <s> find the named icon corresponding to a name </s>
funcom_train/16524133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTilesPerRow() { // todo: It should be an option to follow the tiles per row given // todo: by the tileset. if (tileset.getTilesPerRow() == 0) { int twidth = tileset.getTileWidth() + 1; return Math.max(1, (getWidth() - 1) / twidth); } else { return tileset.getTilesPerRow(); } } COM: <s> returns the number of tiles to display per row </s>
funcom_train/50142566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReactionSensibility(int sens) { if (sens > 0) { if (debugging) { log.debug(getClass().getName() + ": Set new sensibility: " + sens); } this.reactionSensiblity = sens; } else { if (debugging) { log.debug(getClass().getName() + ": Set new sensibility failed: " + sens); } } } COM: <s> this changes the sensibility which is used for adapting the </s>
funcom_train/138474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SeqSymmetry optimizeRequest(SeqSpan span) { MutableSeqSymmetry query_sym = new SimpleMutableSeqSymmetry(); query_sym.addSpan(span); SeqSymmetry optimized_sym = SeqUtils.exclusive(query_sym, requestSym, span.getBioSeq()); optimized_sym = SeqUtils.exclusive(optimized_sym, currentRequestSym, span.getBioSeq()); if (SeqUtils.hasSpan(optimized_sym)) { return optimized_sym; } return null; } COM: <s> split the requested span into spans that still need to be loaded </s>
funcom_train/45599435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void markErrorScriptsAsSuccessful() { checkExecutedScriptsTable(); String deleteSql = "update " + getQualifiedExecutedScriptsTableName() + " set " + succeededColumnName + "=1 where " + succeededColumnName + "=0"; sqlHandler.executeUpdateAndCommit(deleteSql, defaultDatabase.getDataSource()); resetCachedState(); } COM: <s> marks the failed scripts in the executed scripts table as successful </s>
funcom_train/36667378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PortSet_id_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PortSet_id_feature", "_UI_PortSet_type"), DataflowSchemePackage.Literals.PORT_SET__ID, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the id feature </s>
funcom_train/20577827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("Connect4Service".equals(portName)) { setConnect4ServiceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/23985615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertText(String textToInsert) { int pos = this.text.getCaretPosition(); String t = this.text.getText(); t = t.substring(0, pos) + textToInsert + t.substring(pos); this.text.setText(t); this.text.setCaretPosition(pos + textToInsert.length()); } COM: <s> insert the given text at the caret </s>
funcom_train/39885640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createNewFile() throws IOException { SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkWrite(path); } if (path.isEmpty()) { throw new IOException("No such file or directory"); } return createNewFileImpl(absolutePath); } COM: <s> creates a new empty file on the file system according to the path </s>
funcom_train/18739666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { final Runtime runTime = Runtime.getRuntime(); runTime.runFinalization(); runTime.gc(); this.startUsedMemory = runTime.totalMemory() - runTime.freeMemory(); if (getVerbosity() == VerbosityOption.HIGH_VERBOSITY) { this.gts.addLTSListener(this.statisticsListener); } this.startTime = System.currentTimeMillis(); } COM: <s> should be called right before the exploration starts </s>
funcom_train/9371719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skip(int bits) throws AccessException { if ((mPos + bits) > mEnd) { throw new AccessException("illegal skip " + "(pos " + mPos + ", end " + mEnd + ", bits " + bits + ")"); } mPos += bits; } COM: <s> increment the current position and ignore contained data </s>
funcom_train/48615653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileInfo createFileInfo(Repository repository, String fileName) throws edu.ur.file.IllegalFileSystemNameException { String extension = null; if( fileName != null ) { extension = FilenameUtils.getExtension(fileName); } return fileServerService.createEmptyFile(repository.getFileDatabase(), uniqueNameGenerator.getNextName(), extension, FilenameUtils.removeExtension(fileName)); } COM: <s> create a file information object with an empty file </s>
funcom_train/40516667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void executeCommand(Command c) { int v = (int) c.getValue(); if (v >= TURN_OFF && v <= TURN_ON) { //TURN_OFF to TURN_ON brightness = v; led.setRaw(v); } else if (v == TOGGLE) { toggleState(); } } COM: <s> executes next command </s>
funcom_train/51588737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateTopicName() { try { StringTokenizer st = new StringTokenizer(topic, SEPARATOR, true); validateToken(st.nextToken()); for (; st.hasMoreTokens(); validateToken(st.nextToken())) { st.nextToken(); } } catch (NoSuchElementException e) { throw new IllegalArgumentException("invalid topic"); } } COM: <s> validate the topic name </s>
funcom_train/12835099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgentName findAgent(final Locator lc) { final AgentDirectoryService service = LocalServiceManager.getServiceRoot().getAgentDirectoryService(); final AgentDescription desc = service.createAgentDescription(); desc.addLocator(lc); try { AgentDescription[] res = service.search(desc); if (res.length > 0) { return res[0].getAgentName(); } } catch (Exception e) { e.printStackTrace(); } return null; } COM: <s> resolves agent name based on an locator </s>
funcom_train/19752688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String param(Date dVal) { String s=String.format("%1$tY/%1$tm/%1$td %1$tH:%1$tM:%1$tS",dVal); return "to_date("+param(s)+",'yyyy/mm/dd hh24:mi:ss')"; } COM: <s> oracle handles date time using strings and a type conversion </s>
funcom_train/7722324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean moveToComment(String comment) { int idx = this.page.indexOf(comment, this.currentIndex); if(idx == -1) { return false; } else { idx = page.lastIndexOf("<!", idx); if(idx == -1) { return false; } this.currentIndex = idx; return true; } } COM: <s> move to a specified comment </s>
funcom_train/43221302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getGraph() { Vector ans = super.getGraph(); gap = 15; y += dy+2; NodeList evts = getElement().getElementsByTagName("VarDeclaration"); addInterfaceElements(evts, ans, true, false, 0); fbt.setPreferredX(fbx); return ans; } COM: <s> returns the graph elements to draw the resource types outline and its </s>
funcom_train/46723048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRouteInUse(Route r) { try { String query = "select ID from RUNS where ROUTE_ID = " + r.getId(); ResultSet rs = st.executeQuery(query); if (rs.next()) { return true; } } catch (SQLException e) { // should never happen! e.printStackTrace(); System.exit(1); } return false; } COM: <s> detect if specific route is being used by existing run </s>
funcom_train/48474882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInputOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Place_inputOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Place_inputOf_feature", "_UI_Place_type"), DtPackage.Literals.PLACE__INPUT_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the input of feature </s>
funcom_train/22562766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openViewPart(final Page page) { Object input = null; switch (page) { case LIST_SUPPORT_QUESTION_PAGE: input = getTopic(); break; case NEW_SUPPORT_QUESTION_PAGE: try { ISupportQuestionRole question = SupportQuestionRoleFactory.createEntity(UserFactory.getUser(ctx), getTopic(), ctx); input = question; } catch (Exception e) { PortletUtils.handleError(LOG, e); } break; default: PortletUtils.handleError(LOG, new Exception("Unknown page encountered")); } openViewPart(page, input); } COM: <s> open the specified view part </s>
funcom_train/18019635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String noWikiAppend(String rez) { Enumeration enumerator = noWikiStorage.keys(); String rezult = rez; while( enumerator.hasMoreElements() ) { String key = (String)enumerator.nextElement(); rezult = rezult.replaceAll(key, (String)noWikiStorage.get(key)); } return rezult; } COM: <s> no wiki append </s>
funcom_train/1166368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyAsync(String id, WeiboListener listener) { getDispatcher().invokeLater(new AsyncTask(DESTROY, listener, new String[] {id}) { public void invoke(WeiboListener listener,Object[] args) throws WeiboException { listener.destroyed(destroy( (String) args[0])); } }); } COM: <s> discontinues friendship with the specified in the id parameter as the authenticating user </s>
funcom_train/8009674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { String sValue = ""; if (_sAreaCode != null) sValue += _sAreaCode; if (_sPhoneStart != null) sValue += _sPhoneStart; if (_sPhoneEnd != null) sValue += _sPhoneEnd; return sValue; } COM: <s> gets the current value of the control </s>
funcom_train/39921390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TemplatextConfig findContextConfiguration() { try { return (TemplatextConfig) BeanFactoryUtils.beanOfTypeIncludingAncestors(getApplicationContext(), TemplatextConfig.class, true, false); } catch (NoSuchBeanDefinitionException ex) { throw new ApplicationContextException( "Must define a single TemplatextConfig bean (may be inherited). TemplatextConfigurer is the default implementation."); } } COM: <s> locates a single </s>
funcom_train/42382693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String map(CrawlURI cauri) { // get classKey, via frontier to generate if necessary String classKey = frontier.getClassKey(cauri); SortedMap<String,String> tail = map.tailMap(classKey); if(tail.isEmpty()) { // wraparound tail = map; } // target node is value of nearest subsequent key return (String) tail.get(tail.firstKey()); } COM: <s> look up the crawler node name to which the given crawl uri </s>
funcom_train/50440228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDimension(String idx){ // Method attributes StringTokenizer token=new StringTokenizer(idx,","); try { // Populates the Saturation constant indexes int loop=0; while (token.hasMoreTokens()){ dim[loop]=Integer.parseInt(token.nextToken()); loop++; } } catch (Exception error){ // Error logging goes here error.printStackTrace(); } } COM: <s> sets the dimension of the input array </s>
funcom_train/46645222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAction() { System.out.println("Delete Task"); // TaskTypeServices tts = TaskTypeServices.getInstance(); // tts.deleteTaskType(this); getSessionAttributesBBean().getServiceLocator().getSettingsService() .TaskTypeDelete(beanToDTO()); getSessionAttributesBBean().setTaskTypeId(-1); loadTaskTypeAttribute(); getSessionAttributesBBean().setEditMode(EditModes.view); } COM: <s> delete the actual task type and loads the values from the task type </s>
funcom_train/25310294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkUserProperties(User user, User userDb) { assertEquals(userDb.getProperties().size(), user.getProperties().size()); for (Property propDb : userDb.getProperties()) { for (Property prop : user.getProperties()) { if (propDb.getName().equals(prop.getName())) { assertEquals(propDb, prop); } } } } COM: <s> check user properties </s>
funcom_train/47491232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(String query) { if (!connected) throw new NullPointerException("not connected to DB"); // long a = System.currentTimeMillis(); Statement stmt; try { stmt = con.createStatement(); stmt.execute(query); // System.out.println("db execution took " // + (System.currentTimeMillis() - a) + " milliseconds"); return; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> execute modifying statements </s>
funcom_train/29264769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void joinAll() { for (Iterator e = pidMap.keySet().iterator(); e.hasNext(); ){ Launcher l = (Launcher)e.next(); try { l.join(); } catch (InterruptedException ex) { ex.printStackTrace(); System.out.println("Kernel: join: " + ex); } } } // Launcher.joinAll COM: <s> waits for em all em existing launchers to complete </s>
funcom_train/50899862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean load(JDCConnection oConn, String sGuSalesMan) throws SQLException { boolean bRetVal = super.load(oConn, sGuSalesMan); if (bRetVal) oUser = new ACLUser(oConn, getString(DB.gu_sales_man)); return bRetVal; } COM: <s> load sales man and initialize internal user instance </s>
funcom_train/45267605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void messageReceived(String message) { ScrollBar sb = textOutput.getVerticalBar(); boolean autoScroll = sb.getSelection() == (sb.getMaximum() - sb.getThumb()); textOutput.append("> "+ message +"\n"); //$NON-NLS-1$ //$NON-NLS-2$ if (autoScroll) textOutput.setSelection(textOutput.getText().length()); } COM: <s> messages received from teacher </s>
funcom_train/38327579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireActivation(Activation act) { if (act != null) { if (this.workingMem.watchRules()) { this.writeMessage("==> fire: " + act.toPPString() + "\r\n", "t"); } try { this.pushScope(act.getRule()); act.executeActivation(this); act.clear(); this.popScope(); this.firingcount++; this.addRuleFired(act.getRule()); } catch (ExecuteException e) { log.debug(e); } } } COM: <s> method is used to fire an activation immediately </s>
funcom_train/37836841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean showAmountChooser(MouseEvent event, IEntity entity) { if (((event.getModifiersEx() & (MouseEvent.CTRL_DOWN_MASK|MouseEvent.META_DOWN_MASK)) != 0) && (entity instanceof StackableItem)) { return ((StackableItem) entity).getQuantity() > 1; } return false; } COM: <s> determine if the user should be given a chooser popup for selecting the </s>
funcom_train/49651205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|77-getter|0|77-preInit // write pre-init user code here okCommand1 = new Command("TAK", Command.OK, 0);//GEN-LINE:|77-getter|1|77-postInit // write post-init user code here }//GEN-BEGIN:|77-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/7720075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPreparedStatementSetParam3() throws Exception { java.sql.PreparedStatement stmt = con.prepareStatement("INSERT INTO foo ('a', 'b') VALUES ('?', '?');"); stmt.setInt(1, 12345); stmt.setInt(2, 67890); try { stmt.setInt(3, 1234567890); } catch (SQLException e) { return; } fail(); } COM: <s> construct a statement and overpopulate its fields </s>
funcom_train/44832526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setX(java.lang.Integer x) { Integer result = (Integer) ComponentUtils.invokeMethod(getPage().getHandler(), getMethod("onSetX"), new Object[] {x}); this.x = (result != null) ? result : x; } COM: <s> setter for property x </s>
funcom_train/47270919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { // process events only from this components if(ae.getSource() == this.timer) { ActionEvent event = new ActionEvent( this, ActionEvent.ACTION_PERFORMED, super.getActionCommand(), this.modifiers); super.fireActionPerformed(event); } // testing code... else if(testing && ae.getSource() == this) { System.out.println(ae.getActionCommand()); } } COM: <s> handle action events </s>
funcom_train/39910502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkName(File file) { if (((file.getName().toLowerCase()).indexOf(text)) > -1) { boolean fileNotAdded = true; for (FileItem f : files) { if (f.getFile().equals(file)) { fileNotAdded = false; } } if (fileNotAdded) { files.add(new FileItem(file)); } } } COM: <s> a method which compare a filename with a string object </s>
funcom_train/3024588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(FieldSummary fieldSummary, Object data) { if (fieldSummary.getName().equals(target.getName())) { TypeDeclSummary current = fieldSummary.getTypeDecl(); TypeDeclSummary targetDecl = target.getTypeDecl(); if (GetTypeSummary.query(current) == GetTypeSummary.query(targetDecl)) { complex.add(new RemoveFieldTransform(target.getName())); } } return data; } COM: <s> visits the field summary and determines if it should be removed </s>
funcom_train/13272907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(Integer color) { if (color != this.color || (color != null && !color.equals(this.color))) { Integer oldColor = this.color; this.color = color; firePropertyChange(COLOR_PROPERTY, oldColor, color); repaint(); } } COM: <s> sets the color displayed by this button </s>
funcom_train/1990186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JSplitPane createSplitPane() { // TODO Position the table according to a parameter (layout) JSplitPane splitPane = new JSplitPane(); // TODO Adapt the splitting weight according to a parameter splitPane.setResizeWeight(0.5); // Form container panelDetail = createFormPanel(); splitPane.setRightComponent(panelDetail); // Set the table splitPane.setLeftComponent(getField().getTable().getComponent()); return splitPane; } COM: <s> creates the split pane </s>
funcom_train/1784773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { root.addStyleName("root"); icon = new Image("http://freefoodfinder.googlecode.com/files/welcomeScreen.png"); LoginServiceAsync loginService = GWT.create(LoginService.class); loginService.login(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() { public void onSuccess(LoginInfo result) { loginInfo = result; handleLogin(); } public void onFailure(Throwable caught) { Window.alert("We have a problem \n" + caught.getMessage()); } }); } COM: <s> this signifies the entry point the gwt main method </s>
funcom_train/45692468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumSamplesMonoNotEmptyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_numSamplesMonoNotEmpty_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_numSamplesMonoNotEmpty_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__NUM_SAMPLES_MONO_NOT_EMPTY, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the num samples mono not empty feature </s>
funcom_train/51503092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlAndOr() { if (pnlAndOr == null) { pnlAndOr = new JPanel(); pnlAndOr.setLayout(null); pnlAndOr.setBounds(586, 268, 93, 68); pnlAndOr.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); pnlAndOr.add(getRbOder(), null); pnlAndOr.add(getRbUnd(), null); } return pnlAndOr; } COM: <s> this method initializes pnl and or </s>
funcom_train/5463134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean variantOf(TriplePattern pattern) { Map<Value, Value> vmap = new HashMap<Value, Value>(); if ( ! variantOf(subject, pattern.subject, vmap) ) return false; if ( ! variantOf(predicate, pattern.predicate, vmap) ) return false; return variantOf(object, pattern.object, vmap); } COM: <s> test if a pattern is just a variant of this pattern </s>
funcom_train/12316442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreWorkingSetState(Element parent) { NodeList workingSets = parent.getChildNodes(); for (int i = 0; i < workingSets.getLength(); i++) { if (workingSets.item(i).getNodeType() != Node.ELEMENT_NODE) continue; WorkingSet workingSet = restoreWorkingSet((Element) workingSets .item(i)); if (workingSet != null) { this.workingSets.add(workingSet); } } } COM: <s> recreates all working sets from the persistence store and adds them to </s>
funcom_train/24291972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateDocumentHash() { String limit = ""; if (this.limit != null) { limit = hashDateFmt.format(this.limit); } String sDocid = this.getDocId().getId(); String key = this.salt + ";" + sDocid + ";" + limit + ";" + getUsersAsString(); this.hash = cypher.encrypt(key); } COM: <s> generate a hash code for this user document </s>
funcom_train/50879394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void select(LayerEntryPanel inLayerEntryPanel){ for (int i=0; i<myLayerVect.size(); i++){ LayerEntryPanel tempPanel = (LayerEntryPanel) myLayerVect.elementAt(i); if (tempPanel != inLayerEntryPanel){ tempPanel.setSelected(false); } else{ myGISDisplay.setSelectedLayer(tempPanel.getLayer()); } } } COM: <s> called when the layer entry panel has been selected </s>
funcom_train/31163047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassword(String pw) { criticalUpdate("Attempted to set password while server running!"); if (pw == null) setPassword(NetUtil.NULL_PW); else { pw = pw.trim(); if (pw.equals(NetUtil.NULL_PW)) { verifier.remove(ID); password = NetUtil.NULL_PW; } else { verifier.put(ID, pw); password = pw; } } } COM: <s> sets the password for communicating with this i group server i </s>
funcom_train/37142197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateMonthGridBounds() { // PENDING JW: this is the "old way" - keep until the deprecated // methods are removed. calculateStartPositionUnused(); calendarGrid.setBounds(calculateCalendarGridX(), calculateCalendarGridY(), calculateCalendarGridWidth(), calculateCalendarGridHeight()); } COM: <s> calculates the bounds of the grid of months </s>
funcom_train/50224710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEditable(boolean b) { //this may be called before the menu is raised //no problem as by default the text area is enabled if (cutMenuItem != null) cutMenuItem.setEnabled(b); if (pasteMenuItem != null) pasteMenuItem.setEnabled(b); super.setEditable(b); } COM: <s> enable disable the menu items depending on whether it is editable </s>
funcom_train/44154463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayConfiguration(DisplayManager manager) { Section section = new Section("Loading Properties"); HtmlTabulator table = new HtmlTabulator("Name", "Value"); for (String current : getConfiguration()) { // Invariant : getConfiguration returns a string of form // "key = value" . int position = current.indexOf("="); // Split at " = " String key = current.substring(0, position - 1); String value = current.substring(position + 1); table.addRow(key, value); } section.add(table.tabulate()); manager.addSection(section); } COM: <s> displays the properties this bean was loaded with </s>
funcom_train/10621874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRangeFromIndex(int index){ if (index < 0 || index >= MAX_INDEX){ // awt.199=Illegal range argument value: {0} throw new IllegalArgumentException(Messages.getString("awt.199", //$NON-NLS-1$ index)); } return 1 << index; } COM: <s> returns range corresponding to the specified script index </s>
funcom_train/49196861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPathOfOriginalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AdditionalFile_pathOfOriginal_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AdditionalFile_pathOfOriginal_feature", "_UI_AdditionalFile_type"), GenmodelPackage.Literals.ADDITIONAL_FILE__PATH_OF_ORIGINAL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the path of original feature </s>
funcom_train/14245073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllInterfaces(MNamespace ns) { if (ns == null) return new ArrayList(); Iterator it = ns.getOwnedElements().iterator(); List list = new ArrayList(); while (it.hasNext()) { Object o = it.next(); if (o instanceof MNamespace) { list.addAll(getAllInterfaces((MNamespace)o)); } if (o instanceof MInterface) { list.add(o); } } return list; } COM: <s> returns all interfaces found in this namespace and in its children </s>
funcom_train/48915978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void watchAll() { for (int i = 0; i < m_watchInfo.length; ++i) m_watchInfo[i] = true; int mask = JessEvent.DEFRULE | JessEvent.DEFRULE_FIRED | JessEvent.FACT | JessEvent.FOCUS | JessEvent.ACTIVATION; mask = getEventMask() | JessEvent.CLEAR | mask; setEventMask(mask); } COM: <s> produce all possible debugging info </s>
funcom_train/6318699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowIndex(Object obj,int col){ int index = -1; for(int i=0;i<rowData.size();i++){ Pair each = (Pair)rowData.get(i); if((col == 0 && obj.toString().equals(each.getName())) ||(col == 1 && obj.toString().equals(each.getValue()))){ index = i; break; } } return index; } COM: <s> overload the super class get row index method to support pair object </s>
funcom_train/29932672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTokenEnds() { List<DocumentTokenWL> tokens = tok.tokenize("one;two three\n\n\t four", new MockParagraph()); int[] exp = new int[] {2, 3, 6, 12, 20}; assertEquals(exp.length, tokens.size()); int i = 0; for(DocumentTokenWL token : tokens) { assertEquals(exp[i], token.getEnd()); i++; } } COM: <s> test weather tokens have right endings </s>
funcom_train/46759200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MedItemComponentModel getMedItemComponent(final long medItemComponentId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return MedData.getMedItemComponent(medItemComponentId, chain, call); }}; return (MedItemComponentModel) call(method, call); } COM: <s> same transaction return the single med item component model for the primary key </s>
funcom_train/34451206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActivatedPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MBreakpoint_activated_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_MBreakpoint_activated_feature", "_UI_MBreakpoint_type"), DebugPackage.Literals.MBREAKPOINT__ACTIVATED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the activated feature </s>
funcom_train/17788573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getInClassIdentifier(int precinctIndex) { return JPEG2000Util.TCPToInClassIdentifier(parent.parent.index, parent.parent.parent.getNumTiles(), parent.component, parent.parent.parent.getZSize(), getFirstPrecinctIndex() + precinctIndex); } COM: <s> returns the unique precinct identifier </s>
funcom_train/34620668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSimpleInsertMenuForArtifactNode(IMenuManager menu) { String artifactTypeId = getSelectionHelper().getSelectedArtifact().getArtifactTypeId(); String chapterTypeId = getEditorHelper().getChapterOfActiveEditor().getTypeId(); IAction insertAction = createInsertActionForArtifact(artifactTypeId, chapterTypeId); menu.appendToGroup(GROUP_OPEN, insertAction); } COM: <s> creates and adds a simple insert action for artifacts </s>
funcom_train/11344618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpBundles(BundleContext bc) { getLog().info("Bundles:"); Bundle[] bundles = bc.getBundles(); for (int i = 0; i < bundles.length; i++) { getLog().info(bundles[i].getSymbolicName() + " - " + bundles[i].getState()); } } COM: <s> prints the bundle list </s>
funcom_train/48423242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildBoneInfluence(SmdVertex vert) { try { this.bonesMap.get(vert.getBoneIndex()).addVertex(vert); } catch (Exception Ex) { logger.log(Level.SEVERE, "Error adding bone influence from " + "geomIndex : " + geomIndex, Ex); } } COM: <s> method that recovers a bone from bones map with vertex bone index </s>
funcom_train/12277903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startUpdating() { if (running) { throw new IllegalStateException("Already updating."); } try { loadAvailable(); } catch(Exception e) { log.error("Failed to get initial feeds. Next update attempt will occur in 4 hours", e); interval = FOUR_HOURS_MILLIS; } thread = new Thread(this, "FeedManager"); thread.setPriority(Thread.MIN_PRIORITY); running = true; if (!isTestMode()) { thread.start(); } } COM: <s> start checking for feed updates </s>
funcom_train/39294099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAddressStreetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_addressStreet_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_addressStreet_feature", "_UI_DocumentRoot_type"), CntPackage.Literals.DOCUMENT_ROOT__ADDRESS_STREET, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the address street feature </s>
funcom_train/26483322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeXML(XMLWriter out) { out.startElement("join"); out.attr("from", from.fullName()); out.attr("relation", relation); out.attr("to", to.fullName()); out.endElement(); } COM: <s> writes this join as an xml tag </s>
funcom_train/43378920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNestedPieBounds(Rectangle r) { this.nestedPieBounds = r; int newWidth = (int) (nestedPieBounds.width * Math.sin(xAngle)); int newHeight = (int) (nestedPieBounds.height * Math.cos(yAngle)); effectiveBounds = new Rectangle(newWidth, newHeight); this.calculateGeometry(); } COM: <s> pass the rectangle occupied by the nested pie to this method </s>
funcom_train/38864974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMin() { int Tobs = size(); int Nobs = 0; float min = 9999.9f; float val = 0.f; for (int i = 0; i < Tobs; i++) { IonoObs d = this.get(i); float obs = d.getData(); if (obs != MISSING) { if (obs < min) { min = obs; } } } return min; } COM: <s> get the minimum non missing observations value </s>
funcom_train/19396954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long readPackedOId() throws IOException { if (packObjyOids) { long contextOid = getRecid(); long relativeOid = LongPacker.unpackLong(this); long absoluteOid = OidMath.getAbsoluteOid(contextOid, relativeOid); return absoluteOid; } else { return LongPacker.unpackLong(this); } } COM: <s> unpacks a relative oid from an unsigned long integer and then </s>
funcom_train/1651794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPeerNodeStatus(int pnStatus, PeerNode peerNode, boolean noLog) { Integer peerNodeStatus = Integer.valueOf(pnStatus); addPeerNodeStatuses(pnStatus, peerNode, peerNodeStatus, peerNodeStatuses, noLog); if(!peerNode.isOpennet()) addPeerNodeStatuses(pnStatus, peerNode, peerNodeStatus, peerNodeStatusesDarknet, noLog); } COM: <s> add a peer node status to the map </s>
funcom_train/35690687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreState(FacesContext context, Object state) { Object values[] = (Object[]) state; super.restoreState(context, values[0]); _columnName = (String) values[1]; _arrow = (Boolean) values[2]; styleClass = (String)values[3]; } COM: <s> p perform any processing required to restore the state from the entries </s>
funcom_train/3284830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoSu (String[] usrs) { if (autoSuList == null) autoSuList = new Vector<String>(); for (int i = 0; i < usrs.length; i++) { String usr = usrs[i].trim().toLowerCase(); if (!autoSuList.contains(usr)) autoSuList.add(usr); } } COM: <s> set the array with user names which automatically get su rights </s>
funcom_train/33814594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jLabel2 = new JLabel(); jLabel2.setText("Pesquisa de funcionários"); jPanel = new JPanel(); jPanel.setLayout(new BorderLayout()); jPanel.add(getBarraDeControle(), BorderLayout.SOUTH); jPanel.add(jLabel2, BorderLayout.NORTH); jPanel.add(getJPanel1(), BorderLayout.CENTER); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/1668430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReflectClass forName(String className) { ReflectClass clazz = _repository.lookupByName(className); if(clazz != null){ return clazz; } clazz = _delegate.forName(className); if(clazz != null){ return ensureDelegate(clazz); } return _repository.forName(className); } COM: <s> returns a reflect class instance for the specified class name </s>
funcom_train/48407258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyChanllengesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MaturityElementLevel_keyChanllenges_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MaturityElementLevel_keyChanllenges_feature", "_UI_MaturityElementLevel_type"), SpemxtcompletePackage.eINSTANCE.getMaturityElementLevel_KeyChanllenges(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the key chanllenges feature </s>
funcom_train/13726743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int mark(final String name) { if (name == null) { throw new IllegalArgumentException("The mark name must not be null"); } // calculating the time difference final long timeDiff = System.currentTimeMillis() - lastMillis; // saving the index of the mark to create final int newMarkIndex = marks.size(); // creating and adding the new mark marks.add(new Mark(timeDiff, name)); // setting the new millisecond state lastMillis = System.currentTimeMillis(); return newMarkIndex; } COM: <s> marks with a given string </s>
funcom_train/43370383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLogRecord(LogRecord record) { log.finer("adding log record: " + record); // add to record list records.add(record); // decide whether this should also be shown String logger = record.getLoggerName(); log.finest("getting applicable filter for this logger: " + logger); Level level = model.getLevel(logger); if(level == null || record.getLevel().intValue() >= level.intValue()) { log.finer("record should be shown"); display.add(record); fireTableDataChanged(); } } COM: <s> add a log record to the model </s>
funcom_train/2628443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEvent() { System.out.println("getEvent"); EventsType instance = new EventsType(); List expResult = new ArrayList(); /* test 1 - event = null */ List result = instance.getEvent(); assertEquals(expResult, result); /* test 2 - event != null */ instance.event=expResult; result = instance.getEvent(); assertEquals(expResult, result); } COM: <s> test of get event method of class events type </s>
funcom_train/8797276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayObject(String id, boolean show) { AGNObject object = scene_objects.get(id); if(object != null) { config_window.setRegion(id, show); if(show) { AGNPublisher.dispatchEvent(new ObjectShowEvent(object)); } else { AGNPublisher.dispatchEvent(new ObjectHideEvent(object)); if(object == pickedObject) { AGNPublisher.dispatchEvent(new ObjectReleaseEvent()); } } } } COM: <s> implements object displayer </s>
funcom_train/7315666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unregisterRMI() { if (rmiRepository != null) { // drop strong referenece to remote repository rmiRepository = null; // unregister repository try { Naming.unbind(config.getRmiConfig().getRmiUri()); } catch (Exception e) { log("Error while unbinding repository from JNDI: " + e); } } } COM: <s> unregisters the repository from the rmi registry if it has previously </s>
funcom_train/7518208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Local entity) { EntityManagerHelper.log("saving Local instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved local entity </s>
funcom_train/18037302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getParentNode(Object contextNode) { if (debugging) { log.info("[DocumentNavigator] parent node"); } Iterator p = ((StAXNode) contextNode).getParentAxis(); if (p.hasNext()) { return p.next(); } else { throw new IllegalStateException("node without parent."); } } COM: <s> get the parent node of a node </s>
funcom_train/10948184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteStringPartial() { StringBuilderWriter writer = new StringBuilderWriter(); ProxyWriter proxy = new ProxyWriter(writer); try { proxy.write("ABC", 1, 2); } catch(Exception e) { fail("Writing String threw " + e); } assertEquals("BC", writer.toString()); } COM: <s> test writing a partial string </s>
funcom_train/17847799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(Color color) { if (color == mDefaultColor) { setProperty(null); } else { mCachedValue = color; String value = UiUtilities.getHTMLColorCode(color) + StringUtils.leftPad(Integer.toString(color.getAlpha(), 16),2, '0'); setProperty(value); } } COM: <s> sets the color in this property </s>