__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12282733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseQuotedToken(final char[] terminators) { char ch; i1 = pos; i2 = pos; boolean quoted = false; while (hasChar()) { ch = chars[pos]; if (!quoted && isOneOf(ch, terminators)) { break; } if (ch == '"') { quoted = !quoted; } i2++; pos++; } return getToken(true); } COM: <s> parse out a token until any of the given terminators is encountered </s>
funcom_train/51299022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setIsSupplier(boolean value) { supplier = value; treeCustomersGuide.setController(new RoleGroupTreeController( supplier ? "providers_group" : "receivers_group")); treeCustomersGuide.setSelectedGroup(selectedId);// set ID this.setTitle(supplier ? LanguageClass.getValue("guide.suppliers") : LanguageClass.getValue("customer.guide")); } COM: <s> set whether partner is supplier or consumer </s>
funcom_train/1931299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws SQLException, ClassNotFoundException { try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { throw e; } // Getting connection through DriverManager /*System.out.println("Address : " + this.getFullAddress() + ", " + this.userName + ", " + this.passwd);*/ try { this.conn = DriverManager.getConnection(this.getFullAddress(),this.userName, this.passwd); } catch (SQLException e) { throw e; } } COM: <s> methode retournant lobjet connection dacces a la base </s>
funcom_train/45076687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaggedProfile getTaggedProfile() { TaggedProfile tp = new TaggedProfile(); tp.id = Id; tp.profile = new org.omg.PersonIdService.Trait[traits.size()]; for (int i = 0; i < traits.size(); i++) { Trait t = (Trait)traits.get(i); tp.profile[i] = t.toCORBA(); } return tp; } COM: <s> translate the trait list to a tagged profile </s>
funcom_train/32612242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEnvelopeByMessageIdQuery() { StringBuffer query = new StringBuffer(); query.append( "CONSTRUCT { " + "<" + Constants.URI_PREFIX + this.messageId + "> ?p ?o " + "} WHERE { " + "<" + Constants.URI_PREFIX + this.messageId + "> ?p ?o " + "}"); return query.toString(); } COM: <s> create a query matching a soapentry by its message id </s>
funcom_train/46296019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterPropertiesSet() { if (authEndpoint == null) { throw new RuntimeException("authEndpoint not set"); } if (mgrEndpoint == null) { throw new RuntimeException("mgrEndpoint not set"); } validateNAASAccount(adminAccount); validateNAASAccount(runtimeAccount); if (StringUtils.isBlank(nodeId)) { throw new RuntimeException("nodeId not set"); } } COM: <s> make sure the helpers are set </s>
funcom_train/26492673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resignAsEditor(String userid, int cid) { DBConnection con = null; int rs = 0; try { con = DBServiceManager.allocateConnection(); rs = con.executeUpdate("DELETE FROM mdir_Category_Editor WHERE di_editor_userid=\'"+userid+"\' AND di_editor_cid="+cid); } catch (SQLException sqle) { } finally { if (con != null ) { con.release(); } } return (rs != 0); } COM: <s> method used when an editor want to resign for a special category </s>
funcom_train/46336574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPlsqlPackage() { System.out.println("getPlsqlPackage"); PlsqlTreeParserSuperClass instance = new PlsqlTreeParserSuperClass(null); PlsqlPackage expResult = instance.getPlsqlPackage(); PlsqlPackage result = instance.getPlsqlPackage(); assertSame(expResult, result); assertNotNull(result); } COM: <s> test of get plsql package method of class plsql tree parser super class </s>
funcom_train/668043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { switch (currentState) { case 0: return "DISCONNECTED"; case 1: return "CONNECTING"; case 2: return "CONNECTED_WAITING"; case 3: return "ERROR"; case 4: return "REFRESHING"; case 5: return "AUTHENTICATING"; } return "(unknown)"; } COM: <s> this method returns a string reprensentation of the current state </s>
funcom_train/43912682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doConfigSanityCheck() throws ConfigurationException { File dataDirectory = dataDirectory(); try { ReaderUtils.checkFile(dataDirectory, true); } catch (FileNotFoundException e) { throw new ConfigurationException("Can't access the configuration directory. Reason: " + e.getMessage()); } } COM: <s> performs a sanity check on the configuration files to allow for </s>
funcom_train/12116872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display(GLAutoDrawable drawable) { try { if (drawable != this) return; drawable.getContext().makeCurrent(); if (terminationHook) { logger.debug("Termination Hook was set"); this.stateManager.popAll(); return; } drawable.getGL().glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); stateManager.display(); } catch (Exception e) { exceptionHandler.handleException(e); } } COM: <s> makes of code drawable code </s>
funcom_train/18950510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendToSection( String pSectionName, String pContent ) { // existing section if( hasSection( pSectionName ) ) { Section section = getSection( pSectionName ); section.append( pContent ); } // create section else { Section newSection = new BasicSection( pSectionName ); newSection.append( pContent ); addSection( newSection ); } } COM: <s> append content to an existing section </s>
funcom_train/3112416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pathChanged(String path) { GnGeoConfigParser ggcp = new GnGeoConfigParser(); Roms games = new GnGeoParser(ggcp.rom_path, 40).getRoms(); String roms[] = games.getRoms(true); String names[] = games.getNames(true); rrdl.reloadRomsData(path, games, roms, names); } COM: <s> gn geo config file must be changed prior this call </s>
funcom_train/8897407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shop getShop(String nick) throws Exception { logger.info("nick------ "+nick); TaobaoJsonRestClient client = Util.getClient(); ShopGetRequest req = new ShopGetRequest(); req.setFields("sid,cid,title,nick,desc,bulletin,pic_path,created,modified"); req.setNick(nick); ShopGetResponse rsp = client.shopGet(req); com.taobao.api.model.Shop shop = rsp.getShop(); logger.info(rsp.getBody()); return shop; } COM: <s> sid string n id </s>
funcom_train/14371102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try { log.info("userLevelSecurity was set to: " + userLevelSecurity); if (moduleLoader == null) { moduleLoader = new DefaultModuleLoader(); } module = moduleLoader.loadModule(modulesListLocation); } catch (IOException e) { log.error("Error loading module"); } } COM: <s> initalize the module information service </s>
funcom_train/31156739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxSpeed() { int maxspeed = Integer.MIN_VALUE; Iterator it = ships.iterator(); while (it.hasNext()) { Ship ship = (Ship)it.next(); if (ship.getMaxSpeed() > maxspeed) { maxspeed = ship.getMaxSpeed(); } } return maxspeed; } COM: <s> get max speed of the fleet </s>
funcom_train/41280029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int delete(DeletedEntry de) { File file = new File(de.getFilename()); File sfile = getServerFile(file); if (sfile.exists()) { if (debug) System.out.println("Deleting : "+sfile); sfile.delete(); removeDelEntry(de.getKey()); return FILE_DEL; } else { if (debug) System.out.println("Nothing to delete : "+sfile); removeDelEntry(de.getKey()); return FILE_UC; } } COM: <s> delete the file relative to the given entry </s>
funcom_train/4638066
/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 ("CalculatorWSPort".equals(portName)) { setCalculatorWSPortEndpointAddress(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/8539496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collator getCollator() { // not known? if (cachedCollator == null) { cachedCollator = Collator.getInstance(getLocale()); // 20050505 when comparing gedcom values we really don't want it to be // done case sensitive. It surfaces in many places (namely for example // in prefix matching in PropertyTableWidget) so I'm restricting comparison // criterias to PRIMARY from now on cachedCollator.setStrength(Collator.PRIMARY); } // done return cachedCollator; } COM: <s> return an appropriate collator instance </s>
funcom_train/37206658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFormatter(String formatter) { if (this.formatter == null) { if (formatter != null) { this.formatter = formatter; fireFormatterAdded(formatter); } } else if (!this.formatter.equals(formatter)) { if (formatter == null) { String removedFormatter = this.formatter; this.formatter = formatter; fireFormatterRemoved(removedFormatter); } else { this.formatter = formatter; fireFormatterChanged(formatter); } } } COM: <s> sets the formatter </s>
funcom_train/4208978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PacketExtension getExtension(String elementName, String namespace) { if (namespace == null) { return null; } for (PacketExtension ext : packetExtensions) { if ((elementName == null || elementName.equals(ext.getElementName())) && namespace.equals(ext.getNamespace())) { return ext; } } return null; } COM: <s> returns the first packet extension that matches the specified element name and </s>
funcom_train/37804792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getSelectedItem() { mode = MODE_SINGLE; if (SwingUtilities.isEventDispatchThread()) { run(); } else { try { SwingUtilities.invokeAndWait(this); } catch (final InterruptedException e) { logger.log(Level.WARNING, "Exception thrown in SelectionGetter.run()", e); } catch (final InvocationTargetException e) { logger.log(Level.WARNING, "Exception thrown in SelectionGetter.run()", e); } } return selectedItem; } COM: <s> this method returns the t that is selected in </s>
funcom_train/26036141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void constructorInit(Graph schema) { initLP(schema); tempNodecache = new TempNodeCache(this); if (JenaParameters.enableFilteringOfHiddenInfNodes) { hiddenNodes = new HashSet<Node>(); if (schema != null && schema instanceof FBRuleInfGraph) { hiddenNodes.addAll(((FBRuleInfGraph)schema).hiddenNodes); } } } COM: <s> common pieces of initialization code which apply in all constructor cases </s>
funcom_train/1448461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttributeToLocationCategories() { int id = parentCategoryId == null ? 1 : parentCategoryId; this.locationCategories = new LocationCategories(); this.locationCategories.setCategoryId(categoryId); this.locationCategories.setCategoryName(categoryName); this.locationCategories.setCategoryTeaser(categoryTeaser); this.locationCategories.setDescription(description); this.locationCategories.setSortOrder(sortOrder); this.locationCategories .setLocationCategories(getLocationCategoriesFromCategoryId(id)); this.locationCategories.setCategoryType(type); } COM: <s> sets the variable values to location categories object </s>
funcom_train/7372024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInputSpec(HandleSpec spec) { List<HandleSpec> inputSpecs = getHandleSpecs(Handle.INPUT); if (inputSpecs == null || inputSpecs.size() == 0) { addHandleSpec(Handle.INPUT, spec); } else { inputSpecs.set(0, spec); } } COM: <s> set the input specification for the code streaming command code </s>
funcom_train/44713408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ProxyDataObject enqueue(OID oid) { Assert.exists(oid, OID.class); if ( m_queue.contains(oid) ) { return (ProxyDataObject) m_queue.get(oid); } ProxyDataObject pdo = new ProxyDataObject(oid, m_listener); m_queue.enqueue(oid, pdo); m_listener.onEnqueue(oid); return pdo; } COM: <s> enqueues the proxy data object associated with code oid code for processing </s>
funcom_train/18595470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point indexToPoint(JGraph graph, int index) { checkIndex(graph, index); Rectangle rect = getCellBounds(graph, graph.getRoots()[index]); // FIXME this is the center of the bounding box; should use the center // of the CellView/Renderer instead return new Point(rect.x + rect.width/2, rect.y + rect.height/2); } COM: <s> convert the given object index into a screen coordinate </s>
funcom_train/48646294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D) g; calculateLine(); if (line != null) { Shape oldClip = g2d.getClip(); g2d.setClip(getLineBounds()); g2d.setColor(lineColor); line.paint(g2d); g2d.setClip(oldClip); } } COM: <s> overrides parents paint </s>
funcom_train/48152510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g){ super.paintComponent(g); ImageIcon icon; Image image; if (faceUp){ image = images[cardNumber]; if (image == null){ icon = new ImageIcon(getClass().getResource("cards/card" + cardNumber + ".gif")); image = icon.getImage(); images[cardNumber] = image; } } else{ image = images[52]; if (image == null){ icon = new ImageIcon(getClass().getResource("cards/card52.gif")); image = icon.getImage(); images[52] = image; } } g.drawImage(image, 0, 0, this); } COM: <s> this method paints the card by drawing the image </s>
funcom_train/9873851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem createJRadioButtonMenuItem(String name, String command, ActionListener listener, ButtonGroup buttonGroup, boolean isSelected) { JRadioButtonMenuItem item = new JRadioButtonMenuItem(name); item.setActionCommand(command); item.addActionListener(listener); item.setSelected(isSelected); if (buttonGroup != null) { buttonGroup.add(item); } return item; } COM: <s> creates a radio button menu item with specified name action command and state </s>
funcom_train/31626826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertPrivForOTHER(RowSecuredDBObject obj, RowGroupPerms grouppermsForOthers) throws DBException { RowPermissions objperms = obj.getPermissions(); grouppermsForOthers.canGroupRead(objperms.canOthersRead() || othersReadAlways()); grouppermsForOthers.canGroupWrite(objperms.canOthersWrite()); grouppermsForOthers.canGroupAdministrate(objperms.canOthersAdministrate()); } COM: <s> copy privileges for other from the object into this group perm </s>
funcom_train/266215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear(int y) { super.setValue(y, true, false); if (dayChooser != null) { dayChooser.setYear(value); } spinner.setValue(new Integer(value)); firePropertyChange("year", oldYear, value); oldYear = value; } COM: <s> sets the year </s>
funcom_train/22284994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleEvent(Event evt) { switch (evt.id) { case Event.GOT_FOCUS: hadFocus = true; TreeNodeWidget firstNode = null; for (int i = 0; i < content.nwidgets; i++) { Widget node = content.widgets[i]; if (node instanceof TreeNodeWidget && node.isVisible()) { firstNode = (TreeNodeWidget) node; break; } } if (firstNode != null) { firstNode.focus(); firstNode.select(); firstNode.requestFocus(); } return true; } return super.handleEvent(evt); } COM: <s> handle the got focus event </s>
funcom_train/20643880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Money getCom(ComModifier cm) { //m_log.debug(sDepth()+" REQ "+cm+" "+cm.getClass()); ComMemory cmem = owner.getComMemory(cm); if (cmem.opened(this)) { m_log.error( "ComModifier :Loop detected ["+cm +"]["+cm.getComTitle() +"]["+cm.getClass()+"]" , new Exception()); return null; } startComCalc(cm); return cmem.getValue(); } COM: <s> get the com for this modifier br </s>
funcom_train/29324443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings("UnusedFormalParameter") private void activateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activateButtonActionPerformed new BackgroundTask(BackgroundTaskType.ACTIVATE, activateButton.isSelected()); }//GEN-LAST:event_activateButtonActionPerformed COM: <s> handle an activate event login to geocache uk if necessary and </s>
funcom_train/44325646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IStateDescriptor getStateDescriptor(IState state, String stateKey) { IStateDescriptor result = null; while (result == null && state != null) { IStateDescriptor descriptor = state.getStateDescriptor(); result = descriptor.getSubstateDescriptor(stateKey); state = state.getParentState(); } return result; } COM: <s> returns the descriptor of a substate of the given state corresponding to </s>
funcom_train/27943107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyReleased ( int keyCode ) { Event e = null; requests++; repaint(); if( eventCashe.isEmpty() ) { e = new Event(); } else { e = (Event)eventCashe.pop(); } boolean notify = events.isEmpty(); e.mode = e.KEY_PRESSED; e.keyCode = keyCode; events.push( e ); if( notify ) { try { worker.notifyAll(); } catch( IllegalMonitorStateException i ) { System.err.println( i.toString() ); } } } COM: <s> simply adds the event into the event queue and notifies the event </s>
funcom_train/23216950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAgentReferencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Agent_agentReference_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Agent_agentReference_feature", "_UI_Agent_type"), ContractPackage.Literals.AGENT__AGENT_REFERENCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the agent reference feature </s>
funcom_train/10231134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element toXmlElementInternal(Document a_doc) { if (m_elemSignature.getOwnerDocument() == a_doc) { return m_elemSignature; } try { return (Element) XMLUtil.importNode(a_doc, m_elemSignature, true); } catch (Exception a_e) { return null; } } COM: <s> transforms this xmlsignature to an xml element </s>
funcom_train/16357770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePosition(CoordinateGPS coord){ if(rawCoords.size() > ARRAY_SIZE_LIMIT){ rawCoords.removeAllElements(); } rawCoords.addElement(coord); try{ dos.writeUTF(coord.toString()); }catch(Exception e){} //CoordinateGPS c = kFilter.getFilteredCoordinate(); myCanvas.drawPoint(coord); } COM: <s> this function is called when the gps updates its coordinates </s>
funcom_train/20116660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setNewStatusToDocument(String status) { List<Element> configs = XmlUtils.findAllElements(taskDocument.getDocumentElement(),MailTask.CONFIG_NAME); for (Element config : configs) { if (config.getAttribute(MailTask.CONFIG_NAME_ATTRIBUTE).equals(configName)) { config.setAttribute(CONFIG_STATUS_ATTRIBUTE, status); } } } COM: <s> setter for new status of document create </s>
funcom_train/7284573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(Transaction txn, final String name) { if (txn != null) { txn.addTxn(this, new Txn() { public void commit(Transaction txn) { setNameP(txn, name); } }); } else { setNameP(txn, name); } masterPlaylist.setName(txn, name); } COM: <s> sets the name of this database </s>
funcom_train/19536749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void marshalBindings(BaseEncounter encounter, HierarchicalStreamWriter aWriter, MarshallingContext aContext) { Bindings bindings = encounter.getBindings(null); aWriter.startNode("props"); for (String key : bindings.keySet()) { Object value = bindings.get(key); if (value instanceof String) writeNode(aWriter, key, (String)value); } // endfor aWriter.endNode(); } COM: <s> marshal bindings that are not a part of the base encounter </s>
funcom_train/44452420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildTree(Column treeCont) { treeCont.removeAll(); if (root != null) { treeCont.setBorder(new Border(0,Color.LIGHTGRAY,Border.STYLE_SOLID)); treeCont.add(new ThreadTree(new MyTreeSelectionListener(), root, thName, marcOntLogic)); } else { noVersionsAction(); } } COM: <s> method responsible for buidling a versions tree </s>
funcom_train/22286627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getURL(String nm, String def) { String val = (String)current.get(nm); if (val == null) { return def; } if ((persistentPrefix != null) && (val.indexOf(':') < 0) && !val.startsWith("~")) { val = persistentPrefix + val; } if (val.startsWith(activePrefix)) { val = val.substring(activePrefix.length()); } return val; } COM: <s> get a url </s>
funcom_train/776777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean proxyCommand(String command) { if (vfs.getCurrentLocation().isRemote()) { // this is remote proxyCommand(command, vfs.getCurrentLocation().getSlaveName()); // assume that this will be executed in whatever slave dir we are already in return true; } else { return false; } } COM: <s> sends the command to the currently connected slave </s>
funcom_train/3022140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drag(Point point) { if ((activeVertex > 0) && (activeVertex < vertices.length - 1)) { vertices[activeVertex].move(point); if (activeVertex == 1) { updateStart(); } if (activeVertex == vertices.length - 2) { updateEnd(); } } } COM: <s> drag the current vertex </s>
funcom_train/51357512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveConfig() { try { FileOutputStream fos = new FileOutputStream(portencrossFileConfig); propsInitialisation.store(fos, "Auto Created by Portencross"); fos.close(); } catch (Exception e) { LOG.error("Exception saving config", e); throw new RuntimeException("Exception saving config : " + e); } } COM: <s> save off the config properties </s>
funcom_train/13591763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRandomness() { final double value1 = MatsimRandom.getRandom().nextDouble(); final double value2 = MatsimRandom.getRandom().nextDouble(); final double value3 = MatsimRandom.getRandom().nextDouble(); assertTrue(Math.abs(value1 - value2) > EPSILON); assertTrue(Math.abs(value1 - value3) > EPSILON); assertTrue(Math.abs(value2 - value3) > EPSILON); } COM: <s> test that matsim random returns different values </s>
funcom_train/21954476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach() { File[] f = getFileToAttach(); if (f != null) { NewMessageUI nmui = getNewMessageUI(); nmui.setModified(true); for (int i = 0; i < f.length; i++) attachFile(f[i]); } } COM: <s> this attaches a file to a given message </s>
funcom_train/5341253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createImagePanel() { JPanel panel = new JPanel(new BorderLayout()); panel.add(new JLabel(_image), BorderLayout.CENTER); panel.setMaximumSize(getMaximumSize()); panel.setPreferredSize(getPreferredSize()); return panel; } COM: <s> creates the background image panel </s>
funcom_train/13596249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GeneralSettingsPanel getGeneralSettingsPanel() { if (generalSettingsPanel == null) { generalSettingsPanel = new GeneralSettingsPanel(true,Messages.getString("ProjectPropertiesPanel.TitleCustomSettings")); //$NON-NLS-1$ generalSettingsPanel.setName(Messages.getString("ProjectPropertiesPanel.TitleProjectProperties")); // Generated //$NON-NLS-1$ } return generalSettingsPanel; } COM: <s> this method initializes general settings panel </s>
funcom_train/5437103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxBytes(int maxBytes) throws ParfumBallException { if(maxBytes < 0) { throw new IllegalArgumentException("MaxBytes [" + maxBytes + "] must be greater than or equal to 0."); } if(started) { throw new ParfumBallException("Session already started."); } this.maxBytes = maxBytes; } COM: <s> set the maximum number of bytes that will be captured in this session </s>
funcom_train/49125145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateChatPanel(String message,Short sender_id) { String msgDisplay = getPlayerPreference(sender_id).getName()+">>"+message; setMessageLineNo(getMessageLineNo() + 1); chatMessagesArea.insert(msgDisplay, getMessageLineNo()); setChatMessageArrived(false); } COM: <s> update the chat message area when text message arrives </s>
funcom_train/7383686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { if (graphComponent.isEnabled() && !graphComponent.isForceMarqueeEvent(e) && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mousePressed(e); } } } COM: <s> dispatches the mousepressed event to the subhandles </s>
funcom_train/14034535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanCache(MetadataElement meta) { String key = meta.getProjectId() + "|" + meta.getContentType(); // trash the cached data for the "projectId|contentType" key // if it exists if (typeToMetadataMap.containsKey(key)) { Logger.debug("Clearing cache for " + key); ArrayList<MetadataElement> elems = typeToMetadataMap.get(key); typeToMetadataMap.remove(key); for (MetadataElement elem : elems) { elem.destroy(); } elems.clear(); elems = null; } } COM: <s> clean up the cache entry project id content type for an updated </s>
funcom_train/41483722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node visitChildren(NodeVisitor v) { List varDecls = visitList(this.varDecls, v); Expr expr = (Expr) visitChild(this.expr, v); Stmt body = (Stmt) visitChild(this.body, v); return reconstruct(varDecls, expr, body); } COM: <s> visit the children of the statement </s>
funcom_train/29504796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Area findAreaByName(String name) throws Exception { try { return (Area)manager.createQuery("from Area d where d.name = :x").setParameter("x",name).getSingleResult(); } catch (Exception e) { log.error("findAreaByName("+name+") - Failed to find the area: "+e); throw e; } } COM: <s> returns the area with the name specified </s>
funcom_train/4529508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doUpdates(MetricsContext context) { rpcQueueTime.pushMetric(metricsRecord); rpcProcessingTime.pushMetric(metricsRecord); synchronized (metricsList) { // Iterate through the rpcMetrics hashmap to propogate the different rpc metrics. Set keys = metricsList.keySet(); Iterator keyIter = keys.iterator(); while (keyIter.hasNext()) { Object key = keyIter.next(); MetricsTimeVaryingRate value = metricsList.get(key); value.pushMetric(metricsRecord); } } metricsRecord.update(); } COM: <s> push the metrics to the monitoring subsystem on do update call </s>
funcom_train/42543557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RealModeCodeBlock getRealModeCodeBlockAt(Memory memory, int offset) { RealModeCodeBlock block; if ((block = tryRealModeFactory(compilingRealModeChain, memory, offset)) == null) { if ((block = tryRealModeFactory(realModeChain, memory, offset)) == null) { throw new IllegalStateException("Couldn't find capable block"); } } return block; } COM: <s> get a real mode codeblock instance for the given memory area </s>
funcom_train/1807253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveGame(String saveGameName, Gameboard gameboard) { SpielmodusManager modusManager = (SpielmodusManager) FactoryMethod.getInstance().getCurrentSpielfeldOptionManager(); return prozessor.writeSavegame(gameboard, saveGameName, modusManager.getLoesungsSpielfeld().getName()); } COM: <s> save the current game </s>
funcom_train/12146832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLValue computeLockDiscovery(NodeLock objectLockToken, String slideContextPath) { XMLValue xmlValue = new XMLValue(); Element activelock = createActiveLockElement(objectLockToken, slideContextPath); if (activelock != null) { xmlValue.add(activelock); } return xmlValue; } COM: <s> returns an xmlvalue containing the value of the code lt lockdiscovery gt code </s>
funcom_train/31771138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLLoader createFromXML(XMLArguments pxml_Args) throws java.io.IOException { XMLLoader xl = null; try { xl = new ConfigurationFile(); xl.loadFromXML(pxml_Args); } catch (XMLParseException xpex) { throw new RuntimeException(xpex.getMessage()); } catch (SAXException saxex) { throw new RuntimeException(saxex.getMessage()); } return xl; } COM: <s> creates a fresh object from the given xml arguments </s>
funcom_train/11373480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatisticsString() { StringBuffer sb = new StringBuffer(); for(FSEditLogOpCodes opCode : FSEditLogOpCodes.values()) { sb.append(String.format( " %-30.30s (%3d): %d%n", opCode, opCode.getOpCode(), opCodeCount.get(opCode))); } return sb.toString(); } COM: <s> get the statistics in string format suitable for printing </s>
funcom_train/22285288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fit() { int x = this.x; int y = this.y; Dimension d = player.size(); if (x + width > d.width) { x = d.width - width; } if (x < 0) { x = 0; } if (y + height > d.height) { y = d.height - height; } if (y < 0) { y = 0; } setLocation(x, y); } COM: <s> fit the menu in the visible area of the parent window </s>
funcom_train/15464513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeFragmented(String strCmd,boolean blnFlush,int intDelay) throws Exception { OutputStream objOut= objProtocolValidation.getSocket().getOutputStream(); char achrCmd [] = strCmd.toCharArray(); int intLength = strCmd.length(); int intIndex; for (intIndex=0;intIndex<intLength;intIndex++) { objOut.write(achrCmd[intIndex]); if (blnFlush) { objOut.flush(); } sleep(intDelay); } objOut.write(10); objOut.flush(); } COM: <s> write the string message to the output stream socket </s>
funcom_train/27946892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean notAllPositioned(Node[] atomSet) { int test; for (int f = 0; f < size(); f++) { //test = ((Node)elementAt(f)).number; if (atomSet[((Node)elementAt(f)).number].status < 1) return true; } return false; } COM: <s> checks if all nodes of this ring have not yet been finally </s>
funcom_train/1558839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyPerspective(String id) throws IllegalArgumentException { for(int i = 0; i < defaultPerspectives.length; ++i) { if(id.equals(defaultPerspectives[i].getId())) { applyPerspective(defaultPerspectives[i]); return; } } for(Perspective perspective : perspectives) { if(id.equals(perspective.getId())) { applyPerspective(perspective); return; } } throw new IllegalArgumentException("Could not find perspective with the given name."); } COM: <s> apply a new perspective using its id </s>
funcom_train/26509142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object join(Object e1, Object e2) { Object result; if (e1==top || e2==top) result=top; else if (e1==bottom) result=e2; else if (e2==bottom) result=e1; else result=((PreLattice)poset).join(e1,e2); if (result==null) result=top; return result; } COM: <s> computes the least upper bound of two elements in the following way if </s>
funcom_train/10545043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tearDown() throws Exception { rollback(); // Remove all rows in the test tables, so that each test case // sees the same initial state. Statement stmt = createStatement(); stmt.execute("truncate table t1"); stmt.execute("truncate table t2"); commit(); // Reset the counters. zeroArgCount = 0; getConnectionProcCount = 0; selectRowsCount = 0; super.tearDown(); } COM: <s> tear down the test environment </s>
funcom_train/46378349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreValues() { // First clear out any existing updates stored by this class stateUpdates.clear(); // Next iteratate through all factories and tell them to refresh for (PropertiesFactorySPI factory : factoryList) { factory.restore(); } // Clear out the set of "dirty" panels and disable the apply/restore // buttons dirtyPanelSet.clear(); applyButton.setEnabled(false); restoreButton.setEnabled(false); } COM: <s> restores all of the values in the gui to the original values </s>
funcom_train/1958775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalid() throws VerinecException { Document d=null; try { d = builder.build(new StringReader(invalidxml)); } catch (Throwable t) { fail("Could not create jdom: "+t.toString()); } if (validator.validate(d)) { fail("Validated invalid document."); } } COM: <s> test behaviour of validator with invalid xml </s>
funcom_train/32777727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E succ(E e) { if (e == null) { sendWarning("Can not find successor of Entity in Queue!", "Queue : " + getName() + " Method: Entity succ(E e)", "The Entity 'e' given as parameter is a null reference!", "Check to always have valid references when querying for Entities"); return null; // no proper parameter } return _ql.succ(e); } COM: <s> returns the entity enqueued directly after the given entity in the queue </s>
funcom_train/1995258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ListNode getListNode(String raw) { if (raw != null) { for (ListNode place = head; place != null; place = place.next) { if (place.raw != null && place.raw.equals(raw)) { return place; } } } return null; } // getListNode(String):ListNode COM: <s> returns the first node with the specified raw name </s>
funcom_train/45622800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addApplicationUrlPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateBootstrapperType_applicationUrl_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateBootstrapperType_applicationUrl_feature", "_UI_GenerateBootstrapperType_type"), MSBPackage.eINSTANCE.getGenerateBootstrapperType_ApplicationUrl(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the application url feature </s>
funcom_train/23831944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TupleExpr selectNextTupleExpr(List<TupleExpr> expressions, Set<String> boundVars) { double lowestCardinality = Double.MAX_VALUE; TupleExpr result = null; for (TupleExpr tupleExpr : expressions) { // Calculate a score for this tuple expression double cardinality = statistics.getCardinality(tupleExpr, boundVars); if (cardinality < lowestCardinality) { // More specific path expression found lowestCardinality = cardinality; result = tupleExpr; } } return result; } COM: <s> selects from a list of tuple expressions the next tuple expression that </s>
funcom_train/30009220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTopic() { System.out.println("getTopic"); int index = 0; CategoryList instance = new CategoryList(); Category expResult = null; Category result = instance.getTopic(index); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get topic method of class papyrus </s>
funcom_train/51112267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check() throws BuildException { if (this.testjarname != null) { if (!this.testjarname.endsWith(".jar")) { testjarname = testjarname + ".jar"; } } // check ejbRef configuration for (Iterator i = this.ejbRefs.iterator(); i.hasNext();) { EjbRef ejbRef = (EjbRef)i.next(); ejbRef.check(); } } COM: <s> check that all the required parameters have been properly set </s>
funcom_train/29064205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateAspectType_NameConstraint(AspectType aspectType, DiagnosticChain diagnostics, Map context) { if (aspectType.getName() == null || aspectType.getName().trim().equals("")) { if (diagnostics != null) { createBadDataValueDiagnostic(aspectType, AspectxPackage.eINSTANCE.getAspectType_Name(), diagnostics, context); return false; } return false; } return true; } COM: <s> validates the name constraint constraint of em aspect type em </s>
funcom_train/4232201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataPanel createDataPanel(Extension extension) throws Exception { Class<?> dataPanelClass; try { dataPanelClass = Class.forName(extension.getID()); } catch (ClassNotFoundException e) { throw new Exception("Unable to find extension " + extension.getName()); } DataPanel dataPanel = (DataPanel)dataPanelClass.newInstance(); dataPanel.openPanel(this); dataPanels.add(dataPanel); return dataPanel; } COM: <s> creates the data panel referenced by the supplied extension </s>
funcom_train/46110843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocaleId (Locale loc) { if ( loc == null ) { throw new IllegalArgumentException("The locale cannot be null."); } String tmp = loc.toString(); for ( int i=0; i<JAVALOCMAP.length; i++) { if ( JAVALOCMAP[i][0].equals(tmp) ) { tmp = JAVALOCMAP[i][1]; break; } } locId = normalize(tmp); } COM: <s> creates a new locale id for the given java locale </s>
funcom_train/8405926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { if (fast) { synchronized (this) { Map temp = cloneMap(map); Object result = temp.put(key, value); map = temp; return (result); } } else { synchronized (map) { return (map.put(key, value)); } } } COM: <s> associate the specified value with the specified key in this map </s>
funcom_train/34342787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCompra() { if (compra == null) {//GEN-END:|26-getter|0|26-preInit // write pre-init user code here compra = new Command("Compra", Command.OK, 0);//GEN-LINE:|26-getter|1|26-postInit // write post-init user code here }//GEN-BEGIN:|26-getter|2| return compra; } COM: <s> returns an initiliazed instance of compra component </s>
funcom_train/49320846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Point2D.Double p) { if (p != null) { xValue.setText(String.valueOf(p.getX())); yValue.setText(String.valueOf(p.getY())); } else { xValue.setText(""); yValue.setText(""); } } COM: <s> set the x y values to display </s>
funcom_train/33233873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getWordSI() { if (wordSI == null) {//GEN-END:|117-getter|0|117-preInit // write pre-init user code here wordSI = new StringItem("Word:", null);//GEN-LINE:|117-getter|1|117-postInit // write post-init user code here }//GEN-BEGIN:|117-getter|2| return wordSI; } COM: <s> returns an initiliazed instance of word si component </s>
funcom_train/16514663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { if (!shutDown) { shutDown = true; dbQuery("SHUTDOWN"); try { connection.close(); } catch (SQLException e) { System.out.println("Connection could not be closed: "+ e.getMessage()); e.printStackTrace(); } } } COM: <s> shuts down the current database </s>
funcom_train/5348194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMisroutedPong() throws Exception { Message m = PingReply.createExternal(GUID.makeGuid(), (byte)6, 7399, IP, false); ULTRAPEER_1.send(m); ULTRAPEER_1.flush(); assertTrue("should not have drained ultrapeer successfully", !drain(ULTRAPEER_2)); assertTrue("should not have drained leaf successfully", !drain(LEAF)); } COM: <s> tests to make sure that pongs that had no entry in the routing </s>
funcom_train/18341130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { CommandEvent evt = null; while (!quit) { synchronized (readBuffer) { while (readBuffer.isEmpty()) { try { readBuffer.wait(); } catch (InterruptedException e) { } } if (readBuffer.isEmpty()) { continue; } evt = (CommandEvent) readBuffer.remove(0); } handleCommand(evt); evt = null; } } COM: <s> processes the incoming events from the reader thread </s>
funcom_train/4135898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBooktitlePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InProceedingsBibTexEntry_booktitle_feature"), getString("_UI_PropertyDescriptor_description", "_UI_InProceedingsBibTexEntry_booktitle_feature", "_UI_InProceedingsBibTexEntry_type"), BibtexPackage.Literals.IN_PROCEEDINGS_BIB_TEX_ENTRY__BOOKTITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the booktitle feature </s>
funcom_train/5585512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setString(String str) { setUtf8String(str); byte[] bytes; try { bytes = str.getBytes("UTF8"); } catch (UnsupportedEncodingException uex) { // shouldn't happen normally bytes = new byte[0]; } setLength(bytes.length); setBytes(bytes); } COM: <s> stores the utf8 string in the internal byte array </s>
funcom_train/49318116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pan() { Point2D.Double origin = new Point2D.Double(_rect.getX(), _rect.getY()); _imageDisplay.getCoordinateConverter().screenToUserCoords(origin, false); _mainImageDisplay.getCoordinateConverter().userToCanvasCoords(origin, false); _mainImageDisplay.setOrigin(origin); _mainImageDisplay.updateImage(); } COM: <s> pan the image to the selected location </s>
funcom_train/46682333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBoxCausalLinksFrom() { if (jComboBoxCausalLinksFrom == null) { jComboBoxCausalLinksFrom = new JComboBox(); jComboBoxCausalLinksFrom.setFont(new Font("Dialog", Font.BOLD, 12)); jComboBoxCausalLinksFrom.setPreferredSize(new Dimension(180, 20)); } return jComboBoxCausalLinksFrom; } COM: <s> this method initializes j combo box causal links from </s>
funcom_train/10790820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Identifier o) { if (o instanceof DBIdentifier) { if (this == DBIdentifier.NULL && (o == null || o == DBIdentifier.NULL)) { return 0; } if (this == DBIdentifier.NULL) return 1; if (o == null || o == DBIdentifier.NULL) return -1; } return super.compareTo(o); } COM: <s> comparison operator for identifiers </s>
funcom_train/4015108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveToPrevWidget(Widget sender, int col){ int rowCount = table.getRowCount(); //Starting from index 1 since 0 is the header row. for(int row = 1; row < rowCount; row++){ if(sender == table.getWidget(row, col)){ if(row == 1) return; TextBox textBox = ((TextBox)table.getWidget(row - 1, col)); textBox.setFocus(true); textBox.selectAll(); break; } } } COM: <s> moves input focus to the widget before </s>
funcom_train/46144484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayOfCalendar getQueryWSRequestCalendar(BookingRequest request) { // make web service call // CentralBookingWS centralBookingWS = new CentralBookingWS(); // ICentralBookingWS ws = centralBookingWS.getBasicHttpBindingICentralBookingWS(); try { return elvisWebService.getCalandar(request); // return ws.getCalandar(request); } catch (ICentralBookingWSGetCalandarICFaultFaultFaultMessage ex) { log.error(ex.getMessage(), ex); return null; } } COM: <s> retrieves the calendar using a ready made request </s>
funcom_train/49788969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sessionContains(Session session, EObject prop) { EObject obj = prop; int i = 0; while (i < 1000) { i++; if (obj == null) { // we ran out of hierarchy return false; } else if (obj.equals(session)) { // 'prop' is contained directly or indirectly by the given session return true; } else { // recurse up the containment obj = obj.eContainer(); } } throw new RuntimeException("Possible infinite loop detected in containment hierarchy: " + prop); } COM: <s> does the given session directly or indirectly contain the given object </s>
funcom_train/31529330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startDrag(DragGestureEvent pEvent, Cursor pCursor, Transferable pTransferable, DragSourceListener pListener, FlavorMap pFlavorMap) throws InvalidDnDOperationException { this.startDrag(pEvent, pCursor, null, null, pTransferable, pListener, pFlavorMap); } COM: <s> start the drag operation </s>
funcom_train/4745051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCreateAppUserGroupSelected() { this.createTagsString(); //update view createAppCache.setClouds(null); createAppCache.setImages(null); createAppCache.setKeyPairs(null); createAppCache.setMachineTypes(null); createAppCache.setSecurityGroups(null); } COM: <s> event handler on selected user group in create app view </s>
funcom_train/1082259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ExecutorData getExecutorData (String bindName) { ExecutorData exec; executorsMapLock.readLock().lock(); try { exec = executorsMap.get(bindName); // null if wasnt found } finally { executorsMapLock.readLock().unlock(); } if (exec == null) { exec = new ExecutorData(bindName); executorsMapLock.writeLock().lock(); try { executorsMap.put(bindName, exec); } finally { executorsMapLock.writeLock().unlock(); } } return exec; } COM: <s> internal method to retrieve the executor data object corresponding to the given bind </s>
funcom_train/33610805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDomain1(SampleSet<Double> newDomain) { if (sampler1 != newDomain && newDomain != null) { if (sampler1 instanceof ChangeBroadcaster) ((ChangeBroadcaster) sampler1).removeChangeListener(this); sampler1 = newDomain; if (sampler1 instanceof ChangeBroadcaster) ((ChangeBroadcaster) sampler1).addChangeListener(this); updateDomainPlottable(); firePlottableChanged(); } } COM: <s> sets domain of the first parameter </s>