__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1842952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getRefType(Type t) throws ClassNotFoundException { if (t instanceof ObjectType && isEntity(((ObjectType) t).getClassName())) { return new ObjectType(EntityRef.class.getName()); } if (t instanceof ArrayType) { ArrayType at = (ArrayType) t; return new ArrayType(getRefType(at.getBasicType()), at .getDimensions()); } return t; } COM: <s> return the reference type of given type </s>
funcom_train/6267501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUtranCellID3GPP(String utranCellID) throws ParseException { if (utranCellID == null) throw new NullPointerException( "JAIN-SIP Exception, " + "P-Access-Network-Info, setUtranCellID3GPP(), the utranCellID parameter is null."); setParameter(ParameterNamesIms.UTRAN_CELL_ID_3GPP, utranCellID); } COM: <s> set the utran cell id field </s>
funcom_train/16676986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createStatusBar() { statusBar = new ApplicationStatusBar(lower, SWT.NONE); SWTUtil.setGridData(statusBar, true, false, SWT.FILL, SWT.END, 1, 1); // A Windows-Style Size-Grip is set to the lower right. SizeGrip sizeGrip = new SizeGrip(lower, SWT.FLAT); GridData gd = new GridData( ); gd.heightHint = 25; sizeGrip.setLayoutData(gd); statusBar.setVisible(true); statusBar.layout( ); } COM: <s> creates the status bar </s>
funcom_train/28365806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateValuesY(double[] y, double[] err) { synchronized (lockUpObj) { if (xyPointV.size() != y.length || xyPointV.size() != err.length) { return; } for (int i = 0; i < y.length; i++) { xyPointV.get(i).setY(y[i], Math.abs(err[i])); } this.calculateRepresentation(); this.updateData(); } this.updateContainer(); } COM: <s> update the y array with errors into the data set </s>
funcom_train/44595766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean postParsing(Options options) throws InvalidOptionException { if (options.printHelp) { help(Log.log.stream()); return true; } if (options.classpath == null) { options.classpath = System.getProperty("java.classpath",""); } if (false) throw new InvalidOptionException(null); // To fool compiler return false; } COM: <s> this is called after successful parsing of the command line </s>
funcom_train/14005347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildLogonURL(String id, String psw) { StringBuffer buffer = new StringBuffer(); buffer.append(logonURL); buffer.append("?"); buffer.append(LogonXML.LOGON_REQUEST).append("="); buffer.append(LogonXML.buildRequest(id, psw)); return buffer.toString(); } COM: <s> create the logon url with paramethers for sending to the server </s>
funcom_train/44222263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractDiscussion() { if (broken)return null; StringBuffer sb = new StringBuffer(); for (int i = 0; i < this.pgs.size(); i++) { TextBlock pg = (TextBlock)this.pgs.get(i); if (pg.type == DISREGARDED || pg.type == FIGURE || pg.type == FOOTER || pg.type == HEADER) continue; if (pg.section != this.DISCUSSION) continue; sb.append(pg.s); } return sb.toString(); } COM: <s> extracts the discussion from the pdf file </s>
funcom_train/1536079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Drawable3D drawForPicking(Renderer renderer, boolean verifyIsPickable) { Drawable3D ret; if (createdByDrawList())//if it is part of a DrawList3D, the list is picked ret = (Drawable3D) getDrawListCreator(); else ret = this; if (!getGeoElement().isPickable() && verifyIsPickable) return ret; if(!isVisible()) return ret; drawGeometry(renderer); return ret; } COM: <s> draw for picking and verify or not if pickable </s>
funcom_train/48668793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void splash() { initImageAndTracker(); setSize(fImage.getWidth(null), fImage.getHeight(null)); center(); fMediaTracker.addImage(fImage, 0); try { fMediaTracker.waitForID(0); } catch(InterruptedException e){ e.printStackTrace(); } new SplashWindow(this, fImage); } COM: <s> show the splash screen to the end user </s>
funcom_train/48631111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int fetchVersion() throws SQLException { logger.trace("In fetchVersion()"); Cursor mCursor = mDb.query(true, DATABASE_METADATA, new String[] { MAX_COUNT }, null, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } int response = mCursor.getInt(0); mCursor.close(); return response; } COM: <s> retrieve the version number of the database </s>
funcom_train/46261233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void talk() { String userInput; try { while ((userInput = stdIn.readLine()) != null) { System.out.println("Msg Sent : " + userInput); socketWriter.println(userInput); socketWriter.flush(); System.out.println("Echo : " + socketReader.readLine()); } } catch (IOException ex) { System.out.println("\nIOError....!!!!"); ex.printStackTrace(); System.exit(1); } } COM: <s> temp method used for echo client </s>
funcom_train/17675818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initClass(Class cls){ try { if (!Modifier.isAbstract(cls.getModifiers())) { Constructor cons = cls.getDeclaredConstructor(null); ClassHelper.get().setAccessible(cons, true); cons.newInstance(null); } } catch (Exception e) { //ignore } } COM: <s> create a instance of the given class </s>
funcom_train/32136118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText("Clear history"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { mainWinOp.getSelectedProduct().getHistory().clear(); loadHistory(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/25842690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection(boolean selection) { if ((getStyle() & (SWT.CHECK | SWT.RADIO)) == 0) return; if (selection) { PGroupToolItem[] items = parent.getToolItems(); for (int i = 0; i < items.length; i++) { items[i].setSelection(false); } } this.selection = selection; parent.redraw(); } COM: <s> sets the selection state of the receiver </s>
funcom_train/3361023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLinkName() throws NamingException { if (className != null && className.equals(linkClassName)) { RefAddr addr = get(linkAddrType); if (addr != null && addr instanceof StringRefAddr) { return (String)((StringRefAddr)addr).getContent(); } } throw new MalformedLinkException(); } COM: <s> retrieves the name of this link </s>
funcom_train/21660580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeCommand(Instruction instruction) { Position newPosition = null; switch (instruction) { case MOVE_FORWARD: newPosition = moveForward(); break; case TURN_LEFT: newPosition = turnLeft(); break; case TURN_RIGHT: newPosition = turnRight(); break; } if(plateau.isPositionInsidePlateau(newPosition)){ position = newPosition; }else{ throw new IllegalArgumentException("The instruction " + "can't guide the Rover to outside the plateau. Tried position: " + newPosition); } } COM: <s> receives the command to be executed and delegates it to the appropriate </s>
funcom_train/10874047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean run(String s) { int p = initial; int l = s.length(); for (int i = 0, cp = 0; i < l; i += Character.charCount(cp)) { p = step(p, cp = s.codePointAt(i)); if (p == -1) return false; } return accept[p]; } COM: <s> returns true if the given string is accepted by this automaton </s>
funcom_train/10951443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanInfo getBeanInfo(Class clazz) throws IntrospectionException { synchronized (beanInfoCache) { BeanInfo beanInfo; beanInfo = beanInfoCache.get(clazz); if (beanInfo == null) { beanInfo = Introspector.getBeanInfo(clazz, Object.class); beanInfoCache.put(clazz, beanInfo); } return beanInfo; } } COM: <s> gets the java bean info for the given source </s>
funcom_train/46632628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getChildren() { if(children == null) { children = new Vector(); if (!getAllowsChildren()) return children; File[] files = file.listFiles(this); for (int i = 0; i < files.length; i++) children.addElement(new LibraryTreeNode(files[i], this)); } return children; } COM: <s> returns a vector of the receivers children </s>
funcom_train/29387435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPackageName(String pkgName) { if (pkgName != null && pkgName.length() > 0) { if (pkgName.endsWith(".")) { pkgName = pkgName.substring(0, pkgName.length() - 1); } } packageName = pkgName; } COM: <s> set the package name </s>
funcom_train/38326182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeJoin(Rete engine, WorkingMemory mem) throws AssertException { Map rightmem = (Map)mem.getQueryRightMemory(this); if (rightmem.size() == 0){ Index index = new Index(new Fact[0]); this.propogateAssert(index,engine,mem); } } COM: <s> when the first conditional element is notce for a query we simply </s>
funcom_train/492735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnvironment(String name) throws IOException { File k = new File(toolkitServiceImpl.propertyServiceManager.getPropertyManager().getExternalCache() + File.separator + "environment" + File.separator + name); if (!k.exists() || !k.isDirectory()) k = null; currentEnvironment = k; logger.debug(getId() + ": " + "Environment set to " + k); } COM: <s> sets name of current environment </s>
funcom_train/22829657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeEmbeddedIndicesStmt(Table table) { if (getDbDialectInfo().isIndicesSupported()) { for (int idx = 0; idx < table.getIndexCount(); idx++) { printStartOfEmbeddedStatement(); writeEmbeddedIndexCreateStmt(table, table.getIndex(idx)); } } } COM: <s> writes the indexes embedded within the create table statement </s>
funcom_train/40880181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int deleteRow(int row) throws Exception { try{ String rowGUID = getValueAt(row,0); //dbconnection.deleteRow(rowGUID); modelList.remove(row); fireTableRowsDeleted(0,modelList.size()); //Updates the view of the table after deleting a row }catch (Exception e){ throw e; } return 0; }// deleteRow COM: <s> deletes a row from the table </s>
funcom_train/7520063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setByteArray(byte[] data, int offset, int length) { // added on 7-Oct-2003 if (AppiaConfig.QUOTA_ON) { if (size > 0) unBind(size); bind(length); } while (first != null) { first.refs--; first = first.next; } Block b = new Block(data, offset, length, offset); first = b; size = length; ro_mode = false; ro_len = 0; ro_off = 0; } COM: <s> sets the data of the message </s>
funcom_train/21936724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLetterOption() { if (this.name!=null) { final StringBuffer sb = new StringBuffer(); for (int i=0;i<this.name.length();i++) { char c = this.name.charAt(i); if (Character.isLetter(c)) { sb.append(c); } } if (sb.length() > 0) { return sb.toString(); } } return null; } COM: <s> iterate the current tagname and return only letters as told by </s>
funcom_train/45250634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void linkPartToPageLayout(String viewId, LayoutPart newPart) { pageLayout.setRefPart(viewId, newPart); // force creation of the view layout rec pageLayout.getViewLayoutRec(viewId, true); pageLayout.setFolderPart(viewId, placeholder); newPart.setContainer(placeholder); } COM: <s> inform the page layout of the new part created </s>
funcom_train/39865442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getDecodedObject(BerInputStream in) throws IOException { /* To ensure we get the correct encoding on non-ASCII platforms, specify that we wish to convert from ASCII to the default platform encoding */ return new String(in.buffer, in.contentOffset, in.length, Charsets.ISO_8859_1); } COM: <s> extracts string object from ber input stream </s>
funcom_train/24492624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsCaseInsensitive(Set<String> set, String searchStr) { boolean result = set.contains(searchStr); if (!result) { for (String key : set) { if (key.toLowerCase().equals(searchStr.toLowerCase())) { result = true; break; } } } return result; } COM: <s> checks whether a set contains the search string searching case insensitive </s>
funcom_train/25290508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(Node child) { if (child instanceof SharedGroup) { throw new IllegalArgumentException(Ding3dI18N.getString("Group2")); } if (isLiveOrCompiled()) { if (! (child instanceof BranchGroup)) throw new RestrictedAccessException(Ding3dI18N.getString("Group12")); if(!this.getCapability(ALLOW_CHILDREN_EXTEND)) throw new CapabilityNotSetException(Ding3dI18N.getString("Group16")); } ((GroupRetained)this.retained).addChild(child); } COM: <s> appends the specified child node to this group nodes list of children </s>
funcom_train/3462951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawValue(double[] newValue, Graphics g, int graphId) { if (!active[graphId]) return; g.setColor(colors[graphId]); int[] oldCoord = realToScreenCoords(oldValue[graphId]); int[] newCoord = realToScreenCoords(newValue); g.drawLine(oldCoord[0],oldCoord[1],newCoord[0],newCoord[1]); oldValue[graphId] = newValue; } COM: <s> draws a value onto the canvas </s>
funcom_train/24249915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revealInAddressBook(Contact c, boolean edit) { try { String uriString = "addressbook://" + c.getUID(); //$NON-NLS-1$ if (edit) { uriString = uriString + "?edit"; //$NON-NLS-1$ } Desktop.getDesktop().browse(new URI(uriString)); } catch (IOException e) { } catch (URISyntaxException e) { } } COM: <s> opens the address book and selects the given contact </s>
funcom_train/29829064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendInfos(String username, String password, PacketID packetID) { Hashtable values = new Hashtable(); values.put("username", username); values.put("password", password); return sendInfos(null, packetID, values); } COM: <s> directly sends user information needed for registration </s>
funcom_train/45737031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPrimitiveType(){ //Iterate all primitive types and see whether this type //corresponds. for(PrimitiveType val : PrimitiveType.values()){ if(this.getSimpleName().equals(val.getName())){ if(this.getPackage().isEmpty()){ return true; } } } return false; } COM: <s> returns true if this data type is a primitive type </s>
funcom_train/44621673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printSpecs(TypeSpecs tspecs) { preNoNewLine(); for (JmlTree.JmlTypeClause clause: tspecs.clauses) { if (clause instanceof JmlTree.JmlTypeClauseDecl) continue; if (clause instanceof JmlTree.JmlTypeClauseRepresents) continue; print(" "); print(JmlPretty.write(clause,false)); println(); } preEnd(); } COM: <s> prints the given specs any clauses that are not declarations e </s>
funcom_train/14515815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUserData(String username, String[] userData) { if (users == null) { debugLog("addUserData: Creating new users."); users = new Hashtable(); } debugLog("addUserData: Adding '" + username); users.put(username.toLowerCase(), userData); } COM: <s> adds information for a user in an instance to users </s>
funcom_train/25290086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ViewPlatform getTriggeringViewPlatform() { if (behav == null) { throw new IllegalStateException(Ding3dI18N.getString("WakeupOnViewPlatformExit0")); } synchronized (behav) { if (!behav.inCallback) { throw new IllegalStateException(Ding3dI18N.getString("WakeupOnViewPlatformExit0")); } } return (triggeredVP != null) ? (ViewPlatform)triggeredVP.source : null; } COM: <s> retrieves the view platform node that caused the wakeup </s>
funcom_train/10980684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServletMapping(String servletName, String urlPattern) { if (servletName == null) { return; } if (servletName.equals(this.servletName)) { if (log.isDebugEnabled()) { log.debug("Process servletName=" + servletName + ", urlPattern=" + urlPattern); } this.servletMapping = urlPattern; } } COM: <s> p remember a servlet mapping from our web application deployment </s>
funcom_train/28490623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getInstances(String type) { Map extents = new HashMap(); Set concepts = new HashSet(); extents.put(KAOSPackage.eINSTANCE.getKModel(), concepts); Query query = QueryFactory.eINSTANCE.createQuery(type + ".allInstances()", KAOSPackage.eINSTANCE.getKModel()); Collection result = (Collection) query.evaluate(kModel); return result; } COM: <s> returns all instances of a given meta concept the meta concept name must </s>
funcom_train/22718251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OutputStreamWriter buildWriter(String className) throws FileNotFoundException, UnsupportedEncodingException { String filename = options.getDirectory() + File.separator + className + "." + options.getExtension(); System.out.println("Creating new source file: " + filename); File sourceFile = new File(filename); return new OutputStreamWriter(new FileOutputStream(sourceFile), "UTF8"); } COM: <s> builds the file writer object for the given table </s>
funcom_train/24645227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toInsertColumsString() { StringBuilder sb = new StringBuilder(); for (SQLColumn c : COLUMNS) { if (!c.isInsertable()) { continue; } if (sb.length() > 0) { sb.append(","); } sb.append(c.getColumnName()); } return sb.toString(); } COM: <s> not including primary keys </s>
funcom_train/4230634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(JGraphLayout layout, boolean processByGroups) { if (processByGroups) { // Run the layout individual on each sibling group // then combine the result determineLayoutHierarchies(); Set oldVertexFilter = verticesFilter; Object[] hierarchies = groupHierarchies.toArray(); for (int i = 0; i < hierarchies.length; i++) { verticesFilter = (Set)hierarchies[i]; layout.run(this); } verticesFilter = oldVertexFilter; } else { layout.run(this); } } COM: <s> the main method to execute layouts </s>
funcom_train/1309799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long sendToServer(Message message) { if (! (message instanceof PlayerMessage)) { LOG.log(Level.WARNING, "message is not a playermessage: {0}", message); } message.setPlayerId(playerId); message.setDestinationPlayerId((short) -1); LOG.log(Level.FINEST, "sending {0}", message); return getServerConnection().sendMessage(message); // this is a direct connection } COM: <s> send this message only to the server </s>
funcom_train/10977695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isXhtml() { if (xhtmlSet) { return xhtml; } ValueBinding vb = getValueBinding("xhtml"); if (vb != null) { Boolean value = (Boolean) vb.getValue(getFacesContext()); if (null == value) { return xhtml; } return value.booleanValue(); } else { return xhtml; } } COM: <s> p return a flag indicating whether xhtml should be created </s>
funcom_train/10628236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFloatValuePlusZero() { String a = "123809648392384754573567356745735.63567890295784902768787678287E-400"; BigDecimal aNumber = new BigDecimal(a); int zero = 0; float result = aNumber.floatValue(); assertTrue("incorrect value", Float.floatToIntBits(result) == zero); } COM: <s> float value of a small positive big decimal </s>
funcom_train/46976255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BugIterator listBugs(int nBugs){ // create db connection / set member var: realBugsManagerDBConnect connect(); BugIteratorServant bugItSrv = new BugIteratorServant( nBugs, realBugsManagerDBConnect ); return BugIteratorHelper.narrow( bugItSrv._this_object( this._orb()) ); } COM: <s> retrieves all bugs </s>
funcom_train/50154239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initEditor() { editor = new ProjectEditorPanel(); messages = new MessagePanel(); messages.addComponentListener(this); editor.setMessageConsole(messages); splitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true); splitter.add(editor); splitter.add(messages); messages.setVisible(false); getContentPane().add(splitter, BorderLayout.CENTER); } COM: <s> method init editor </s>
funcom_train/18953032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueObject getValueObject() { if (logger.isDebugEnabled()) { logger.debug("getValueObject() - start"); } if (logger.isDebugEnabled()) { logger.debug("getValueObject() - end - return value = " + valueObject); } return valueObject; } COM: <s> value object whose values are to be displayed in the mask </s>
funcom_train/25307242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mkdirPath(String root, String filepath) { String[] directories = filepath.split("/"); String path = root; for (int i = 0; i < directories.length; i++) { path += File.separator + directories[i]; File file = new File(path); if (!file.exists()) { file.mkdir(); } } } COM: <s> make directory path </s>
funcom_train/10228676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bindToPullValuesFromModel(String bindingName, String bindingSpecification) { if (currentBinder == null || currentView == null) { throw new IllegalStateException( "Can't perform bind. Call 'switchToSubview' first to setup a current subview."); } currentBinder.bind( currentView, component.getEventsSupport(), bindingName, bindingSpecification, STBindingSet.PULL_FROM_MODEL_BINDING); } COM: <s> creates a named one way binding for the current subview </s>
funcom_train/47679238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet executeQuery(PreparedStatement pstmt) { if (!shouldPerformOp()) { return null; } try { resultSet = pstmt.executeQuery(); } catch (Exception ex) { lastError = !debugMode ? ex.getMessage(): "Could not execute prepared statement:\n" + ex.toString(); logError("Could not execute prepared statement:\n" + ex); return null; } return resultSet; } COM: <s> calls the code execute query code method of the </s>
funcom_train/4918021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OfficeBuildingManagerMBean startOfficeBuilding() throws Exception { return OfficeBuildingManager.startOfficeBuilding(null, PORT, this.keyStore, KEY_STORE_PASSWORD, MOCK_USER_NAME, MOCK_PASSWORD, null, false, new Properties(), this.mbeanServer, new String[0], false, this.remoteRepositoryUrls); } COM: <s> starts the office building for testing </s>
funcom_train/3117878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSeparator(int index) { final JToolBar.Separator s = new JToolBar.Separator(null); if (getOrientation() == VERTICAL) { s.setOrientation(JSeparator.HORIZONTAL); } else { s.setOrientation(JSeparator.VERTICAL); } add(s, index); } COM: <s> adds a separator at the specified index </s>
funcom_train/9551454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRbtCreateDomain() { if (RbtCreateDomain == null) { RbtCreateDomain = new JRadioButton("Create Domain",true); RbtCreateDomain.setBounds(new Rectangle(100, 55, 110, 21)); RbtCreateDomain.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateDmdUrl(); } }); } return RbtCreateDomain; } COM: <s> this method initializes rbt create domain </s>
funcom_train/8818551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { int width = getWidth(); int height = getHeight(); g.setColor(0x000000); g.fillRect(0, 0, width, height); g.setColor(0xffffff); g.drawRect(0, 0, width - 1, height - 1); g.drawRect(1, 1, width - 3, height - 3); } COM: <s> paints white border </s>
funcom_train/825996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionListener(ActionListener listener) { Class<? extends ActionListener> key = getKey(listener.getClass()); if (key == null) { return; } List<ActionListener> list; if (listeners.containsKey(key)) { list = listeners.get(key); } else { list = new ArrayList<ActionListener>(); listeners.put(key, list); } list.add(listener); } COM: <s> adds a specific action listener </s>
funcom_train/44222238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractBody() { if (broken)return null; StringBuffer sb = new StringBuffer(); for (int i = 0; i < this.pgs.size(); i++) { TextBlock pg = (TextBlock)this.pgs.get(i); if (pg.type == DISREGARDED || pg.type == FIGURE || pg.type == FOOTER || pg.type == HEADER) { continue; } sb.append(pg.s); } return sb.toString(); } COM: <s> extracts all the text from the body of the paper </s>
funcom_train/3594279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayStrategy(String annotationElementName, DisplayStrategy ds) { if (annotationElementName == null) { throw new IllegalArgumentException("Can't set display strategy for <null> annotation element name"); } if (ds == null) { throw new IllegalArgumentException("Display strategy <null> not allowed"); } displayStrategies.put(annotationElementName, ds); } COM: <s> administration of display strategies </s>
funcom_train/43245525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSpEmpCity() { System.out.println("getSpEmpCity"); EmploymentDataDG2Object instance = new EmploymentDataDG2Object(); String expResult = ""; String result = instance.getSpEmpCity(); 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 sp emp city method of class org </s>
funcom_train/32363051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMaximumSize() { Dimension ms = super.getMaximumSize(); if (ms == null) { if (maxWidth > 0 || maxHeight > 0) ms = new Dimension(); else return null; } if (maxWidth > 0) ms.width = maxWidth; if (maxHeight > 0) ms.height = maxHeight; return ms; } COM: <s> gets maximum size </s>
funcom_train/12561207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uCallInvalidate() { boolean wasModal = maxScroll > 0 || alert.numCommands > 1; super.uCallInvalidate(); synchronized (Display.LCDUILock) { if (wasModal != lIsModal()) { lSetTimeout(alert.getTimeout()); } lRequestPaint(); } setVerticalScroll(); } COM: <s> this method is responsible for </s>
funcom_train/26283297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void traceAttributes() { System.out.println("Trace attributes for servlet context:"); Enumeration enum = getServletContext().getAttributeNames(); while(enum.hasMoreElements()) { String aname = (String)enum.nextElement(); if (aname.startsWith("net.opense")) { System.out.println(aname + "='" + getServletContext().getAttribute(aname)+ "'"); } } } COM: <s> prints all attributes set in servlet context </s>
funcom_train/18351020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { if (value instanceof Goal) { domains.setValue(((Goal)value).getDomain()); goals.setValue(value); existingGoal.setSelected(true); name.setEnabled(false); name.setBackground(Color.lightGray); description.setEnabled(false); description.setBackground(Color.lightGray); } } COM: <s> if instance of goal set domain and goal combos are set </s>
funcom_train/37650583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveNewContent(IFile file, String newContent) { try { file.setContents(new ByteArrayInputStream(newContent.getBytes()), false, true, getMonitor()); } catch (CoreException e) { logError(StringKeys.ERROR_CORE_EXCEPTION, e); } } COM: <s> save the file </s>
funcom_train/13804529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel getLeftLabel(String label) { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p,BoxLayout.X_AXIS)); p.add(new JLabel(label)); p.add(Box.createHorizontalGlue()); return p; } COM: <s> generate a panel with a label pushed to the left </s>
funcom_train/40451772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidData(SensorData data) { // no type, or Type=* are wildcards for all data if (this.type == null || "*".equals(this.type)) { return true; } String typeValue = getPropertyValue(data, "Type"); return this.type.equals(typeValue); } COM: <s> determines if the sensor data matches the specified type </s>
funcom_train/31911640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int nextInEntityValue() throws IOException, XMLException { switch (current) { case '&': return readReference(); case '%': int t = nextChar(); readName(LexicalUnits.PARAMETER_ENTITY_REFERENCE); if (current != ';') { throw createXMLException("invalid.parameter.entity"); } nextChar(); return t; default: while (current != -1 && current != attrDelimiter && current != '&' && current != '%') { nextChar(); } switch (current) { case -1: throw createXMLException("unexpected.eof"); case '\'': case '"': nextChar(); context = ENTITY_CONTEXT; return LexicalUnits.STRING; } return LexicalUnits.FIRST_ATTRIBUTE_FRAGMENT; } } COM: <s> returns the next lexical unit in the context of an entity value </s>
funcom_train/43865947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findExistedCell(Point p, Vector<DrawingBean> v) { for (int i=0; i<v.size(); i++) { if (p.x == v.get(i).getPoint().x && p.y == v.get(i).getPoint().y) { return i; } } return -1; } COM: <s> finds the index of a specified cell in a given vector </s>
funcom_train/437970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCellEditable(EventObject event) { // Checks whether the event should cause editing to be resumed resumeOnNextEdit = event instanceof MouseEvent || (event instanceof ActionEvent && ((ActionEvent)event).getActionCommand().equals( SpreadsheetTable.RESUME_EDIT_COMMAND)); // Checks whether editing should start if (event instanceof MouseEvent) return ((MouseEvent)event).getClickCount() >= CLICK_COUNT_TO_START; else return true; } COM: <s> checks if the given event should cause editing to be resumed </s>
funcom_train/25342559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumDifferentArtists() { HashSet<String> artists = new HashSet<String>(); for (Entry entry : this.workingEntries) { Title title = this.titleRegistry.getTitle(entry.getTitleId()); if (title != null) { artists.add(title.getArtist().toLowerCase().trim()); } } return artists.size(); } COM: <s> gets the number of different artists used in this playlist </s>
funcom_train/33530842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readBody(HTTPServer.Request request) throws IOException { String body = ""; BufferedReader reader = new BufferedReader(new InputStreamReader(request.getBody())); while (true) { String line = reader.readLine(); if (line == null) break; body += line; } return body; } COM: <s> returns the contents of an http post request as a string </s>
funcom_train/24039402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlPort() { if (pnlPort == null) { pnlPort = new JPanel(); pnlPort.setLayout(new BorderLayout()); pnlPort.setBorder(BorderFactory.createTitledBorder(null, "Data port", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51))); pnlPort.add(getPnlPortInner(), BorderLayout.WEST); } return pnlPort; } COM: <s> this method initializes pnl port </s>
funcom_train/46759588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessModel getAccess(final long accessId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SecurityData.getAccess(accessId, chain, call); }}; return (AccessModel) call(method, call); } COM: <s> same transaction return the single access model for the primary key </s>
funcom_train/16769074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensurePullAndPushRunning() { if (pullMode && pullAndPushFuture == null) { synchronized (pullAndPushMonitor) { // client buffer is at least 100ms pullAndPushFuture = subscriberStream.getExecutor().scheduleWithFixedDelay(new PullAndPushRunnable(), 0, 10, TimeUnit.MILLISECONDS); } } } COM: <s> make sure the pull and push processing is running </s>
funcom_train/26199102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllChildrenFromTheTree(DefaultMutableTreeNode actionNode, DefaultTreeModel treeModel){ ((MBTNode)actionNode.getUserObject()).removeAllChildren(); int cnt = actionNode.getChildCount(); for (int i = 0; i < cnt; i++) { treeModel.removeNodeFromParent((DefaultMutableTreeNode) actionNode.getChildAt(0)); } } COM: <s> removes all the children from a given jtree node </s>
funcom_train/167513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contourRenderer(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, ContourPlot plot, ValueAxis horizontalAxis, ValueAxis verticalAxis, ColorBar colorBar, ContourDataset data, CrosshairState crosshairState) { try { super.contourRenderer(g2, dataArea, info, plot, horizontalAxis, verticalAxis, colorBar, data, crosshairState); } catch (ArrayIndexOutOfBoundsException e) { log.info("data number is not a square."); if (log.isDebugEnabled()) log.debug(e); } } COM: <s> check array index out of bounds exception to suppress error </s>
funcom_train/16677404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getIncrementInternal() { if (showIncrement) { int textLength = textValue.getText( ).length( ); double factor = textLength - position - 1; double base = 10; if (showDouble) { if (position >= textLength) { factor = (position - textLength) + 1; base = 0.1; } } double multi = Math.pow(base, factor); return increment * multi; } else { return increment; } } COM: <s> calculates the increment to use according to the style of the </s>
funcom_train/1170560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addType(Card c, String s) { if (!types.containsKey(c)) { ArrayList<String> list = new ArrayList<String>(); list.add(s); types.put(c, list); } else types.get(c).add(s); } COM: <s> p add type </s>
funcom_train/8533780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model load(XMLDocument doc) { fModel = new Model(null, new ID()); try { XMLElement root = doc.getRootElement(); IElementHandler handler = getHandler(root, true); handler.handle(root); return fModel; } finally { fModel = null; } } COM: <s> this method creates and returns a new model with resources and their </s>
funcom_train/2582527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int column) { if (this.model == null) { return null; } if (column < 1) { return this.model.getX(0, row); } else { return this.model.getY(column - 1, row); } } COM: <s> returns a value of the specified cell </s>
funcom_train/46760439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationPanelTreeModel getApplicationPanelTree(final long applicationPanelTreeId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SecurityData.getApplicationPanelTree(applicationPanelTreeId, chain, call); }}; return (ApplicationPanelTreeModel) call(method, call); } COM: <s> same transaction return the single application panel tree model for the primary key </s>
funcom_train/1589332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Period plusHours(int hours) { if (hours == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.HOUR_INDEX, values, hours); return new Period(values, getPeriodType()); } COM: <s> returns a new period plus the specified number of hours added </s>
funcom_train/33981912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { ArrayList<Authorizer> authorizers = new ArrayList<Authorizer>(); authorizers.add(new GoogleAuthorizer()); authorizers.add(fbAuthorizer); StatusPanel status = new StatusPanel("Starting...", authorizers, new LoginHandler() { public void loginFailed() { } public void loginSucceeded() { startGetUserInfo(); } }); statusDisplay = status; RootPanel.get("statusPanelDiv").add(status); status.getAuthorized(); } COM: <s> this is the entry point method </s>
funcom_train/9043102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int binarySearch(String field, Object key, FieldComparator comp) { Fields row = new Fields(); int index = fields.indexOf(field); row.addAll(Collections.nCopies(index, null)); row.add(key); // padding by irrelevant fields, could also be done by another // Comparator return Collections.binarySearch(this, row, comp); } COM: <s> perform a binary search specifying the condition with a comparator </s>
funcom_train/43245505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSpEmployer() { System.out.println("setSpEmployer"); String spEmployer = ""; EmploymentDataDG2Object instance = new EmploymentDataDG2Object(); instance.setSpEmployer(spEmployer); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set sp employer method of class org </s>
funcom_train/26221363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getHostNameTextField() { if (hostNameTextField == null) { hostNameTextField = new JTextField(); hostNameTextField.setText("localhost"); hostNameTextField.setEditable(true); hostNameTextField.setBackground(Color.orange); } return hostNameTextField; } COM: <s> this method initializes host name text field </s>
funcom_train/38810414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__String_getChildText_String_OrgJdomNamespace() { Element element = new Element("element"); Namespace ns = Namespace.getNamespace("urn:test:foo"); Element child = new Element("child", ns); child.addContent(" some text \nboo "); element.addContent(child); assertEquals("incorrect text returned", " some text \nboo ", element .getChildText("child", ns)); } COM: <s> test the convience method for retrieving child text for a child retrieved </s>
funcom_train/9990149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object apply(Context context, Object arg) { Object result = null; if (arg == null) { throw new NullArgument("Null argument to cosh()"); } if (arg instanceof Number) { result = new Double(Math.cosh(((Number) arg).doubleValue())); } else { throw new TypeError("Wrong argument type to cosh()"); } return result; } COM: <s> returns the hyperbolic cosine of the argument </s>
funcom_train/9701103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String testConnection() { if (!isInitialized()){ throw new RuntimeException(JavaSQLServerMessages.SQLServerConnectionModelGenerator_4); } String dbConnectionString = getConnectionString(); try { conn = DriverManager.getConnection(dbConnectionString,user,password); } catch (SQLException e) { if (e.getCause()!=null){ e.getCause().printStackTrace(); return e.getMessage(); } e.printStackTrace(); return e.getMessage(); } return null; } COM: <s> test the connection to the database </s>
funcom_train/45237088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JRadioButton getJRadioButtonMrBayes() { if (jRadioButtonMrBayes == null) { jRadioButtonMrBayes = new JRadioButton(); jRadioButtonMrBayes.setText("Mr. Bayes"); jRadioButtonMrBayes.setSize(new Dimension(101, 24)); jRadioButtonMrBayes.setLocation(new Point(358, 225)); jRadioButtonMrBayes.setBackground(new Color(173, 200, 226)); } return jRadioButtonMrBayes; } COM: <s> this method initializes j radio button mr bayes </s>
funcom_train/49995694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goDTW() { TrajectoryDTWInputPanel dtwInputPanel = new TrajectoryDTWInputPanel("inputPanel", this); dtwInputPanel.setOutputMarkupId(true); TrajectoryDTWDataPanel dtwDataPanel = new TrajectoryDTWDataPanel("dataPanel", this); dtwDataPanel.setOutputMarkupId(true); remove(inputPanel); add(dtwInputPanel); remove(dataPanel); add(dtwDataPanel); } COM: <s> starts the dtw dialog </s>
funcom_train/3099377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processSchedulerStatusMsg(SchedulerStatusMsg schedulerStatusMsg) { Scheduler scheduler = (Scheduler) schedulerStatusMsg.getSender(); Status status = schedulerStatusMsg.getStatus(); boolean isBusy = (status.getValue(Status.SCHEDULE_FINISHED) != null); if (! isBusy) recordSchedulerCompletedSchedule(scheduler); checkIfAllSchedulersDone(); } COM: <s> processes the schedule status message </s>
funcom_train/32861520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(char c) { if (chars == null) return "No unicode database found."; String name = "0000"+Integer.toHexString(c).toUpperCase(); name = name.substring(name.length()-4); for(Iterator it = chars.iterator(); it.hasNext(); ) { String data = (String) it.next(); if (data.substring(0,4).equals(name)) { return data.substring(4); } } return "Not found."; } COM: <s> returns the unicode name of a character </s>
funcom_train/5268765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanStart() { synchronized(gameModes) { gameModes.removeAllElements(); WorldMapMode worldMap = new WorldMapMode(this, world); worldMap.cleanStart(); gameModes.push(worldMap); } player.cleanStart(); blockingAnims = new BlockingAnimationGroup(); } COM: <s> this function will reset the game to it original state </s>
funcom_train/13307622
/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); Dimension d = getSize(); g.setColor(getBackground()); g.fillRect(0, 0, d.width, d.height); if (mJPEGPanelBufferedImage != null) { g.drawImage(mJPEGPanelBufferedImage, 0, 0, this); } } COM: <s> paints the component </s>
funcom_train/502421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteLabelGroup(String key) throws ApsSystemException { SystemContext ctx = this.getSystemContext(); Connection conn = null; try { conn = ctx.getPortalConnection(); conn.setAutoCommit(false); _i18nDao.deleteLabelGroup(key, conn, ctx); this._labelGroups.remove(key); conn.commit(); } catch (Throwable t) { ctx.logThrowable(t, this, "deleteLabelGroup"); this.executeRollback(conn); throw new ApsSystemException("Errore in rimozione label", t); } finally { ctx.closeConnection(conn); } } COM: <s> delete a group of labels from db </s>
funcom_train/12167170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EnvironmentContext getEnvironmentContext() { EnvironmentContextMock environmentContext = new EnvironmentContextMock("environmentContext", expectations); ExpressionContextMock expressionContext = new ExpressionContextMock("expressionContext", expectations); environmentContext.expects.getExpressionContext(). returns(expressionContext); DefaultNamespacePrefixTracker tracker = new DefaultNamespacePrefixTracker(); tracker.startPrefixMapping("mcs", XDIMESchemata.XDIME2_MCS_NAMESPACE); expressionContext.expects.getNamespacePrefixTracker().returns(tracker); return environmentContext; } COM: <s> get an enviornment context which can provide an expression context </s>
funcom_train/22661855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVariableToScope(VarEntry entry) { if ( currentScope instanceof TypeScope && entry.getMode() != Mode.EXEMPLAR) { if (moduleScopeAddPermitted(entry.getName())) { moduleScope.addVariable(entry); } } else { if (addPermitted(entry.getName())) { currentScope.addVariable(entry); } } } COM: <s> adds the specified variable to the current scope </s>
funcom_train/43214411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireFulfilledCallback(RemoteCallback rc) { ServerCallbackEvent sce = new ServerCallbackEvent(IOUtil.createURL(this), rc.getID(), ServerCallbackEvent.TYPE_FULFILLED, rc.getName(), rc.getDescription()); for (RemoteTrancheServerListener l : getListeners()) { try { l.requestFulfilled(sce); } catch (Exception e) { } } } COM: <s> p notify server listeners that a server request has been fulfilled </s>
funcom_train/18741923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void selectionChanged() { if (suspendListening()) { Component selection = getTabPane().getSelectedComponent(); String name = selection == null ? null : selection.getName(); getSimulatorModel().doSelect(getResourceKind(), name); activateListening(); } } COM: <s> callback method that is invoked when the tab selection has changed </s>