__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2001498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractFilePath(String fileNameAndPath) { // Find last / or \ int extensionStartPos = fileNameAndPath.lastIndexOf("/"); if (extensionStartPos == -1) { extensionStartPos = fileNameAndPath.lastIndexOf("\\"); } if (extensionStartPos == -1) { return fileNameAndPath.substring(0); } return fileNameAndPath.substring(0, extensionStartPos); } COM: <s> this will extract the path of a fully qualified filename </s>
funcom_train/44558082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexColorModel getDefaultColorModel() { if (ImageProcessor.defaultColorModel==null) { byte[] r = new byte[256]; byte[] g = new byte[256]; byte[] b = new byte[256]; for(int i=0; i<256; i++) { r[i]=(byte)i; g[i]=(byte)i; b[i]=(byte)i; } ImageProcessor.defaultColorModel = new IndexColorModel(8, 256, r, g, b); } return ImageProcessor.defaultColorModel; } COM: <s> returns the default grayscale index color model </s>
funcom_train/18898661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getVariableList() throws QueryException, URISyntaxException { try { List tmpVariableList = new ArrayList(variableList); if (uriException != null) { throw uriException; } else if (queryException != null) { throw queryException; } else { return tmpVariableList; } } finally { uriException = null; queryException = null; variableList.clear(); } } COM: <s> returns the latest variable list or throws an exception if there </s>
funcom_train/35099897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long lastPage() { pageIndex = countPage; if ( isOnlyOne() ) { nextPage = false; previousPage = false; firstPage = false; lastPage = false; } else { nextPage = false; previousPage = true; firstPage = true; lastPage = false; } return ( startIndex = ( countPage - 1 ) * recordPerPage ); } COM: <s> goes to last page and gets last page number </s>
funcom_train/22285318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeyResource(String keyResource) { if (JDK10) { return; } resources = new Hashtable(2, 2); this.keyResource = keyResource; try { ClassLoader cl = getClassLoader(); marimba.util.StringResources sr = new marimba.util.StringResources(keyResource, getLocale(), getBase(), cl); resources.put(getLocale(), sr); } catch (Exception e) { // wow! the file does not exist! } } COM: <s> set the resource for the keys to the specified file </s>
funcom_train/34421494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePluginList() { Vector vectorPluginList=new Vector(); TableItem[] tableItems=tablePlugins.getItems(); for (int i=0;i<tableItems.length;i++) { vectorPluginList.add(tableItems[i].getText()); } configurationProfile.setPropertyValue("txtPlugins",vectorPluginList); } COM: <s> this helper method updates the txt plugins field inside the profile configurations </s>
funcom_train/21111846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Principal getPrincipal(String url) throws BadURLException { URLPrincipal upi=new URLPrincipal(url, defaultPort); if (!upi.getProtocol().equals(protocol)){ throw new BadURLException("Wrong URL parser: "+upi.getProtocol()+": found, "+protocol+": expected"); } return upi; } COM: <s> this method returns a principal for a given http url string </s>
funcom_train/7979440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Type removeElementFromDefinition(final String name) { if (isInitialized()) { throw new IllegalStateException( "Elements definition can only be removed in constructor."); } Object removedObj = this.definitionMap.remove(name); if (removedObj != null) { this.definition.remove(removedObj); } return (Type)removedObj; } COM: <s> this method can only be called before the complex type has been </s>
funcom_train/18032330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage scaleImage(int width, int height) { // create new scaled instance BufferedImage target = null; AffineTransform scaleMatrix = new AffineTransform(); scaleMatrix.setToScale( (double)width / (double)m_image.getWidth(), (double)height / (double)m_image.getHeight()); AffineTransformOp filter = new AffineTransformOp(scaleMatrix, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); target = filter.filter(m_image, null); return target; } COM: <s> scales and returns an image </s>
funcom_train/5446703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String allowedRequests() { String allowed = null; for (int i = 0; i < HTTP_COMMANDS.length; i++) if (isAllowedRequest(i)) { if (allowed == null) allowed = new String(HTTP_COMMANDS[i]); else allowed.concat(", " + HTTP_COMMANDS[i]); } return(allowed); } COM: <s> return a comma delimited list of allowed http methods </s>
funcom_train/14177688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getOpenGames(Game game) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = null; List result = null; try { tx = session.beginTransaction(); Query q = session .createQuery("from OpenGame where GAMEID like :un"); q.setInteger("un", game.getGameId()); result = q.list(); tx.commit(); } catch (HibernateException he) { if (tx != null) { tx.rollback(); } throw he; } return result; } COM: <s> returns all opengames with the same gameid like game </s>
funcom_train/43902176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final AbstractIdentifiedObject object, final boolean compareMetadata) { if (object == this) { return true; // Slight optimization. } if (super.equals(object, compareMetadata)) { final DefaultCompoundCRS that = (DefaultCompoundCRS) object; return equals(this.crs, that.crs, compareMetadata); } return false; } COM: <s> compares this coordinate reference system with the specified object for equality </s>
funcom_train/13319509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnName(String name, int col) { if (col > columnNames.length || col == columnNames.length || col < 0) { throw new IndexOutOfBoundsException("Column position out of range (available = 0-" + (columnNames.length - 1) + ", specified position = " + col + ")"); } this.columnNames[col] = name; } COM: <s> sets the specified name for the column with the specified index </s>
funcom_train/44624230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JCExpression parseLblExpr(int pos, JmlToken jmlToken) { // The JML token is already scanned Name n = ident(); JCExpression e = parseExpression(); return toP(jmlF.at(pos).JmlLblExpression(jmlToken, n, e)); } COM: <s> parses identifier expression </s>
funcom_train/13125297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void log(String message) { Logger logger = null; if (host != null) { logger = host.getLogger(); } if (logger != null) { logger.log("XUserConfig[" + host.getName() + "]: " + message); } else { System.out.println("XUserConfig[" + host.getName() + "]: " + message); } } COM: <s> log a message on the logger associated with our host if any </s>
funcom_train/25305645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(File location) { Map<String, Class<?>> aliases = new ConcurrentHashMap<String, Class<?>>(); aliases.put("sva", SvaModel.class); aliases.put("svaParameter", SvaParameter.class); this.init(location, aliases); } COM: <s> xstream file persistence strategy initialization </s>
funcom_train/32057280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDropActionChanged() { System.out.println("testDropActionChanged"); // Add your test code below by replacing the default call to fail. BasicGraphDropTargetListener x = new BasicGraphDropTargetListener(); // this returns void so there is no assertEquals() needed DropTargetDragEvent e = null; x.dropActionChanged(e); } COM: <s> test of drop action changed method of class basic graph drop target listener </s>
funcom_train/22928869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandHandler getCommandHandler(int index) { Assert.isTrue(index < commandHandlers.size(), "No CommandHandler defined for index " + index); Assert.isTrue(index >= 0, "The index cannot be less than zero: " + index); return (CommandHandler) commandHandlers.get(index); } COM: <s> return the command handler corresponding to the specified invocation index </s>
funcom_train/32316175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDataPropertyExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DisjointDataProperty_dataPropertyExpression_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DisjointDataProperty_dataPropertyExpression_feature", "_UI_DisjointDataProperty_type"), OdmPackage.Literals.DISJOINT_DATA_PROPERTY__DATA_PROPERTY_EXPRESSION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the data property expression feature </s>
funcom_train/9791648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Conversant getConversantAddingIfNecessary(String username) { for (int i = 0; i < conversants.size(); i++) { Conversant conv = (Conversant) conversants.elementAt(i); if (conv.getUsername().equalsIgnoreCase(username)) { return conv; } } System.out.println("Adding new conversant with username " + username); Conversant c2 = new Conversant(username); conversants.addElement(c2); return c2; } COM: <s> searches for conversant </s>
funcom_train/33371372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix add(Matrix m) { if(m.col != col || m.row != row) throw new RuntimeException("Matrix dimension mismatch"); Matrix result = new Matrix(row, col); for(int i=0; i<row; i++) { for(int j=0; j<col; j++) { result.set(add(get(i, j), m.get(i, j)), i, j); } } return result; } COM: <s> adds this matrix to the given one </s>
funcom_train/22279971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(int minCapacity) { int newLength; Object newArray[]; if (array == null) array = new Object[8]; if (minCapacity < array.length) return; if (array.length < 8) newLength = 8; else newLength = array.length; while (newLength < minCapacity) newLength = 2 * newLength; newArray = new Object[newLength]; System.arraycopy(array, 0, newArray, 0, count); array = newArray; } COM: <s> increases if necessary the the vectors storage area so that it can </s>
funcom_train/44283172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get() { if (nibbled) { int d = (((patch.sysex[ofs])*16)+(patch.sysex[ofs + 1])); //*/ ErrorMsg.reportStatus("SPD11PadModel.get(): " + d); ErrorMsg.reportStatus("SPD11PadModel.get(): ofs = " + ofs + "(0x" + Integer.toHexString(ofs) + ")"); //*/ return d; } else { return patch.sysex[ofs]; } } COM: <s> get data from sysex byte array </s>
funcom_train/36841085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeSelectionTree() { assert (allEvaluated); selectionTree = new TreeMap<Double, Schedule>(); double tot = 0; for (int i = 0; i < params.getPopSize(); i++) { tot += getNormedFitness(i); selectionTree.put(tot, this.pop.get(i)); } treemax = tot; } COM: <s> make the selection tree so that you can select individuals weighted by </s>
funcom_train/44560331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String hmac(String stringToSign) { String signature = null; byte[] data; byte[] rawHmac; try { data = stringToSign.getBytes(UTF8_CHARSET); rawHmac = mac.doFinal(data); signature = new String(Base64.encode(rawHmac)); } catch (UnsupportedEncodingException e) { throw new RuntimeException(UTF8_CHARSET + " is unsupported!", e); } return signature; } COM: <s> compute the hmac </s>
funcom_train/35461136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveLineSequenceNumber() { PLISourceCleaner cleaner = new PLISourceCleaner(); assertEquals("", cleaner.removeLineSequenceNumbering("")); /* 12345678901234567890123456789012345678901234567890123456789012345678901234567890*/ assertEquals( " DCL DSGTCBMO CHAR(1) STATIC INIT('02'X); ", cleaner.removeLineSequenceNumbering( " DCL DSGTCBMO CHAR(1) STATIC INIT('02'X); 91000000")); } COM: <s> check that we know how to remove a sequence number from a line </s>
funcom_train/37036441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWrapperListener(String listener) { synchronized (wrapperListeners) { String results[] =new String[wrapperListeners.length + 1]; for (int i = 0; i < wrapperListeners.length; i++) results[i] = wrapperListeners[i]; results[wrapperListeners.length] = listener; wrapperListeners = results; } } COM: <s> add the classname of a container listener to be added to each </s>
funcom_train/863113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { if (fields != null) { Iterator e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = (FieldEditor) e.next(); /* $codepro.preprocessor.if version >= 3.1 $ */ pe.setPage(null); /* $codepro.preprocessor.elseif version < 3.0 $ pe.setPreferencePage(null); $codepro.preprocessor.endif $ */ pe.setPropertyChangeListener(this); pe.setPreferenceStore(getPreferenceStore()); pe.load(); } } } COM: <s> initializes all field editors </s>
funcom_train/19977376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getKeysString() { String[] k = getKeys(); String s = ""; for (int i = 0; i < k.length; i++) { s += k[i] + ","; } if (s.length() > 1) { return s.substring(0, s.length() - 1); } else { return s; } } COM: <s> generates a comma separated string representation of the current keys </s>
funcom_train/47303747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreePath getTreePathForNode(SPObject o) { List<SPObject> path = new ArrayList<SPObject>(); while (o != null) { path.add(0, o); if (o == schema) break; o = o.getParent(); } return new TreePath(path.toArray()); } COM: <s> returns the tree path built from the get parent of the given olapobject </s>
funcom_train/16683773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String selectInstance() throws FxApplicationException { EJBLookup.getEngine(Account.class).selectInstance( FxContext.getUserTicket(), selectedInstancePk); String message = (String) MessageBean.getInstance().get( "userSettings.message.instanceChanged"); FxJsfUtils.addMessage(new FacesMessage(message)); return null; } COM: <s> changes user selected uip application instance </s>
funcom_train/40852260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double angleBetween(Vector other) { double t = (getX()*other.getY() - getY()*other.getX()); if(t == 0) return 0; t/=Math.abs(t); return t * Math.acos(scalar(other)/(length()*other.length())); } COM: <s> angle between two vectors the value is between pi and pi </s>
funcom_train/48110766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeLog(double value) { if (mIsLogging) { if (logCount++ > LOGLIMIT) { try { Date now = new Date(); mSplLog = new FileWriter(LOGPATH + now.getDate() + "_" + now.getMonth() + "_" + (now.getYear() + 1900) + ".xls", true); mSplLog.append(value + "\n"); mSplLog.close(); } catch (Exception e) { e.printStackTrace(); } logCount = 0; } } } COM: <s> if logging then store the spl values to a log file </s>
funcom_train/26280482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extract(Node node) throws ConfigException { extractIterType(node); id_ = XMLUtil.getAttributeByName(node, "id"); extractData(node); if (data_ == null || data_.length == 0) { throw new ConfigException("There is no data for the dataset"); } } COM: <s> do the actual extraction of the xml data to create the </s>
funcom_train/46453948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDrawingPanel3D(org.opensourcephysics.display3d.core.DrawingPanel3D _drawingPanel) { if(drawingPanel!=null) { // remove the old drawing panel. getContentPane().remove((JPanel) drawingPanel); } drawingPanel = _drawingPanel; if(drawingPanel!=null) { getContentPane().add((JPanel) drawingPanel, BorderLayout.CENTER); } pack(); } COM: <s> adds the drawing panel to the the frame </s>
funcom_train/42954058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void servicesDiscovered(int transID, ServiceRecord[] servRecord) { // Log.debug(LOG_NAME, "Services Discovered ..."); for (int i = 0; i < servRecord.length; i++) { this.records.addElement(servRecord[i]); } } COM: <s> determines the services discovered </s>
funcom_train/43106407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getOperationsInh(Object handle) { if (handle instanceof MClassifier) { MClassifier c = (MClassifier) handle; // TODO: We are converting back and forth between collections and // iterators. I (Linus) prefer iterators. return nsmodel.getCoreHelper().getOperationsInh(c).iterator(); } // ... illegalArgument(handle); return null; } COM: <s> get the list of operations of this classifier and all inherited </s>
funcom_train/6265586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String filterProfanity(String str) { // Check to see if the string is null or zero-length if (str == null || "".equals(str)) { return str; } String lower; if (ignoreCase) { lower = str.toLowerCase(); } else { lower = str; } for (int i = 0; i < filterList.length; i++) { str = replace(str, lower, filterList[i], cleanWord(filterList[i].length())); } return str; } COM: <s> filters out bad words </s>
funcom_train/11012321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadSheetWithRK() { HSSFWorkbook h = openSample("rk.xls"); HSSFSheet s = h.getSheetAt(0); HSSFCell c = s.getRow(0).getCell(0); int a = c.getCellType(); assertEquals(a, c.CELL_TYPE_NUMERIC); } COM: <s> test name test read sheet with an rk number p </s>
funcom_train/19887184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDescription() { System.out.println("getDescription"); testRevenueSource instance = null; String expResult = ""; String result = instance.getDescription(); 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 description method of class edu </s>
funcom_train/18651015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChessPosition positionAfterMove(Move move) { ChessPosition positionAfterMove; try{ positionAfterMove = (ChessPosition)this.clone(); }catch(CloneNotSupportedException e) { throw new java.lang.RuntimeException("CloneNotSupportedException", e); } positionAfterMove.doMove(move); return positionAfterMove; } COM: <s> returns a new position object after the specified move </s>
funcom_train/22468646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { //FIXME //Object[] args = {new Integer(pos)}; StringBuffer sb = new StringBuffer(); String prefix = RE.getLocalizedMessage("error.prefix"); //sb.append(MessageFormat.format(prefix, args)); sb.append('\n'); sb.append(super.getMessage()); return sb.toString(); } COM: <s> reports the descriptive message associated with this exception </s>
funcom_train/20978274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void uninstallListeners() { m_Window.removePropertyChangeListener(propertyChangeListener); if (m_Window instanceof Window.FrameWindow && m_WindowListener != null) { ((Window.FrameWindow)m_Window).getMainFrame().removeWindowListener( m_WindowListener); } } COM: <s> overriden to unregister on the window </s>
funcom_train/22183650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer readNumberOfComponents(byte[] data, Integer offset){ try{ NdmnField f = new NdmnField(data, this.getByteOrder()); Long l = u.read4Bytes(f, offset); return l.intValue(); }catch(NdmnException e){ System.err.println(e); return 0; } } COM: <s> read number of components out of data </s>
funcom_train/24641941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCaretStyle(int mode, int style) { style = (style>=ConfigurableCaret.MIN_STYLE && style<=ConfigurableCaret.MAX_STYLE ? style : ConfigurableCaret.THICK_VERTICAL_LINE_STYLE); carets[mode] = style; if (mode==getTextMode()) { // Will repaint the caret if necessary. ((ConfigurableCaret)getCaret()).setStyle(style); } } COM: <s> sets the style of caret used when in insert or overwrite mode </s>
funcom_train/3526817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHistoryName() { UriHandler hpathHandler = HistoryPathHandler.getHistoryPathHandler(); String[] hpathTokens = hpathHandler.getUriTokens(); if( !isHistoryUri() && !isVersionUri() ) throw new IllegalStateException( "URI "+uri+" is neither history nor version URI" ); return uriTokens[hpathTokens.length]; } COM: <s> returns the history identifier from the uri </s>
funcom_train/28366120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void filterList( final Pattern pattern, final List<? extends T> baseList ) { List<T> filteredList = new ArrayList<T>( baseList.size() ); Iterator<? extends T> iterator = baseList.iterator(); while ( iterator.hasNext() ) { T item = iterator.next(); String text = item.toString(); if ( pattern.matcher( text ).matches() ) { filteredList.add( item ); } } setFilteredList( filteredList ); } COM: <s> filter the base list using the pattern </s>
funcom_train/18635687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayPage(String urlString) { try { URL url = new URL(urlString); browserPane.setPage(url); urlTextField.setText(urlString); currentURL = urlString; } catch (Exception e) { JOptionPane.showMessageDialog(this, "Can't open " + urlString); } } COM: <s> displays the given url page </s>
funcom_train/24243120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element createElement(Document document, String tagName, ArrayList<String> attributeName, ArrayList<String> attributeValue) { int k = 0; Element element = document.createElement(tagName); while (k < attributeName.size()) { element.setAttribute(attributeName.get(k), attributeValue.get(k)); k++; } return element; } COM: <s> add an element to the xml document with multiple attributes </s>
funcom_train/15518062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getHomologousCoordinate(int genX, long pos, int genY){ long[] lcb = getLCBAndColumn(genomes[genX], pos); long[] seq_coords = new long[genomes.length]; boolean[] gap = new boolean[genomes.length]; getColumnCoordinates((int) lcb[0], lcb[1], seq_coords, gap); if (!gap[genY]) return seq_coords[genY]; else return 0; } COM: <s> returns the position in genome code gen y code that is homologous </s>
funcom_train/39794468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char cbuf[], int off, int len) throws IOException { int count = 0; for (; count < len; off++, count++) { int c = read(); if (c < 0) break; cbuf[off] = (char) c; } if (count == 0) return -1; return count; } COM: <s> read characters into a portion of an array </s>
funcom_train/10010091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeOn(Object prevalentSystem, Date executionTime) { PrevalentRoot root=(PrevalentRoot) prevalentSystem; try { for (BusinessAction mt: deltas) { mt.executeOn(root); } } catch (Exception ex) { ex.printStackTrace(); rollback(); // TODO restore modified objects } } COM: <s> executes all the stored actions </s>
funcom_train/32316136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addObjectpropertyexpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectExistsSelf_objectpropertyexpression_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectExistsSelf_objectpropertyexpression_feature", "_UI_ObjectExistsSelf_type"), OdmPackage.Literals.OBJECT_EXISTS_SELF__OBJECTPROPERTYEXPRESSION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the objectpropertyexpression feature </s>
funcom_train/8825126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerService() { DFAgentDescription dfd = new DFAgentDescription(); dfd.setName(getAID()); ServiceDescription sd = new ServiceDescription(); sd.setType(getSdType()); sd.setName(getSdName()); dfd.addServices(sd); try { DFService.register(this, dfd); } catch (FIPAException fe) { throw new IllegalStateException( "Appeared problem during the service registration.", fe); } } COM: <s> registers the service that this agent offers in the yellow pages </s>
funcom_train/24477208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMail(String subject, String messageBody) throws AddressException, MessagingException { Session session = Session.getDefaultInstance(System.getProperties(), new Authenticator(userName, password)); MimeMessage message = new MimeMessage(session); StringTokenizer st = new StringTokenizer(recipients, ","); while (st.hasMoreTokens()) { message.addRecipient(Message.RecipientType.TO, new InternetAddress(st.nextToken())); } message.setSubject(subject); message.setText(messageBody); Transport.send(message); } COM: <s> send mail with the subject and the message body </s>
funcom_train/10666815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printStackTrace(Throwable ex) { if (ex == null) { return; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); ex.printStackTrace(new PrintStream(baos)); log.log(baos.toString(), "[EXCEPTION]", 2); } COM: <s> print stack trace </s>
funcom_train/38560481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter) throws IOException { _s = ((ComplexNumberWritable)key).get(); DoubleTupleWritable temp; while (values.hasNext()) { temp = (DoubleTupleWritable)values.next(); rtaRes = temp.get1(); cdfRes = temp.get2(); } output.collect(key, new DoubleTupleWritable(rtaRes, cdfRes)); } COM: <s> simply passes the results through to the output collector </s>
funcom_train/5575995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { paletteEntryVector = new Vector(); Vector engineVector = engine.getPalette(); for (int i = 0; i < engineVector.size(); i++) { paletteEntryVector.addElement(new PaletteEntry((PaletteEntryState) engineVector.elementAt(i))); } paletteEntryList.setListData(paletteEntryVector); } COM: <s> refreshes the listbox of riffs </s>
funcom_train/28352270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKnobElementListener( final KnobElementListener listener ) { synchronized( this ) { MESSAGE_CENTER.registerTarget( listener, this, KnobElementListener.class ); listener.channelChanged( this, getChannel() ); listener.connectionChanged( this, isConnected() ); listener.readyStateChanged( this, isReady() ); listener.coefficientChanged( this, getCoefficient() ); listener.valueChanged( this, getLatestValue() ); } } COM: <s> add the specified listener as a receiver of notifications from this element </s>
funcom_train/41457687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Mode convert(ConnectionMode mode) throws ModeNotSupportedException { switch (mode) { case RECV_ONLY: return recvOnly; case SEND_ONLY: return sendOnly; case SEND_RECV: return send_recv; case CONFERENCE: return cnfMode; case NETWORK_LOOPBACK: return network_loop; case INACTIVE: return null; default: throw new ModeNotSupportedException(mode); } } COM: <s> creates switch executor for specified mode </s>
funcom_train/32778744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activateBefore(Schedulable before) { // get the current process SimProcess currentProcess = currentSimProcess(); if (currentProcess == null) { sendWarning("The current process of a cooperation is not found. " + "The attempted action is ignored!", "ProcessCoop: " + getName() + " Method: activateBefore()", "The current process is only a null pointer.", "Make sure that only real SimProcesses are cooperating."); return; } currentProcess.activateBefore(before); } COM: <s> schedules the current sim process to be activated directly before the </s>
funcom_train/31436360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePlanner(int userId) throws SQLException { DbConnection dc = new DbConnection(); int rows = 0; try { rows = dc.executeUpdate("DELETE FROM planners WHERE userid = " + userId); } catch (SQLException s) { dc.close(); SysUtils.logError(s); } dc.close(); if (rows > 0) return true; else return false; } COM: <s> removes the specified planner from the database </s>
funcom_train/43570246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ZapTextArea getDefaultOutput() { if (defaultOutput == null) { defaultOutput = new ZapTextArea(); defaultOutput.setEditable(false); defaultOutput.setLineWrap(true); defaultOutput.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); defaultOutput.setName(""); defaultOutput.append(Constant.messages.getString("alerts.label.defaultMessage")); } return defaultOutput; } COM: <s> this method initializes txt output </s>
funcom_train/47958004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double get_resolution(double[] bbox, int[] size){ double w = java.lang.Math.abs(bbox[0] - bbox[2]); double h = java.lang.Math.abs(bbox[1] - bbox[3]); return java.lang.Math.min(w/size[0], h/size[1]) ; } COM: <s> calculate the highest resolution needed to draw the bbox into an image </s>
funcom_train/13995005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testApplyValues() { uri.setQueryAttribute(KEYS[0], VALUES[0]); VOURI newURI = new VOURI("fofo"); newURI.applyValues(uri); assertEquals("invalid fragment", uri.getFragment(), newURI.getFragment()); assertEquals("invalid scheme specific part", uri.getSchemeSpecificPart(), newURI.getSchemeSpecificPart()); } COM: <s> tests whether scheme specific part and query attributes are applied </s>
funcom_train/3917758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { super.setUp(); // Set workbench data instance location tempFolder = FileSupport.getTestDataFolder(); ResourcesIndex index = new ResourcesIndex(); ResourceEntry entry = index.getRootResourcesGroup().addNewEntry("entry1", "", true); dc = new Resource(entry); } COM: <s> set up with a new test index resource and entry </s>
funcom_train/5437211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endCapture() { if(done) { return; } done = true; try { iface.close(); } catch (PcapException e) { notifyListeners(PCT_CAPTURE_ERROR, e); } finally { iface = null; } notifyListeners(PCT_END_CAPTURE, iface); } COM: <s> ends the capture </s>
funcom_train/44869038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getAPoint() { if (aPoint == null) { aPoint = new WCMDrawGeometricBean(); aPoint.setShape(10); aPoint.setFillColor(Color.red); aPoint.setColor(Color.red); aPoint.setX1(getAInput()); aPoint.setY1(getFOfA()); aPoint.setV(3); aPoint.setH(3); if (presentation) { aPoint.setV(5); aPoint.setH(5); aPoint.setLineWidth(3); } } return aPoint; } COM: <s> this method initializes a point </s>
funcom_train/40356697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "CompassClassMapping: mappedClass=[" + mappedClass + "], mappedClassSuperClass=[" + mappedClassSuperClass + "], alias=[" + alias + "], root=[" + root + "], poly=[" + poly + "], extend=[" + extend + "], propertyMappings=[" + propertyMappings + "]"; } COM: <s> provide a useful string </s>
funcom_train/12652027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLocation() { int code = generator.nextInt(); // Ensure that the holder is empty Procedure procedure = new Procedure(); assert procedure.getLocation() == null : "Location not null " + procedure.getLocation(); // Test the set and get procedure.setLocation(new CharacteristicCode(code)); assert new CharacteristicCode(code).equals(procedure.getLocation()) : "Characteristic " + code + " not contained in procedure " + procedure; } COM: <s> test location field </s>
funcom_train/44309902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjectOrder(Class[] classes) { m_classes = classes; m_accessEventHandlers = new HashMap<Class<?>, ObjectAccessEventHandler>(); ObjectAccessEventHandler defHandler = new ObjectAccessEventHandler.EmptyAccessEventHandler(); for(Class<?> cls : classes) { m_accessEventHandlers.put(cls, defHandler); } } COM: <s> provide a dependency ordering for the objects in the model </s>
funcom_train/30132778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWorkflowContents(java.lang.String param){ if (localWorkflowContents == null){ localWorkflowContents = new java.lang.String[]{}; } java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localWorkflowContents); list.add(param); this.localWorkflowContents = (java.lang.String[])list.toArray( new java.lang.String[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/804401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performFinish() { //Get filename from wizard page String filename = filePage.getFileName() + filePage.getExtension(); //Get folder to install in from wizard page IBioResource parentFolder = filePage.getSelectedFolder(); CMLSpectrum spec= createNewCMLSpectrum(); this.createNewSpectrum(filename, parentFolder, spec); return true; } COM: <s> this method is called when finish button is pressed in the wizard </s>
funcom_train/3718223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateFile(GeneratedClass gc, String packageName, String filename) { //fg.storeFile(gc, filename, packageName); try { fg.storeFile(gc, packageName, filename); } catch (IOException e) { System.err.println(e.getMessage()); } } COM: <s> this method is used to generate a file containng the generated class </s>
funcom_train/27738871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addUDPFailover(RemoteFileDesc file) { synchronized (UDP_FAILOVER) { byte[] key = file.getClientGUID(); AtomicInteger requests = UDP_FAILOVER.get(key); if (requests == null) { requests = new AtomicInteger(0); UDP_FAILOVER.put(key, requests); } requests.addAndGet(1); } } COM: <s> adds the necessary data into udp failover so that a push failover requestor </s>
funcom_train/22277832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean dragDropped(DragSession session) { Object theItem; if (!isEnabled() || session.source() == this) { return false; } theItem = session.data(); if (theItem == null || !(theItem instanceof Color)) { return false; } setColor((Color)theItem); sendCommand(); return true; } COM: <s> drag and drop destination support method called when the user </s>
funcom_train/28158641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillCircle(final Circle c, final Point pos) { fillOval( pos.x() + c.getCenter().x() - c.getRadius(), pos.y() + c.getCenter().y() - c.getRadius(), c.getRadius() * 2, c.getRadius() * 2 ); } COM: <s> draw a filled circle </s>
funcom_train/35274758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTerrainLodCamera(JmeNode jmeRootNode) { Camera camera = SceneApplication.getApplication().getCamera(); com.jme3.scene.Node root = jmeRootNode.getLookup().lookup(com.jme3.scene.Node.class); TerrainUtils.enableLodControl(camera, root); } COM: <s> terrain has a lod control that requires the camera to function </s>
funcom_train/8763415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getViewPanel() { if (viewPanel == null) { viewPanel = new JPanel(); viewPanel.setLayout(new BorderLayout()); // Canvas canvas = defView.getCanvas(); JmeContext canvas = ModelUtil.createCanvas(640, 480, modelRepository.getModelContext()); this.canvasContext = canvas; viewPanel.add(canvas.getCanvas()); } return viewPanel; } COM: <s> this method initializes view panel </s>
funcom_train/24002486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(double x,final AsyncCallback<Boolean> callback) { synchronized (lock) { print(x,new AsyncCallback<Boolean>() { public void onSuccess(Boolean b) { println(callback); } public void onFailure(Throwable t) { callback.onFailure(t); } }); } } COM: <s> prints a double precision floating point number and then terminates the </s>
funcom_train/32636240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOneCompleteOneIncompletePartition() { int dataLen = PARTITION_LENGTH + 1; byte[] data = new byte[dataLen]; Arrays.fill(data, (byte)4); wu.setData(data); wu.save(); reinitializeHibernate(); wu = WorkUnit.findAll()[0]; byte[] savedData = wu.getData(); assertTrue(savedData.length == dataLen); for (byte datum : savedData) { assertTrue(datum == (byte)4); } } COM: <s> tests saving data with partition length length 2 partition length </s>
funcom_train/33704900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initCaller( boolean full ) { StackTraceElement caller = getCallerStackTraceElement(); this.name = caller.getClassName(); lineNumber = caller.getLineNumber(); method = caller.getMethodName(); classname = caller.getClassName(); if ( full ) { this.name = this.name + "." + caller.getMethodName(); } requiresFullInit = false; } COM: <s> get the name of the calling classname </s>
funcom_train/24119281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String doGetZkVersion() { final String version = Executions.getCurrent().getDesktop().getWebApp().getVersion(); final String build = Executions.getCurrent().getDesktop().getWebApp().getBuild(); return "ZK " + version + " EE" + " / build : " + build; } COM: <s> returns the used zk framework version and build number </s>
funcom_train/43245110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInsuranceCompanyOptions() throws Exception { System.out.println("getInsuranceCompanyOptions"); String securitytoken = secToken; RefDataServicesImpl instance = new RefDataServicesImpl(); String[] result = instance.getInsuranceCompanyOptions(securitytoken); assertTrue(result.length>0); } COM: <s> test of get insurance company options method of class org </s>
funcom_train/19765273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getUpdateLocation() { if (updateLocation == null) {//GEN-END:|16-getter|0|16-preInit // write pre-init user code here updateLocation = new Command("\u6211\u7684\u4F4D\u7F6E", Command.SCREEN, 0);//GEN-LINE:|16-getter|1|16-postInit // write post-init user code here }//GEN-BEGIN:|16-getter|2| return updateLocation; } COM: <s> returns an initiliazed instance of update location component </s>
funcom_train/10498149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int tokenize(StringBuilder sb, String path, int index){ String[] tokens = path.split("/"); for (String s: tokens) { if (s.length()==0) continue; sb.append("name").append(index++) .append("=").append(s).append(","); } return index; } COM: <s> this takes a path such as a b c and converts it to </s>
funcom_train/4378157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseObject handle(InputStream in) { Hashtable properties; UpdateResponse response = null; try { properties = RSFMUtils.loadProperties(in); response = new UpdateResponse((String)properties.get("fm.radiostation.player_version"), (String) properties.get("updateurl")); } catch (IOException e) { e.printStackTrace(); RSFMUtils.debug("Cannot parse remote version information. "+e.getMessage(), this); } return response; } COM: <s> reads the version property file for latest version and update url </s>
funcom_train/39273838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShortUnits() { String units = (getUnits() == null) ? ConstantValues.STRING_BLANK : getUnits(); if (units.equals(ConstantValues.STRING_KILOMETERS)) { return ConstantValues.STRING_KILOMETERS_SHORT; } else if (units.equals(ConstantValues.STRING_MILES)) { return ConstantValues.STRING_MILES_SHORT; } else { return null; } } COM: <s> get the abbreviated value of the form beans em units em </s>
funcom_train/28355443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected void addCenteredComponentToBox(Component component, Box box) { int margin = 3; Box rowBox = new Box(HORIZONTAL); rowBox.add( Box.createHorizontalStrut(margin) ); rowBox.add(component); rowBox.add( Box.createHorizontalStrut(margin) ); box.add(rowBox); rowBox.setMaximumSize( rowBox.getPreferredSize() ); } COM: <s> convenience method to add the component centered in the specified box </s>
funcom_train/36853034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveUserContactsPhotos(String userName,int limit) throws IOException, SAXException, FlickrException{ ContactsInterface contactInterface = flickr.getContactsInterface(); PeopleInterface peopleInterface = flickr.getPeopleInterface(); User user = peopleInterface.findByUsername(userName); Collection contactList = contactInterface.getPublicList(user.getId()); for(Object ou:contactList){ Contact contact = (Contact)ou; saveUserPhotos(contact.getUsername(), limit); } } COM: <s> save public photos of a users contacts </s>
funcom_train/11319455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataContext getDataContext(HttpServletRequest request) { if (sessionScope) { HttpSession session = request.getSession(true); DataContext dataContext = (DataContext) session.getAttribute(ServletUtil.DATA_CONTEXT_KEY); if (dataContext == null) { synchronized (session) { dataContext = createDataContext(); session.setAttribute(ServletUtil.DATA_CONTEXT_KEY, dataContext); } } return dataContext; } else { return createDataContext(); } } COM: <s> return a data context instance </s>
funcom_train/13631115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matf transpose() { Matf tmp = new Matf(nCol, nRow); for (int i = 0; i < nRow; i++) { for (int j = 0; j < nCol; j++) { tmp.set(j, i, get(i, j)); } } return tmp; } COM: <s> returns transpose of this matrix creates new matrix </s>
funcom_train/50879489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getComparison(){ int tempComparison = AttributeFilter.ATTRIBUTE_EQUALS; if (myComboComparisons.getSelectedIndex() == 1) tempComparison = AttributeFilter.ATTRIBUTE_GREATER; if (myComboComparisons.getSelectedIndex() == 2) tempComparison = AttributeFilter.ATTRIBUTE_LESS; return tempComparison; } COM: <s> retrieve the comparison to use </s>
funcom_train/17395055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findSegment(Point2D p) { Point2D p1; Point2D p2; for (int i = 0; i < points.size() - 1; i++) { p1 = points.get(i); p2 = points.get(i + 1); if (Geom.lineContainsPoint(p1, p2, p)) { return i; } } return -1; } COM: <s> gets the segment of the polyline that is hit by the given point </s>
funcom_train/7965310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String registerSlave(String slaveName) { String slaveId = SlaveIdGenerator.generateId(slaveName); SlaveInformation slaveInfo = new SlaveInformation(); slaveManager.addSlave(slaveId, slaveInfo); statisticsManager.addSlave(slaveId); logger.log(Level.FINE, "Slave " + slaveName + " assigned with slave ID: " + slaveId.toString()); return slaveId; } COM: <s> registers slave in the slave registry </s>
funcom_train/7380892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Money valueInCurrency(final Currency toCurrency, final CurrencyExchange currencyExchange) { if (currency.equals(toCurrency)) { return this; } else if (amount.compareTo(BigDecimal.ZERO) == 0) { return new Money(BigDecimal.ZERO, toCurrency); } else { return new Money(amount.multiply(currencyExchange.calculateExchangeRate( currency, toCurrency)), toCurrency); } } COM: <s> converts this money to the given currency using the exchange rate provided </s>
funcom_train/49852773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Algorithm configure() throws JMException { Algorithm algorithm; QualityIndicator indicators; // Creating the problem algorithm = new RandomSearch(problem_); // Algorithm parameters algorithm.setInputParameter("maxEvaluations", maxEvaluations_); // Creating the indicator object if (!paretoFrontFile_.equals("")) { indicators = new QualityIndicator(problem_, paretoFrontFile_); algorithm.setInputParameter("indicators", indicators); } // if return algorithm; } // Constructor COM: <s> configure the mocell algorithm with default parameter settings </s>
funcom_train/11344761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { try { m_clazz = m_factory.loadClass(m_className); } catch (ClassNotFoundException e) { m_logger.log(Logger.ERROR, "[" + m_name + "] Class not found during the loading phase : " + e.getMessage(), e); stop(); return; } } COM: <s> loads the manipulated class </s>
funcom_train/34080156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void allpass_res(double freq, double qfact) { bandpass_res(freq, qfact); zertyp[0] = 2; zertyp[1] = 0; System.arraycopy(pol, 0, zer, 0, 2); cmulr(zer, 0, 1.0 / (zer[0] * zer[0] + zer[1] * zer[1])); } COM: <s> setup poles zeros for an allpass resonator </s>
funcom_train/50912339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLSymmetry getNonTranslations() { CMLSymmetry newSymmetry = new CMLSymmetry(); CMLElements<CMLTransform3> symmetryElements = this.getTransform3Elements(); for (CMLTransform3 tr : symmetryElements) { if (!tr.hasNonZeroTranslationComponent() && !tr.isUnit()) { newSymmetry.addTransform3(new CMLTransform3(tr)); } } return newSymmetry; } COM: <s> gets all symmetry operations that do not have translations </s>